edu.mssm.crover.bturns
Class Matrix
java.lang.Object
|
+--edu.mssm.crover.bturns.Matrix
- public class Matrix
- extends java.lang.Object
LinearAlgebra matrix class.
Adapted from http://www.mkaz.com/math/
method distribution to perform the determinant
calculation.
|
Constructor Summary |
Matrix(int dimension)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Matrix
public Matrix(int dimension)
setValue
public void setValue(int i,
int j,
float value)
- Set the element i,j value.
getValue
public float getValue(int i,
int j)
- Get the element i,j value.
determinant
public float determinant()
- Returns the determinant.
AddMatrix
public float[][] AddMatrix(float[][] a,
float[][] b)
throws Matrix.MatrixException
Matrix.MatrixException
MultiplyMatrix
public float[][] MultiplyMatrix(float[][] a,
float[][] b)
throws Matrix.MatrixException
Matrix.MatrixException
Transpose
public float[][] Transpose(float[][] a)
Inverse
public float[][] Inverse(float[][] a)
throws Matrix.MatrixException
Matrix.MatrixException
Adjoint
public float[][] Adjoint(float[][] a)
throws Matrix.MatrixException
Matrix.MatrixException
UpperTriangle
public float[][] UpperTriangle(float[][] a)
Determinant
public float Determinant(float[][] a)
getAppletInfo
public java.lang.String getAppletInfo()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
main
public static void main(java.lang.String[] args)
Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.