effect-io-ai

Package: effect
Module: Graph

Graph.predecessors

Returns the incoming neighbor node indices for a node in a directed graph.

Throws a GraphError when used with an undirected graph.

Signature

declare const predecessors: <N, E>(graph: Graph<N, E, "directed"> | MutableGraph<N, E, "directed">, nodeIndex: NodeIndex) => Array<NodeIndex>

Source

Since v3.22.0