mama.spad line 1 [edit on github]
Some functions for manipulating (dense) matrices. Supported are various kinds of slicing, splitting and stacking of matrices. The functions resemble operations often used in numerical linear algebra algorithms.
bandMatrix
returns multiple diagonals out of a matrix. The diagonals are put into a matrix of same shape as the original one. Positive integer arguments select upper off-diagonals, negative ones lower off-diagonals.
bandMatrix
returns multiple diagonals out of a matrix. The diagonals are put into a matrix of same shape as the original one. Positive integer arguments select upper off-diagonals, negative ones lower off-diagonals.
blockSplit
splits a matrix into multiple submatrices row and column wise, dividing a matrix into blocks.
blockSplit
splits a matrix into multiple submatrices row and column wise, dividing a matrix into blocks.
columnMatrix
returns a single column out of a matrix. The column is put into a one by N
matrix.
columns
returns several columns out of a matrix. The columns are stacked into a matrix.
columns
returns several columns out of a matrix. The columns are stacked into a matrix.
diagonalMatrix
returns the main diagonal out of a matrix. The diagonal is put into a matrix of same shape as the original one.
diagonalMatrix
returns a diagonal out of a matrix. The diagonal is put into a matrix of same shape as the original one. Positive integer arguments select upper off-diagonals, negative ones lower off-diagonals.
element
returns a single element out of a matrix. The element is put into a one by one matrix.
rowMatrix
returns a single row out of a matrix. The row is put into a one by N
matrix.
rows
returns several rows out of a matrix. The rows are stacked into a matrix.
rows
returns several rows out of a matrix. The rows are stacked into a matrix.
subMatrix
returns several elements out of a matrix. The elements are stacked into a submatrix.
subMatrix
returns several elements out of a matrix. The elements are stacked into a submatrix.