|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.math.matrix.MatrixFactory
public class MatrixFactory
MatrixFactory creates matrices with different types of entries.
Field Summary | |
---|---|
protected static java.lang.Class |
defaultMatrixClass
Default matrix implementation class. |
Constructor Summary | |
---|---|
protected |
MatrixFactory()
Don't allow instantiation but do allow overrides. |
Method Summary | |
---|---|
static Matrix |
createIdentityMatrix(int size)
Create an identity matrix. |
static Matrix |
createIdentityMatrix(int size,
java.lang.Class matrixClass)
Create an identity matrix. |
static Matrix |
createMatrix(double[][] values)
Create matrix with specified values. |
static Matrix |
createMatrix(double[][] values,
java.lang.Class matrixClass)
Create matrix with specified values. |
static Matrix |
createMatrix(int rows,
int columns)
Create matrix with specified dimensions. |
static Matrix |
createMatrix(int rows,
int columns,
java.lang.Class matrixClass)
Create matrix of specified dimensions and implementation class. |
static Matrix |
createMatrix(int rows,
int columns,
double scalar)
Create matrix with specified dimensions and a specified value. |
static Matrix |
createMatrix(int rows,
int columns,
double[][] values)
Create matrix with specified dimensions and values. |
static Matrix |
createMatrix(int rows,
int columns,
double[][] values,
java.lang.Class matrixClass)
Create matrix with specified dimensions and values. |
static Matrix |
createMatrix(int rows,
int columns,
double scalar,
java.lang.Class matrixClass)
Create matrix with specified dimensions and a specified value. |
static Matrix |
createMatrix(java.util.List list)
Create a column vector matrix from a list of double values. |
static Matrix |
createMatrix(java.util.List list,
java.lang.Class matrixClass)
Create a column vector matrix from a list of double values. |
static Matrix |
createMatrix(Matrix matrix)
Create matrix from another matrix. |
static Matrix |
createRandomMatrix(int rows,
int columns)
Create matrix with specified dimensions filled with random values. |
static Matrix |
createRandomMatrix(int rows,
int columns,
java.lang.Class matrixClass)
Create matrix with specified dimensions filled with random values. |
static Matrix |
createScalarMatrix(int size,
double diagonalValue)
Creates a scalar matrix. |
static Matrix |
createScalarMatrix(int size,
double[] diagonalValues)
Creates a scalar matrix. |
static Matrix |
createScalarMatrix(int size,
double[] diagonalValues,
java.lang.Class matrixClass)
Creates a scalar matrix. |
static Matrix |
createScalarMatrix(int size,
double diagonalValue,
java.lang.Class matrixClass)
Creates a scalar matrix. |
static java.lang.Class |
getDefaultMatrixClass()
Get default matrix class. |
static boolean |
isMatrixClass(java.lang.Class possibleMatrixClass)
Determine if a class implements the Matrix interface. |
static void |
setDefaultMatrixClass(java.lang.Class matrixClass)
Set default matrix class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.Class defaultMatrixClass
Constructor Detail |
---|
protected MatrixFactory()
Method Detail |
---|
public static Matrix createMatrix(int rows, int columns, java.lang.Class matrixClass)
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).matrixClass
- Implementation class for the matrix.
public static Matrix createMatrix(int rows, int columns)
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).
public static Matrix createMatrix(int rows, int columns, double scalar, java.lang.Class matrixClass)
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).scalar
- Initial value for each matrix element.matrixClass
- Implementation class for the matrix.
public static Matrix createMatrix(int rows, int columns, double scalar)
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).scalar
- Initial value for each matrix element.
public static Matrix createMatrix(int rows, int columns, double[][] values, java.lang.Class matrixClass)
All elements are set to values in the passed array.
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).values
- Initial values of the matrix elements.matrixClass
- Implementation class for the matrix.
public static Matrix createMatrix(int rows, int columns, double[][] values)
All elements are set to values in the passed array.
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).values
- Initial values of the matrix elements.
public static Matrix createMatrix(double[][] values, java.lang.Class matrixClass)
values
- Initial values of the matrix elements.matrixClass
- Implementation class for the matrix.
All elements are set to values in the passed array.
public static Matrix createMatrix(double[][] values)
All elements are set to values in the passed array.
values
- Initial values of the matrix elements.
public static Matrix createMatrix(java.util.List list, java.lang.Class matrixClass)
list
- List containing the Double values for the matrix.matrixClass
- Implementation class for the matrix.
public static Matrix createMatrix(java.util.List list)
list
- List containing the Double values for the matrix.
public static Matrix createMatrix(Matrix matrix)
matrix
- Matrix to copy.
public static Matrix createIdentityMatrix(int size, java.lang.Class matrixClass)
size
- Row and column size of the square matrix.matrixClass
- Implementation class for the matrix.
public static Matrix createIdentityMatrix(int size)
size
- Row and column size of the square matrix.
public static Matrix createScalarMatrix(int size, double diagonalValue, java.lang.Class matrixClass)
size
- Number of rows and columns in the square matrix.diagonalValue
- The value for each main diagonal element.matrixClass
- Implementation class for the matrix.
public static Matrix createScalarMatrix(int size, double diagonalValue)
size
- Number of rows and columns in the square matrix.diagonalValue
- The value for each main diagonal element.
public static Matrix createScalarMatrix(int size, double[] diagonalValues, java.lang.Class matrixClass)
size
- Number of rows and columns in the square matrix.diagonalValues
- double[] vector of values for each main diagonal
element.matrixClass
- Implementation class for the matrix.
public static Matrix createScalarMatrix(int size, double[] diagonalValues)
size
- Number of rows and columns in the square matrix.diagonalValues
- double[] vector of values for each main diagonal
element.
public static Matrix createRandomMatrix(int rows, int columns, java.lang.Class matrixClass)
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).matrixClass
- Implementation class for the matrix.
public static Matrix createRandomMatrix(int rows, int columns)
rows
- Number of rows in the matrix (> 1).columns
- Number of columns in the matrix (> 1).
public static boolean isMatrixClass(java.lang.Class possibleMatrixClass)
possibleMatrixClass
- The class to check.
public static java.lang.Class getDefaultMatrixClass()
public static void setDefaultMatrixClass(java.lang.Class matrixClass)
matrixClass
- The default matrix class for creating
matrices.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |