Does Gremlin provides BFS or DFS in Java API?

196 views
Skip to first unread message

Li Irene

unread,
Oct 30, 2015, 6:48:08 AM10/30/15
to Gremlin-users
New to Gremlin, just wondering if it provides the basic traversal method like BFS or DFS? 
Thanks!

Lev Givon

unread,
Oct 30, 2015, 7:51:57 AM10/30/15
to gremli...@googlegroups.com
Received from Li Irene on Fri, Oct 30, 2015 at 05:59:47AM EDT:
> New to Gremlin, just wondering if it provides the basic traversal method
> like BFS or DFS?
> Thanks!

Yes - you can do both depending upon how you structure your pipeline:

https://github.com/tinkerpop/gremlin/wiki/Depth-First-vs.-Breadth-First
--
Lev Givon
Bionet Group | Neurokernel Project
http://lebedov.github.io/
http://neurokernel.github.io/

Marko Rodriguez

unread,
Oct 30, 2015, 9:14:10 AM10/30/15
to gremli...@googlegroups.com
Hello,

If you are just starting, please use Gremlin3.

Next, Gremlin3 in OLTP is depth-first, however, if you use barrier(), you can make it breadth-first.
Gremlin3 in OLAP is inherently breadth-first.

HTH,
Marko.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/20151030115147.GZ5787%40avicenna.ee.columbia.edu.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages