Embedded Neo4J SimplePaths

49 views
Skip to first unread message

Rehan

unread,
Oct 9, 2012, 11:46:05 PM10/9/12
to ne...@googlegroups.com
Hi , 

Can any one put a quick example in Java for  how we can  get All Simple Paths (with no loops) between two nodes. 

Thanks and Best Regards, 

Rehan

杨军

unread,
Oct 10, 2012, 2:44:32 AM10/10/12
to ne...@googlegroups.com
 Expander expander = Traversal.expanderForTypes(TopoRels.LINK, Direction.BOTH);
        expander = expander.addRelationsipFilter(new ValuePredicate(minWeightValue, Consts.PROP_WEIGHT));
        PathFinder<Path> pathFinder = GraphAlgoFactory.allSimplePaths(expander, maxNodeNum);
        Iterable<Path> paths = pathFinder.findAllPaths(startNode, endNode);

2012/10/10 Rehan <rehan...@gmail.com>

Rehan

--
 
 



--
Best regards,
yang jun
Tel: 028-85126877
Mob: 18608027881 <mailto:yangjun...@gmail.com>
Chat: yangjun...@gmail.com(gtalk)

Mattias Persson

unread,
Oct 10, 2012, 9:03:10 AM10/10/12
to ne...@googlegroups.com
GraphAlgoFactory#allSimplePaths

2012/10/10 杨军 <yangjun...@gmail.com>
--
 
 



--
Mattias Persson, [mat...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
Reply all
Reply to author
Forward
0 new messages