|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.croftsoft.core.math.Matrix
public class Matrix
A mathematical matrix class.
Field Summary | |
---|---|
int |
cols
|
double[][] |
data
|
int |
rows
|
Constructor Summary | |
---|---|
Matrix(int rows,
int cols)
Constructs a Matrix with all of the element values set to zero. |
|
Matrix(int rows,
int cols,
double value)
Constructs a Matrix with all of the element values set to a specified constant. |
|
Matrix(Matrix old)
|
Method Summary | |
---|---|
Matrix |
add(double addend)
|
Matrix |
add(Matrix addend)
|
Matrix |
clip(double min,
double max)
|
void |
display()
|
static Matrix |
identity(int rows_cols)
Returns a square matrix with the diagonal values set to 1.0 and all others set to 0.0. |
static void |
main()
Test/demo method. |
Matrix |
multiply(double factor)
|
Matrix |
multiply(Matrix right)
|
static Matrix |
multiply(Matrix left,
Matrix right)
|
static Matrix |
multiplyPairwise(Matrix a,
Matrix b)
|
Matrix |
randomizeUniform(double min,
double max)
|
Matrix |
sigmoid()
|
Matrix |
sigmoidDerivative()
|
Matrix |
submatrix(int row_start,
int row_end,
int col_start,
int col_end)
|
Matrix |
subtract(Matrix subtractor)
|
double |
sum()
|
Matrix |
transpose()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int rows
public int cols
public double[][] data
Constructor Detail |
---|
public Matrix(int rows, int cols)
public Matrix(int rows, int cols, double value)
value
- All of the element values will be set to this constant.public Matrix(Matrix old)
Method Detail |
---|
public static void main()
public static Matrix identity(int rows_cols)
rows_cols
- The number of rows and columns on a side.public static Matrix multiply(Matrix left, Matrix right)
public static Matrix multiplyPairwise(Matrix a, Matrix b)
public Matrix add(double addend)
public Matrix add(Matrix addend)
public Matrix clip(double min, double max)
public void display()
public Matrix multiply(double factor)
public Matrix multiply(Matrix right)
public Matrix randomizeUniform(double min, double max)
public Matrix sigmoid()
public Matrix sigmoidDerivative()
public Matrix submatrix(int row_start, int row_end, int col_start, int col_end)
public Matrix subtract(Matrix subtractor)
public double sum()
public Matrix transpose()
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |