About Data Structures in the LinearAlgebra Package
|
LinearAlgebra routines operate on three principal data structures: Matrices, Vectors, and scalars. The implementation of Matrices and Vectors is based on Maple's rtable data structure. As a result, table-based arrays, matrices and vectors are not interchangeable with LinearAlgebra Matrices and Vectors.
|
|
Note: The documentation regarding the LinearAlgebra package uses the convention that "matrix" (lowercase "m") refers to a table-based matrix used by routines in the linalg package, and "Matrix" (uppercase "M") refers to an rtable-based Matrix used by routines in the LinearAlgebra package. The convention is similar for vectors and Vectors.
|
|
Matrices
|
|
•
|
A Matrix is implemented as an rtable with subtype option Matrix.
|
•
|
The mathematical Matrix types supported in the LinearAlgebra package are: rectangular, triangular, Hessenberg, band, and diagonal. Each of these Matrix types can be created in dense or sparse format, and the first three also come in several varieties.
|
|
|
|
|
symmetric,
|
skew-symmetric,
|
hermitian,
|
skew-hermitian
|
|
|
|
|
upper,
|
upper unit,
|
lower,
|
lower unit
|
|
|
|
iii. Hessenberg (triangular plus one extra diagonal):
|
|
There is no special Matrix type for block forms of the above Matrix types. That is, while the facility exists for the construction of block Matrices of various types (e.g., block diagonal, block triangular, etc.), the blocks are flattened during the construction process, and the resulting Matrix does not preserve the block form.
|
•
|
A number of special Matrices are provided in the LinearAlgebra package (e.g., the Identity Matrix, the Zero Matrix, and the Constant Matrix). In addition, the LinearAlgebra package includes many Matrix operations. See Details of the LinearAlgebra Package for more information.
|
•
|
Matrix algebra expressions such as A+B, A-B, and A.B are evaluated directly. For more information on performing Matrix algebra and using the Matrix multiplication operator, see rtable_algebra and dot, respectively.
|
•
|
The map, Map, map2, and Map2 commands can be used to apply a function to each entry in a Matrix.
|
|
|
Vectors
|
|
•
|
A Vector is implemented as an rtable with subtype option Vector[column] or Vector[row].
|
•
|
A number of special Vectors are provided in the LinearAlgebra package (e.g., the Unit Vector, the Zero Vector, and the Constant Vector). In addition, the LinearAlgebra package includes many Vector operations. See Details of the LinearAlgebra Package for more information.
|
•
|
The map, Map, map2, and Map2 commands can be used to apply a function to each entry in a Vector.
|
|
|
Scalars
|
|
•
|
A scalar is a Maple object of type algebraic which neither is nor includes a Matrix or a Vector.
|
|
|
Compatibility with Other Maple Objects
|
|
|
The following objects are not recognized as Matrices, Vectors or scalars.
|
•
|
rtable-based Arrays (rtables with subtype option Array)
|
|
|
|
|
|
|