pub fn bidirectional_search<N, E, Ix>(
graph: &Graph<N, E, Ix>,
start: &N,
goal: &N,
) -> Result<Option<Vec<N>>>
Expand description
Performs bidirectional breadth-first search to find a path between two nodes
This algorithm searches from both the start and goal nodes simultaneously, which can be more efficient than unidirectional search for finding paths in large graphs.
§Arguments
graph
- The graph to searchstart
- The starting nodegoal
- The goal node
§Returns
Result<Option<Vec<N>>>
- The path from start to goal, or None if no path exists