effect-io-ai

Package: effect
Module: Graph

Graph.SearchConfig

Configuration for DFS, BFS, and postorder graph traversals.

When to use

Use to configure the starting node indices and edge-following direction for lazy graph traversals.

Details

start supplies the node indices where traversal begins. If it is omitted, the iterator is empty. direction chooses whether traversal follows outgoing edges, incoming edges, or ignores edge direction. radius limits traversal by edge distance from the nearest start node.

Gotchas

Traversal creation throws a GraphError when any configured start node does not exist.

See

Signature

export interface SearchConfig {
  readonly start?: Array<NodeIndex>
  readonly direction?: TraversalDirection
  readonly radius?: number
}

Source

Since v3.18.0