|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.stefanochizzolini.clown.util.math.SquareMatrix
public final class SquareMatrix
Square matrix providing fundamental operations of linear algebra.
This class is a specialized adaptation from the original JAMA (Java Matrix Package) project, brought to the public domain by The MathWorks, Inc. and the National Institute of Standards and Technology.
Constructor Summary | |
---|---|
SquareMatrix(double[][] data)
Construct a matrix from a 2-D array. |
|
SquareMatrix(int size)
|
Method Summary | |
---|---|
Object |
clone()
|
double[][] |
getData()
Gets the internal two-dimensional array. |
double |
getDet()
Gets the matrix determinant. |
static SquareMatrix |
getIdentity(int size)
Gets the identity matrix. |
SquareMatrix |
getInverse()
Gets the matrix inverse. |
SquareMatrix |
getMatrix(int[] rowIndexes,
int startColumnIndex)
Gets a submatrix. |
int |
getSize()
Gets the matrix size. |
SquareMatrix |
solve(SquareMatrix target)
Solves [this] * [return] = [target] |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SquareMatrix(int size)
public SquareMatrix(double[][] data)
data
- Two-dimensional array of doubles.
IllegalArgumentException
- All rows must have the same lengthMethod Detail |
---|
public static SquareMatrix getIdentity(int size)
size
- Matrix size.public Object clone()
clone
in class Object
public double[][] getData()
public SquareMatrix getMatrix(int[] rowIndexes, int startColumnIndex)
rowIndexes
- Array of row indices.startColumnIndex
- Initial column index.
ArrayIndexOutOfBoundsException
- Submatrix indicespublic double getDet()
public SquareMatrix getInverse()
public int getSize()
public SquareMatrix solve(SquareMatrix target)
target
- Resulting matrix.
|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |