public class MatrixUtility
extends java.lang.Object
Constructor and Description |
---|
MatrixUtility() |
Modifier and Type | Method and Description |
---|---|
static void |
add(Matrix a,
Matrix b)
This method adds a matrix to a reference matrix.
|
static void |
elementWiseMultiply(Matrix a,
Matrix b)
This method returns the element wise product of two matrices.
|
static Matrix |
getIdentityMatrix(int i)
This method returns an identity matrix of size i.
|
static void |
scalarMultiply(Matrix a,
double b)
This method multiplies all the element of a matrix by a double.
|
static void |
subtract(Matrix a,
Matrix b)
This method subtracts a matrix from a reference matrix.
|
public static void add(Matrix a, Matrix b)
a
- a Matrix instance (the reference)b
- a Matrix instancepublic static void subtract(Matrix a, Matrix b)
a
- a Matrix instance (the reference)b
- a Matrix instancepublic static void elementWiseMultiply(Matrix a, Matrix b)
a
- a Matrix instance (the reference)b
- a Matrix instancepublic static void scalarMultiply(Matrix a, double b)
a
- a Matrix instanceb
- a double instancepublic static Matrix getIdentityMatrix(int i)
i
- the dimension of the matrix