Class InvertibleMatrix
- java.lang.Object
-
- org.hortonmachine.gears.utils.math.matrixes.Matrix
-
- org.hortonmachine.gears.utils.math.matrixes.SquareMatrix
-
- org.hortonmachine.gears.utils.math.matrixes.LinearSystem
-
- org.hortonmachine.gears.utils.math.matrixes.InvertibleMatrix
-
public class InvertibleMatrix extends LinearSystem
From: Java Number Cruncher The Java Programmer's Guide to Numerical Computation by Ronald Mak A matrix that can be inverted. Also, compute its determinant, norm, and condition number.
-
-
Field Summary
-
Fields inherited from class org.hortonmachine.gears.utils.math.matrixes.LinearSystem
exchangeCount, LU, permutation
-
-
Constructor Summary
Constructors Constructor Description InvertibleMatrix(double[][] values)Constructor.InvertibleMatrix(int n)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecondition()Compute the condition number based on the Euclidean norm.doubledeterminant()Compute the determinant.InvertibleMatrixinverse()Compute the inverse of this matrix.doublenorm()Compute the Euclidean norm of this matrix.-
Methods inherited from class org.hortonmachine.gears.utils.math.matrixes.LinearSystem
decompose, reset, set, set, setColumn, setRow, solve
-
Methods inherited from class org.hortonmachine.gears.utils.math.matrixes.SquareMatrix
add, multiply, subtract
-
-
-
-
Method Detail
-
inverse
public InvertibleMatrix inverse() throws MatrixException
Compute the inverse of this matrix.- Returns:
- the inverse matrix
- Throws:
matrix.MatrixException- if an error occurredMatrixException
-
determinant
public double determinant() throws MatrixExceptionCompute the determinant.- Returns:
- the determinant
- Throws:
matrix.MatrixException- if an error occurredMatrixException
-
norm
public double norm()
Compute the Euclidean norm of this matrix.- Returns:
- the norm
-
condition
public double condition() throws MatrixExceptionCompute the condition number based on the Euclidean norm.- Returns:
- the condition number
- Throws:
MatrixException
-
-