EdgeTraversalResult

com.phasmidsoftware.gryphon.traverse.EdgeTraversalResult
case class EdgeTraversalResult[V, E, T](ts: List[T]) extends AbstractEdgeTraversalResult[T]

A case class representing the concrete implementation of edge traversal for a graph-like structure.

This class enables the traversal of edges by providing a list of precomputed results of type T associated with each edge.

Edge traversal uses the defined behavior from the AbstractEdgeTraversalResult base class, where vertexTraverse throws an exception, and edgeTraverse retrieves the traversal result from the precomputed list based on the edge index.

Type parameters

E

the type representing an edge in the graph.

T

the type of results for the edge traversal.

V

the type representing a vertex in the graph.

Value parameters

ts

a list of elements of type T representing the computed results of edge traversal.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait TraversalResult[Int, T]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def edgeTraverse(x: Int): T

Traverses a specified edge within a graph-like structure and produces a result of type T.

Traverses a specified edge within a graph-like structure and produces a result of type T.

Value parameters

x

the index of the edge to be traversed

Attributes

Returns

the result of the traversal

Inherited from:
AbstractEdgeTraversalResult
def keySet: Set[Int]

Retrieves the set of keys from the underlying map that represents the traversal result.

Retrieves the set of keys from the underlying map that represents the traversal result.

Attributes

Returns

a set of keys of type V contained in the underlying map.

Inherited from:
AbstractEdgeTraversalResult
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
def size: Int

Returns the number of key-value pairs in the map.

Returns the number of key-value pairs in the map.

Attributes

Returns

the size of the map as an integer

Inherited from:
AbstractEdgeTraversalResult
def vertexTraverse(v: Int): Option[T]

Traverses a given vertex in the graph and returns the result of the traversal.

Traverses a given vertex in the graph and returns the result of the traversal.

Value parameters

v

the vertex to be traversed.

Attributes

Returns

the result of the traversal for the provided vertex.

Inherited from:
AbstractEdgeTraversalResult