LisaacTM Platform

ARRAY2


General prurpose, resizable, two dimensional array.
Inherit/Insert Summary
parent_collection2
parent_safe_equal No developed.
 
Constructor Summary
create to
Reset all bounds line_minimum / line_maximum / column_minimum and column_maximum using arguments as new values. All elements are set to the default value of type E.
 
Slot Summary
lower1
First Lower index bounds.
lower2
Second Lower index bounds.
upper1
First Upper index bounds.
upper2
Second Upper index bounds.
storage
To store elements line by line.
capacity
Number of elements in storage.
 
Creation / modification:
make to
Reset all bounds line_minimum / line_maximum / column_minimum and column_maximum using arguments as new values. All elements are set to the default value of type E.
from_collection2
Uses model to initialize Current.
from_collection size to
Reset all bounds using line_min, line_max, column_min, and column_max . Copy all elements of contents, line by line into Current.
from_model
The model is used to fill line by line the COLLECTION2. Assume all sub-collections of model have the same indexing. The model is used to fill line by line Current. Assume all sub-collections of model have the same number of lines.
 
Resizing:
resize to
Resize bounds of the Current array
 
Implementation of others feature from COLLECTION2:
item
put to
count1
Size of the first dimension.
count2
Size of the second dimension.
count
Total number of elements.
force to
Put element at position (line,column). Collection is resized first when (line,column) is not inside current bounds. New bounds are initialized with default values.
set_all_with
Set all item with value v.
replace_all with
Replace all occurences of the element old_value by new_value using equal for comparison.
See also fast_replace_all to choose the apropriate one.
fast_replace_all with
Replace all occurences of the element old_value by new_value using operator = for comparison.
See also replace_all to choose the apropriate one.
sub_collection2 to
Create a new object using selected area of Current.
 
Looking and comparison:
occurrences
Number of occurrences using equal.
See also fast_occurrences to chose the apropriate one.
fast_occurrences
Number of occurrences using =.
See also occurrences to chose the apropriate one.
has
Search if a element x is in the array using equal. See also fast_has to chose the apropriate one. Search if a element x is in the array using equal.
See also fast_has to chose the apropriate one.
fast_has
Search if a element x is in the array using =. Search if a element x is in the array using =.
all_default
Do all items have their type's default value?
swap with
Swap the element at index (line1,column1) with the the element at index (line2,column2).
copy
Infix '=='
Do both collections have the same lower1, lower2, upper1 and upper2, and items? The basic = is used for comparison of items.
See also is_equal_map.
is_equal_map
Do both collections have the same lower1, lower2, upper1 and upper2, and items? Feature is_equal is used for comparison of items.
See also is_equal.
 
Other features:
transpose
Transpose the Current array
to_external
Gives C access to the internal storage (may be dangerous).
 
Indexing:
line_minimum
Equivalent of lower1.
column_minimum
Equivalent of lower2.
line_maximum
Equivalent of upper1.
column_maximum
Equivalent of upper2.
 
Index validity:
valid_line
valid_index1
valid_column
valid_index2
valid_index
 
Counting:
line_count
Equivalent of count1.
column_count
Equivalent of count2.
clear_all
Set all items to default values.
 
Creating or initializing:
copy_collection
Copy other to Current.
 
Printing:
fill_tagged_out_memory
 
Miscellaneous features:
set_area to with
Set all the elements of the selected area rectangle with element.
 

Inherit/Insert Detail

parent_collection2

.../base/collection/array2.li line #12

Section:
Inherit

Profile:
+ SelfSELFparent_collection2 :Expanded  COLLECTION2V)

parent_safe_equal

.../base/collection/low_level/collection2.li line #17

Section:
Inherit

Profile:
- SelfSELFparent_safe_equal : SAFE_EQUALV)

Constructor Detail

create to

.../base/collection/array2.li line #36

Section:
Public

Profile:
- SelfSELFcreate  ( line_min : INTEGER, column_min : INTEGER)  to  ( line_max : INTEGER, column_max : INTEGER) : SELF

Description:
Reset all bounds line_minimum / line_maximum / column_minimum and column_maximum using arguments as new values. All elements are set to the default value of type E.

Detail slot

lower1

.../base/collection/array2.li line #16

Section:
Public

Profile:
+ SelfSELFlower1 : INTEGER

Description:
First Lower index bounds.

lower2

.../base/collection/array2.li line #17

Section:
Public

Profile:
+ SelfSELFlower2 : INTEGER

Description:
Second Lower index bounds.

upper1

.../base/collection/array2.li line #19

Section:
Public

Profile:
+ SelfSELFupper1 : INTEGER

Description:
First Upper index bounds.

upper2

.../base/collection/array2.li line #20

Section:
Public

Profile:
+ SelfSELFupper2 : INTEGER

