java api查询环路径遇到的问题
发布于 7 年前 作者 nalidao 2353 次浏览 来自 问答

使用过程中遇到一些问题: 方法1:PathFinder<Path> finder =GraphAlgoFactory.allPaths(PathExpanders.allTypesAndDirections(), 4);用这个方法可以得到11条环路径,长度是1-4, 方法2:PathFinder<Path> finder =GraphAlgoFactory.allSimplePaths(PathExpanders.allTypesAndDirections(), 4);用这个方法,只能得到一条路径,长度为1 方法3:PathFinder<Path> finder =GraphAlgoFactory.pathsWithLength(PathExpanders.allTypesAndDirections(), 4);用这个方法,一条路径都没得到 如果想得到具体某个长度的环路径,方法3是得不到的,不知道什么原因,有没有其他的方式?

关系图: ![3E$O26$)~B~U6VX)1@]177N.png](http://neo4j.6laohu.com/FqM1O20k8eha3UjItCX0Is0hj-i0)

回到顶部