A symbolic alias for zip
.
A symbolic alias for combine
.
Returns the number of times the specified element appears in the set.
Combines this set with the specified set to produce a new set where the number of times each element appears is the sum of the number of times it appears in this set and the specified set.
Returns whether this set is equal to the specified set, meaning that the same elements appear in both sets the same number of times.
Returns whether this set is equal to the specified set, meaning that the same elements appear in both sets the same number of times.
Creates a new set for each element in this set and combines the resulting sets together.
Creates a new set for each element in this set and combines the resulting sets together. The number of times each element appears will be the sum of the products of the number of times it appeared in the original set and the number of times it appears in each new set.
Returns the hash code of this set.
Returns the hash code of this set.
Transforms the elements in the set using the specified function.
Transforms the elements in the set using the specified function. If this results in mapping two or more elements to the same values, the number of times the new value appears in the set will be the sum of the number of times each of the old values appeared in the set.
Converts this set to a Map
from elements to how many times they appear
in the set.
Converts this set to a Set
, discarding information about how many times
an element appears in the set beyond whether it appears at all.
Returns a meaningful string representation of this set.
Returns a meaningful string representation of this set.
Transforms the representation of how many times each element appears in the set with the specified function.
Combines this set with the specified set to produce a new set where the number of times each element appears is the maximum of the number of times it appears in this set and the specified set.
Combines this set with the specified set to produce their cartesian product.
Combines this set with the specified set to produce their cartesian
product, combining pair of elements using the specified function f
.
A symbolic alias for union
.
Similar to
ZSet
, aZNonEmptySet[A, B]
is a guaranteed non-empty set ofA
values whereB
represents some notion of "how many"A
values are included in the set. This can be the number of times each element appears in the set ifB
is a natural number, the probability associated with an element in the set ifB
is a rational number, or even whether an element appears at all ifB
is a boolean.