public final class Matrices
extends java.lang.Object
Constructor and Description |
---|
Matrices() |
Modifier and Type | Method and Description |
---|---|
static double |
determinant(double[][] mat)
Calculates the determinant of a matrix.
|
static double[][] |
diagonal(double[] vec)
Creates a diagonal matrix from a vector.
|
static double[][] |
identity(int size)
Creates a identity matrix.
|
static double[][] |
sub(double[][] matA,
double[][] matB)
Subtracts the second from the first matrix and returns a new matrix.
|
static double[][] |
submatrix(double[][] mat,
int row,
int column)
Creates a submatrix excluding the specified row and column.
|
static double[][] |
transpose(double[][] mat)
Creates a transposed matrix.
|
public static double[][] sub(double[][] matA, double[][] matB)
public static double[][] identity(int size)
size
- number of rows an columnspublic static double[][] diagonal(double[] vec)
public static double[][] transpose(double[][] mat)
public static double[][] submatrix(double[][] mat, int row, int column)
public static double determinant(double[][] mat)