Struct dogs::data_structures::sparse_set::SparseSet [−][src]
pub struct SparseSet { /* fields omitted */ }
Expand description
implements a sparse set data-structure. this structure is efficient to remove all but one values, but is costly in memory. if n is the number elements and m the number of subsets in the set this data-structure has the following complexities:
- memory: O(n+m)
- insertion: O(1)
- remove: O(1)
- contains: O(1)
- remove all but one: O(1)
Implementations
removes everything except e from the set