|
Class: AbstractMatrix
Object
|
+--Collection
|
+--SequenceableCollection
|
+--AbstractMultidimensionalArray
|
+--AbstractMatrix
|
+--Matrix
|
+--MatrixAccessor
- Package:
- stx:libbasic
- Category:
- Collections-MultiDimensional
- Version:
- rev:
1.4
date: 2021/11/08 22:13:18
- user: cg
- file: AbstractMatrix.st directory: libbasic
- module: stx stc-classLibrary: libbasic
- Author:
- cg
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:]
accessing
-
at: index
-
dimensions size ~~ 1 ifTrue:[self dimensionError].
-
at: index put: val
-
dimensions size ~~ 1 ifTrue:[self dimensionError].
-
subMatrix: aPoint
-
}
Usage example(s):
(Matrix3_3 withAll:#(11 12 13
21 22 23
31 32 33))
subMatrix:(1 @ 1)
|
arithmetic
-
* aNumberOrMatrix
-
Answer the result of multiplying this matrix by a scalar.
Usage example(s):
|m1 m2|
m1 := (Matrix[2][2])
contents:#(
1 2
5 1
).
m1 * 10
|
-
+ aMatrix
-
Answer the result of adding 'aMatrix' to this matrix.
Usage example(s):
|m1 m2|
m1 := (Matrix[2][2])
contents:#(
1 2
5 1
).
m2 := (Matrix[2][2])
contents:#(
3 -1
2 1
).
m1 + m2
|
Usage example(s):
|m1|
m1 := (Matrix[2][2])
contents:#(
1 2
5 1
).
m1 + 1
|
-
- aMatrix
-
Answer the result of subtracting 'aMatrix' from this matrix.
Usage example(s):
|m1 m2|
m1 := (Matrix[2][2])
contents:#(
1 2
5 1
).
m2 := (Matrix[2][2])
contents:#(
3 -1
2 1
).
m1 - m2
|
Usage example(s):
Modified (comment): / 28-02-2021 / 14:43:03 / cg
|
-
/ aNumberOrMatrix
-
Answer the result of dividing this matrix by a scalar.
Usage example(s):
|m1 m2|
m1 := (Matrix[2][2])
contents:#(
1 2
5 1
).
m1 / 2
|
double dispatching
-
differenceFromMatrix: aMatrix
-
Answer the result of subtracting the receiver from 'aMatrix'.
This is a slow fallback
(and even that may be tuned to avoid the repeated index computation
and useless bounds checks involved)
-
productFromMatrix: aMatrix
-
Answer the result of multiplying 'aMatrix' with this matrix.
This is a slow fallback
(and even that may be tuned to avoid the repeated index computation
and useless bounds checks involved)
-
sumFromMatrix: aMatrix
-
Answer the result of adding 'aMatrix' to this matrix.
This is a slow fallback
(and even that may be tuned to avoid the repeated index computation
and useless bounds checks involved)
matrix operations
-
determinant
-
-
minor: aPoint
-
Modified (format): / 10-03-2021 / 09:17:02 / cg
-
transposed
-
return a transposed matrix
Usage example(s):
|m|
m := (Matrix[3][2]) contents:#( 1 2
3 4
5 6).
m transposed.
m transposed transposed.
m * m transposed.
|
queries
-
cofactor: aPoint
-
Modified (format): / 10-03-2021 / 09:16:48 / cg
-
columns
-
the number of columns
-
rows
-
the number of rows
|