DoxigAlpha

EnumMultiset

A multiset of enum elements up to a count of usize. Backed by an EnumArray. This type does no dynamic allocation and can be copied by value.

Fields of this type

Fields

#
counts:EnumArray(E, CountSize)

Initializes the multiset using a struct of counts.

Functions

#
init
Initializes the multiset using a struct of counts.
initEmpty
Initializes the multiset with a count of zero.
initWithCount
Initializes the multiset with all keys at the
count
Returns the total number of key counts in the multiset.
contains
Checks if at least one key in multiset.
removeAll
Removes all instance of a key from multiset.
addAssertSafe
Increases the key count by given amount.
add
Increases the key count by given amount.
remove
Decreases the key count by given amount.
getCount
Returns the count for a key.
setCount
Set the count for a key.
addSetAssertSafe
Increases the all key counts by given multiset.
addSet
Increases the all key counts by given multiset.
removeSet
Decreases the all key counts by given multiset.
eql
Returns true iff all key counts are the same as
subsetOf
Returns true iff all key counts less than or
supersetOf
Returns true iff all key counts greater than or
plusAssertSafe
Returns a multiset with the total key count of this
plus
Returns a multiset with the total key count of this
minus
Returns a multiset with the key count of this
iterator
Returns an iterator over this multiset.

= EnumArray(E, CountSize).Entry

Values

#
Entry
= EnumArray(E, CountSize).Entry
Iterator
= EnumArray(E, CountSize).Iterator

Source

Implementation

#