Hi,

> What about cycles?
> 
>  A --knows--> B --knows--> C --knows--> A    # or
>  A --knows--> B --knows--> C --knows--> B
> 
> Will the traverser follow these? Or does it maintain a map of seen edges
> and/or vertices so it will avoid cycles?

When doing //, it remembers previously seen elements and then halts that 
particular path when that element has been seen again. However, there are many 
many many paths in any complex enough graph (so usually this is just a memory 
and time explosion). Thus, // is usually avoided --- instead a 
while/foreach/repeat loop is usually opted for.


> Also, this raises the question of traversal order: Let's assume that
> A --knows--> B, C and D. Is there an order specified for going along the
> edges, such as *document order* in XSLT? Or are edges specified to be
> unordered, such as attributes in XDM (XPath Data Model)?

The traversal order is determined by how the underlying graph database serves 
up its results. So its different for different graph databases having the same 
graph data.

Take care,
Marko.

http://markorodriguez.com
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to