effect-io-ai

Package: effect
Module: Graph

Graph.TopoConfig

Configuration for the topological sort iterator.

When to use

Use to prioritize specific zero in-degree nodes in a topological sort.

Details

initials optionally supplies zero in-degree node indices used as prioritized initial queue entries. Topological sorting still includes the other zero in-degree nodes and produces a complete topological order.

Gotchas

Throws a GraphError when any initial node has incoming edges.

See

Signature

export interface TopoConfig {
  readonly initials?: Array<NodeIndex>
}

Source

Since v3.18.0