public class DiagonalMatrixFactoryMTJ extends MatrixFactory<DiagonalMatrixMTJ>
MatrixFactory that produces DiagonalMatrixMTJ matrices.| Modifier and Type | Field and Description |
|---|---|
static DiagonalMatrixFactoryMTJ |
INSTANCE
Default instance of the class
|
DEFAULT_DENSE_INSTANCE, DEFAULT_DIAGONAL_INSTANCE, DEFAULT_SPARSE_INSTANCE| Constructor and Description |
|---|
DiagonalMatrixFactoryMTJ()
Creates a new instance of DiagonalMatrixFactoryMTJ
|
| Modifier and Type | Method and Description |
|---|---|
DiagonalMatrixMTJ |
copyMatrix(Matrix m)
Creates a deep copy new Matrix given another, argument is unchanged
|
DiagonalMatrixMTJ |
createGaussianRandom(int numRows,
int numColumns,
java.util.Random random)
Creates a new Matrix filled with values sampled from a Gaussian
distribution with mean 0 and variance 1.
|
DiagonalMatrixMTJ |
createGaussianRandom(int dimensionality,
java.util.Random random)
Creates a new square Matrix of the given size with random values for the
entries, Gaussian distributed with mean 0 and variance 1.
|
DiagonalMatrixMTJ |
createMatrix(int dim)
Creates a square diagonal matrix of dimensionality "dim" with zeros
along the diagonal
|
DiagonalMatrixMTJ |
createMatrix(int numRows,
int numColumns)
Creates an empty Matrix of the specified dimensions, all elements
must be all zeros!
|
DiagonalMatrixMTJ |
createMatrix(int numRows,
int numColumns,
double initialValue)
Creates a matrix with the given initial value on all of the elements of
the diagonal.
|
DiagonalMatrixMTJ |
createUniformRandom(int dimensionality,
double min,
double max,
java.util.Random random)
Creates a new square Matrix of the given size with random values for the
entries, uniformly distributed between the given minimum and maximum
values.
|
DiagonalMatrixMTJ |
createUniformRandom(int numRows,
int numColumns,
double min,
double max,
java.util.Random random)
Creates a new Matrix of the given size with random values for the
entries, uniformly distributed between the given minimum and maximum
values.
|
DiagonalMatrixMTJ |
createUniformRandom(int numRows,
int numColumns,
java.util.Random random)
Creates a new Matrix filled with values sampled uniformly between 0 and
1.
|
DiagonalMatrixMTJ |
diagonalValues(double[] diagonal)
Creates a diagonal matrix with the array of values on its diagonal
|
copyArray, copyColumnVectors, copyColumnVectors, copyRowVectors, copyRowVectors, createDiagonal, createIdentity, createIdentity, getDefault, getDenseDefault, getDiagonalDefault, getSparseDefaultpublic static final DiagonalMatrixFactoryMTJ INSTANCE
public DiagonalMatrixFactoryMTJ()
public DiagonalMatrixMTJ copyMatrix(Matrix m)
MatrixFactorycopyMatrix in class MatrixFactory<DiagonalMatrixMTJ>m - Matrix to copypublic DiagonalMatrixMTJ createMatrix(int numRows, int numColumns)
MatrixFactorycreateMatrix in class MatrixFactory<DiagonalMatrixMTJ>numRows - number of rows in the MatrixnumColumns - number of columns in the Matrixpublic DiagonalMatrixMTJ createMatrix(int dim)
dim - Number of dimensions of the square matrixpublic DiagonalMatrixMTJ diagonalValues(double[] diagonal)
diagonal - Values for the diagonal entries of the matrixpublic DiagonalMatrixMTJ createMatrix(int numRows, int numColumns, double initialValue)
createMatrix in class MatrixFactory<DiagonalMatrixMTJ>numRows - The number of rows. Cannot be negative.numColumns - The number of columns. Cannot be negative.initialValue - The initial value to set all elements to.public DiagonalMatrixMTJ createUniformRandom(int numRows, int numColumns, java.util.Random random)
MatrixFactorycreateUniformRandom in class MatrixFactory<DiagonalMatrixMTJ>numRows - The number of rows.numColumns - The number of columns.random - The random number generator to use.public DiagonalMatrixMTJ createUniformRandom(int numRows, int numColumns, double min, double max, java.util.Random random)
MatrixFactorycreateUniformRandom in class MatrixFactory<DiagonalMatrixMTJ>numRows - The number of rows in the Matrix.numColumns - The number of columns in the Matrix.min - The minimum range of the uniform distribution.max - The maximum range of the uniform distribution.random - The random number generator.public DiagonalMatrixMTJ createUniformRandom(int dimensionality, double min, double max, java.util.Random random)
dimensionality - The number of rows and columns for this square matrix.min - The minimum range of the uniform distribution.max - The maximum range of the uniform distribution.random - The random number generator.public DiagonalMatrixMTJ createGaussianRandom(int numRows, int numColumns, java.util.Random random)
MatrixFactorycreateGaussianRandom in class MatrixFactory<DiagonalMatrixMTJ>numRows - The number of rows.numColumns - The number of columns.random - The random number generator to use.public DiagonalMatrixMTJ createGaussianRandom(int dimensionality, java.util.Random random)
dimensionality - The number of rows and columns for this square matrix.random - The random number generator.