This also seems like a case of finding paths from A to D... look at the graph-algo component for a couple of algorithms which could be of use to you.
2010/3/3 Gutemberg Vieira <gutemberg.lis...@gmail.com>: > This is the same case as the previous thread entitled Extracting a Subgraph. > > I think that each time you get a node from the Traverser you must check for > relationships with previous returned nodes. > > Another solution could be to build your own Traverser, returning custom a > TraverserPosition even when a node is duplicated. You could problably borrow > some code from current Traverser implementations. > > But I am a neo4j begginer too, may be wrong! > > []s > Gutemberg > > On Tue, Mar 2, 2010 at 3:41 PM, Jan Vejsada <jvejs...@gmail.com> wrote: > >> Hi. I have a simple diamond shaped graph: >> >> A --- B >> | | >> C --- D >> >> Traversing from A results in B,C,D. >> But what I'm interested in is the structure of the graph, not just the set >> of nodes. In other words, I need to know that both B and C are connected to >> D. >> If this was a social network, I'd want to know that (from the point of view >> of A, D is a friend of both B and C). >> Is there a way of doing this in a single traversal? >> >> Thanks. >> jan >> _______________________________________________ >> Neo mailing list >> User@lists.neo4j.org >> https://lists.neo4j.org/mailman/listinfo/user >> > _______________________________________________ > Neo mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [matt...@neotechnology.com] Neo Technology, www.neotechnology.com _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user