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.

Outdate all indices.

Set the given index as current.

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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.