ShortestPaths

com.phasmidsoftware.gryphon.traverse.ShortestPaths
object ShortestPaths

Computes shortest paths in a weighted directed graph using Dijkstra's algorithm. Delegates to DijkstraTraversal from the GraphTraversal family.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def dijkstra[V, E](traversable: Traversable[V], start: V)(using evidence$1: Monoid[E], evidence$2: Ordering[E], random: Random = ...): TraversalResult[V, AttributedDirectedEdge[V, E]]

Runs Dijkstra's algorithm from start, returning the shortest-path tree.

Runs Dijkstra's algorithm from start, returning the shortest-path tree.

Type parameters

E

the edge-weight type; must be Monoid and Ordering.

V

the vertex type.

Value parameters

random

controls adjacency ordering.

start

the source vertex.

traversable

the weighted directed graph.

Attributes

Returns

a TraversalResult[V, DirectedEdge[V, E]] mapping each settled vertex to its cheapest incoming edge, or None for the start vertex.

def undiscoveredEdges[V, E](traversable: Traversable[V])(v: V)(using random: Random = ...): Seq[Edge[V, E]]

Returns the directed edges reachable from v.

Returns the directed edges reachable from v.

Attributes

def undiscoveredVertices[V, E](traversable: Traversable[V])(v: V)(using random: Random = ...): Seq[V]

Returns the vertices reachable via attributed directed edges from v.

Returns the vertices reachable via attributed directed edges from v.

Attributes