jsci.maths.matrices
Class AbstractComplexSquareMatrix
- java.lang.Object
-
- jsci.maths.matrices.Matrix
-
- jsci.maths.matrices.AbstractComplexMatrix
-
- jsci.maths.matrices.AbstractComplexSquareMatrix
-
- All Implemented Interfaces:
- java.io.Serializable, Algebra.Member, BanachSpace.Member, CStarAlgebra.Member, Module.Member, VectorSpace.Member, Ring.Member, AbelianGroup.Member, SquareMatrix, Member
- Direct Known Subclasses:
- ComplexDiagonalMatrix, ComplexSquareMatrix, ComplexTridiagonalMatrix
public abstract class AbstractComplexSquareMatrix extends AbstractComplexMatrix implements CStarAlgebra.Member, SquareMatrix
The AbstractComplexSquareMatrix class provides an object for encapsulating square matrices containing complex numbers.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AbstractComplexMatrixadd(AbstractComplexMatrix m)Returns the addition of this matrix and another.AbstractComplexSquareMatrixadd(AbstractComplexSquareMatrix m)Returns the addition of this matrix and another.AbstractComplexMatrixconjugate()Returns the complex conjugate of this matrix.Complexdet()Returns the determinant.AbstractComplexSquareMatrixdirectSum(AbstractComplexSquareMatrix m)Returns the direct sum of this matrix and another.AbstractComplexMatrixhermitianAdjoint()Returns the hermitian adjoint of this matrix.AbstractDoubleMatriximag()Returns the imaginary part of this complex matrix.AbstractComplexSquareMatrixinverse()Returns the inverse of this matrix.CStarAlgebra.Memberinvolution()Returns the involution of this matrix.booleanisHermitian()Returns true if this matrix is hermitian.booleanisUnitary()Returns true if this matrix is unitary.AbstractComplexSquareMatrix[]luDecompose()Returns the LU decomposition of this matrix.AbstractComplexSquareMatrix[]luDecompose(int[] pivot)Returns the LU decomposition of this matrix.AbstractComplexMatrixmapElements(ComplexMapping f)Applies a function on all the matrix elements.AbstractComplexSquareMatrixmultiply(AbstractComplexSquareMatrix m)Returns the multiplication of this matrix and another.AbelianGroup.Membernegate()Returns the negative of this matrix.doublenorm()Returns the C* norm.doubleoperatorNorm()Returns the operator norm.AbstractComplexSquareMatrix[]polarDecompose()Returns the polar decomposition of this matrix.AbstractDoubleMatrixreal()Returns the real part of this complex matrix.AbstractComplexMatrixscalarDivide(Complex z)Returns the division of this matrix by a scalar.AbstractComplexMatrixscalarDivide(double x)Returns the division of this matrix by a scalar.AbstractComplexMatrixscalarMultiply(Complex z)Returns the multiplication of this matrix by a scalar.AbstractComplexMatrixscalarMultiply(double x)Returns the multiplication of this matrix by a scalar.ComplexscalarProduct(AbstractComplexMatrix m)Returns the scalar product of this matrix and another.ComplexscalarProduct(AbstractComplexSquareMatrix m)Returns the scalar product of this matrix and another.AbstractComplexMatrixsubtract(AbstractComplexMatrix m)Returns the subtraction of this matrix and another.AbstractComplexSquareMatrixsubtract(AbstractComplexSquareMatrix m)Returns the subtraction of this matrix by another.AbstractComplexSquareMatrixtensor(AbstractComplexSquareMatrix m)Returns the tensor product of this matrix and another.Complextrace()Returns the trace.Matrixtranspose()Returns the transpose of this matrix.-
Methods inherited from class jsci.maths.matrices.AbstractComplexMatrix
add, directSum, equals, equals, equals, frobeniusNorm, getElement, getImagElement, getRealElement, getSet, hashCode, infNorm, multiply, multiply, multiply, scalarDivide, scalarMultiply, setElement, setElement, subtract, tensor, toString
-
Methods inherited from interface jsci.maths.fields.Ring.Member
multiply
-
Methods inherited from interface jsci.maths.algebras.VectorSpace.Member
scalarDivide
-
Methods inherited from interface jsci.maths.algebras.Module.Member
scalarMultiply
-
-
-
-
Method Detail
-
real
public AbstractDoubleMatrix real()
Returns the real part of this complex matrix.- Overrides:
realin classAbstractComplexMatrix- Returns:
- a double matrix
-
imag
public AbstractDoubleMatrix imag()
Returns the imaginary part of this complex matrix.- Overrides:
imagin classAbstractComplexMatrix- Returns:
- a double matrix
-
isHermitian
public boolean isHermitian()
Returns true if this matrix is hermitian.
-
isUnitary
public boolean isUnitary()
Returns true if this matrix is unitary.
-
det
public Complex det()
Returns the determinant.
-
trace
public Complex trace()
Returns the trace.
-
norm
public double norm()
Returns the C* norm.- Specified by:
normin interfaceBanachSpace.Member
-
operatorNorm
public double operatorNorm() throws MaximumIterationsExceededExceptionReturns the operator norm.- Throws:
MaximumIterationsExceededException- If it takes more than 50 iterations to determine an eigenvalue.
-
negate
public AbelianGroup.Member negate()
Returns the negative of this matrix.- Specified by:
negatein interfaceAbelianGroup.Member- Overrides:
negatein classAbstractComplexMatrix
-
add
public final AbstractComplexMatrix add(AbstractComplexMatrix m)
Returns the addition of this matrix and another.- Overrides:
addin classAbstractComplexMatrix- Parameters:
m- a complex square matrix- Throws:
MatrixDimensionException- If the matrices are not square or different sizes.
-
add
public AbstractComplexSquareMatrix add(AbstractComplexSquareMatrix m)
Returns the addition of this matrix and another.- Parameters:
m- a complex square matrix- Throws:
MatrixDimensionException- If the matrices are different sizes.
-
subtract
public final AbstractComplexMatrix subtract(AbstractComplexMatrix m)
Returns the subtraction of this matrix and another.- Overrides:
subtractin classAbstractComplexMatrix- Parameters:
m- a complex square matrix- Throws:
MatrixDimensionException- If the matrices are not square or different sizes.
-
subtract
public AbstractComplexSquareMatrix subtract(AbstractComplexSquareMatrix m)
Returns the subtraction of this matrix by another.- Parameters:
m- a complex square matrix- Throws:
MatrixDimensionException- If the matrices are different sizes.
-
scalarMultiply
public AbstractComplexMatrix scalarMultiply(Complex z)
Returns the multiplication of this matrix by a scalar.- Overrides:
scalarMultiplyin classAbstractComplexMatrix- Parameters:
z- a complex number- Returns:
- a complex square matrix
-
scalarMultiply
public AbstractComplexMatrix scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar.- Overrides:
scalarMultiplyin classAbstractComplexMatrix- Parameters:
x- a double- Returns:
- a complex square matrix
-
scalarDivide
public AbstractComplexMatrix scalarDivide(Complex z)
Returns the division of this matrix by a scalar.- Overrides:
scalarDividein classAbstractComplexMatrix- Parameters:
z- a complex number- Returns:
- a complex square matrix
-
scalarDivide
public AbstractComplexMatrix scalarDivide(double x)
Returns the division of this matrix by a scalar.- Overrides:
scalarDividein classAbstractComplexMatrix- Parameters:
x- a double- Returns:
- a complex square matrix
-
scalarProduct
public final Complex scalarProduct(AbstractComplexMatrix m)
Returns the scalar product of this matrix and another.- Overrides:
scalarProductin classAbstractComplexMatrix- Parameters:
m- a Complex square matrix.- Throws:
MatrixDimensionException- If the matrices are not square or different sizes.
-
scalarProduct
public Complex scalarProduct(AbstractComplexSquareMatrix m)
Returns the scalar product of this matrix and another.- Parameters:
m- a complex square matrix.- Throws:
MatrixDimensionException- If the matrices are different sizes.
-
multiply
public AbstractComplexSquareMatrix multiply(AbstractComplexSquareMatrix m)
Returns the multiplication of this matrix and another.- Parameters:
m- a complex square matrix- Returns:
- an AbstractComplexMatrix or an AbstractComplexSquareMatrix as appropriate
- Throws:
MatrixDimensionException- If the matrices are incompatible.
-
directSum
public AbstractComplexSquareMatrix directSum(AbstractComplexSquareMatrix m)
Returns the direct sum of this matrix and another.
-
tensor
public AbstractComplexSquareMatrix tensor(AbstractComplexSquareMatrix m)
Returns the tensor product of this matrix and another.
-
involution
public final CStarAlgebra.Member involution()
Returns the involution of this matrix.- Specified by:
involutionin interfaceCStarAlgebra.Member
-
hermitianAdjoint
public AbstractComplexMatrix hermitianAdjoint()
Returns the hermitian adjoint of this matrix.- Overrides:
hermitianAdjointin classAbstractComplexMatrix- Returns:
- a complex square matrix
-
conjugate
public AbstractComplexMatrix conjugate()
Returns the complex conjugate of this matrix.- Overrides:
conjugatein classAbstractComplexMatrix- Returns:
- a complex square matrix
-
transpose
public Matrix transpose()
Returns the transpose of this matrix.- Overrides:
transposein classAbstractComplexMatrix- Returns:
- a complex square matrix
-
inverse
public AbstractComplexSquareMatrix inverse()
Returns the inverse of this matrix.- Returns:
- a complex square matrix
-
luDecompose
public AbstractComplexSquareMatrix[] luDecompose(int[] pivot)
Returns the LU decomposition of this matrix.- Returns:
- an array with [0] containing the L-matrix and [1] containing the U-matrix.
-
luDecompose
public AbstractComplexSquareMatrix[] luDecompose()
Returns the LU decomposition of this matrix. Warning: no pivoting.- Returns:
- an array with [0] containing the L-matrix and [1] containing the U-matrix.
-
polarDecompose
public AbstractComplexSquareMatrix[] polarDecompose()
Returns the polar decomposition of this matrix.
-
mapElements
public AbstractComplexMatrix mapElements(ComplexMapping f)
Applies a function on all the matrix elements.- Overrides:
mapElementsin classAbstractComplexMatrix- Parameters:
f- a user-defined function- Returns:
- a complex square matrix
-
-
DMelt 3.0 © DataMelt by jWork.ORG