flanagan.math
Class Matrix

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

public class Matrix
extends Object


Constructor Summary
Matrix(ArrayList<Object>[] twoDal)
           
Matrix(ArrayMaths[] twoD)
           
Matrix(BigDecimal[][] twoD)
           
Matrix(BigInteger[][] twoD)
           
Matrix(double[][] twoD)
           
Matrix(float[][] twoD)
           
Matrix(int[][] twoD)
           
Matrix(int numberOfRows, int numberOfColumns)
           
Matrix(int numberOfRows, int numberOfColumns, double constant)
           
Matrix(long[][] twoD)
           
Matrix(Matrix bb)
           
Matrix(Vector<Object>[] twoDv)
           
 
Method Summary
 Object clone()
           
static Matrix columnMatrix(double[] darray)
           
 double[] columnMaxima()
           
 double[] columnMeans()
           
 double[] columnMedians()
           
 double[] columnMinima()
           
 double[] columnRanges()
           
 double[] columnStandardDeviations()
           
 double[] columnStandardErrors()
           
 double[] columnSums()
           
 double[] columnVariances()
           
 Matrix copy()
           
static Matrix copy(Matrix a)
           
 double determinant()
           
static double determinant(double[][] mat)
           
static double determinant(Matrix amat)
           
static Matrix diagonalMatrix(int numberOfRows, double[] diag)
           
static Matrix diagonalMatrix(int numberOfRows, int numberOfColumns, double[] diag)
           
 int[] eigenValueIndices()
           
 double frobeniusNorm()
           
 double[][] getArrayCopy()
           
 double[][] getArrayPointer()
           
 double[][] getArrayReference()
           
 double[] getColumnCopy(int ii)
           
 double[] getEigenValues()
           
 double[][] getEigenVector()
           
 double[][] getEigenVectorsAsColumns()
           
 double[][] getEigenVectorsAsRows()
           
 double getElement(int i, int j)
           
 double getElementCopy(int i, int j)
           
 double getElementPointer(int i, int j)
           
 double[][] getHessenbergMatrix()
           
 int[] getIndexCopy()
           
 int[] getIndexPointer()
           
 int[] getIndexReference()
           
 boolean getMatrixCheck()
           
 int getNcol()
           
 int getNrow()
           
 int getNumberOfColumns()
           
 int getNumberOfJacobiRotations()
           
 int getNumberOfRows()
           
 double[] getRowCopy(int i)
           
 double[] getSortedEigenValues()
           
 double[][] getSortedEigenVector()
           
 double[][] getSortedEigenVectorsAsColumns()
           
 double[][] getSortedEigenVectorsAsRows()
           
 Matrix getSubMatrix(int[] row, int[] col)
           
 Matrix getSubMatrix(int i, int j, int k, int l)
           
 double getSwap()
           
 void hessenbergMatrix()
           
static Matrix identityMatrix(int numberOfRows)
           
 double infinityNorm()
           
 Matrix inverse()
           
static Matrix inverse(Matrix amat)
           
 boolean isDiagonal()
           
 boolean isIdentity()
           
 boolean isLowerHessenberg()
           
 boolean isLowerTriagonal()
           
 boolean isNearlyIdenty(double tolerance)
           
 boolean isNearlyLowerHessenberg(double tolerance)
           
 boolean isNearlyLowerTriagonal(double tolerance)
           
 boolean isNearlySymmetric(double tolerance)
           
 boolean isNearlyUnit(double tolerance)
           
 boolean isNearlyUpperHessenberg(double tolerance)
           
 boolean isNearlyUpperTriagonal(double tolerance)
           
 boolean isNearlyZero(double tolerance)
           
 boolean isSquare()
           
 boolean isSymmetric()
           
 boolean isTridiagonal()
           
 boolean isTridiagonal(double tolerance)
           
 boolean isUnit()
           
 boolean isUpperHessenberg()
           
 boolean isUpperTriagonal()
           
 boolean isZero()
           
 double logDeterminant()
           
static double logDeterminant(double[][] mat)
           