Description:
Second Upper index bounds.

storage

.../base/collection/array2.li line #24

Section:
ARRAY2

Profile:
+ SelfSELFstorage : NATIVE_ARRAYV)

Description:
To store elements line by line.

capacity

.../base/collection/array2.li line #27

Section:
ARRAY2

Profile:
+ SelfSELFcapacity : INTEGER

Description:
Number of elements in storage.

Creation / modification:

make to

.../base/collection/array2.li line #47

Section:
Public

Profile:
- SelfSELFmake  ( line_min : INTEGER, column_min : INTEGER)  to  ( line_max : INTEGER, column_max : INTEGER)

Description:
Reset all bounds line_minimum / line_maximum / column_minimum and column_maximum using arguments as new values. All elements are set to the default value of type E.

from_collection2

.../base/collection/array2.li line #75

Section:
Public

Profile:
- SelfSELFfrom_collection2   model : COLLECTION2V)

Description:
Uses model to initialize Current.

from_collection size to

.../base/collection/array2.li line #92

Section:
Public

Profile:
- SelfSELFfrom_collection   contents : COLLECTIONV)  size  ( line_min : INTEGER, column_min : INTEGER)  to  ( line_max : INTEGER, column_max : INTEGER)

Description:
Reset all bounds using line_min, line_max, column_min, and column_max . Copy all elements of contents, line by line into Current.

from_model

.../base/collection/array2.li line #115

Section:
Public

Profile:
- SelfSELFfrom_model   model : COLLECTIONCOLLECTIONV))

Description:
The model is used to fill line by line the COLLECTION2. Assume all sub-collections of model have the same indexing. The model is used to fill line by line Current. Assume all sub-collections of model have the same number of lines.

Resizing:

resize to

.../base/collection/array2.li line #138

Section:
Public

Profile:
- SelfSELFresize  ( line_min : INTEGER, column_min : INTEGER)  to  ( line_max : INTEGER, column_max : INTEGER)

Description:
Resize bounds of the Current array

Implementation of others feature from COLLECTION2:

item

.../base/collection/array2.li line #169

Section:
Public

Profile:
- SelfSELFitem  ( line : INTEGER, column : INTEGER) : V

put to

.../base/collection/array2.li line #174

Section:
Public

Profile:
- SelfSELFput   element : V  to  ( line : INTEGER, column : INTEGER)

count1

.../base/collection/array2.li line #179

Section:
Public

Profile:
- SelfSELFcount1 : INTEGER

Description:
Size of the first dimension.

count2

.../base/collection/array2.li line #184

Section:
Public

Profile:
- SelfSELFcount2 : INTEGER

Description:
Size of the second dimension.

count

.../base/collection/array2.li line #189

Section:
Public

Profile:
- SelfSELFcount : INTEGER

Description:
Total number of elements.

force to

.../base/collection/array2.li line #194

Section:
Public

Profile:
- SelfSELFforce   x : V  to  ( line : INTEGER, column : INTEGER)

Description:
Put element at position (line,column). Collection is resized first when (line,column) is not inside current bounds. New bounds are initialized with default values.

set_all_with

.../base/collection/array2.li line #203

Section:
Public

Profile:
- SelfSELFset_all_with   element : V

Description:
Set all item with value v.

replace_all with

.../base/collection/array2.li line #208

Section:
Public

Profile:
- SelfSELFreplace_all   old_value : V  with   new_value : V

Description:
Replace all occurences of the element old_value by new_value using equal for comparison.
See also fast_replace_all to choose the apropriate one.

fast_replace_all with

.../base/collection/array2.li line #213

Section:
Public

Profile:
- SelfSELFfast_replace_all   old_value : V  with   new_value : V

Description:
Replace all occurences of the element old_value by new_value using operator = for comparison.
See also replace_all to choose the apropriate one.

sub_collection2 to

.../base/collection/array2.li line #218

Section:
Public

Profile:
- SelfSELFsub_collection2  ( line_min : INTEGER, column_min : INTEGER)  to  ( line_max : INTEGER, column_max : INTEGER) : SELF

Description:
Create a new object using selected area of Current.

Looking and comparison:

occurrences

.../base/collection/array2.li line #243

Section:
Public

Profile:
- SelfSELFoccurrences   elt : VINTEGER

Description:
Number of occurrences using equal.
See also fast_occurrences to chose the apropriate one.

fast_occurrences

.../base/collection/array2.li line #248

Section:
Public

Profile:
- SelfSELFfast_occurrences   elt : VINTEGER

Description:
Number of occurrences using =.
See also occurrences to chose the apropriate one.

has

.../base/collection/array2.li line #253

Section:
Public

Profile:
- SelfSELFhas   x : VBOOLEAN

