pub fn bellman_ford(
store: &LpgStore,
source: NodeId,
weight_property: Option<&str>,
) -> BellmanFordResultExpand description
Runs Bellman-Ford algorithm from a source node.
Unlike Dijkstra, this algorithm handles negative edge weights and detects negative cycles.
§Arguments
store- The graph storesource- Starting node IDweight_property- Optional property name for edge weights
§Returns
Distances, predecessors, and negative cycle detection flag.
§Complexity
O(V × E)