Abstract base class for edge traversal within a graph. This class supports traversing edges in a graph-like structure by providing a specific implementation for edge traversal while delegating the vertex traversal to throw an exception, as it is not applicable for edge-based traversal.
Type parameters
T
the type representing the result of the edge traversal
Adds a new mapping of a vertex to its corresponding traversal result to the existing map, returning a new VertexTraversalResult instance with the updated mapping.
Adds a new mapping of a vertex to its corresponding traversal result to the existing map, returning a new VertexTraversalResult instance with the updated mapping.
Value parameters
t
a tuple where the first element is a vertex of type V, and the second element is its associated traversal result of type T.
Attributes
Returns
a new VertexTraversalResult instance of type VertexTraversalResult[V, E, T] containing the updated map.
Traverses the specified vertex in the graph and retrieves the associated traversal result from the underlying map. If the vertex does not exist, a NoSuchElementException is thrown.
Traverses the specified vertex in the graph and retrieves the associated traversal result from the underlying map. If the vertex does not exist, a NoSuchElementException is thrown.
Value parameters
v
the vertex to be traversed and looked up in the map.
Attributes
Returns
the traversal result of type T associated with the provided vertex.