Class RecursorContext<TGraph>

Represents a context for graph recursion.

Provides a subset of node/edge query methods similar to a graph, but with the source and target nodes passed in as the node and neighbor parameters.

Type Parameters

  • TGraph extends Graph

    The type of the graph.

Constructors

  • Type Parameters

    • TGraph extends default<Attributes, Attributes, Attributes>

    Parameters

    • graph: TGraph
    • inputNodes: Set<string>

      The nodes that were provided as input to the recursion.

    • currentInputNode: string

      The starting node of the current recursion session.

    • source: string

      The previous node in recursion.

    • target: string

      The current node in recursion.

    • path: string[]

      The path from the currentInputNode to the target node.

    Returns RecursorContext<TGraph>

Properties

currentInputNode: string

The starting node of the current recursion session.

graph: TGraph
inputNodes: Set<string>

The nodes that were provided as input to the recursion.

path: string[]

The path from the currentInputNode to the target node.

source: string

The previous node in recursion.

target: string

The current node in recursion.

Methods

Generated using TypeDoc