Struct traitgraph_algo::dijkstra::Dijkstra
source · [−]pub struct Dijkstra<Graph: GraphBase, WeightType: DijkstraWeight, NodeWeights: NodeWeightArray<WeightType>, Heap: DijkstraHeap<WeightType, Graph::NodeIndex>> { /* private fields */ }
Expand description
Data structure for Dijkstra’s shortest path algorithm.
This variant of Dijkstra’s algorithm supports only computing the length of a shortest path, and not the shortest path itself. Therefore it does not need an array of back pointers for each node, saving a bit of memory.
Implementations
sourceimpl<WeightType: DijkstraWeight + Eq + Debug, EdgeData: DijkstraWeightedEdgeData<WeightType>, Graph: StaticGraph<EdgeData = EdgeData>, NodeWeights: NodeWeightArray<WeightType>, Heap: DijkstraHeap<WeightType, Graph::NodeIndex>> Dijkstra<Graph, WeightType, NodeWeights, Heap>
impl<WeightType: DijkstraWeight + Eq + Debug, EdgeData: DijkstraWeightedEdgeData<WeightType>, Graph: StaticGraph<EdgeData = EdgeData>, NodeWeights: NodeWeightArray<WeightType>, Heap: DijkstraHeap<WeightType, Graph::NodeIndex>> Dijkstra<Graph, WeightType, NodeWeights, Heap>
sourcepub fn shortest_path_lens<TargetMap: DijkstraTargetMap<Graph>>(
&mut self,
graph: &Graph,
source: Graph::NodeIndex,
targets: &TargetMap,
target_amount: usize,
max_weight: WeightType,
forbid_source_target: bool,
distances: &mut Vec<(Graph::NodeIndex, WeightType)>
)
pub fn shortest_path_lens<TargetMap: DijkstraTargetMap<Graph>>(
&mut self,
graph: &Graph,
source: Graph::NodeIndex,
targets: &TargetMap,
target_amount: usize,
max_weight: WeightType,
forbid_source_target: bool,
distances: &mut Vec<(Graph::NodeIndex, WeightType)>
)
Compute the shortest paths from source to all targets, with given maximum weight.
Auto Trait Implementations
impl<Graph, WeightType, NodeWeights, Heap> RefUnwindSafe for Dijkstra<Graph, WeightType, NodeWeights, Heap> where
Graph: RefUnwindSafe,
Heap: RefUnwindSafe,
NodeWeights: RefUnwindSafe,
WeightType: RefUnwindSafe,
impl<Graph, WeightType, NodeWeights, Heap> Send for Dijkstra<Graph, WeightType, NodeWeights, Heap> where
Graph: Send,
Heap: Send,
NodeWeights: Send,
WeightType: Send,
impl<Graph, WeightType, NodeWeights, Heap> Sync for Dijkstra<Graph, WeightType, NodeWeights, Heap> where
Graph: Sync,
Heap: Sync,
NodeWeights: Sync,
WeightType: Sync,
impl<Graph, WeightType, NodeWeights, Heap> Unpin for Dijkstra<Graph, WeightType, NodeWeights, Heap> where
Graph: Unpin,
Heap: Unpin,
NodeWeights: Unpin,
WeightType: Unpin,
impl<Graph, WeightType, NodeWeights, Heap> UnwindSafe for Dijkstra<Graph, WeightType, NodeWeights, Heap> where
Graph: UnwindSafe,
Heap: UnwindSafe,
NodeWeights: UnwindSafe,
WeightType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more