pub trait DijkstraPerformanceData {
    fn add_iteration(&mut self);
    fn add_unnecessary_heap_element(&mut self);
    fn record_heap_size(&mut self, heap_size: usize);
    fn record_distance_array_size(&mut self, distance_array_size: usize);
    fn finish_dijkstra(&mut self);
    fn iterations(&self) -> Option<u64>;
    fn unnecessary_heap_elements(&self) -> Option<u64>;
    fn max_max_heap_size(&self) -> Option<usize>;
    fn max_max_distance_array_size(&self) -> Option<usize>;
    fn average_max_heap_size(&self) -> Option<f64>;
    fn average_max_distance_array_size(&self) -> Option<f64>;
}
Expand description

Performance data collected by Dijkstra’s algorithm. This trait allows to collect the performance data optionally, by providing a type that either collects it, or ignores it.

Required Methods

Increment the number of iterations of the main loop of Dijkstra’s algorithm.

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.

Record the current heap size of Dijkstra’s algorithm.

Record the current distance array size of Dijkstra’s algorithm.

Finish an invocation of Dijkstra’s algorithm. Performs finalisation of recorded metrics that are local to single Dijkstra invocations.

Get the number of iterations of the main loop of Dijkstra’s algorithm.

Get the number of unnecessary heap elements that were inserted during Dijkstra’s algorithm.

Get the maximum heap size encountered at any point during execution.

Get the maximum distance array size encountered at any point during execution.

Get the maximum heap size as average over all invocations of Dijkstra’s algorithm.

Get the maximum distance array size as average over all invocations of Dijkstra’s algorithm.

Implementors