annas.math
Class Matrix

java.lang.Object
  extended by annas.math.Matrix

public class Matrix
extends java.lang.Object


Nested Class Summary
 class Matrix.Product
           
 
Field Summary
 int MAXTHREADS
           
 boolean useParallel
           
 
Constructor Summary
Matrix(float[][] m)
           
Matrix(int size)
           
Matrix(int sizeX, int sizeY)
           
Matrix(Matrix m)
           
 
Method Summary
 Matrix addMatrix(Matrix m)
           
 Matrix Adjoint()
           
 float calculateRowColumnProduct(float[][] A, int row, float[][] B, int col)
           
static Matrix createIdentity(int i)
           
 float Determinant()
           
 Matrix divide(Matrix j)
           
 boolean eq(Matrix B)
          Performs a deep equals
 boolean eq(Matrix B, double tolerance)
          Performs a deep equals
 float[][] getMatrix()
           
 Matrix Inverse()
           
 Matrix MultiplyMatrix(Matrix mb)
           
 void print()
           
 void printformatted(java.lang.String Pattern)
           
 void SetMatrix(float[][] m)
           
 Matrix subtractMatrix(Matrix m)
           
 Matrix Transpose()
           
 float[][] UpperTriangle()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useParallel

public boolean useParallel

MAXTHREADS

public int MAXTHREADS
Constructor Detail

Matrix

public Matrix(Matrix m)

Matrix

public Matrix(int size)

Matrix

public Matrix(int sizeX,
              int sizeY)

Matrix

public Matrix(float[][] m)
Method Detail

SetMatrix

public void SetMatrix(float[][] m)

getMatrix

public float[][] getMatrix()

createIdentity

public static Matrix createIdentity(int i)

print

public void print()

printformatted

public void printformatted(java.lang.String Pattern)

MultiplyMatrix

public Matrix MultiplyMatrix(Matrix mb)
                      throws java.lang.Exception
Throws:
java.lang.Exception

calculateRowColumnProduct

public float calculateRowColumnProduct(float[][] A,
                                       int row,
                                       float[][] B,
                                       int col)

Transpose

public Matrix Transpose()

Inverse

public Matrix Inverse()
               throws java.lang.Exception
Throws:
java.lang.Exception

Adjoint

public Matrix Adjoint()
               throws java.lang.Exception
Throws:
java.lang.Exception

UpperTriangle

public float[][] UpperTriangle()

Determinant

public float Determinant()

addMatrix

public Matrix addMatrix(Matrix m)
                 throws java.lang.Exception
Throws:
java.lang.Exception

subtractMatrix

public Matrix subtractMatrix(Matrix m)
                      throws java.lang.Exception
Throws:
java.lang.Exception

divide

public Matrix divide(Matrix j)

eq

public boolean eq(Matrix B)
Performs a deep equals

Parameters:
B -
Returns:

eq

public boolean eq(Matrix B,
                  double tolerance)
Performs a deep equals

Parameters:
B -
Returns: