All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mathUtil.Matrix

java.lang.Object
   |
   +----mathUtil.Matrix

public class Matrix
extends Object
Has all the Matrix utilities built it.


Variable Index

 o data
 o dimension

Constructor Index

 o Matrix(int, double[][])
The constructor takes an input parameter and the array to instantiate the matrix

Method Index

 o invertMatrix()
Return the inverse of the matrix.
 o invertMatrixLowerTriangular()
Assume that this matrix is lower triangular and invert it.
 o multiplyLeft(Matrix)
Multiply this matrix on the left with another matrix
 o multiplyRight(Matrix)
Multiply this matrix on the right with another matrix
 o multiplyVector(double[])
Multiple this matrix with a vector on the right.
 o print()
Print the matrix in row major order.

Variables

 o dimension
 public int dimension
 o data
 public double data[][]

Constructors

 o Matrix
 public Matrix(int n,
               double input[][])
The constructor takes an input parameter and the array to instantiate the matrix

Methods

 o print
 public void print()
Print the matrix in row major order.

 o multiplyVector
 public double[] multiplyVector(double values[])
Multiple this matrix with a vector on the right.

 o multiplyRight
 public Matrix multiplyRight(Matrix second)
Multiply this matrix on the right with another matrix

 o multiplyLeft
 public Matrix multiplyLeft(Matrix second)
Multiply this matrix on the left with another matrix

 o invertMatrixLowerTriangular
 public Matrix invertMatrixLowerTriangular()
Assume that this matrix is lower triangular and invert it. The algorithm is recursive.

 o invertMatrix
 public Matrix invertMatrix()
Return the inverse of the matrix. Return null if the matrix is singular.


All Packages  Class Hierarchy  This Package  Previous  Next  Index