DFSTraversal

com.phasmidsoftware.gryphon.traverse.DFSTraversal
case class DFSTraversal[V]() extends GraphTraversal[V, Unit, V]

Depth-first search traversal. E = Unit, R = V. Each visited vertex maps to itself in the result.

Type parameters

V

the vertex type.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait GraphTraversal[V, Unit, V]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def run(graph: Traversable[V])(start: V)(using random: Random = ...): TraversalResult[V, V]

Runs the traversal from start on graph, returning a TraversalResult.

Runs the traversal from start on graph, returning a TraversalResult.

Value parameters

graph

the graph to traverse.

random

controls adjacency ordering.

start

the starting vertex.

Attributes

Returns

a TraversalResult[V, R] mapping each visited vertex to its result.

Inherited methods

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