Type of the vertices of this graph.
Type of the data associated with edges.
Type of the label used to distiniguish different between edges with the same source and target vertex.
If no label is given, defaults to undefined
for the label.
Same as MultiGraphAdapter#addEdge, but with the data
and label
arguments
reversed for convenience.
This check if a specific labeled edge between the given vertices can be contracted. Note that cycles are not allowed, so if there exists more than one edge between the given vertices, the contraction cannot be performed as that would create a cycle.
Source vertex of the edge.
Target vertex of the edge.
Label of the edge to be deleted.
true
iff the edge can be contracted, false
otherwise.
This check if a single labeled edge between the given vertices can be contracted. Note that cycles are not allowed, so if there exists more than one edge between the given vertices, the contraction cannot be performed as that would create a cycle.
Source vertex of the edge.
Target vertex of the edge.
true
iff the edge can be contracted, false
otherwise.
This contracts two vertices, ie. all edges between the given vertices.
This contract a specific labeled edge between the given vertices. Note that cycles are not allowed, so if there exists more than one edge between the given vertices, the contraction cannot be performed as that would create a cycle.
Source vertex of the edge.
Target vertex of the edge.
Label of the edge to be deleted.
The vertex that replaces the two old vertices. If not given, defaults to from
.
true
iff the edge was contracted.
If label is undefined
, deletes all edges between the two given vertices.
Deletes the edges with the given label, which may be undefined
.
Source vertex of the edge.
Target vertex of the edge.
Label of the edge.
true
iff an edge was deleted.
Deletes a vertex from the graph; and all incident egdes.
Vertex to be deleted.
Whether the vertex was deleted. That is, it returns false
in case the given vertex was not contained in this graph.
The number of edges between two distinct vertices, ie. not including multiple edges between the same vertices.
Source vertex.
Target vertex.
How many edges there are between the two vertices.
If no label is given, defaults to undefined
for the label.
If a label is given, restricts the returned result to edges with that label.
If a label is given, restricts the returned result to edges with that label.
If a label is given, restricts the returned result to edges with that label.
If a label is given, restricts the returned result to edges with that label.
This returns the number of all edges, ie. including multiple edges between the same vertices.
The number of edges in this graph, counting each multiple edge.
Similar to MultiGraphAdapter#getEdges, but returns all edges between the vertices.
All edges between the vertices. An edge is identified by its source vertex, its target vertex and its label.
If a label is given, only returns predecessors connected to this vertex by an edge with the given label.
If a label is given, only returns successors connected to this vertex by an edge with the given label.
If no label is given, returns true iff an edge with any label exists between the two given vertices. Otherwise, returns true iff an edge with the given label exists.
Similar to MultiGraphAdapter#hasEdge, but if undefined
is
given for the label, checks whether an edge with an undefined
label exists.
Source vertex of the edge.
Target vertex of the edge.
Label the edge must have.
Whether this graph contains an edge form the given source to the target with the given label.
Creates an independent copy of this graph data structure and maps each vertex and edge datum to a new vertex and edge datum and edge label. Further changes to this graph are not reflected in the returned copy, and vice-versa.
Type of the mapped vertices.
Type of the cloned edge data.
Type of the cloned edge label.
Mapping function that takes a vertex and returns a mapped copy of it.
Mapping function that takes an edge datum and returns a mapped copy of it.
Mapping function that takes a label and returns a mapped copy of it.
A mapped copy of this graph.
If no label is given, defaults to undefined
for the label.
Creates a new graph adapter with the given options.
Type of the vertices of this graph.
Type of the data associated with edges.
Type of the label used to distiniguish different between edges with the same source and target vertex.
Options for configuring this instance.
Generated using TypeDoc
Generic graph data structure similar to CommonAdapter. It additionally supports multiple edges between two vertices. An edge is identified by its label. Labels are compared by a
Map
, ie.===
.CommonAdapter
CommonAdapter