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 Rodriguez <ok...@gmail.com> on 2015/03/19 16:22:50 UTC
Core API Update -- Vertex.edges(Object…)
Hi,
I think we should add the following method to the core Vertex API.
Iterator<Edge> edges = vertex.edges(1,2,3)
This method can turn O(N) operations in OLAP to O(1). For instance, when you need to attach a detached edge to a vertex (OLAP message pass), the way it currently does it is iterate through the edges of the vertex until it finds itself. This is an O(N) operation, where N is the number of incident edges to the vertex.
This comes into play on operations traversals like g.V.outE.
I believe, though not certain, that this O(N) behavior is also in Gremlin I/O and Gremlin Server.
Thoughts?,
Marko.
http://markorodriguez.com