Description:
Search if a element x is in the array using equal. See also fast_has to chose the apropriate one. Search if a element x is in the array using equal.
See also fast_has to chose the apropriate one.

fast_has

.../base/collection/array2.li line #264

Section:
Public

Profile:
- SelfSELFfast_has   x : VBOOLEAN

Description:
Search if a element x is in the array using =. Search if a element x is in the array using =.

all_default

.../base/collection/array2.li line #274

Section:
Public

Profile:
- SelfSELFall_default : BOOLEAN

Description:
Do all items have their type's default value?

swap with

.../base/collection/array2.li line #279

Section:
Public

Profile:
- SelfSELFswap  ( line1 : INTEGER, column1 : INTEGER)  with  ( line2 : INTEGER, column2 : INTEGER)

Description:
Swap the element at index (line1,column1) with the the element at index (line2,column2).

copy

.../base/collection/array2.li line #291

Section:
Public

Profile:
- SelfSELFcopy   other : SELF

Infix '=='

.../base/collection/array2.li line #304

Section:
Public

Profile:
- SelfSELF== ' Right 60  other : SELFBOOLEAN

Description:
Do both collections have the same lower1, lower2, upper1 and upper2, and items? The basic = is used for comparison of items.
See also is_equal_map.

is_equal_map

.../base/collection/low_level/collection2.li line #306

Section:
Public

Profile:
- SelfSELFis_equal_map   other : COLLECTION2V) : BOOLEAN

Description:
Do both collections have the same lower1, lower2, upper1 and upper2, and items? Feature is_equal is used for comparison of items.
See also is_equal.

Other features:

transpose

.../base/collection/array2.li line #325

Section:
Public

Profile:
- SelfSELFtranspose 

Description:
Transpose the Current array

to_external

.../base/collection/array2.li line #353

Section:
Public

Profile:
- SelfSELFto_external : POINTER

Description:
Gives C access to the internal storage (may be dangerous).

Indexing:

line_minimum

.../base/collection/low_level/collection2.li line #39

Section:
Public

Profile:
- SelfSELFline_minimum : INTEGER

Description:
Equivalent of lower1.

column_minimum

.../base/collection/low_level/collection2.li line #42

Section:
Public

Profile:
- SelfSELFcolumn_minimum : INTEGER

Description:
Equivalent of lower2.

line_maximum

.../base/collection/low_level/collection2.li line #59

Section:
Public

Profile:
- SelfSELFline_maximum : INTEGER

Description:
Equivalent of upper1.

column_maximum

.../base/collection/low_level/collection2.li line #62

Section:
Public

Profile:
- SelfSELFcolumn_maximum : INTEGER

Description:
Equivalent of upper2.

Index validity:

valid_line

.../base/collection/low_level/collection2.li line #108

Section:
Public

Profile:
- SelfSELFvalid_line   line : INTEGERBOOLEAN

valid_index1

.../base/collection/low_level/collection2.li line #116

Section:
Public

Profile:
- SelfSELFvalid_index1   line : INTEGERBOOLEAN

valid_column

.../base/collection/low_level/collection2.li line #121

Section:
Public

Profile:
- SelfSELFvalid_column   column : INTEGERBOOLEAN

valid_index2

.../base/collection/low_level/collection2.li line #129

Section:
Public

Profile:
- SelfSELFvalid_index2   column : INTEGERBOOLEAN

valid_index

.../base/collection/low_level/collection2.li line #134

Section:
Public

Profile:
- SelfSELFvalid_index  ( line : INTEGER, column : INTEGER) : BOOLEAN

Counting:

line_count

.../base/collection/low_level/collection2.li line #157

Section:
Public

Profile:
- SelfSELFline_count : INTEGER

Description:
Equivalent of count1.

column_count

.../base/collection/low_level/collection2.li line #170

Section:
Public

Profile:
- SelfSELFcolumn_count : INTEGER

Description:
Equivalent of count2.

clear_all

.../base/collection/low_level/collection2.li line #208

Section:
Public

Profile:
- SelfSELFclear_all 

Description:
Set all items to default values.

Creating or initializing:

copy_collection

.../base/collection/low_level/collection2.li line #250

Section:
Public

Profile:
- SelfSELFcopy_collection   other : COLLECTION2V)

Description:
Copy other to Current.

See:
copy.

Printing:

fill_tagged_out_memory

.../base/collection/low_level/collection2.li line #337

Section:
Public

Profile:
- SelfSELFfill_tagged_out_memory 

Miscellaneous features:

set_area to with

.../base/collection/low_level/collection2.li line #454

Section:
Public

Profile:
- SelfSELFset_area  ( line_min : INTEGER, column_min : INTEGER)  to  ( line_max : INTEGER, column_max : INTEGER)  with   element : V

Description:
Set all the elements of the selected area rectangle with element.