No seed in the results
@@ -320,7 +320,7 @@ public class SearchEngine {
if (!nodes.contains(gid)) continue; // We accept arbitrary seed sets
- if (filter.test(gid)) {
+ if (!seed.contains(gid) && filter.test(gid)) {
probe.gid = gid;
if (!results.contains(probe)) results.add(new Result(gid, (graph.outdegree(gid) + graph.indegree(gid)) / Fast.log2(d + 2)));
}
@@ -427,8 +427,6 @@ public class SearchEngine {
bfs(stitchedGraph, true, seed, filter, results);
visitTime += System.nanoTime();
- results.removeAll(seed);
-
LOGGER.debug("Found " + results.size() + " reachable nodes");
final Result[] array = results.toArray(new Result[0]);
@@ -554,8 +552,6 @@ public class SearchEngine {
LOGGER.debug("Found " + (results.size() - sizeBefore) + " coreachable nodes");
}
- results.removeAll(seed);
-
LOGGER.debug("Found overall " + results.size() + " coreachable nodes");
final Result[] array = results.toArray(new Result[0]);
