+
Point of view
All features
class PERMUT
Summary
Direct parents
Inherit list: COMPARABLE, FAST_ARRAY
Class invariant
Overview
Creation features
{ANY}
Features
{ANY}
{ANY}
  • is_equal (other: PERMUT): BOOLEAN
    Is other attached to an object considered equal to current object?
  • infix "<=" (other: PERMUT): BOOLEAN
    Is Current less than or equal other?
  • infix ">" (other: PERMUT): BOOLEAN
    Is Current strictly greater than other?
  • infix ">=" (other: PERMUT): BOOLEAN
    Is Current greater than or equal than other?
  • in_range (lower: PERMUT, upper: PERMUT): BOOLEAN
    Return True if Current is in range [lower..upper]
    See also min, max, compare.
  • compare (other: PERMUT): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • three_way_comparison (other: PERMUT): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • min (other: PERMUT): PERMUT
    Minimum of Current and other.
  • max (other: PERMUT): PERMUT
    Maximum of Current and other.
  • bounded_by (a_min: PERMUT, a_max: PERMUT): PERMUT
    A value that is equal to Current if it is between the limits set by a_min and a_max.
{ANY}
Creation and modification:
{ANY}
Modification:
{ANY}
Implementation of deferred:
{ANY}
Garbage collector tuning (very low-level):
{}
  • mark_native_arrays
    For performance reasons, the unused area of storage is always left as it is when some elements are removed.
