matrix1
http://www.win.tue.nl/SCIEnce/cds/matrix1.ocd
2009-06-22
0
4
experimental
alg1
ringname1
linalg2
linalg3
This CD holds a collection of matrix constructors over arbitrary rings.
entry_domain
This symbol is a unary function, whose argument should be a ring r.
When applied to r, it represents the matrix-algebra ground domain (MAD).
matrix_domain
This symbol is a ternary function, whose first argument should be a
matrix1.entry_domain application.
The second and third arguments must be matrix1.row_dimension
and matrix1.column_dimension.
When applied to these arguments this `creates' the domain of linear mappings
between modules of specified dimensions over a common ground domain,
conveniently represented by matrices.
12
10
row_dimension
This symbol is a unary function whose first argument must be either a
non-negative OpenMath integer or nums1.infinity.
When applied this creates an object that denotes the dimension of the
codomain of the linear mapping represented by the matrix.
column_dimension
This symbol is a unary function whose first argument must be either a
non-negative OpenMath integer or nums1.infinity.
When applied this creates an object that denotes the dimension of the
domain of the linear mapping represented by the matrix.
matrix
This symbol is a binary function whose first argument must be a
matrix algebra constructor and the second argument can be any of the
below matrix entry constructors.
Additionally it is possible to use the matrix constructors of the
linalg2 or linalg3 CDs.
Todo
dense
This symbol is an $(m \cdot n)$-ary function whose arguments specify
the entries of the matrix, where $m$ is the dimension of the codomain
and $n$ is the dimension of the domain.
The matrix (or block) must be filled row-wise, that is the first argument
denotes the entry in row 1, column 1 of the matrix (or block), the second
argument denotes the entry at row 1, column 2, and so forth.
The number of arguments MUST match the dimensions of either the matrix
algebra or the surrounding block (see below).
3
3
1
2
3
4
5
6
7
8
9
sparse
The constructor for sparse matrices without any indication of dimension
or domain for the coefficients.
Its arguments are just matrix1.sparse_entrys.
Attention: No two matrix1.sparse_entrys must specify the
same location.
sparse_entry
This symbol denotes a ternary function whose first two arguments specify
the location of an entry inside the matrix, and whose final argument is
the entry itself.
The entry MUST be either from the specified ground domain directly,
or be a diagonal constructor as described below, a block constructor
as described below, or a banded constructor as described below.
In the block case, the dimensions of the block MUST NOT exceed the total
dimensions of the matrix algebra.
In the diagonal case, the dimension of the diagonal MUST NOT exceed the
total dimensions of the matrix algebra.
3
3
1
2
12
2
1
21
3
3
33
diagonal
This symbol is an $m$-ary function whose arguments specify the entries of
a (generalised) matrix diagonal.
The diagonal must be filled from top-left to bottom-right. That is: the
first argument represents the entry in row 1, column 1 of the matrix,
the second argument denotes the entry at row 2, column 2, and so forth.
If used inside a sparse_entry object at location $(i, j)$, the first entry
is offset accordingly.
If not used inside a sparse_entry object, the number of arguments MUST
match the dimensions of either the matrix algebra (the smaller of $m$ and
$n$).
If used inside a sparse_entry object, the number of entries MUST NOT
exceed the total matrix dimensions.
3
3
1
1
2
2
3
3
block
This symbol is like the matrix constructor as described above, but
intended for use inside matrix to form ``submatrices''. The symbol
takes at least two arguments: a column_dimension and a row_dimension
object which denote the total extent of the block.
30
30
10
20
2
2
11
12
21
22
1000000
1000000
24800
26133
99999
99999
4
15
0
banded
This symbol is a constructor for banded matrices. It takes at least
2 arguments, the first of which being the number of upper bands and
the second being the number of lower bands.
Amongst the further arguments you can specify AT MOST one
matrix1.diagonal object. You MUST exactly as many
matrix1.upper_band objects as you specified upper bands, and
you MUST specify as many matrix1.lower_band objects as you
specified lower bands.
This symbol facilitates the use of blas based systems which expect
to know the bands structure upfront.
7
3
3
1
1
111
222
333
1
4
5
1
1
2
upper_band
This symbol is a binary function whose first argument is a non-negative
OpenMath integer which denotes the index of the upper band which is
specified in the second argument.
Hereby the first upper band is the one immediately above the main
(generalised) diagonal, its starting coordinates relative to the top-left
of the matrix thus are (1, 2).
lower_band
This symbol is a binary function whose first argument is a non-negative
OpenMath integer which denotes the index of the lower band which is
specified in the second argument.
Hereby the first lower band is the one immediately below the main
(generalised) diagonal, its starting coordinates relative to the top-left
of the matrix thus are (2, 1).