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§
source§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>
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>, DijkstraPerformance: DijkstraPerformanceData>(
&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)>,
max_node_weight_data_size: usize,
max_heap_data_size: usize,
performance_data: DijkstraPerformance
) -> DijkstraStatus<DijkstraPerformance>
pub fn shortest_path_lens<TargetMap: DijkstraTargetMap<Graph>, DijkstraPerformance: DijkstraPerformanceData>( &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)>, max_node_weight_data_size: usize, max_heap_data_size: usize, performance_data: DijkstraPerformance ) -> DijkstraStatus<DijkstraPerformance>
Compute the shortest paths from source to all targets, with given maximum weight.
max_node_weight_data_size: the maximum number of nodes for which a weight can be stored before the search aborts.
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more