fix crawler deep
This commit is contained in:
@@ -118,9 +118,7 @@ public class Crawler<T> {
|
||||
if (t.isPresent()) {
|
||||
setTarget(target);
|
||||
if (count > 1 || s.isEntry(target)) {
|
||||
int maxDeep = maxSize - (s.isEntry(target) ? graph.getMinJumps() * 2 : graph.getMinJumps());
|
||||
if (maxDeep < 0) maxDeep = 0;
|
||||
found = bfs(start(s), maxDeep, count);
|
||||
found = bfs(start(s), graph.getMinLevel(), count);
|
||||
} else {
|
||||
found = dfs(start(s), t.get().getLevel() + 1);
|
||||
}
|
||||
@@ -155,9 +153,7 @@ public class Crawler<T> {
|
||||
int found = 0;
|
||||
if (t.isPresent()) {
|
||||
setTarget(target);
|
||||
int maxDeep = s.isEntry(target) ? maxSize - graph.getMinJumps() * 2 : graph.getMinLevel();
|
||||
if (maxDeep < 0) maxDeep = 0;
|
||||
found = ucs2(start(s), maxDeep, count);
|
||||
found = ucs2(start(s), graph.getMinLevel(), count);
|
||||
}
|
||||
LOG.debug("Found {} paths", found);
|
||||
callback.endSearch();
|
||||
|
||||
@@ -16,7 +16,7 @@ public interface CrawlerSpecification<T> {
|
||||
public int getGroupCount();
|
||||
|
||||
public default int getMinLands(){
|
||||
return routeSpecification() != null ? routeSpecification().matchCount() : 0;
|
||||
return routeSpecification() != null ? routeSpecification().matchCount() : 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user