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.


Nested Class Summary
 class Matrix.MatrixException
           
 
Constructor Summary
Matrix(int dimension)
           
 
Method Summary
 float[][] AddMatrix(float[][] a, float[][] b)
           
 float[][] Adjoint(float[][] a)
           
 float determinant()
          Returns the determinant.
 float Determinant(float[][] a)
           
 java.lang.String getAppletInfo()
           
 float getValue(int i, int j)
          Get the element i,j value.
 float[][] Inverse(float[][] a)
           
static void main(java.lang.String[] args)
           
 float[][] MultiplyMatrix(float[][] a, float[][] b)
           
 void setValue(int i, int j, float value)
          Set the element i,j value.
 java.lang.String toString()
           
 float[][] Transpose(float[][] a)
           
 float[][] UpperTriangle(float[][] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Matrix

public Matrix(int dimension)
Method Detail

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.