+
Point of view
INTERNALS_HANDLER
deferred class ABSTRACT_HASHED_SET [E_]
Summary
Class invariant
Overview
Exported features
  • add (e: E_)
    Add new item e to the set.
  • fast_add (e: E_)
    Same job as add, but uses basic = for comparison.
  • remove (e: E_)
    Remove item e from the set: the mathematical definition of removing from a set is followed.
  • fast_remove (e: E_)
    Same job as remove, but uses basic = for comparison.
  • clear_count
    Empty the current set (is_empty is True after that call).
  • clear_count_and_capacity
    Empty the current set (is_empty is True after that call).
  • has (e: E_): BOOLEAN
    Is element e in the set?
  • fast_has (e: E_): BOOLEAN
    Is element e actually stored in the set?
  • reference_at (e: E_): E_
    Non Void when e is in the set.
  • item (index: INTEGER_32): E_
    Item at the corresponding index i.
  • intersection (other: ABSTRACT_HASHED_SET [E_])
    Make the intersection of the Current set with other.
  • copy (other: ABSTRACT_HASHED_SET [E_])
    Copy 'other' into the current set
  • from_collection (model: COLLECTION[E_])
    Add all items of model.
Counting:
To provide iterating facilities:
Mathematical operations:
  • union (other: ABSTRACT_HASHED_SET [E_])
    Make the union of the Current set with other.
  • fast_union (other: ABSTRACT_HASHED_SET [E_])
    Make the union of the Current set with other.
  • infix "+" (other: ABSTRACT_HASHED_SET [E_]): ABSTRACT_HASHED_SET [E_]
    Return the union of the Current set with other.
  • fast_intersection (other: ABSTRACT_HASHED_SET [E_])
    Make the intersection of the Current set with other.
  • infix "^" (other: ABSTRACT_HASHED_SET [E_]): ABSTRACT_HASHED_SET [E_]
    Return the intersection of the Current set with other.
  • minus (other: ABSTRACT_HASHED_SET [E_])
    Make the set Current - other.
  • fast_minus (other: ABSTRACT_HASHED_SET [E_])
    Make the set Current - other.
  • infix "-" (other: ABSTRACT_HASHED_SET [E_]): ABSTRACT_HASHED_SET [E_]
    Return the set Current - other.
Comparison:
  • is_subset_of (other: ABSTRACT_HASHED_SET [E_]): BOOLEAN
    Is the Current set a subset of other?
  • is_disjoint_from (other: ABSTRACT_HASHED_SET [E_]): BOOLEAN
    Is the Current set disjoint from other ?
  • is_equal (other: ABSTRACT_HASHED_SET [E_]): BOOLEAN
    Is the Current set equal to other?
Other features:
Agent-based features:
Printing:
Agent-based features:
Indexing:
  • test (e1: E_, e2: E_): BOOLEAN
    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.
  • safe_equal (e1: E_, e2: E_): BOOLEAN
    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.
Default_size: INTEGER_32
is 53
constant attribute
Minimum size for storage in number of items.
capacity: INTEGER_32
writable attribute
Of the buckets storage area.
count: INTEGER_32
writable attribute
Number of available items in the hoard.
add (e: E_)
effective procedure
Add new item e to the set.
fast_add (e: E_)
effective procedure
Same job as add, but uses basic = for comparison.
remove (e: E_)
effective procedure
Remove item e from the set: the mathematical definition of removing from a set is followed.
fast_remove (e: E_)
effective procedure
Same job as remove, but uses basic = for comparison.
clear_count
effective procedure
Empty the current set (is_empty is True after that call).
clear_count_and_capacity
effective procedure
Empty the current set (is_empty is True after that call).
has (e: E_): BOOLEAN
effective function
Is element e in the set?
fast_has (e: E_): BOOLEAN
effective function
Is element e actually stored in the set?
reference_at (e: E_): E_
effective function
Non Void when e is in the set.
item (index: INTEGER_32): E_
effective function
Item at the corresponding index i.
intersection (other: ABSTRACT_HASHED_SET [E_])
effective procedure
Make the intersection of the Current set with other.
copy (other: ABSTRACT_HASHED_SET [E_])
effective procedure
Copy 'other' into the current set
from_collection (model: COLLECTION[E_])
effective procedure
Add all items of model.
is_empty: BOOLEAN
effective function
Is the set empty?
lower: INTEGER_32
is 1
constant attribute
Minimum index.
upper: INTEGER_32
effective function
Maximum index.
first: E_
effective function
The very first item.
last: E_
effective function
The last item.
new_iterator: ITERATOR[E_]
effective function
union (other: ABSTRACT_HASHED_SET [E_])
effective procedure
Make the union of the Current set with other.
fast_union (other: ABSTRACT_HASHED_SET [E_])
effective procedure
Make the union of the Current set with other.
infix "+" (other: ABSTRACT_HASHED_SET [E_]): ABSTRACT_HASHED_SET [E_]
effective function
Return the union of the Current set with other.
fast_intersection (other: ABSTRACT_HASHED_SET [E_])
effective procedure
Make the intersection of the Current set with other.
infix "^" (other: ABSTRACT_HASHED_SET [E_]): ABSTRACT_HASHED_SET [E_]
effective function
Return the intersection of the Current set with other.
minus (other: ABSTRACT_HASHED_SET [E_])
effective procedure
Make the set Current - other.
fast_minus (other: ABSTRACT_HASHED_SET [E_])
effective procedure
Make the set Current - other.
infix "-" (other: ABSTRACT_HASHED_SET [E_]): ABSTRACT_HASHED_SET [E_]
effective function
Return the set Current - other.
is_subset_of (other: ABSTRACT_HASHED_SET [E_]): BOOLEAN
effective function
Is the Current set a subset of other?
is_disjoint_from (other: ABSTRACT_HASHED_SET [E_]): BOOLEAN
effective function
Is the Current set disjoint from other ?
is_equal (other: ABSTRACT_HASHED_SET [E_]): BOOLEAN
effective function
Is the Current set equal to other?
enumerate: ENUMERATE[E_]
effective function
get_new_iterator: ITERATOR[E_]
frozen
effective function
for_each (action: PROCEDURE[TUPLE[TUPLE 1[E_]]])
effective procedure
Apply action to every item of Current.
for_all (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
Do all items satisfy test?
exists (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
Does at least one item satisfy test?
aggregate (action: FUNCTION[TUPLE[TUPLE 2[E_, E_], E_]], initial: E_): E_
effective function
Aggregate all the elements starting from the initial value.
out_in_tagged_out_memory
effective procedure
Append terse printable representation of current object in tagged_out_memory.
generation: INTEGER_32
writable attribute
do_all (action: ROUTINE[TUPLE[TUPLE 1[E_]]])
frozen
effective procedure
Apply action to every item of Current.
valid_index (i: INTEGER_32): BOOLEAN
effective function
True when i is valid (i.e., inside actual bounds).
test (e1: E_, e2: E_): BOOLEAN
effective function
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.
safe_equal (e1: E_, e2: E_): BOOLEAN
effective function
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.