Options
All
  • Public
  • Public/Protected
  • All
Menu

Factory functions for creating instances of graphs' ADTs.

Index

Functions

depthFirstOrder

  • Creates an instance of DepthFirstOrder for given digraph.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to build the order.

    Returns DepthFirstOrder<V>

    implementation of DepthFirstOrder.

digraph

digraphBFS

digraphDFS

digraphFromEdges

  • Creates new Digraph with given egdes.

    Type parameters

    • V

    Parameters

    Returns Digraph<V>

    new Digraph with given egdes.

digraphFromEdgesKeys

  • digraphFromEdgesKeys(edges: [string, string][]): Digraph<string>
  • Creates new instance of Digraph from given keys of its edges. It means that for every pair like ['key1', 'key2'] it creates pair of vertices [V1('key1', 'key1'), V2('key2', 'key2'] and adds this pair of vertices as the edge (V1->V2).

    Parameters

    • edges: [string, string][]

      pairs of keys of vertices that describe edges.

    Returns Digraph<string>

    new digraph with given edges.

directed

  • Creates an instance of Directed for give digraph.

    Type parameters

    • V

    Parameters

    Returns Directed<V>

    implementation of Directed.

directedCycle

  • Creates new DirectedCycle that analyzes given digraph.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to analyse.

    Returns DirectedCycle<V>

    new DirectedCycle that analyzes given digraph.

directedEulerianCycle

directedEulerianPath

directedPathsBFS

  • Creates BFS-based implementation of DirectedPaths for given digraph and sources.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to find paths.

    • source: Vertex<V>

      source to find path from.

    Returns DirectedPaths<V>

    BFS-based implementation of DirectedPaths.

directedPathsDFS

  • Creates DFS-based implementation of DirectedPaths for given digraph and sources.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to find paths.

    • source: Vertex<V>

      source to find path from.

    Returns DirectedPaths<V>

    DFS-based implementation of DirectedPaths.

sccGabow

  • Creates an instance of StronglyConnectedComponents implementation that uses Gabow algorithm.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to build the order.

    Returns StronglyConnectedComponents<V>

    implementation of StronglyConnectedComponents.

sccKosarajuSharir

  • Creates an instance of StronglyConnectedComponents implementation that uses Kosaraju-Sharir algorithm.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to build the order.

    Returns StronglyConnectedComponents<V>

    implementation of StronglyConnectedComponents.

sccTarjan

  • Creates an instance of StronglyConnectedComponents implementation that uses Tarjan algorithm.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to build the order.

    Returns StronglyConnectedComponents<V>

    implementation of StronglyConnectedComponents.

topologicalOrder

  • Creates an instance of TopologicalOrder for give digraph.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to build the order.

    Returns TopologicalOrder<V>

    implementation of TopologicalOrder.

transitiveClosure

  • Creates an instance of TransitiveClosure for give digraph.

    Type parameters

    • V

    Parameters

    • dg: Digraph<V>

      digraph to build the closure.

    Returns TransitiveClosure<V>

    implementation of TransitiveClosure.

verkey

  • verkey(key: string): Vertex<string>
  • Creates new vertex with given key and with value === key.

    Parameters

    • key: string

      key of the creating vertex.

    Returns Vertex<string>

    vertex with value === key.

vertex

  • vertex<V>(key: string, value: V): Vertex<V>
  • Creates new vertex with given key and payload.

    Type parameters

    • V

    Parameters

    • key: string

      key.

    • value: V

      payload.

    Returns Vertex<V>

    new vertex.

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