flanagan.math
Class Matrix
- java.lang.Object
-
- flanagan.math.Matrix
-
public class Matrix extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Matrix(java.util.ArrayList<java.lang.Object>[] twoDal)Matrix(ArrayMaths[] twoD)Matrix(java.math.BigDecimal[][] twoD)Matrix(java.math.BigInteger[][] twoD)Matrix(char[][] 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(java.lang.String[][] twoD)Matrix(java.util.Vector<java.lang.Object>[] twoDv)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Matrixcofactor()doublecofactor(int ii, int jj)static MatrixcolumnMatrix(double[] darray)double[]columnMaxima()double[]columnMeans()double[]columnMedians()double[]columnMinima()double[]columnRanges()double[]columnStandardDeviations()double[]columnStandardErrors()double[]columnSums()double[]columnVariances()Matrixcopy()static Matrixcopy(Matrix a)doubledeterminant()static doubledeterminant(double[][] mat)static doubledeterminant(Matrix amat)static MatrixdiagonalMatrix(int numberOfRows, double[] diag)static MatrixdiagonalMatrix(int numberOfRows, int numberOfColumns, double[] diag)int[]eigenValueIndices()doublefrobeniusNorm()double[][]getArrayCopy()double[][]getArrayPointer()double[][]getArrayReference()double[]getColumnCopy(int ii)double[]getEigenValues()double[][]getEigenVector()double[][]getEigenVectorsAsColumns()double[][]getEigenVectorsAsRows()doublegetElement(int i, int j)doublegetElementCopy(int i, int j)doublegetElementPointer(int i, int j)double[][]getHessenbergMatrix()int[]getIndexCopy()int[]getIndexPointer()int[]getIndexReference()booleangetMatrixCheck()intgetNcol()intgetNrow()intgetNumberOfColumns()intgetNumberOfJacobiRotations()intgetNumberOfRows()double[]getRowCopy(int i)double[]getSortedEigenValues()double[][]getSortedEigenVector()double[][]getSortedEigenVectorsAsColumns()double[][]getSortedEigenVectorsAsRows()MatrixgetSubMatrix(int[] row, int[] col)MatrixgetSubMatrix(int i, int j, int k, int l)doublegetSwap()voidhessenbergMatrix()java.util.ArrayList<java.lang.Integer>identicalColumns()java.util.ArrayList<java.lang.Integer>identicalRows()static MatrixidentityMatrix(int numberOfRows)doubleinfinityNorm()Matrixinverse()static Matrixinverse(Matrix amat)booleanisDiagonal()booleanisIdentity()booleanisLowerHessenberg()booleanisLowerTriagonal()booleanisNearlyIdenty(double tolerance)booleanisNearlyLowerHessenberg(double tolerance)booleanisNearlyLowerTriagonal(double tolerance)booleanisNearlySingular(double tolerance)booleanisNearlySymmetric(double tolerance)booleanisNearlyTridiagonal(double tolerance)booleanisNearlyUnit(double tolerance)booleanisNearlyUpperHessenberg(double tolerance)booleanisNearlyUpperTriagonal(double tolerance)booleanisNearlyZero(double tolerance)booleanisSingular()booleanisSquare()booleanisSymmetric()booleanisTridiagonal()booleanisTridiagonal(double tolerance)booleanisUnit()booleanisUpperHessenberg()booleanisUpperTriagonal()booleanisZero()doublelogDeterminant()static doublelogDeterminant(double[][] mat)static doublelogDeterminant(Matrix amat)double[]luBackSub(double[] bvec)MatrixluDecomp()double[]maximumElement()doublemean()doublemedian()double[]minimumElement()Matrixminus(double[][] bmat)Matrixminus(Matrix bmat)static Matrixminus(Matrix amat, Matrix bmat)voidminusEquals(Matrix bmat)doubleoneNorm()Matrixopposite()static Matrixopposite(Matrix amat)Matrixover(double[][] bmat)Matrixover(double[][] amat, double[][] bmat)Matrixover(double[][] amat, Matrix bmat)Matrixover(Matrix bmat)Matrixover(Matrix amat, double[][] bmat)Matrixover(Matrix amat, Matrix bmat)voidoverEquals(double[][] bmat)voidoverEquals(Matrix bmat)int[]pivot()Matrixplus(double[][] bmat)Matrixplus(Matrix bmat)static Matrixplus(Matrix amat, Matrix bmat)voidplusEquals(Matrix bmat)doublerange()MatrixreducedRowEchelonForm()voidresetLUzero(double zeroValue)static MatrixrowMatrix(double[] darray)double[]rowMaxima()double[]rowMeans()double[]rowMedians()double[]rowMinima()double[]rowRanges()double[]rowStandardDeviations()double[]rowStandardErrors()double[]rowSums()double[]rowVariances()static MatrixscalarMatrix(int numberOfRows, double diagconst)static MatrixscalarMatrix(int numberOfRows, int numberOfColumns, double diagconst)voidsetDenominatorToN()voidsetElement(int i, int j, double aa)voidsetSubMatrix(int[] row, int[] col, double[][] subMatrix)voidsetSubMatrix(int i, int j, double[][] subMatrix)voidsetSubMatrix(int i, int j, int k, int l, double[][] subMatrix)voidsetTwoDarray(double[][] aarray)double[]solveLinearSet(double[] bvec)doublestanadardError()doublestandardDeviation()MatrixsubtractColumnMeans()MatrixsubtractMean()MatrixsubtractRowMeans()doublesum()voidsupressErrorMessage()Matrixtimes(double constant)Matrixtimes(double[][] bmat)Matrixtimes(Matrix bmat)static Matrixtimes(Matrix amat, double constant)static Matrixtimes(Matrix amat, double[][] bmat)static Matrixtimes(Matrix amat, Matrix bmat)voidtimesEquals(double constant)voidtimesEquals(Matrix bmat)doubletrace()static doubletrace(Matrix amat)Matrixtranspose()static Matrixtranspose(Matrix amat)static MatrixunitMatrix(int numberOfRows)static MatrixunitMatrix(int numberOfRows, int numberOfColumns)doublevariance()java.util.ArrayList<java.lang.Integer>zeroColumns()java.util.ArrayList<java.lang.Integer>zeroRows()
-
-
-
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(char[][] twoD)
-
Matrix
public Matrix(java.lang.String[][] twoD)
-
Matrix
public Matrix(ArrayMaths[] twoD)
-
Matrix
public Matrix(java.util.ArrayList<java.lang.Object>[] twoDal)
-
Matrix
public Matrix(java.util.Vector<java.lang.Object>[] twoDv)
-
Matrix
public Matrix(java.math.BigDecimal[][] twoD)
-
Matrix
public Matrix(java.math.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 Matrix copy()
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
columnMatrix
public static Matrix columnMatrix(double[] darray)
-
rowMatrix
public static Matrix rowMatrix(double[] darray)
-
plus
public Matrix plus(double[][] bmat)
-
plusEquals
public void plusEquals(Matrix bmat)
-
minus
public Matrix minus(double[][] bmat)
-
minusEquals
public void minusEquals(Matrix bmat)
-
times
public Matrix times(double[][] bmat)
-
times
public Matrix times(double constant)
-
timesEquals
public void timesEquals(Matrix bmat)
-
timesEquals
public void timesEquals(double constant)
-
over
public Matrix over(double[][] 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()
-
transpose
public Matrix transpose()
-
opposite
public Matrix opposite()
-
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)
-
cofactor
public Matrix cofactor()
-
cofactor
public double cofactor(int ii, int jj)
-
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)
-
isNearlyTridiagonal
public boolean isNearlyTridiagonal(double tolerance)
-
isNearlyUpperHessenberg
public boolean isNearlyUpperHessenberg(double tolerance)
-
isNearlyLowerHessenberg
public boolean isNearlyLowerHessenberg(double tolerance)
-
isSingular
public boolean isSingular()
-
isNearlySingular
public boolean isNearlySingular(double tolerance)
-
identicalRows
public java.util.ArrayList<java.lang.Integer> identicalRows()
-
identicalColumns
public java.util.ArrayList<java.lang.Integer> identicalColumns()
-
zeroRows
public java.util.ArrayList<java.lang.Integer> zeroRows()
-
zeroColumns
public java.util.ArrayList<java.lang.Integer> zeroColumns()
-
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()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG