class ARRAY2{T} < $ELT{T} |
---|
**** | Two-dimensional arrays of elements of type T. |
$ELT{_} | $ELT | AREF{_} |
attr size1:INT; |
---|
**** | Size of the slowest changing dimension. |
attr size2:INT; |
---|
**** | Size of the fastest changing dimension. |
aget(i1,i2:INT):T |
---|
**** | The element with indices `[i1,i2]'. |
aset(i1,i2:INT,val:T) |
---|
**** | Set the element with indices `[i1,i2]' to val. |
copy(a: ARRAY{ARRAY{T}}) |
---|
**** | Copy as much of a as will fit into self |
copy: SAME |
---|
**** | Return a new 2D array with the same set of values as self |
create(a: ARRAY{ARRAY{T}}): SAME |
---|
**** | Create a new array with the same dimensions and values as a, which is an array of arrays(rows). Assume that all the rows of "a" have the same number of elements |
create(d1,d2:INT):SAME |
---|
**** | A new two-dimensional array with dimensions `d1 x d2' initialized to void. |
nc: INT |
---|
**** | The size of the second dimension of the array. Number of cols |
nr: INT |
---|
**** | The size of the first dimension of the array. Number of rows |
resize(sz1, sz2:INT):SAME |
---|
to_portion_of(a: SAME) |
---|
**** | Copy into self as much of arg as will fit and return it. Don't alter other elements. |
to_transpose_of(a:SAME) |
---|
**** | Set self to the transpose of a. |
transpose: SAME |
---|
**** | Return a new array containing the transpose of self |
col_elt!(once col:INT):T |
---|
**** | Yield elements by varying index 1 and holding index 2 at `col'. The elements of a "column" col |
col_ind!:INT |
---|
**** | Yield each value of the second index in order. The columns |
diag_elt!: T |
---|
**** | Yield values along the diagonal (square in smaller dimension) |
elt!: T |
---|
**** | Yield all elements in row major order |
elt1!(once i1:INT):T |
---|
**** | Yield elements by varying index 2 and holding index 1 at `i1'. The elements of a row "i1" this is the same as row_elt! |
elt2!(once i2:INT):T |
---|
**** | Yield elements by varying index 1 and holding index 2 at `i2'. The elements of a "column" i2 this is the same as col_elt! |
ind1!: INT |
---|
**** | Yield each value of the first index in order. The rows |
ind2!:INT |
---|
**** | Yield each value of the second index in order. The columns |
inds!:TUP{INT,INT} |
---|
**** | Yield tuples of the indices of self in lexicographical order. |
row_elt!(once row:INT):T |
---|
**** | Yield elements by varying index 2 and holding index 1 at `row'. The elements of a row "row" |
row_ind!: INT |
---|
**** | Yield each value of the first index in order. The rows |
set!(val:T) |
---|
**** | Set all elements in row major order |
set1!(once i1:INT, val:T) |
---|
**** | Set to val elements with varying index 2 and index 1 fixed at `i1'. i.e. setting the row i1 this is the same as set_row! |
set2!(once i2:INT, val:T) |
---|
**** | Set to val elements with varying index 1 and index 2 fixed at `i2'. i.e. setting the column i2 this is the same as set_col! |
set_col!(once col:INT, val:T) |
---|
**** | Set to val elements with varying index 1 and index 2 fixed at `col'. i.e. setting the column col |
set_diag_elt!(val:T) |
---|
**** | Set values along the diagonal (square in smaller dimension) |
set_row!(once row:INT, val:T) |
---|
**** | Set to val elements with varying index 2 and index 1 fixed at `row'. i.e. setting a row "row" |
attr size1:INT; |
---|
**** | Size of the slowest changing dimension. |
attr size2:INT; |
---|
**** | Size of the fastest changing dimension. |