Module matrix
matrices (as known from linear algebra)
Class Matrix
Matrix.new (init, ncol, ring) | constructor. |
Matrix.newNoInit (nrow, ncol, ring) | creates a new matrix without actually creating the nested tables. |
Matrix.one (n, ring) | identity matrix |
Matrix.t (mat) | transposed matrix. |
Matrix.glue (mat, mat2, dir) | "glue" two matrices together (Standard: horizontally = h). |
Class Matrix
Matrix entries could be elements of some ring
(copied from cryptology courses). This functionality is
currently not implemented here (exept for rationals).
- Matrix.new (init, ncol, ring)
-
constructor.
Parameters:
- init number or 2dim-table or 1dim-table or Matrix
- ncol number #of columns if not implicitly given by 2dim-table or matrix as first argument.
- ring table class to which each element belongs (e.g. Rationals ;nil -> float)
- Matrix.newNoInit (nrow, ncol, ring)
-
creates a new matrix without actually creating
the nested tables. Yout have to do this yourself.
Parameters:
- nrow
- ncol
- ring
- Matrix.one (n, ring)
-
identity matrix
Parameters:
- n
- ring
- Matrix.t (mat)
-
transposed matrix.
Parameters:
- mat
- Matrix.glue (mat, mat2, dir)
-
"glue" two matrices together (Standard: horizontally = h).
Parameters:
- mat
- mat2
- dir