Skip to main content

dijkstra_path

Function dijkstra_path 

Source
pub fn dijkstra_path(
    graph: &KnowledgeGraph,
    source: &str,
    target: &str,
    min_confidence: f64,
) -> Option<(Vec<String>, f64, Vec<EdgeDetail>)>
Expand description

Dijkstra shortest path using edge weights.

Cost = 1.0 / edge.weight (higher weight = shorter distance). Optionally filters edges below min_confidence score. Returns (path, total_cost, edge_details) or None if no path exists.