Implemented are functions: - finding inverse of a matrix - solving linear equation systems using the Gauss-Elimination method - basic operations like matrix multiplication, addition and so on.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public short[][] | Returns: addition of matrix1 and matrix2first summand matrix1, short[][] second summand matrix2)Adds the matrices matrix1 and matrix2 |
| public short[][] | Returns: addition of matrix and matrix_transposefirst summand matrix)Adds the transpose of a n x n matrix to itself |
| public short[] | Returns: addition of vector1 and vector2first summand, always of dim n vector1, short[] second summand, always of dim n vector2)Addition of two vectors |
| private void | |
| public short[][] | Returns: inverse matrix of the input matrix. If the matrix is singular, null is returned.the matrix which inverse matrix is needed coef)This function computes the inverse of a given matrix using the Gauss- Elimination method. |
| public short[][] | Returns: A = M1*M2-the 1st matrix M1, short[][] -the 2nd matrix M2)This function multiplies two given matrices. |
| public short[] | Returns: M1*mthe matrix to be multiplied M1, short[] the one-dimensional array to be multiplied m)This function multiplies a given matrix with a one-dimensional array. |
| public short | Returns: m_transpose*M1*mthe matrix to be multiplied M1, short[] the one-dimensional array to be multiplied m)This function multiplies a given matrix with a one-dimensional array as m_transpose * M1 * m. |
| public short[][] | Returns: matrix multiplied with scalargalois element to multiply matrix with scalar, short[][] 2-dim n x n matrix to be multiplied matrix)Multiplies matrix with scalar |
| public short[] | Returns: vector multiplied with scalargalois element to multiply vector with scalar, short[] vector to be multiplied vector)Multiplies vector with scalar |
| public short[][] | Returns: resulting n x n matrix of multiplicationcolumn vector, always n x 1 vector1, short[] row vector, always 1 x n vector2)Multiplication of column vector with row vector |
| public short[][][] | Returns: batch matrix a * b + cmatrix a, short[][][] batched matrix b, short[][][] batched matrix c)Computes a * b + c for batched matrices b and c |
| public short[] | Returns: x the solution of the equation if it is solvable null otherwisethis matrix is the left part of the
equation (B in the equation above) B, short[] the right part of the equation
(b in the equation above) b)This function finds a solution of the equation Bx = b. |
| public short[][] | Returns: UT of matrixmatrix to turn into UT matrix)Compute upper triangular matrix for given n x n matrix |
| public short[][] | Returns: transpose of matrixmatrix to transpose matrix)Returns the transpose of matrix |
| ComputeInField | back to summary |
|---|---|
| public ComputeInField() Constructor with no parameters | |
| addMatrix | back to summary |
|---|---|
| public short[][] addMatrix(short[][] matrix1, short[][] matrix2) Adds the matrices matrix1 and matrix2
| |
| addMatrixTranspose | back to summary |
|---|---|
| public short[][] addMatrixTranspose(short[][] matrix) Adds the transpose of a n x n matrix to itself
| |
| addVect | back to summary |
|---|---|
| public short[] addVect(short[] vector1, short[] vector2) Addition of two vectors
| |
| gaussElim | back to summary |
|---|---|
| private void gaussElim(short[][] A) | |
| inverse | back to summary |
|---|---|
| public short[][] inverse(short[][] coef) This function computes the inverse of a given matrix using the Gauss- Elimination method. An exception is thrown if the matrix has no inverse
| |
| multiplyMatrix | back to summary |
|---|---|
| public short[][] multiplyMatrix(short[][] M1, short[][] M2) throws RuntimeException This function multiplies two given matrices. If the given matrices cannot be multiplied due to different sizes, an exception is thrown.
| |
| multiplyMatrix | back to summary |
|---|---|
| public short[] multiplyMatrix(short[][] M1, short[] m) throws RuntimeException This function multiplies a given matrix with a one-dimensional array. An exception is thrown, if the number of columns in the matrix and the number of rows in the one-dim. array differ.
| |
| multiplyMatrix_quad | back to summary |
|---|---|
| public short multiplyMatrix_quad(short[][] M1, short[] m) throws RuntimeException This function multiplies a given matrix with a one-dimensional array as m_transpose * M1 * m. An exception is thrown, if matrix is ot quadratic and the number of columns in the matrix and the number of rows in the one-dim. array differ.
| |
| multMatrix | back to summary |
|---|---|
| public short[][] multMatrix(short scalar, short[][] matrix) Multiplies matrix with scalar
| |
| multVect | back to summary |
|---|---|
| public short[] multVect(short scalar, short[] vector) Multiplies vector with scalar
| |
| multVects | back to summary |
|---|---|
| public short[][] multVects(short[] vector1, short[] vector2) Multiplication of column vector with row vector
| |
| obfuscate_l1_polys | back to summary |
|---|---|
| public short[][][] obfuscate_l1_polys(short[][] a, short[][][] b, short[][][] c) Computes a * b + c for batched matrices b and c
| |
| solveEquation | back to summary |
|---|---|
| public short[] solveEquation(short[][] B, short[] b) This function finds a solution of the equation Bx = b. Exception is thrown if the linear equation system has no solution
| |
| to_UT | back to summary |
|---|---|
| public short[][] to_UT(short[][] matrix) Compute upper triangular matrix for given n x n matrix
| |
| transpose | back to summary |
|---|---|
| public short[][] transpose(short[][] matrix) Returns the transpose of matrix
| |