Graphity for TypeScript 3.0.0
    Preparing search index...

    Variable EdgeTypeConst

    EdgeType: { BACK: 1; CROSS: 3; FORWARD: 2; TREE: 0 } = ...

    The type of an edge in a DFS (depth-first search), as EdgeTypes classifies the edges of a graph (Java: the enum EdgeType; here a constant object with the ordinals of the enum as values, and a type of the same name for one of them).

    A depth-first search through all nodes reaches each node once, either by a tree edge or as the root of a new search tree; the tree edges form the DFS forest. Every other edge gets its type from where its target lies relative to its source in that forest, so each edge has exactly one type. Edges.of collects the edges of one type.

    Type Declaration

    • ReadonlyBACK: 1

      An edge to an ancestor of its source in the DFS forest, or to the source itself. A graph has a cycle exactly when it has a back edge.

    • ReadonlyCROSS: 3

      An edge between two nodes of which neither is an ancestor of the other in the DFS forest: the search had finished the target before it reached the source.

    • ReadonlyFORWARD: 2

      An edge to a descendant of its source in the DFS forest, other than a tree edge.

    • ReadonlyTREE: 0

      An edge by which the search reaches its target for the first time: an edge of the forest.