Package: effect
Module: Graph
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
dfs for depth-first traversalbfs for breadth-first traversaldfsPostOrder for depth-first postorder traversalSignature
export interface SearchConfig {
readonly start?: Array<NodeIndex>
readonly direction?: TraversalDirection
readonly radius?: number
}
Since v3.18.0