static double logDeterminant(Matrix amat)
           
 double[] luBackSub(double[] bvec)
           
 Matrix luDecomp()
           
 double[] maximumElement()
           
 double mean()
           
 double median()
           
 double[] minimumElement()
           
 Matrix minus(double[][] bmat)
           
 Matrix minus(Matrix bmat)
           
static Matrix minus(Matrix amat, Matrix bmat)
           
 void minusEquals(Matrix bmat)
           
 double oneNorm()
           
 Matrix opposite()
           
static Matrix opposite(Matrix amat)
           
 Matrix over(double[][] bmat)
           
 Matrix over(double[][] amat, double[][] bmat)
           
 Matrix over(double[][] amat, Matrix bmat)
           
 Matrix over(Matrix bmat)
           
 Matrix over(Matrix amat, double[][] bmat)
           
 Matrix over(Matrix amat, Matrix bmat)
           
 void overEquals(double[][] bmat)
           
 void overEquals(Matrix bmat)
           
 int[] pivot()
           
 Matrix plus(double[][] bmat)
           
 Matrix plus(Matrix bmat)
           
static Matrix plus(Matrix amat, Matrix bmat)
           
 void plusEquals(Matrix bmat)
           
 double range()
           
 Matrix reducedRowEchelonForm()
           
 void resetLUzero(double zeroValue)
           
static Matrix rowMatrix(double[] darray)
           
 double[] rowMaxima()
           
 double[] rowMeans()
           
 double[] rowMedians()
           
 double[] rowMinima()
           
 double[] rowRanges()
           
 double[] rowStandardDeviations()
           
 double[] rowStandardErrors()
           
 double[] rowSums()
           
 double[] rowVariances()
           
static Matrix scalarMatrix(int numberOfRows, double diagconst)
           
static Matrix scalarMatrix(int numberOfRows, int numberOfColumns, double diagconst)
           
 void setDenominatorToN()
           
 void setElement(int i, int j, double aa)
           
 void setSubMatrix(int[] row, int[] col, double[][] subMatrix)
           
 void setSubMatrix(int i, int j, double[][] subMatrix)
           
 void setSubMatrix(int i, int j, int k, int l, double[][] subMatrix)
           
 void setTwoDarray(double[][] aarray)
           
 double[] solveLinearSet(double[] bvec)
           
 double stanadardError()
           
 double standardDeviation()
           
 Matrix subtractColumnMeans()
           
 Matrix subtractMean()
           
 Matrix subtractRowMeans()
           
 double sum()
           
 void supressErrorMessage()
           
 Matrix times(double constant)
           
 Matrix times(double[][] bmat)
           
 Matrix times(Matrix bmat)
           
static Matrix times(Matrix amat, double constant)
           
static Matrix times(Matrix amat, double[][] bmat)
           
static Matrix times(Matrix amat, Matrix bmat)
           
 void timesEquals(double constant)
           
 void timesEquals(Matrix bmat)
           
 double trace()
           
static double trace(Matrix amat)
           
 Matrix transpose()
           
static Matrix transpose(Matrix amat)
           
static Matrix unitMatrix(int numberOfRows)
           
static Matrix unitMatrix(int numberOfRows, int numberOfColumns)
           
 double variance()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Matrix

public Matrix(int numberOfRows,
              int numberOfColumns)

Matrix

public Matrix(int numberOfRows,
              int numberOfColumns,
              double constant)

Matrix

public Matrix(double[][] twoD)

Matrix

public Matrix(float[][] twoD)

Matrix

public Matrix(long[][] twoD)

Matrix

public Matrix(int[][] twoD)

Matrix

public Matrix(ArrayMaths[] twoD)

Matrix

public Matrix(ArrayList<Object>[] twoDal)

Matrix

public Matrix(Vector<Object>[] twoDv)

Matrix

public Matrix(BigDecimal[][] twoD)

Matrix

public Matrix(BigInteger[][] twoD)

Matrix

public Matrix(Matrix bb)
Method Detail

resetLUzero

public void resetLUzero(double zeroValue)

setTwoDarray

public void setTwoDarray(double[][] aarray)

setElement

public void setElement(int i,
                       int j,
                       double aa)

setSubMatrix

public void setSubMatrix(int i,
                         int j,
                         double[][] subMatrix)

setSubMatrix

