//and non-exhaustive searches
if (regionCount > EXHAUSTIVE_SEARCH_GROUPS) {
exhaustive = Math.max(2, EXHAUSTIVE_SEARCH_GROUPS - (int)Math.ceil(Math.sqrt((regionCount - EXHAUSTIVE_SEARCH_GROUPS))));
}
Iterator permIter = perms.generate(exhaustive);
while(permIter.hasNext()) {
Object[] order = (Object[]) permIter.next();
double score = region.scoreRegion(order, 0, metadata, capFinder, context);