+
Point of view
ANY
deferred class SET [E_]
Summary
Overview
exported features
Counting:
Adding and removing:
  • 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).
Looking and searching:
To provide iterating facilities:
Mathematical operations:
  • union (other: SET [E_])
    Make the union of the Current set with other.
  • infix "+" (other: SET [E_]): SET [E_]
    Return the union of the Current set with other.
  • intersection (other: SET [E_])
    Make the intersection of the Current set with other.
  • infix "^" (other: SET [E_]): SET [E_]
    Return the intersection of the Current set with other.
  • minus (other: SET [E_])
    Make the set Current - other.
  • infix "-" (other: SET [E_]): SET [E_]
    Return the set Current - other.
Comparison:
Agents based features:
Indexing:
Counting:
  • 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.
is_empty: BOOLEAN
effective function
Is the set empty?
add (e: E_)
deferred procedure
Add new item e to the set.
fast_add (e: E_)
deferred procedure
Same job as add, but uses basic = for comparison.
remove (e: E_)
deferred procedure
Remove item e from the set: the mathematical definition of removing from a set is followed.
fast_remove (e: E_)
deferred procedure
Same job as remove, but uses basic = for comparison.
clear_count
deferred procedure
Empty the current set (is_empty is True after that call).
clear_count_and_capacity
deferred procedure
Empty the current set (is_empty is True after that call).
has (e: E_): BOOLEAN
deferred function
Is element e in the set?
fast_has (e: E_): BOOLEAN
deferred function
Is element e actually stored in the set?
reference_at (e: E_): E_
deferred function
Non Void when e is in the set.
lower: INTEGER_32
constant attribute
Minimum index.
upper: INTEGER_32
effective function
Maximum index.
item (index: INTEGER_32): E_
deferred function
Item at the corresponding index i.
first: E_
effective function
The very first item.
last: E_
effective function
The last item.
get_new_iterator: ITERATOR[E_]
effective function
union (other: SET [E_])
effective procedure
Make the union of the Current set with other.
infix "+" (other: SET [E_]): SET [E_]
effective function
Return the union of the Current set with other.
intersection (other: SET [E_])
effective procedure
Make the intersection of the Current set with other.
infix "^" (other: SET [E_]): SET [E_]
effective function
Return the intersection of the Current set with other.
minus (other: SET [E_])
effective procedure
Make the set Current - other.
infix "-" (other: SET [E_]): SET [E_]
effective function
Return the set Current - other.
is_subset_of (other: SET [E_]): BOOLEAN
effective function
Is the Current set a subset of other?
is_disjoint_from (other: SET [E_]): BOOLEAN
effective function
Is the Current set disjoint from other ?
is_equal (other: SET [E_]): BOOLEAN
effective function
Is the Current set equal to other?
copy (other: SET [E_])
effective procedure
Copy 'other' into the current set
from_collection (model: COLLECTION[E_])
effective procedure
Add all items of model.
do_all (action: ROUTINE[TUPLE[TUPLE 1[E_]]])
effective procedure
Apply action to every item of Current.
for_all (predicate: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
Do all items satisfy predicate?
exists (predicate: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
Does at least one item satisfy predicate?
valid_index (i: INTEGER_32): BOOLEAN
effective function
True when i is valid (i.e., inside actual bounds).
count: INTEGER_32
deferred function
Number of available indices.
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.