public void setSubMatrix(int i,
                         int j,
                         int k,
                         int l,
                         double[][] subMatrix)

setSubMatrix

public void setSubMatrix(int[] row,
                         int[] col,
                         double[][] subMatrix)

getMatrixCheck

public boolean getMatrixCheck()

identityMatrix

public static Matrix identityMatrix(int numberOfRows)

unitMatrix

public static Matrix unitMatrix(int numberOfRows)

unitMatrix

public static Matrix unitMatrix(int numberOfRows,
                                int numberOfColumns)

scalarMatrix

public static Matrix scalarMatrix(int numberOfRows,
                                  double diagconst)

scalarMatrix

public static Matrix scalarMatrix(int numberOfRows,
                                  int numberOfColumns,
                                  double diagconst)

diagonalMatrix

public static Matrix diagonalMatrix(int numberOfRows,
                                    double[] diag)

diagonalMatrix

public static Matrix diagonalMatrix(int numberOfRows,
                                    int numberOfColumns,
                                    double[] diag)

getNumberOfRows

public int getNumberOfRows()

getNrow

public int getNrow()

getNumberOfColumns

public int getNumberOfColumns()

getNcol

public int getNcol()

getArrayReference

public double[][] getArrayReference()

getArrayPointer

public double[][] getArrayPointer()

getArrayCopy

public double[][] getArrayCopy()

getRowCopy

public double[] getRowCopy(int i)

getColumnCopy

public double[] getColumnCopy(int ii)

getElement

public double getElement(int i,
                         int j)

getElementCopy

public double getElementCopy(int i,
                             int j)

getElementPointer

public double getElementPointer(int i,
                                int j)

getSubMatrix

public Matrix getSubMatrix(int i,
                           int j,
                           int k,
                           int l)

getSubMatrix

public Matrix getSubMatrix(int[] row,
                           int[] col)

getIndexReference

public int[] getIndexReference()

getIndexPointer

public int[] getIndexPointer()

getIndexCopy

public int[] getIndexCopy()

getSwap

public double getSwap()

copy

public static Matrix copy(Matrix a)

copy

public Matrix copy()

clone

public Object clone()
Overrides:
clone in class Object

columnMatrix

public static Matrix columnMatrix(double[] darray)

rowMatrix

public static Matrix rowMatrix(double[] darray)

plus

public Matrix plus(Matrix bmat)

plus

public Matrix plus(double[][] bmat)

plus

public static Matrix plus(Matrix amat,
                          Matrix bmat)

plusEquals

public void plusEquals(Matrix bmat)

minus

public Matrix minus(Matrix bmat)

minus

public Matrix minus(double[][] bmat)

minus

public static Matrix minus(Matrix amat,
                           Matrix bmat)

minusEquals

public void minusEquals(Matrix bmat)

times

public Matrix times(Matrix bmat)

times

public Matrix times(double[][] bmat)

times

public Matrix times(double constant)

times

public static Matrix times(Matrix amat,
                           Matrix bmat)

times

public static Matrix times(Matrix amat,
                           double[][] bmat)

times

public static Matrix times(Matrix amat,
                           double constant)

timesEquals

public void timesEquals(Matrix bmat)

timesEquals

public void timesEquals(double constant)

over

public Matrix over(Matrix bmat)

over

public Matrix over(Matrix amat,
                   Matrix bmat)

over

public Matrix over(double[][] bmat)

over

public Matrix over(Matrix amat,
                   double[][] bmat)

over

public Matrix over(double[][] amat,
                   Matrix bmat)

over

public Matrix over(double[][] amat,
                   double[][] bmat)

overEquals

public void overEquals(Matrix bmat)

overEquals

public void overEquals(double[][] bmat)

inverse

public Matrix inverse()

inverse

public static Matrix inverse(Matrix amat)

transpose

public Matrix transpose()

transpose

public static Matrix transpose(Matrix amat)

opposite

public Matrix opposite()

opposite

public static Matrix opposite(Matrix amat)

trace

public double trace()

trace

public static double trace(Matrix amat)

determinant

public double determinant()

determinant

public static double determinant(Matrix amat)

determinant

public static double determinant(double[][] mat)

