I am creating Tinkergraph in gremlin.
Actually, I want to create graph of 50 nodes and they are connected via edges randomly.
I have created 50 nodes by:
(0..<50).each{graph.addVertex().property("NodeId",it)}
that creates 50 nodes.
I can't create graph properly, connecting the nodes via edges. No one node should be left.
I tried this also:
v = g.V().has("NodeId",0).next(); (0..<50).each{v.addEdge("childs",g.V().has("NodeId",it).next())}
It creates graph where all nodes are connected to the only one node.
Any ideas how to fix it?
Create Tinkergraph of 50 nodes and connected via edges.