A graph with explicit edges.
The number of vertices and edges may be infinite in which case the user has to take care not to call methods which
will not return (this is similar to an Iterable which may contain an infinite number of elements).
The same applies for the neighbors or adjacent edges of a vertex.
no type hierarchy
| Attributes | |
edges | Source Codeshared formal {E*} edgesAll edges of the graph. |
| Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: AdjacencyGraph<V> |
| Methods | |
adjacentEdges | Source Codeshared default {E*} adjacentEdges(V vertex)The adjacent edges of the given vertex. A directed edge is adjacent if it is outgoing. The edges are answered such that the following conditions hold: edge.source == vertex neighbors(vertex).contains(edge.target) |
containsEdge | Source Codeshared actual default Boolean containsEdge(V source, V target)Answer whether the graph contains an edge from source to target. Refines AdjacencyGraph.containsEdge |
forEachAdjacentEdge | Source Codeshared void forEachAdjacentEdge(V vertex, void action(E edge))Apply action(E) for each adjacent edge of the given vertex. |
hasNeighbors | Source Codeshared actual default Boolean hasNeighbors(V vertex)Answer whether the given vertex has at least one neighbor. Refines AdjacencyGraph.hasNeighbors |
neighbors | Source Codeshared actual default {V*} neighbors(V vertex)All neighbor vertices of the given vertex. A neighbor is the target of an outgoing directed edge or the other endpoint of an undirected edge. Refines AdjacencyGraph.neighbors |
| Inherited Methods |
Methods inherited from: Object |
Methods inherited from: AdjacencyGraph<V> |