Struct traitgraph::algo::dijkstra::EpochArray [−][src]
pub struct EpochArray { /* fields omitted */ }
Expand description
An epoch counter array. This can be used to check if an index is current by comparing its entry in the epoch array to the current epoch. To unmark all values, the current epoch can be increased in O(1). Only overflows have to be handled by resetting all epoch counters.
Implementations
Create a new epoch array of given length where all values are outdated.
Returns true if the given index is current, and false otherwise.
Updates the given index and returns true if the given index was current before, and false otherwise.