effect-io-ai

Package: effect
Module: Graph

Graph.successors

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

When to use

Use when you need the nodes reached by following outgoing edges from a node in a directed graph.

Gotchas

Throws a GraphError when used with an undirected graph.

See

Signature

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

Source

Since v4.0.0