TraversalResult

com.phasmidsoftware.gryphon.traverse.TraversalResult
See theTraversalResult companion trait

Provides graph traversal functionality using depth-first search (DFS) for vertex traversal.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def edgeTraversal[V, E, T](f: Edge[V, E] => T)(traversable: EdgeTraversable[V, E]): TraversalResult[Int, T]

Performs a traversal over the edges of a graph and applies a function to each edge, returning the results as a TraversalResult object.

Performs a traversal over the edges of a graph and applies a function to each edge, returning the results as a TraversalResult object.

Type parameters

E

the type of the attributes associated with the edges in the graph

T

the resulting type after applying the function f to each edge

V

the type of vertices connected by the edges in the graph

Value parameters

f

a function applied to each edge, transforming each Edge[V, E] into a value of type T

traversable

the graph or data structure implementing the core.Traversable interface over edge type E

Attributes

Returns

a TraversalResult[V, T] containing the results of applying the function f to each edge of the graph

Throws
GraphException

if the provided traversable does not represent an edge graph