logDeterminant

public double logDeterminant()

logDeterminant

public static double logDeterminant(Matrix amat)

logDeterminant

public static double logDeterminant(double[][] mat)

reducedRowEchelonForm

public Matrix reducedRowEchelonForm()

frobeniusNorm

public double frobeniusNorm()

oneNorm

public double oneNorm()

infinityNorm

public double infinityNorm()

sum

public double sum()

rowSums

public double[] rowSums()

columnSums

public double[] columnSums()

mean

public double mean()

rowMeans

public double[] rowMeans()

columnMeans

public double[] columnMeans()

subtractMean

public Matrix subtractMean()

subtractRowMeans

public Matrix subtractRowMeans()

subtractColumnMeans

public Matrix subtractColumnMeans()

median

public double median()

rowMedians

public double[] rowMedians()

columnMedians

public double[] columnMedians()

setDenominatorToN

public void setDenominatorToN()

variance

public double variance()

rowVariances

public double[] rowVariances()

columnVariances

public double[] columnVariances()

standardDeviation

public double standardDeviation()

rowStandardDeviations

public double[] rowStandardDeviations()

columnStandardDeviations

public double[] columnStandardDeviations()

stanadardError

public double stanadardError()

rowStandardErrors

public double[] rowStandardErrors()

columnStandardErrors

public double[] columnStandardErrors()

maximumElement

public double[] maximumElement()

rowMaxima

public double[] rowMaxima()

columnMaxima

public double[] columnMaxima()

minimumElement

public double[] minimumElement()

rowMinima

public double[] rowMinima()

columnMinima

public double[] columnMinima()

range

public double range()

rowRanges

public double[] rowRanges()

columnRanges

public double[] columnRanges()

pivot

public int[] pivot()

isSquare

public boolean isSquare()

isSymmetric

public boolean isSymmetric()

isZero

public boolean isZero()

isUnit

public boolean isUnit()

isDiagonal

public boolean isDiagonal()

isUpperTriagonal

public boolean isUpperTriagonal()

isLowerTriagonal

public boolean isLowerTriagonal()

isTridiagonal

public boolean isTridiagonal()

isUpperHessenberg

public boolean isUpperHessenberg()

isLowerHessenberg

public boolean isLowerHessenberg()

isIdentity

public boolean isIdentity()

isNearlySymmetric

public boolean isNearlySymmetric(double tolerance)

isNearlyZero

public boolean isNearlyZero(double tolerance)

isNearlyUnit

public boolean isNearlyUnit(double tolerance)

isNearlyUpperTriagonal

public boolean isNearlyUpperTriagonal(double tolerance)

isNearlyLowerTriagonal

public boolean isNearlyLowerTriagonal(double tolerance)

isNearlyIdenty

public boolean isNearlyIdenty(double tolerance)

isTridiagonal

public boolean isTridiagonal(double tolerance)

isNearlyUpperHessenberg

public boolean isNearlyUpperHessenberg(double tolerance)

isNearlyLowerHessenberg

public boolean isNearlyLowerHessenberg(double tolerance)

luDecomp

public Matrix luDecomp()

luBackSub

public double[] luBackSub(double[] bvec)

solveLinearSet

public double[] solveLinearSet(double[] bvec)

supressErrorMessage

public void supressErrorMessage()

hessenbergMatrix

public void hessenbergMatrix()

getHessenbergMatrix

public double[][] getHessenbergMatrix()

getEigenValues

public double[] getEigenValues()

getSortedEigenValues

public double[] getSortedEigenValues()

getEigenVectorsAsColumns

public double[][] getEigenVectorsAsColumns()

getEigenVector

public double[][] getEigenVector()

getEigenVectorsAsRows

public double[][] getEigenVectorsAsRows()

getSortedEigenVectorsAsColumns

public double[][] getSortedEigenVectorsAsColumns()

getSortedEigenVector

public double[][] getSortedEigenVector()

getSortedEigenVectorsAsRows

public double[][] getSortedEigenVectorsAsRows()

getNumberOfJacobiRotations

public int getNumberOfJacobiRotations()

eigenValueIndices

public int[] eigenValueIndices()


jHepWork 3.1 ©