|
Class: AbstractMultidimensionalArray
Object
|
+--Collection
|
+--SequenceableCollection
|
+--AbstractMultidimensionalArray
|
+--AbstractMatrix
- Package:
- stx:libbasic
- Category:
- Collections-MultiDimensional
- Version:
- rev:
1.11
date: 2022/02/23 08:08:45
- user: cg
- file: AbstractMultidimensionalArray.st directory: libbasic
- module: stx stc-classLibrary: libbasic
documentation to be added.
class:
<a short class summary here, describing what instances represent>
responsibilities:
<describing what my main role is>
collaborators:
<describing with whom and how I talk to>
API:
<public api and main messages>
example:
<a one-line examples on how to use - can also be in a separate example method>
implementation:
<implementation points>
[instance variables:]
[class variables:]
copyrightCOPYRIGHT (c) 2018 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.
accessing
-
_at: index
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx] is parsed.
I.e.
foo[n]
generates
foo _at: n
-
_at: index1 at: index2
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx1][idx2] is parsed.
I.e.
foo[n][m]
generates
foo _at:n at:m
-
_at: index1 at: index2 at: index3
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx1][idx2][idx3] is parsed.
I.e.
foo[n][m][o]
generates
foo _at:n at:m at:o
-
_at: index1 at: index2 at: index3 at: index4
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx1][idx2][idx3][idx4] is parsed.
I.e.
foo[n][m][o][p]
generates
foo _at:n at:m at:o at:p
-
_at: index1 at: index2 at: index3 at: index4 put: value
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx1][idx2][idx3][idx4] := is parsed.
I.e.
foo[n][m][o][p] := expr
generates
foo _at:n at:m at:o at:p put:expr
-
_at: index1 at: index2 at: index3 put: val
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx1][idx2][idx3] := val is parsed.
I.e.
foo[n][m][o] := val
generates
foo _at:n at:m at:o put:val
-
_at: index1 at: index2 put: val
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx1][idx2] := val is parsed.
I.e.
foo[n][m] := val
generates
foo _at:n at:m put:val
-
_at: index put: val
-
this is a synthetic selector, generated by the compiler,
if a construct of the form expr[idx] := val is parsed.
I.e.
foo[n] := val
generates
foo _at:n put:val
-
at: index
-
Modified (comment): / 10-03-2021 / 09:19:01 / cg
-
at: index put: val
-
Modified (comment): / 10-03-2021 / 09:19:09 / cg
-
dimensions
-
the dimensions vector;
provides the number of indices per dimension
error handling
-
dimensionError
-
printing & storing
-
displayFromDimension: dim offset: offset indent: indent on: aStream
-
-
displayOn: aStream
-
|m2a m2b m3|
m2a := (Matrix[2][2])
contents:#(
1 2
5 1
).
m2b := (Matrix[3][2])
contents:#(
1 2
5 1
9 2
).
m3 := (Matrix[3][2][2])
contents:#(
1 2
3 4
10 20
30 40
100 200
300 400
).
private
-
dimensions: aPointOrArray
-
set the dimensions vector;
provides the number of indices per dimension
-
setDimensions: anArray
-
set the dimensions vector;
provides the number of indices per dimension
queries
-
isMultiDimensionalArray
-
true if this is a matrix-like collection
-
isSquare
-
true if this is a square matrix
species instance creation
-
speciesNew: size
-
create a new instance of my species.
MUST be redefined especially for MatrixAccessor
** This method must be redefined in concrete classes (subclassResponsibility) **
|