+
Point of view
All features
deferred class COLLECTION3 [E_]
Summary
Abstract definition of a 3 dimensional collection of elements of type E_.
The Liberty Eiffel standard library provides two implementations of COLLECTION3: ARRAY3 and FIXED_ARRAY3. All implementations have exactly the same behavior. Switching from one implementation to another only change the memory used and the execution time.
Direct parents
Insert list: SAFE_EQUAL
Known children
Inherit list: ARRAY3, FAST_ARRAY3
Overview
Features
Indexing:
{ANY}
Reading:
{ANY}
Writing:
{ANY}
Index validity:
{ANY}
Counting:
{ANY}
{ANY}
Creating or initializing:
{ANY}
  • from_collection3 (model: COLLECTION3[E_])
    Uses model to initialize Current.
  • from_model (model: COLLECTION[COLLECTION[COLLECTION[E_]]])
    The model is used to fill line by line Current.
Looking and comparison:
{ANY}
Printing:
{ANY}
Miscellaneous features:
{ANY}
{ANY}
  • 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.
lower1: INTEGER_32
deferred function
{ANY}
Lower index bound for dimension 1.
lower2: INTEGER_32
deferred function
{ANY}
Lower index bound for dimension 2.
lower3: INTEGER_32
deferred function
{ANY}
Lower index bound for dimension 3.
line_minimum: INTEGER_32
frozen
effective function
{ANY}
Equivalent of lower1.
column_minimum: INTEGER_32
frozen
effective function
{ANY}
Equivalent of lower2.
depth_minimum: INTEGER_32
frozen
effective function
{ANY}
Equivalent of lower3.
upper1: INTEGER_32
deferred function
{ANY}
Upper index bound for dimension 1.
upper2: INTEGER_32
deferred function
{ANY}
Upper index bound for dimension 2.
upper3: INTEGER_32
deferred function
{ANY}
Upper index bound for dimension 3.
line_maximum: INTEGER_32
frozen
effective function
{ANY}
Equivalent of upper1.
column_maximum: INTEGER_32
frozen
effective function
{ANY}
Equivalent of upper2.
depth_maximum: INTEGER_32
frozen
effective function
{ANY}
Equivalent of upper3.
item (line: INTEGER_32, column: INTEGER_32, depth: INTEGER_32): E_
deferred function
{ANY}
require
put (element: E_, line: INTEGER_32, column: INTEGER_32, depth: INTEGER_32) assign item
deferred procedure
{ANY}
require ensure
  • item(line, column, depth) = element
force (element: E_, line: INTEGER_32, column: INTEGER_32, depth: INTEGER_32)
deferred procedure
{ANY}
Put element at position (line,column,depth).
Collection is resized first when (line,column,depth) is not inside current bounds. New bounds are initialized with default values.
require
  • line >= 0
  • column >= 0
  • depth >= 0
ensure
valid_line (line: INTEGER_32): BOOLEAN
frozen
effective function
{ANY}
ensure
valid_index1 (line: INTEGER_32): BOOLEAN
effective function
{ANY}
ensure
valid_column (column: INTEGER_32): BOOLEAN
frozen
effective function
{ANY}
ensure
valid_index2 (column: INTEGER_32): BOOLEAN
effective function
{ANY}
ensure
valid_depth (depth: INTEGER_32): BOOLEAN
frozen
effective function
{ANY}
ensure
valid_index3 (depth: INTEGER_32): BOOLEAN
effective function
{ANY}
ensure
valid_index (line: INTEGER_32, column: INTEGER_32, depth: INTEGER_32): BOOLEAN
frozen
effective function
{ANY}
ensure
count1: INTEGER_32
deferred function
{ANY}
Size of the first dimension.
ensure
line_count: INTEGER_32
frozen
effective function
{ANY}
Equivalent of count1.
count2: INTEGER_32
deferred function
{ANY}
Size of the second dimension.
ensure
column_count: INTEGER_32
frozen
effective function
{ANY}
count3: INTEGER_32
deferred function
{ANY}
Size of the third dimension.
ensure
depth_count: INTEGER_32
frozen
effective function
{ANY}
count: INTEGER_32
deferred function
{ANY}
Total number of elements.
ensure
swap (line1: INTEGER_32, column1: INTEGER_32, depth1: INTEGER_32, line2: INTEGER_32, column2: INTEGER_32, depth2: INTEGER_32)
deferred procedure
{ANY}
Swap the element at index (line1,column1,depth1) with the element at index (line2,column2,depth2).
require ensure
  • item(line1, column1, depth1) = old item(line2, column2, depth2)
  • item(line2, column2, depth2) = old item(line1, column1, depth1)
  • count = old count
