The last user's external index in range [1 .. count] (see item and valid_index for example)
may be saved in cache_user otherwise -1 to indicate that the cache is not active.
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).
The last user's external index in range [1 .. count] (see item and valid_index for example)
may be saved in cache_user otherwise -1 to indicate that the cache is not active.
When the cache
is active, the corresponding index in buckets is save in cache_buckets and the corresponding
node in cache_node.
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.
require
e /= Void
ensure
added: has(e)
not_in_then_added: not old has(e) implies count = old count + 1
in_then_not_added: old has(e) implies count = old count
Empty the current set (is_empty is True after that call).
If possible, the actual implementation
is supposed to keep its internal storage area in order to refill Current in an efficient way.
See also clear_count_and_capacity to select the most appropriate.
Empty the current set (is_empty is True after that call).
If possible, the actual implementation
is supposed to release its internal storage area for this memory to be used by other objects.
See also clear_count to select the most appropriate.
As this query is actually using is_equal, you may consider to use fast_has for expanded
objects as well while trying to get the very best performances.
SETs are intrinsically unordered, so there is no guarantee that item(i) after performing an add
or remove operation is related in any way to item(i) before that operation.