org.encog.mathutil.matrices
public final class MatrixMath extends Object
Modifier and Type | Method and Description |
---|---|
static Matrix |
add(Matrix a,
Matrix b)
Add two matrixes.
|
static void |
copy(Matrix source,
Matrix target)
Copy from one matrix to another.
|
static Matrix |
deleteCol(Matrix matrix,
int deleted)
Delete one column from the matrix.
|
static Matrix |
deleteRow(Matrix matrix,
int deleted)
Delete a row from the matrix.
|
static double |
determinant(Matrix m) |
static Matrix |
divide(Matrix a,
double b)
Return a matrix with each cell divided by the specified value.
|
static double |
dotProduct(Matrix a,
Matrix b)
Compute the dot product for the two matrixes.
|
static Matrix |
identity(int size)
Return an identity matrix of the specified size.
|
static Matrix |
multiply(Matrix a,
double b)
Return the result of multiplying every cell in the matrix by the
specified value.
|
static double[] |
multiply(Matrix a,
double[] d) |
static Matrix |
multiply(Matrix a,
Matrix b)
Return the product of the first and second matrix.
|
static Matrix |
subtract(Matrix a,
Matrix b)
Return the results of subtracting one matrix from another.
|
static Matrix |
transpose(Matrix input)
Return the transposition of a matrix.
|
static double |
vectorLength(Matrix input)
Calculate the length of a vector.
|
public static Matrix add(Matrix a, Matrix b)
a
- The first matrix to add.b
- The second matrix to add.public static void copy(Matrix source, Matrix target)
source
- The source matrix for the copy.target
- The target matrix for the copy.public static Matrix deleteCol(Matrix matrix, int deleted)
matrix
- The matrix.deleted
- The column to delete.public static Matrix deleteRow(Matrix matrix, int deleted)
matrix
- The matrix.deleted
- Which row to delete.public static Matrix divide(Matrix a, double b)
a
- The matrix to divide.b
- The value to divide by.public static double dotProduct(Matrix a, Matrix b)
a
- The first matrix.b
- The second matrix.public static Matrix identity(int size)
size
- The number of rows and columns to create. An identity matrix
is always square.public static Matrix multiply(Matrix a, double b)
a
- The first matrix.b
- The second matrix.public static Matrix multiply(Matrix a, Matrix b)
a
- The first matrix.b
- The second matrix.public static Matrix subtract(Matrix a, Matrix b)
a
- The first matrix.b
- The second matrix.public static Matrix transpose(Matrix input)
input
- The matrix to transpose.public static double vectorLength(Matrix input)
input
- The matrix to calculate the length of.public static double determinant(Matrix m)
public static double[] multiply(Matrix a, double[] d)
Copyright © 2014. All Rights Reserved.