README

wqbcs/moon_collections/sparseset does not have a README file

#
SparseSet

pub struct SparseSet[V] {
sparse : Array[Int]
dense : Array[Int]
values : Array[V?]
count : Int
capacity : Int
fp_cache : UInt64
fp_dirty : Bool
}

impl Collection for SparseSet[V]

#
SparseSet::capacity

fn[V] SparseSet::capacity(self : SparseSet[V]) -> Int

#
SparseSet::clear

fn[V] SparseSet::clear(self : SparseSet[V]) -> Unit

#
SparseSet::contains

fn[V] SparseSet::contains(self : SparseSet[V], key : Int) -> Bool

#
SparseSet::contains_value

fn[V : Eq] SparseSet::contains_value(self : SparseSet[V], value : V) -> Bool

#
SparseSet::each

fn[V] SparseSet::each(self : SparseSet[V], f : (Int, V) -> Unit) -> Unit

#
SparseSet::each_index

fn[V] SparseSet::each_index(self : SparseSet[V], f : (Int) -> Unit) -> Unit

#
SparseSet::from_array

fn[V] SparseSet::from_array(capacity : Int, pairs : Array[(Int, V)]) -> SparseSet[V]

#
SparseSet::get

fn[V] SparseSet::get(self : SparseSet[V], key : Int) -> V?

#
SparseSet::insert

fn[V] SparseSet::insert(self : SparseSet[V], key : Int, value : V) -> V?

#
SparseSet::is_empty

fn[V] SparseSet::is_empty(self : SparseSet[V]) -> Bool

#
SparseSet::iter

fn[V] SparseSet::iter(self : SparseSet[V]) -> Iter[(Int, V)]

#
SparseSet::keys_array

fn[V] SparseSet::keys_array(self : SparseSet[V]) -> Array[Int]

#
SparseSet::len

fn[V] SparseSet::len(self : SparseSet[V]) -> Int

#
SparseSet::new

fn[V] SparseSet::new(capacity : Int) -> SparseSet[V]

#
SparseSet::remove

fn[V] SparseSet::remove(self : SparseSet[V], key : Int) -> V?

#
SparseSet::update

fn[V] SparseSet::update(self : SparseSet[V], key : Int, f : (V) -> V) -> Bool

#
SparseSet::value_eq

fn[V : Eq] SparseSet::value_eq(self : SparseSet[V], key : Int, value : V) -> Bool

#
SparseSet::values_array

fn[V] SparseSet::values_array(self : SparseSet[V]) -> Array[V]

Source Files