flanagan.math
Class Matrix
java.lang.Object
flanagan.math.Matrix
public class Matrix
- extends java.lang.Object
Method Summary |
java.lang.Object |
clone()
|
Matrix |
copy()
|
static Matrix |
copy(Matrix a)
|
double |
determinant()
|
static double |
determinant(Matrix amat)
|
static Matrix |
diagonalMatrix(int nrow,
double[] diag)
|
double |
frobeniusNorm()
|
double[][] |
getArrayCopy()
|
double[][] |
getArrayPointer()
|
double[][] |
getArrayReference()
|
double |
getElement(int i,
int j)
|
double |
getElementCopy(int i,
int j)
|
double |
getElementPointer(int i,
int j)
|
int[] |
getIndexCopy()
|
int[] |
getIndexPointer()
|
int[] |
getIndexReference()
|
boolean |
getMatrixCheck()
|
int |
getNcol()
|
int |
getNrow()
|
Matrix |
getSubMatrix(int[] row,
int[] col)
|
Matrix |
getSubMatrix(int i,
int j,
int k,
int l)
|
double |
getSwap()
|
static Matrix |
identityMatrix(int nrow)
|
double |
infinityNorm()
|
Matrix |
inverse()
|
static Matrix |
inverse(Matrix amat)
|
double |
logDeterminant()
|
static double |
logDeterminant(Matrix amat)
|
double[] |
luBackSub(double[] bvec)
|
Matrix |
luDecomp()
|
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 |
plus(double[][] bmat)
|
Matrix |
plus(Matrix bmat)
|
static Matrix |
plus(Matrix amat,
Matrix bmat)
|
void |
plusEquals(Matrix bmat)
|
static Matrix |
scalarMatrix(int nrow,
double diagconst)
|
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)
|
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,
Matrix bmat)
|
void |
timesEquals(double constant)
|
void |
timesEquals(Matrix bmat)
|
double |
trace()
|
static double |
trace(Matrix amat)
|
Matrix |
transpose()
|
static Matrix |
transpose(Matrix amat)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Matrix
public Matrix(int nrow,
int ncol)
Matrix
public Matrix(int nrow,
int ncol,
double constant)
Matrix
public Matrix(double[][] twoD)
Matrix
public Matrix(Matrix bb)
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 nrow)
scalarMatrix
public static Matrix scalarMatrix(int nrow,
double diagconst)
diagonalMatrix
public static Matrix diagonalMatrix(int nrow,
double[] diag)
getNrow
public int getNrow()
getNcol
public int getNcol()
getArrayReference
public double[][] getArrayReference()
getArrayPointer
public double[][] getArrayPointer()
getArrayCopy
public double[][] getArrayCopy()
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 java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
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 constant)
timesEquals
public void timesEquals(Matrix bmat)
timesEquals
public void timesEquals(double constant)
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)
logDeterminant
public double logDeterminant()
logDeterminant
public static double logDeterminant(Matrix amat)
frobeniusNorm
public double frobeniusNorm()
oneNorm
public double oneNorm()
infinityNorm
public double infinityNorm()
luDecomp
public Matrix luDecomp()
luBackSub
public double[] luBackSub(double[] bvec)
solveLinearSet
public double[] solveLinearSet(double[] bvec)
supressErrorMessage
public void supressErrorMessage()
jHepWork 1.1 (C) Chekanov