Iterator over buckets
Iterator over buckets
Put or replace the bucket associated with the new bucket.
Put or replace the bucket associated with the new bucket.
The bucket must be compatible with the bag (i.e. it was generated by the bagConfiguration instance)
new bucket
the bag with the new bucket in place
Shorthand for intersect
Shorthand for intersect
Shorthand for diff
Shorthand for diff
Add the element to the bag
Add the element to the bag
Tests if some element is contained in this bag.
Tests if some element is contained in this bag.
the element to test for membership.
true if elem is contained in this bag, false otherwise.
Returns a bag containing the multi-set difference of this bag with that bag
Returns a bag containing the multi-set difference of this bag with that bag
the other bag
bag containing the multi-set difference of this bag and that bag
Iterator over distinct elements
Iterator over distinct elements
Returns a the sub-bag that has only elements equivalent to elem
Returns a the sub-bag that has only elements equivalent to elem
element
A sub-bag with elements equivalent to elem
Returns the bucket associated with some key element.
Returns the bucket associated with some key element. All elements in that bucket are equivalent to elem
Key element
Some(bucket) if the bucket exists in the bag or None if the bucket doesn't exist in the bag.
Returns a bag containing the multi-set intersection of this bag and that bag
Returns a bag containing the multi-set intersection of this bag and that bag
the other bag
bag containing the multi-set intersection of this bag and that bag
Returns a Bag with the least common elements up to the equivalence defined in the BagConfiguration
Returns a Bag with the least common elements up to the equivalence defined in the BagConfiguration
An bag with the least common elements up to equivalence
Query for the maximum multiplicity of elements in the bag.
Query for the maximum multiplicity of elements in the bag.
The maximum multiplicity of the bag
Returns a bag containing the multi-set max union (or generalized set union) of this bag and that bag
Returns a bag containing the multi-set max union (or generalized set union) of this bag and that bag
the other bag
bag containing the multi-set max union of this bag and that bag
Query for the minimum multiplicity of elements in the bag.
Query for the minimum multiplicity of elements in the bag.
The minimum multiplicity of the bag
Returns a Bag with the most common elements up to the equivalence defined in the BagConfiguration
Returns a Bag with the most common elements up to the equivalence defined in the BagConfiguration
An bag with the most common elements up to equivalence
Creates a new builder for this bag type.
Creates a new builder for this bag type.
(Changed in version 2.9.0) The behavior of scanRight has changed. The previous behavior can be reproduced with scanRight.reverse.
Tests if this bag is subset of that bag, where the subset is the multiset subset.
Tests if this bag is subset of that bag, where the subset is the multiset subset.
the other bag.
true if this bag is subset of that bag, false if not.
Returns a mapping of the multiplicities of the bag
Returns a mapping of the multiplicities of the bag
map containing the mapping of multiplicities of the of the bag
Returns a bag containing the multi-set union of this bag and that bag
Returns a bag containing the multi-set union of this bag and that bag
the other bag
bag containing the multi-set union of this bag and that bag
Returns a bag with an updated multiplicity of some element
Returns a bag with an updated multiplicity of some element
element that will have it's multiplicity changed
number of times the element will be repeated in the bag
bag with the new multiplicity
Shorthand for union
Shorthand for union