Adds the given edge to the underlying dynamic graph.
Adds the given edge to the underlying dynamic graph. Note that for efficiency we don't check if the edge already exists, so if the edge already exists, a 2nd copy of it will be added.
Called by other methods when given an id that doesn't exist in this graph.
Called by other methods when given an id that doesn't exist in this graph. By default it throws an exception, but implementations can override it to return an IndexedSeq which is the neighbor seq of non-existing nodes (typically an empty IndexedSeq).
The number of edges in this graph.
The number of edges in this graph.
Returns the number of in-neighbors of the given id.
Returns the number of in-neighbors of the given id.
Returns the in-degree of the given node id, or 0 if the node id does not exist.
Returns the in-degree of the given node id, or 0 if the node id does not exist.
Returns the ith in-neighbor of the node with the given id.
Returns the ith in-neighbor of the node with the given id. Throws IndexOutOfBoundsException unless 0 <= i < inDegree(id).
Returns the in-neighbors of the given id as a java.util.List.
Returns the in-neighbors of the given id as a java.util.List.
Returns the in-neighbors of the given id.
Returns the in-neighbors of the given id.
The largest node id in this graph (or an upper bound on it).
The largest node id in this graph (or an upper bound on it).
Returns the nodeCount if it is defined.
Returns the nodeCount if it is defined. Otherwise throws an UnsupportedOperationException.
The number of nodes in this graph.
The number of nodes in this graph. May return None if it is expensive to compute (for example, for the union of two graphs).
All nodeIds that exist in the graph.
All nodeIds that exist in the graph.
Returns the number of out-neighbors of the given id.
Returns the number of out-neighbors of the given id.
Returns the out-degree of the given node id, or 0 if the node id does not exist.
Returns the out-degree of the given node id, or 0 if the node id does not exist.
Returns the ith out-neighbor of the node with the given id.
Returns the ith out-neighbor of the node with the given id. Throws IndexOutOfBoundsException unless 0 <= i < outDegree(id).
Returns the out-neighbors of the given id as a java.util.List.
Returns the out-neighbors of the given id as a java.util.List.
Returns the out-neighbors of the given id.
Returns the out-neighbors of the given id.
Returns a view of the transpose of this graph.
Returns a view of the transpose of this graph.
Returns the node with the given id
or else None
if the given node does not
exist in this graph.
Returns the node with the given id
or else None
if the given node does not
exist in this graph. Deprecated: to decrease the number of objects used, get node
neighbors and degrees directly through the graph.
(Since version 1.0) Rather than using Node objects, use graph method directly
Wraps a directed graph and a dynamic directed graph to create a dynamic graph with the union of their nodes and edges. When edge are added, they are added to the underlying dynamic graph. Edge deletion is not supported.