The buckets storage area is the primary hash table of capacity elements.
To search some
element, the first access is done in buckets using the remainder of the division of the key
hash_code by capacity. In order to try to avoid clashes, capacity is always a prime number
(selected using HASHED_CAPACITY).
Internal storage capacity of the set is initialized using the
Default_size value. Then, tuning of needed storage size is done automatically according to
usage. If you are really sure that your set is always really bigger than Default_size, you may
use with_capacity to save some execution time.
Create an empty set using medium_size as an appropriate value to help initialization of
Thus, this feature may be used in place of make to save some execution time if one
is sure that storage size will rapidly become really bigger than Default_size (if not sure,
simply use make). Anyway, the initial medium_size value is just an indication and never a
limit for the possible capacity. Keep in mind that the capacity tuning is done automatically
according to usage.
The mathematical definition of adding in a set is followed, i.e. the
element e is added only and only if it is not yet present in the set.
As this add feature is actually using is_equal, you may consider to use fast_add for expanded
objects as well while trying to get the very best performances.
e /= Void
not_in_then_added: not old has(e) implies count = old count + 1
in_then_not_added: old has(e) implies count = old count