Point of view

SET

Summary

Class invariant

- capacity > 0
- capacity >= count
- cache_user.in_range(-1, count)
- cache_user > 0 implies cache_node /= Void
- cache_user > 0 implies cache_buckets.in_range(0, capacity - 1)

Overview

Minimum size for storage in number of items.

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.

Meaningful only when cache_user is not -1.

Meaningful only when cache_user is not -1.

Of the buckets storage area.

Number of available indices.

Add new item __e__ to the set.

Remove item __e__ from the set: the mathematical definition of
removing from a set is followed.

Empty the current set (is_empty is True after that call).

Non Void when __e__ is in the set.

Item at the corresponding index __i__.

Make the intersection of the __Current__ set with __other__.

Add all items of __model__.

Minimum index.

Maximum index.

Make the union of the __Current__ set with __other__.

Return the union of the __Current__ set with __other__.

Return the intersection of the __Current__ set with __other__.

Return the set __Current__ - __other__.

Is the __Current__ set a subset of __other__?

Is the __Current__ set disjoint from __other__ ?

Is the __Current__ set equal to __other__?

Apply __action__ to every item of __Current__.

Do all items satisfy __predicate__?

Does at least one item satisfy __predicate__?

True when __i__ is valid (i.e., inside actual bounds).

In order to avoid run-time type errors, feature safe_equal calls is_equal only when
__e1__ and __e2__ have exactly the same dynamic type.