Struct traitgraph_algo::dijkstra::epoch_array_dijkstra_node_weight_array::EpochNodeWeightArray
source · pub struct EpochNodeWeightArray<WeightType> { /* private fields */ }
Expand description
An epoched node weight array that can be cleared in O(1) most of the times. Only if the epoch in the epoch array overflows, clearing takes linear time.
Trait Implementations§
source§impl<WeightType: DijkstraWeight + Copy> NodeWeightArray<WeightType> for EpochNodeWeightArray<WeightType>
impl<WeightType: DijkstraWeight + Copy> NodeWeightArray<WeightType> for EpochNodeWeightArray<WeightType>
source§fn get(&self, node_index: usize) -> WeightType
fn get(&self, node_index: usize) -> WeightType
Returns the current weight of the given node index.
source§fn get_mut<'this: 'result, 'result>(
&'this mut self,
node_index: usize
) -> &'result mut WeightType
fn get_mut<'this: 'result, 'result>( &'this mut self, node_index: usize ) -> &'result mut WeightType
Returns the current weight of the given node index as mutable reference.
Auto Trait Implementations§
impl<WeightType> RefUnwindSafe for EpochNodeWeightArray<WeightType>where WeightType: RefUnwindSafe,
impl<WeightType> Send for EpochNodeWeightArray<WeightType>where WeightType: Send,
impl<WeightType> Sync for EpochNodeWeightArray<WeightType>where WeightType: Sync,
impl<WeightType> Unpin for EpochNodeWeightArray<WeightType>where WeightType: Unpin,
impl<WeightType> UnwindSafe for EpochNodeWeightArray<WeightType>where 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