TraversalResult

com.phasmidsoftware.gryphon.traverse.TraversalResult
See theTraversalResult companion object
trait TraversalResult[V, T]

A trait that defines the behavior of traversal over vertices and edges within a graph-like structure.

Type parameters

T

the resulting type after traversing a vertex or an edge.

V

the type representing a vertex in the graph.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class EdgeTraversalResult[V, E, T]
class Connexions[V, E]
class TopologicalSort[V]
class VertexTraversalResult[V, T]
Show all

Members list

Value members

Abstract methods

def edgeTraverse(x: Int): T

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

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

Value parameters

x

the index of the edge traversed

Attributes

Returns

the corresponding value of T

def keySet: Set[V]

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.

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

def vertexTraverse(v: V): 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.