Options
All
  • Public
  • Public/Protected
  • All
Menu

The DirectedPaths class represents a data type for finding shortest paths (number of edges) from a source vertex that was used to create instance of DirectedPaths (or set of source vertices) to every other vertex in the digraph.

For additional documentation, see Section 4.2 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

Type parameters

  • V

Hierarchy

  • DirectedPaths

Implemented by

Index

Methods

Methods

hasPathTo

  • hasPathTo(v: Vertex<V>): boolean
  • Is there a directed path from the source (or sources) to vertex v?

    Parameters

    Returns boolean

    true if there is a directed path, false otherwise. Also returns false if the vertex is not in the graph.

pathTo

  • Returns a shortest path from source (or sources) to vertex v, or empty collection if no such path.

    Parameters

    Returns Collection<Vertex<V>>

    the sequence of vertices on a shortest path, as a Collection.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc