g.v('125582').as('s1').both().loop('s1'){it.loops<=4}.dedup()
g.v('125582').as('s1').both().dedup().loop('s1'){it.loops<=4}
--
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/8c007500-86d4-493c-ac2b-586710eb19d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
g.v('125582').as('s1').both().dedup().loop('s1') {it.loops<=4}
x = [] as Set; g.v('125582').as('s1').both().except(x).store(x).loop('s1') {it.loops<=4}.iterate(); x
--
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/39c92b66-72c9-4dab-8d16-b8668bccccae%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/2392de95-9de4-4137-9693-22e7b1491b12%40googlegroups.com.
e = [] as Set; x._().as("x").bothE().as("e").bothV().except("x").retain(x).back("e").fill(e)
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/56058665-1bdf-4c65-843d-7ee076ca55c9%40googlegroups.com.
e = [] as Setx = [] as Setg.v('125582').as('s1').bothE().as('e').bothV().except('s1').except(x).sideEffect { v, m -> x << v; e << m.e }.loop('s1') {it.loops<=4}.iterate()x // contains all verticese // contains all edges
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/55a94d0c-3ca5-467d-a6ea-383f312a227f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/de7a8f3e-f52e-4a32-9518-b76bf5f6927e%40googlegroups.com.
g = new TinkerGraph();for ( i in 1..60 ) {def v0 = g.getVertex(i) ?: g.addVertex(i);def v1 = g.getVertex(i-1) ?: g.addVertex(i-1);def v2 = g.getVertex(i+2) ?: g.addVertex(i+2);def v3 = g.getVertex(i+3) ?: g.addVertex(i+3);g.addEdge(null, v0, v1, "r");g.addEdge(null, v0, v2, "r");g.addEdge(null, v0, v3, "r")}
gremlin> x = [] as Set; g.v('32').as('s1').both().except(x).store(x).loop('s1') {it.loops<=4}.iterate(); x.count()
==>25
gremlin> e = [] as Set; x._().as("x").bothE().as("e").bothV().except("x").retain(x).back("e").fill(e); e.count()
==>69
g.v('32').as('s1').bothE().as('e').bothV().except('s1').except(x).sideEffect { v, m -> x << v; e << m.e }.loop('s1') {it.loops<=4}.iterate(); x.count()
==>24
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/351e79c0-5095-45b4-bce3-cfec30446f28%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/9468d616-93c1-480b-9572-9bfd7baddf40%40googlegroups.com.