|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.algebraic.AbstractHypermatrix
org.jscience.mathematics.algebraic.AbstractMatrix
org.jscience.mathematics.algebraic.matrices.AbstractComplexMatrix
org.jscience.mathematics.algebraic.matrices.AbstractComplexSquareMatrix
org.jscience.mathematics.algebraic.matrices.ComplexSparseSquareMatrix
public class ComplexSparseSquareMatrix
The DoubleSparseSquareMatrix class provides an object for encapsulating sparse square matrices. Uses compressed row storage.
| Field Summary |
|---|
| Fields inherited from class org.jscience.mathematics.algebraic.matrices.AbstractComplexSquareMatrix |
|---|
LU, LUpivot |
| Constructor Summary | |
|---|---|
ComplexSparseSquareMatrix(Complex[][] array)
Constructs a matrix from an array. |
|
ComplexSparseSquareMatrix(ComplexSparseSquareMatrix mat)
Copy constructor. |
|
ComplexSparseSquareMatrix(int size)
Constructs an empty matrix. |
|
| Method Summary | |
|---|---|
AbstractComplexSquareMatrix |
add(AbstractComplexSquareMatrix m)
Returns the addition of this matrix and another. |
ComplexSparseSquareMatrix |
add(ComplexSparseSquareMatrix m)
Returns the addition of this matrix and another. |
ComplexSquareMatrix |
add(ComplexSquareMatrix m)
DOCUMENT ME! |
AbstractComplexSquareMatrix[] |
choleskyDecompose()
Returns the Cholesky decomposition of this matrix. |
java.lang.Object |
clone()
Clone matrix into a new matrix. |
Complex |
det()
Returns the determinant. |
boolean |
equals(AbstractComplexSquareMatrix m,
double tol)
Compares two Complex sparse square matrices for equality. |
boolean |
equals(ComplexSparseSquareMatrix m)
DOCUMENT ME! |
boolean |
equals(ComplexSparseSquareMatrix m,
double tol)
DOCUMENT ME! |
double |
frobeniusNorm()
Returns the Frobenius (l2) norm. |
Complex |
getPrimitiveElement(int i,
int j)
Returns an element of the matrix. |
double |
infNorm()
Returns the l -norm. |
AbstractComplexSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
AbstractComplexMatrix |
mapElements(ComplexMapping f)
Applies a function on all the matrix elements. |
AbstractComplexSquareMatrix |
multiply(AbstractComplexSquareMatrix m)
Returns the multiplication of this matrix and another. |
AbstractComplexVector |
multiply(AbstractComplexVector v)
Returns the multiplication of a vector by this matrix. |
ComplexSparseSquareMatrix |
multiply(ComplexSparseSquareMatrix m)
Returns the multiplication of this matrix and another. |
ComplexSquareMatrix |
multiply(ComplexSquareMatrix m)
DOCUMENT ME! |
AbstractComplexMatrix |
scalarDivide(Complex x)
DOCUMENT ME! |
AbstractComplexMatrix |
scalarMultiply(Complex x)
Returns the multiplication of this matrix by a scalar. |
Complex |
scalarProduct(AbstractComplexSquareMatrix m)
Returns the scalar product of this matrix and another. |
Complex |
scalarProduct(ComplexSquareMatrix m)
DOCUMENT ME! |
void |
setAllElements(Complex m)
Sets the value of all elements of the matrix. |
void |
setElement(int i,
int j,
Complex x)
Sets the value of an element of the matrix. |
AbstractComplexSquareMatrix |
subtract(AbstractComplexSquareMatrix m)
Returns the subtraction of this matrix and another. |
ComplexSparseSquareMatrix |
subtract(ComplexSparseSquareMatrix m)
Returns the addition of this matrix and another. |
ComplexSquareMatrix |
subtract(ComplexSquareMatrix m)
DOCUMENT ME! |
Complex[][] |
toPrimitiveArray()
Projects the matrix to an array. |
java.lang.String |
toString()
Returns a string representing this matrix. |
Complex |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class org.jscience.mathematics.algebraic.matrices.AbstractComplexSquareMatrix |
|---|
add, conjugate, directSum, hermitianAdjoint, imag, inverse, involution, isHermitian, isSymmetric, isUnitary, negate, norm, operatorNorm, polarDecompose, real, scalarDivide, scalarMultiply, scalarProduct, subtract, tensorProduct |
| Methods inherited from class org.jscience.mathematics.algebraic.matrices.AbstractComplexMatrix |
|---|
abs, add, directSum, equals, equals, equals, getColumn, getElement, getImagElement, getMatrixAsColumns, getMatrixAsRows, getRealElement, getRow, getSet, getSubMatrix, hashCode, horizontalAxisSymmetry, mass, multiply, multiply, read, reverse, scalarDivide, scalarMultiply, setColumn, setElement, setRow, setSubMatrix, subtract, tensorProduct, verticalAxisSymmetry |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix |
|---|
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.fields.Ring.Member |
|---|
multiply |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.VectorSpace.Member |
|---|
scalarDivide |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.Module.Member |
|---|
scalarMultiply |
| Methods inherited from interface org.jscience.mathematics.algebraic.Matrix |
|---|
getColumn, getElement, getRow, numColumns, numRows, toArray |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, getElement, numDimensions, numElements, numElements, toArray, toArray |
| Constructor Detail |
|---|
public ComplexSparseSquareMatrix(int size)
size - the number of rows/columnspublic ComplexSparseSquareMatrix(Complex[][] array)
array - an assigned value
IllegalDimensionException - If the array is not square.public ComplexSparseSquareMatrix(ComplexSparseSquareMatrix mat)
mat - an assigned value| Method Detail |
|---|
public boolean equals(AbstractComplexSquareMatrix m,
double tol)
m - a Complex matrixtol - DOCUMENT ME!
public boolean equals(ComplexSparseSquareMatrix m)
m - DOCUMENT ME!
public boolean equals(ComplexSparseSquareMatrix m,
double tol)
m - DOCUMENT ME!tol - DOCUMENT ME!
public java.lang.String toString()
toString in class AbstractComplexMatrix
public Complex getPrimitiveElement(int i,
int j)
getPrimitiveElement in class AbstractComplexMatrixi - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid
element.
public void setElement(int i,
int j,
Complex x)
setElement in class AbstractComplexMatrixi - row index of the elementj - column index of the elementx - a number
IllegalDimensionException - If attempting to access an invalid
element.public void setAllElements(Complex m)
setAllElements in class AbstractComplexMatrixm - a complex elementpublic Complex det()
det in class AbstractComplexSquareMatrixjava.lang.ArithmeticException - DOCUMENT ME!public Complex trace()
trace in class AbstractComplexSquareMatrixjava.lang.ArithmeticException - DOCUMENT ME!public double infNorm()
-norm.
infNorm in class AbstractComplexMatrixjava.lang.ArithmeticException - DOCUMENT ME!public double frobeniusNorm()
frobeniusNorm in class AbstractComplexMatrixjava.lang.ArithmeticException - DOCUMENT ME!public AbstractComplexSquareMatrix add(AbstractComplexSquareMatrix m)
add in class AbstractComplexSquareMatrixm - a Complex matrix
IllegalDimensionException - If the matrices are different sizes.public ComplexSquareMatrix add(ComplexSquareMatrix m)
m - DOCUMENT ME!
public ComplexSparseSquareMatrix add(ComplexSparseSquareMatrix m)
m - a Complex sparse matrix
IllegalDimensionException - If the matrices are different sizes.public AbstractComplexSquareMatrix subtract(AbstractComplexSquareMatrix m)
subtract in class AbstractComplexSquareMatrixm - a Complex matrix
IllegalDimensionException - If the matrices are different sizes.public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
m - DOCUMENT ME!
public ComplexSparseSquareMatrix subtract(ComplexSparseSquareMatrix m)
m - a Complex sparse matrix
IllegalDimensionException - If the matrices are different sizes.public AbstractComplexMatrix scalarMultiply(Complex x)
scalarMultiply in class AbstractComplexSquareMatrixx - a Complex
public AbstractComplexMatrix scalarDivide(Complex x)
scalarDivide in class AbstractComplexSquareMatrixx - DOCUMENT ME!
public Complex scalarProduct(AbstractComplexSquareMatrix m)
scalarProduct in class AbstractComplexSquareMatrixm - a Complex matrix.
IllegalDimensionException - If the matrices are different sizes.public Complex scalarProduct(ComplexSquareMatrix m)
m - DOCUMENT ME!
public AbstractComplexVector multiply(AbstractComplexVector v)
multiply in class AbstractComplexMatrixv - a Complex vector
IllegalDimensionException - If the matrix and vector are
incompatible.public AbstractComplexSquareMatrix multiply(AbstractComplexSquareMatrix m)
multiply in class AbstractComplexSquareMatrixm - a Complex matrix
IllegalDimensionException - If the matrices are incompatible.public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
m - DOCUMENT ME!
public ComplexSparseSquareMatrix multiply(ComplexSparseSquareMatrix m)
m - a Complex sparse matrix
IllegalDimensionException - If the matrices are incompatible.public Matrix transpose()
transpose in interface Matrixtranspose in class AbstractComplexSquareMatrixpublic AbstractComplexSquareMatrix[] luDecompose(int[] pivot)
luDecompose in class AbstractComplexSquareMatrixpivot - an empty array of length numRows()+1 to hold
the pivot information (null if not interested)
public AbstractComplexSquareMatrix[] choleskyDecompose()
public AbstractComplexMatrix mapElements(ComplexMapping f)
mapElements in class AbstractComplexMatrixf - a user-defined function
public java.lang.Object clone()
clone in class java.lang.Objectpublic Complex[][] toPrimitiveArray()
toPrimitiveArray in class AbstractComplexMatrix
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||