set_all_with (v: E_)
deferred procedure
{ANY}
Set all item with value v.
ensure
clear_all
frozen
effective procedure
{ANY}
Set all items to default values.
ensure
from_collection3 (model: COLLECTION3[E_])
deferred procedure
{ANY}
Uses model to initialize Current.
require
  • model /= Void
ensure
from_model (model: COLLECTION[COLLECTION[COLLECTION[E_]]])
deferred procedure
{ANY}
The model is used to fill line by line Current.
Assume all sub-collections have the same dimension.
require
  • model /= Void
ensure
all_default: BOOLEAN
deferred function
{ANY}
Do all items have their type's default value?
fast_is_equal (other: COLLECTION3 [E_]): BOOLEAN
effective function
{ANY}
Do both collections have the same lower1, lower2, lower3, upper1, upper2 and upper3, and items?
The basic = is used for comparison of items. See also is_equal.
is_equal (other: COLLECTION3 [E_]): BOOLEAN
effective function
{ANY}
Do both collections have the same lower1, lower2, lower3, upper1, upper2 and upper3, and items?
Feature is_equal is used for comparison of items. See also fast_is_equal.
require
  • other /= Void
ensure
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)
is_equal_map (other: COLLECTION3 [E_]): BOOLEAN
effective function
{ANY}
Do both collections have the same lower, upper, and items?
This feature is obsolete: Use `is_equal' instead.
fill_tagged_out_memory
frozen
effective procedure
{ANY}
Append a viewable information in tagged_out_memory in order to affect the behavior of out, tagged_out, etc.
require
  • locked: tagged_out_locked
ensure
  • still_locked: tagged_out_locked
occurrences (elt: E_): INTEGER_32
deferred function
{ANY}
Number of occurrences using is_equal.
See also fast_occurrences to choose the appropriate one.
ensure
  • Result >= 0
fast_occurrences (elt: E_): INTEGER_32
deferred function
{ANY}
Number of occurrences using =.
See also occurrences to choose the appropriate one.
ensure
  • Result >= 0
has (x: E_): BOOLEAN
deferred function
{ANY}
Search if a element x is in the array using is_equal.
See also fast_has to choose the appropriate one.
fast_has (x: E_): BOOLEAN
deferred function
{ANY}
Search if a element x is in the array using =.
replace_all (old_value: E_, new_value: E_)
deferred procedure
{ANY}
Replace all occurrences of the element old_value by new_value using is_equal for comparison.
See also fast_replace_all to choose the appropriate one.
ensure
fast_replace_all (old_value: E_, new_value: E_)
deferred procedure
{ANY}
Replace all occurrences of the element old_value by new_value using operator = for comparison.
See also replace_all to choose the appropriate one.
ensure
sub_collection3 (line_min: INTEGER_32, line_max: INTEGER_32, column_min: INTEGER_32, column_max: INTEGER_32, depth_min: INTEGER_32, depth_max: INTEGER_32): COLLECTION3 [E_]
deferred function
{ANY}
Create a new object using selected area of Current.
require ensure
  • Result /= Void
set_area (element: E_, line_min: INTEGER_32, line_max: INTEGER_32, column_min: INTEGER_32, column_max: INTEGER_32, depth_min: INTEGER_32, depth_max: INTEGER_32)
effective procedure
{ANY}
Set all the elements of the selected area rectangle with element.
require ensure
test (e1: E_, e2: E_): BOOLEAN
effective function
{ANY}
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
{ANY}
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.