You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2016/04/29 16:52:12 UTC
[jira] [Created] (TINKERPOP-1284) StarGraph does not handle
self-loops correctly.
Marko A. Rodriguez created TINKERPOP-1284:
---------------------------------------------
Summary: StarGraph does not handle self-loops correctly.
Key: TINKERPOP-1284
URL: https://issues.apache.org/jira/browse/TINKERPOP-1284
Project: TinkerPop
Issue Type: Bug
Components: hadoop, structure
Affects Versions: 3.1.2-incubating, 3.2.0-incubating
Reporter: Marko A. Rodriguez
{code}
gremlin> graph = TinkerGraph.open()
==>tinkergraph[vertices:0 edges:0]
gremlin> v = graph.addVertex()
==>v[0]
gremlin> v.addEdge("self",v)
==>e[1][0-self->0]
gremlin>
gremlin> g = graph.traversal()
==>graphtraversalsource[tinkergraph[vertices:1 edges:1], standard]
gremlin> g.V(0)
gremlin> g.V(0l)
==>v[0]
gremlin> g.V(0l).bothE()
==>e[1][0-self->0]
==>e[1][0-self->0]
gremlin> g.V(0l).outE()
==>e[1][0-self->0]
gremlin> g.V(0l).inE()
==>e[1][0-self->0]
gremlin>
/////////
gremlin> starGraph = org.apache.tinkerpop.gremlin.structure.util.star.StarGraph.of(v)
==>stargraph[starOf:v[0]]
gremlin> sg = starGraph.traversal()
==>graphtraversalsource[stargraph[starOf:v[0]], standard]
gremlin> sg.V(0l)
==>v[0]
gremlin> sg.V(0l).bothE()
==>e[1][0-self->0]
gremlin> sg.V(0l).outE()
gremlin> sg.V(0l).inE()
==>e[1][0-self->0]
gremlin>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)