Implement manifest generic creation (very low-level):
{}
Accessing:
{ANY}
Writing:
{ANY}
Adding:
{ANY}
Removing:
{ANY}
Looking and Searching:
{ANY}
Looking and comparison:
{ANY}
Other features:
{ANY}
Implement manifest generic creation:
{}
{ANY}
Other features:
{ANY}
Agent-based features:
{ANY}
Printing:
{ANY}
{ANY}
{}
Agent-based features:
{ANY}
{}
Indexing:
{ANY}
Accessing:
{ANY}
{ARRAYED_COLLECTION, ARRAYED_COLLECTION_HANDLER}
{ANY}
Interfacing with C:
{ANY}
{ARRAYED_COLLECTION}
{}
infix "<" (other: PERMUT): BOOLEAN
effective function
{ANY}
Is Current strictly less than other?
is_equal (other: PERMUT): BOOLEAN
effective function
{ANY}
Is other attached to an object considered equal to current object?
infix "<=" (other: PERMUT): BOOLEAN
effective function
{ANY}
Is Current less than or equal other?
infix ">" (other: PERMUT): BOOLEAN
effective function
{ANY}
Is Current strictly greater than other?
infix ">=" (other: PERMUT): BOOLEAN
effective function
{ANY}
Is Current greater than or equal than other?
in_range (lower: PERMUT, upper: PERMUT): BOOLEAN
effective function
{ANY}
Return True if Current is in range [lower..upper]
See also min, max, compare.
compare (other: PERMUT): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
three_way_comparison (other: PERMUT): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
min (other: PERMUT): PERMUT
effective function
{ANY}
Minimum of Current and other.
max (other: PERMUT): PERMUT
effective function
{ANY}
Maximum of Current and other.
bounded_by (a_min: PERMUT, a_max: PERMUT): PERMUT
effective function
{ANY}
A value that is equal to Current if it is between the limits set by a_min and a_max.
lower: INTEGER_32
is 0
constant attribute
{ANY}
Frozen lower bound.
default_create
effective procedure
{ANY}
Create a new with empty FAST_ARRAY with capacity 32.
make (new_count: INTEGER_32)
effective procedure
{ANY}
Make array with range [0 .. new_count - 1].
with_capacity (needed_capacity: INTEGER_32)
effective procedure
{ANY}
Create an empty array with at least needed_capacity.
resize (new_count: INTEGER_32)
effective procedure
{ANY}
Resize the array.
is_empty: BOOLEAN
effective function
{ANY}
Is the hoard empty ?
See also count.
item (i: INTEGER_32): E_
effective function
{ANY}
Item at the corresponding index i.
put (element: E_, i: INTEGER_32)
effective procedure
{ANY}
Make element the item at index i.
add_first (element: E_)
effective procedure
{ANY}
Add a new item in first position : count is increased by one and all other items are shifted right.
add_last (element: E_)
effective procedure
{ANY}
Add a new item at the end : count is increased by one.
count: INTEGER_32
effective function
{ANY}
Number of available items in the hoard.
clear_count
effective procedure
{ANY}
Discard all items (is_empty is True after that call).
clear_count_and_capacity
effective procedure
{ANY}
Discard all items (is_empty is True after that call).
copy (other: PERMUT)
effective procedure
{ANY}
Copy other onto Current.
set_all_with (v: E_)
effective procedure
{ANY}
Set all items with value v.
from_collection (model: TRAVERSABLE[E_])
effective procedure
{ANY}
Initialize the current object with the contents of model.
fast_is_equal (other: PERMUT): BOOLEAN
effective function
{ANY}
Do both collections have the same lower, upper, and items?
all_default: BOOLEAN
effective function
{ANY}
Do all items have their type's default value?
occurrences (element: E_): INTEGER_32
effective function
{ANY}
Number of occurrences of element using is_equal for comparison.
fast_occurrences (element: E_): INTEGER_32
effective function
{ANY}
Number of occurrences of element using basic = for comparison.
first_index_of (element: E_): INTEGER_32
effective function
{ANY}
Give the index of the first occurrence of element using is_equal for comparison.
index_of (element: E_, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Using is_equal for comparison, gives the index of the first occurrence of element at or after start_index.
reverse_index_of (element: E_, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Using is_equal for comparison, gives the index of the first occurrence of element at or before start_index.
fast_first_index_of (element: E_): INTEGER_32
effective function
{ANY}
Give the index of the first occurrence of element using basic = for comparison.
fast_index_of (element: E_, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Using basic = for comparison, gives the index of the first occurrence of element at or after start_index.
fast_reverse_index_of (element: E_, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Using basic = comparison, gives the index of the first occurrence of element at or before start_index.
subarray (min: INTEGER_32, max: INTEGER_32): PERMUT
effective function
{ANY}
New collection consisting of items at indexes in [min .. max].
slice (min: INTEGER_32, max: INTEGER_32): PERMUT
effective function
{ANY}
New collection consisting of items at indexes in [min..max].
force (element: E_, index: INTEGER_32)
effective procedure
{ANY}
Make element the item at index, enlarging the collection if necessary (new bounds except index are initialized with default values).
remove_first
effective procedure
{ANY}
Remove the first element of the collection.
remove_head (n: INTEGER_32)
effective procedure
{ANY}
Remove the n elements of the collection.
remove (index: INTEGER_32)
effective procedure
{ANY}
Remove the item at position index.
new_iterator: ITERATOR[E_]
effective function
{ANY}
mark_native_arrays
effective procedure
{}
For performance reasons, the unused area of storage is always left as it is when some elements are removed.
manifest_make (needed_capacity: INTEGER_32)
effective procedure
{}
Manifest creation of a FAST_ARRAY[E_].
manifest_put (index: INTEGER_32, element: E_)
effective procedure
{}
infix "@" (i: INTEGER_32): E_
frozen
effective function
{ANY}
The infix notation which is actually just a synonym for item.
swap (i1: INTEGER_32, i2: INTEGER_32)
effective procedure
{ANY}
Swap item at index i1 with item at index i2.
set_slice_with (v: ANY, lower_index: INTEGER_32, upper_index: INTEGER_32)
effective procedure
{ANY}
Set all items in range [lower_index .. upper_index] with v.
clear_all
effective procedure
{ANY}
Set every item to its default value.
add (element: ANY, index: INTEGER_32)
deferred procedure
{ANY}
Add a new element at rank index : count is increased by one and range [index .. upper] is shifted right by one position.
append_collection (other: COLLECTION[E_])
effective procedure
{ANY}
Append other to Current.
append_traversable (other: TRAVERSABLE[E_])
effective procedure
{ANY}
Append other to Current.
remove_last
deferred procedure
{ANY}
Remove the last item.
remove_tail (n: INTEGER_32)
deferred procedure
{ANY}
Remove the last n item(s).
has (x: ANY): BOOLEAN
effective function
{ANY}
Look for x using is_equal for comparison.
fast_has (x: ANY): BOOLEAN
effective function
{ANY}
Look for x using basic = for comparison.
last_index_of (element: ANY): INTEGER_32
effective function
{ANY}
Using is_equal for comparison, gives the index of the last occurrence of element at or before upper.
fast_last_index_of (element: ANY): INTEGER_32
effective function
{ANY}
Using basic = for comparison, gives the index of the last occurrence of element at or before upper.
is_equal_map (other: PERMUT): BOOLEAN
effective function
{ANY}
Do both collections have the same lower, upper, and items?
same_items (other: COLLECTION[E_]): BOOLEAN
effective function
{ANY}
Do both collections have the same items?
replace_all (old_value: ANY, new_value: ANY)
deferred procedure
{ANY}
Replace all occurrences of the element old_value by new_value using is_equal for comparison.
fast_replace_all (old_value: ANY, new_value: ANY)
deferred procedure
{ANY}
Replace all occurrences of the element old_value by new_value using basic = for comparison.
move (lower_index: INTEGER_32, upper_index: INTEGER_32, distance: INTEGER_32)
effective procedure
{ANY}
Move range lower_index ..
reverse
deferred procedure
{ANY}
Reverse the order of the elements.
manifest_semicolon_check: BOOLEAN
is False
constant attribute
{}
enumerate: ENUMERATE[E_]
effective function
{ANY}
get_new_iterator: ITERATOR[E_]
frozen
effective function
{ANY}
for_each (action: PROCEDURE[TUPLE[TUPLE 1[E_]]])
effective procedure
{ANY}
Apply action to every item of Current.
for_all (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Do all items satisfy test?
exists (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Does at least one item satisfy test?
aggregate (action: FUNCTION[TUPLE[TUPLE 2[E_, E_], E_]], initial: E_): E_
effective function
{ANY}
Aggregate all the elements starting from the initial value.
out_in_tagged_out_memory
effective procedure
{ANY}
Append terse printable representation of current object in tagged_out_memory.
generation: INTEGER_32
writable attribute
{ANY}
next_generation
effective procedure
{}
do_all (action: ROUTINE[TUPLE[TUPLE 1[E_]]])
frozen
effective procedure
{ANY}
Apply action to every item of Current.
_inline_agent2 (a: ROUTINE[TUPLE[TUPLE 1[E_]]], e: E_)
frozen
effective procedure
{}
upper: INTEGER_32
deferred function
{ANY}
Maximum index.
valid_index (i: INTEGER_32): BOOLEAN
effective function
{ANY}
True when i is valid (i.e., inside actual bounds).
first: E_
deferred function
{ANY}
The very first item.
last: E_
deferred function
{ANY}
The last item.
storage: NATIVE_ARRAY[E_]
writable attribute
Internal access to storage location.
from_external (a_storage: POINTER, a_capacity: INTEGER_32)
effective procedure
capacity: INTEGER_32
writable attribute
{ANY}
Internal storage capacity in number of item.
to_external: POINTER
effective function
{ANY}
Gives C access into the internal storage of the ARRAY.
set_upper (new_upper: INTEGER_32)
effective procedure
mark_item (native_array: NATIVE_ARRAY[E_], index: INTEGER_32)
{}
To be used _only_ inside the definition of mark_native_arrays.