eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'AbstractMultidimensionalArray':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: AbstractMultidimensionalArray


Inheritance:

   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

Description:


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:]

copyright

COPYRIGHT (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.

Class protocol:

queries
o  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.


Instance protocol:

accessing
o  _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

o  _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

o  _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

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

o  _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

o  _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

o  _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

o  _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

o  at: index
Modified (comment): / 10-03-2021 / 09:19:01 / cg

o  at: index put: val
Modified (comment): / 10-03-2021 / 09:19:09 / cg

o  dimensions
the dimensions vector;
provides the number of indices per dimension

error handling
o  dimensionError

printing & storing
o  displayFromDimension: dim offset: offset indent: indent on: aStream

o  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
o  dimensions: aPointOrArray
set the dimensions vector;
provides the number of indices per dimension

o  setDimensions: anArray
set the dimensions vector;
provides the number of indices per dimension

queries
o  isMultiDimensionalArray
true if this is a matrix-like collection

o  isSquare
true if this is a square matrix

species instance creation
o  speciesNew: size
create a new instance of my species.
MUST be redefined especially for MatrixAccessor

** This method must be redefined in concrete classes (subclassResponsibility) **



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:05:13 GMT