Expand description
Route-finding algorithms.
This module defines the Algorithm trait and built-in implementations. New algorithms can be added by implementing the trait.
Algorithms are generic over their preferred graph type, allowing them to use different graph crates (petgraph, custom, etc.) and leverage built-in algorithms.
§Adding a New Algorithm
External: Implement the Algorithm trait in your own crate and plug it
into a WorkerPoolBuilder via
with_algorithm. No changes
to fynd-core required. See the custom_algorithm example.
Built-in: To add an algorithm to the built-in registry:
- Create a new module with your algorithm implementation
- Implement the
Algorithmtrait - Register it in
registry.rs
Re-exports§
pub use bellman_ford::BellmanFordAlgorithm;pub use most_liquid::MostLiquidAlgorithm;
Modules§
- bellman_
ford - Bellman-Ford algorithm with SPFA optimization for simulation-driven routing.
- most_
liquid - Most Liquid algorithm implementation.
Structs§
- Algorithm
Config - Configuration for an Algorithm instance.
Enums§
- Algorithm
Error - Errors that can occur during route finding.
- NoPath
Reason - Reason why no path was found between tokens.
Traits§
- Algorithm
- Trait for route-finding algorithms.