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 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.
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