Extensions |
Hereinafter the following convention is used:
– small Greek letters are used to denote scalars;
– small Latin letters are used to denote vectors;
– capital Latin letters are used to denote matrices.
Permutation of matrix columns/rows is specified by array of indices which denote the order of columns/rows in the resulting matrix. Note that indices start from 0.
Operation | Description | Performance |
---|---|---|
clear | Sets all elements of the matrix to zero. | |
negate | Negates all elements of the matrix. | |
rank-1 update | Performs in-place rank-1 update of this matrix (adds scaled outer product of two vectors). Given the matrix A, two vectors u and v, and a constant α the result will be: the result will be: | |
scale rows | Scales each row of the matrix by corresponding factor. Given the matrix A and vector of factors b: the result will be: | |
scale columns | Scales each column of the matrix by corresponding factor. Given the matrix A and vector of factors c: the result will be: | |
transposed multiply | Multiplies transposed matrix by given vector: Returning result:Out of place:TransposedMultiply(Vector, Vector) Multiplies transposed matrix by another matrix: Returning result:Out of place: | |
matrix-matrix product in general form | Computes the matrix-matrix product in general form. It multiplies this matrix C by scalar β and adds the product of matrices A and B scaled by α. User may specify whether the matrices A or B should be transposed before multiplicetion. GeneralMatrixMatrixMultiply(Double, Matrix, Boolean, Matrix, Boolean, Double) |