Lisaac prototype interface

Section Header
+ name := ARRAY[E];
- comment :=" General purpose resizable ARRAYs .";
General purpose resizable ARRAYs as they are define in the Eiffel language definition.
The `lower' bound can be any arbitrary value, even a negative one.
This implementation uses only one chunk of memory, the `storage' area which is a
NATIVE_ARRAY. One must keep in mind that this internal `storage' area is always kept
left align. Thus, you can expect good performances while using an ARRAY to modelize a
stack behavior with `add_last' / `last' / `remove_last'.
Conversely `add_first' and `remove_first' are likely to slow down your program if
they are too often used. If the fact that `lower' is always stuck to 0 is not a
problem for you, also consider FAST_ARRAY to get better performances.
Section Inherit
+ parent_arrayed_collection:Expanded ARRAYED_COLLECTION[E];
Section Public
+ lower:INTEGER;
Lower index bound.
Creation and Modification:
- create min_index:INTEGER to max_index:INTEGER :SELF <-
Prepare the array to hold values for indexes in range
[`min_index' .. `max_index']. Set all values to default.
When `max_index' = `min_index' - 1, the array `is_empty'.
- make min_index:INTEGER to max_index:INTEGER <-
Prepare the array to hold values for indexes in range
[`min_index' .. `max_index']. Set all values to default.
When `max_index' = `min_index' - 1, the array `is_empty'.
- create_with_capacity needed_capacity:INTEGER lower low:INTEGER :SELF <-
Create an empty array with `capacity' initialized
at least to `needed_capacity' and `lower' set to `low'.
- with_capacity needed_capacity:INTEGER lower low:INTEGER <-
Create an empty array with `capacity' initialized
at least to `needed_capacity' and `lower' set to `low'.
Section Public
- ensure_capacity needed_capacity:INTEGER and_bounds low:INTEGER to up:INTEGER <-
Modification:
- resize min_index:INTEGER to max_index:INTEGER <-
Resize to bounds `min_index' and `max_index'. Do not lose any
item whose index is in both [`lower' .. `upper'] and
[`min_index' .. `max_index']. New positions if any are
initialized with the appropriate default value.
- reindex new_lower:INTEGER <-
Change indexing to take in account the expected `new_lower'
index. The `upper' index is translated accordingly.
Implementation of deferred:
- subarray min:INTEGER to max:INTEGER :SELF <-
- is_empty:BOOLEAN <-
- count:INTEGER <-
- item i:INTEGER :E <-
- put element:E to i:INTEGER <-
- force element:E to index:INTEGER <-
- copy other:SELF <-
- set_all_with v:E <-
- remove_first <-
- remove_head n:INTEGER <-
- remove index:INTEGER <-
- clear <-
- add_first element:E <-
- add_last element:E <-
- from_collection model:COLLECTION[E] <-
- all_default:BOOLEAN <-
- occurrences element:E :INTEGER <-
- fast_occurrences element:E :INTEGER <-
- first_index_of element:E :INTEGER <-
- index_of element:E start start_index:INTEGER :INTEGER <-
- reverse_index_of element:E start start_index:INTEGER :INTEGER <-
- fast_index_of element:E start start_index:INTEGER :INTEGER <-
- fast_reverse_index_of element:E start start_index:INTEGER :INTEGER <-
- '==' Right 60 other:SELF :BOOLEAN <-
- is_equal_map other:SELF :BOOLEAN <-
- slice min:INTEGER to max:INTEGER :SELF <-