|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.maths.Matrix
JSci.maths.DoubleMatrix
JSci.maths.DoubleSquareMatrix
public class DoubleSquareMatrix
The DoubleSquareMatrix class provides an object for encapsulating square matrices containing doubles.
| Field Summary | |
|---|---|
protected DoubleSquareMatrix[] |
LU
|
protected int[] |
LUpivot
|
| Fields inherited from class JSci.maths.DoubleMatrix |
|---|
ARRAY_2D, matrix |
| Fields inherited from class JSci.maths.Matrix |
|---|
CLASS_SPECIFIC, numCols, numRows, storageFormat |
| Constructor Summary | |
|---|---|
|
DoubleSquareMatrix(double[][] array)
Constructs a matrix by wrapping an array. |
|
DoubleSquareMatrix(DoubleVector[] array)
Constructs a matrix from an array of vectors (columns). |
|
DoubleSquareMatrix(int size)
Constructs an empty matrix. |
protected |
DoubleSquareMatrix(int size,
int storeID)
Constructs a matrix. |
| Method Summary | |
|---|---|
DoubleMatrix |
add(DoubleMatrix m)
Returns the addition of this matrix and another. |
DoubleSquareMatrix |
add(DoubleSquareMatrix m)
Returns the addition of this matrix and another. |
DoubleSquareMatrix[] |
choleskyDecompose()
Returns the Cholesky decomposition of this matrix. |
double |
det()
Returns the determinant. |
DoubleSquareMatrix |
inverse()
Returns the inverse of this matrix. |
boolean |
isSymmetric()
Returns true if this matrix is symmetric. |
boolean |
isUnitary()
Returns true if this matrix is unitary. |
DoubleSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
DoubleMatrix |
mapElements(Mapping f)
Applies a function on all the matrix elements. |
DoubleSquareMatrix |
multiply(DoubleSquareMatrix m)
Returns the multiplication of this matrix and another. |
DoubleVector |
multiply(DoubleVector v)
Returns the multiplication of a vector by this matrix. |
double |
operatorNorm()
Returns the operator norm. |
DoubleSquareMatrix[] |
polarDecompose()
Returns the polar decomposition of this matrix. |
DoubleMatrix |
scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar. |
double |
scalarProduct(DoubleMatrix m)
Returns the scalar product of this matrix and another. |
double |
scalarProduct(DoubleSquareMatrix m)
Returns the scalar product of this matrix and another. |
DoubleSquareMatrix[] |
singularValueDecompose()
Returns the singular value decomposition of this matrix. |
DoubleMatrix |
subtract(DoubleMatrix m)
Returns the subtraction of this matrix and another. |
DoubleSquareMatrix |
subtract(DoubleSquareMatrix m)
Returns the subtraction of this matrix by another. |
double |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class JSci.maths.DoubleMatrix |
|---|
add, directSum, equals, finalize, frobeniusNorm, getElement, hashCode, infNorm, multiply, multiply, negate, scalarDivide, scalarDivide, scalarMultiply, setElement, subtract, tensorProduct, toComplexMatrix, toIntegerMatrix, toString |
| Methods inherited from class JSci.maths.Matrix |
|---|
columns, getInvalidElementMsg, rows |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient DoubleSquareMatrix[] LU
protected transient int[] LUpivot
| Constructor Detail |
|---|
protected DoubleSquareMatrix(int size,
int storeID)
public DoubleSquareMatrix(int size)
size - the number of rows/columns.public DoubleSquareMatrix(double[][] array)
array - an assigned value.
MatrixDimensionException - If the array is not square.public DoubleSquareMatrix(DoubleVector[] array)
array - an assigned value.| Method Detail |
|---|
public boolean isSymmetric()
public boolean isUnitary()
public double det()
public double trace()
public double operatorNorm()
throws MaximumIterationsExceededException
MaximumIterationsExceededException - If it takes more than 50 iterations to determine an eigenvalue.public DoubleMatrix add(DoubleMatrix m)
add in class DoubleMatrixm - a double matrix.
MatrixDimensionException - If the matrices are different sizes.public DoubleSquareMatrix add(DoubleSquareMatrix m)
m - a double square matrix.
MatrixDimensionException - If the matrices are different sizes.public DoubleMatrix subtract(DoubleMatrix m)
subtract in class DoubleMatrixm - a double matrix.
MatrixDimensionException - If the matrices are different sizes.public DoubleSquareMatrix subtract(DoubleSquareMatrix m)
m - a double square matrix.
MatrixDimensionException - If the matrices are different sizes.public DoubleMatrix scalarMultiply(double x)
scalarMultiply in class DoubleMatrixx - a double.
public double scalarProduct(DoubleMatrix m)
scalarProduct in class DoubleMatrixm - a double matrix.
MatrixDimensionException - If the matrices are different sizes.public double scalarProduct(DoubleSquareMatrix m)
m - a double square matrix.
MatrixDimensionException - If the matrices are different sizes.public DoubleVector multiply(DoubleVector v)
multiply in class DoubleMatrixv - a double vector.
DimensionException - If the matrix and vector are incompatible.public DoubleSquareMatrix multiply(DoubleSquareMatrix m)
m - a double square matrix.
MatrixDimensionException - If the matrices are incompatible.public Matrix transpose()
transpose in class DoubleMatrixpublic DoubleSquareMatrix inverse()
public DoubleSquareMatrix[] luDecompose(int[] pivot)
pivot - an empty array of length rows()+1
to hold the pivot information (null if not interested).
The last array element will contain the parity.
public DoubleSquareMatrix[] choleskyDecompose()
public DoubleSquareMatrix[] singularValueDecompose()
public DoubleSquareMatrix[] polarDecompose()
public DoubleMatrix mapElements(Mapping f)
mapElements in class DoubleMatrixf - a user-defined function.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||