Search for containing frontier from high to low, cutting execution time by over 25%. (2:10 to 1:32 in my test)

This commit is contained in:
Nathan Braswell
2016-04-19 16:58:30 -04:00
parent 0961636ab0
commit e2ff94a90b

View File

@@ -457,7 +457,7 @@ obj gss (Object) {
edges.set(make_pair(start,end), edge)
}
fun get_containing_frontier(node: *tree<int>): int {
for (var i = 0; i < data.size; i++;)
for (var i = data.size-1; i >= 0; i--;)
if (data[i].contains(node))
return i
return -1