64-set, language concept

Some functions treat values of the long type as 64 separate bits, representing a subset of ${0\ldots 63}$. This acts as a high-performance representation of a set of integers, in cases where using relational logic is not fast enough.

64-sets are created with flag or emptySet.

They can be combined with union and intersection, negated with complement, and compared with isSubsetOf or contains.

A == B and A != B work as expected to check if two sets are exactly equal or not.

To print out a text representation of a 64-set, use printSet.

The number of elements in a 64-set is given with popCount.

User Contributed Notes
0 notes + add a note