Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a data type for determining the strong components in a digraph. The id operation determines in which strong component a given vertex lies; the areStronglyConnected operation determines whether two vertices are in the same strong component; and the count operation determines the number of strong components. The component identifier of a component is one of the vertices in the strong component: two vertices have the same component identifier if and only if they are in the same strong component.

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

Type parameters

  • V

Hierarchy

  • StronglyConnectedComponents

Implemented by

Index

Methods

count

  • count(): number
  • Returns the number of strong components.

    Returns number

    the number of strong components

id

  • Returns the component id of the strong component containing vertex v.

    Parameters

    Returns number

    the component id of the strong component containing vertex v or -1 if the vertex is not in the graph.

stronglyConnected

  • Are vertices v and w in the same strong component?

    Parameters

    Returns boolean

    true if vertices v and w are in the same strong component, and false otherwise

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