@graphty/algorithms / index / breadthFirstSearch
Function: breadthFirstSearch() ​
breadthFirstSearch(
graph,startNode,options):TraversalResult
Defined in: algorithms/traversal/bfs-unified.ts:46
Perform breadth-first search starting from a given node
Automatically uses the most optimized implementation based on graph size. No configuration needed - just call this function for the best performance.
Parameters ​
graph ​
The input graph to traverse
startNode ​
The node to start the BFS from
options ​
TraversalOptions = {}
Traversal options (callbacks, target node, etc.)
Returns ​
Traversal result with visited nodes, order, and tree structure