-
Notifications
You must be signed in to change notification settings - Fork 135
Phase 2 Node paths
rdvdijk edited this page Sep 26, 2012
·
1 revision
n1.all_paths_to(n2).incoming(:friends).depth(4) # Gets all paths of a specified type
n1.all_simple_paths_to(n2).incoming(:friends).depth(4) # for the relationships defined
n1.all_shortest_paths_to(n2).incoming(:friends).depth(4) # at a maximum depth
n1.path_to(n2).incoming(:friends).depth(4) # Same as above, but just one path.
n1.simple_path_to(n2).incoming(:friends).depth(4)
n1.shortest_path_to(n2).incoming(:friends).depth(4)
n1.shortest_path_to(n2).incoming(:friends).depth(4).rels # Gets just relationships in path
n1.shortest_path_to(n2).incoming(:friends).depth(4).nodes # Gets just nodes in path