Options
All
  • Public
  • Public/Protected
  • All
Menu

The DepthFirstOrder class represents a data type for determining depth-first search ordering of the vertices in a digraph or edge-weighted digraph, including preorder, postorder, and reverse postorder.

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

Type parameters

  • V

Hierarchy

  • DepthFirstOrder

Implemented by

Index

Methods

post

postorderNumber

  • postorderNumber(v: Vertex<V>): number
  • Returns the postorder number of vertex v.

    Parameters

    Returns number

    the postorder number of vertex v or -1 if the vertex is not in the graph.

pre

preorderNumber

  • preorderNumber(v: Vertex<V>): number
  • Returns the preorder number of vertex v.

    Parameters

    Returns number

    the preorder number of vertex v or -1 if the vertex is not in the graph.

reversePost

  • Returns the vertices in reverse postorder.

    Returns Collection<Vertex<V>>

    the vertices in reverse postorder, as an iterable of vertices

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