Expand description
A simple performance counter for Dijkstra’s algorithm, keeping all supported counts.
Fields
iterations: u64
The number of iterations of the main loop of Dijkstra’s algorithm.
unnecessary_heap_elements: u64
The number of unnecessary heap elements.
Trait Implementations
sourceimpl AddAssign<DijkstraPerformanceCounter> for DijkstraPerformanceCounter
impl AddAssign<DijkstraPerformanceCounter> for DijkstraPerformanceCounter
sourcefn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation. Read more
sourceimpl Clone for DijkstraPerformanceCounter
impl Clone for DijkstraPerformanceCounter
sourcefn clone(&self) -> DijkstraPerformanceCounter
fn clone(&self) -> DijkstraPerformanceCounter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DijkstraPerformanceCounter
impl Debug for DijkstraPerformanceCounter
sourceimpl Default for DijkstraPerformanceCounter
impl Default for DijkstraPerformanceCounter
sourcefn default() -> DijkstraPerformanceCounter
fn default() -> DijkstraPerformanceCounter
Returns the “default value” for a type. Read more
sourceimpl DijkstraPerformanceData for DijkstraPerformanceCounter
impl DijkstraPerformanceData for DijkstraPerformanceCounter
sourcefn add_iteration(&mut self)
fn add_iteration(&mut self)
Increment the number of iterations of the main loop of Dijkstra’s algorithm.
sourcefn add_unnecessary_heap_element(&mut self)
fn add_unnecessary_heap_element(&mut self)
Increment the number of heap elements that already have a lower weight than what was stored in the heap.
These are wasted cycles because our heap does not support the decrease_key
operation. Read more
sourcefn iterations(&self) -> Option<u64>
fn iterations(&self) -> Option<u64>
Get the number of iterations of the main loop of Dijkstra’s algorithm.
sourcefn unnecessary_heap_elements(&self) -> Option<u64>
fn unnecessary_heap_elements(&self) -> Option<u64>
Get the number of unnecessary heap elements that were inserted during Dijkstra’s algorithm.
sourceimpl PartialEq<DijkstraPerformanceCounter> for DijkstraPerformanceCounter
impl PartialEq<DijkstraPerformanceCounter> for DijkstraPerformanceCounter
sourcefn eq(&self, other: &DijkstraPerformanceCounter) -> bool
fn eq(&self, other: &DijkstraPerformanceCounter) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DijkstraPerformanceCounter) -> bool
fn ne(&self, other: &DijkstraPerformanceCounter) -> bool
This method tests for !=
.
impl Eq for DijkstraPerformanceCounter
impl StructuralEq for DijkstraPerformanceCounter
impl StructuralPartialEq for DijkstraPerformanceCounter
Auto Trait Implementations
impl RefUnwindSafe for DijkstraPerformanceCounter
impl Send for DijkstraPerformanceCounter
impl Sync for DijkstraPerformanceCounter
impl Unpin for DijkstraPerformanceCounter
impl UnwindSafe for DijkstraPerformanceCounter
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.