|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.jmat.data.AbstractDoubleArray
|
+--org.jmat.data.AbstractMatrix
Description : Class designed to implement all algebraic, visualisation and others ... methods of the matrix classes.
Copyright : LGPL
| Field Summary |
| Fields inherited from class org.jmat.data.AbstractDoubleArray |
m, n |
| Constructor Summary | |
AbstractMatrix(int _m,
int _n)
Construct an m-by-n matrix of zeros. |
|
| Method Summary | |
CholeskyDecomposition |
cholesky()
Cholesky Decomposition |
double |
condition()
Matrix condition (2 norm) |
AbstractMatrix |
copy()
Copy the Matrix object. |
AbstractMatrix |
correlation()
Generate a correlation matrix, each column contains values of a pulling. |
AbstractMatrix |
covariance()
Generate a covariance matrix, each column contains values of a pulling. |
AbstractMatrix |
cumProduct()
Generate a row matrix, each column contents the product value of the columns. |
AbstractMatrix |
cumSum()
Generate a row matrix, each column contents the sum value of the columns. |
AbstractMatrix |
deleteColumn(int J)
Delete a Column to Matrix. |
AbstractMatrix |
deleteColumns(int[] J)
Delete a Column to Matrix. |
AbstractMatrix |
deleteColumns(int j0,
int j1)
Delete a Column to Matrix. |
AbstractMatrix |
deleteRow(int I)
delete a Row to Matrix. |
AbstractMatrix |
deleteRows(int[] I)
delete a Row to Matrix. |
AbstractMatrix |
deleteRows(int i0,
int i1)
delete a Row to Matrix. |
double |
determinant()
Matrix determinant |
AbstractMatrix |
distance(AbstractDoubleArray B,
double pow)
Generate a matrix, each column contents the N-distance between the columns. |
AbstractMatrix |
divide(AbstractMatrix B)
Linear algebraic matrix division, A / B |
AbstractMatrix |
divide(double s)
Multiply a matrix by a scalar, C = s*A |
void |
divideEquals(double s)
Multiply a matrix by a scalar, C = s*A |
AbstractMatrix |
ebeAbs()
Absolute value of each element |
void |
ebeAbsEquals()
Element-by-element absolute value |
AbstractMatrix |
ebeCos()
Element-by-element cosinus |
void |
ebeCosEquals()
Element-by-element cosinus |
AbstractMatrix |
ebeDivide(AbstractMatrix B)
Element-by-element right division, C = A. |
void |
ebeDivideEquals(AbstractMatrix B)
Element-by-element right division, C = A. |
AbstractMatrix |
ebeExp()
Element-by-element exponential |
void |
ebeExpEquals()
Element-by-element exponential |
AbstractMatrix |
ebeFunction(DoubleFunction fun)
Element-by-element function evaluation |
void |
ebeFunctionEquals(DoubleFunction fun)
Element-by-element absolute value |
AbstractMatrix |
ebeInverse()
Element-by-element inverse |
void |
ebeInverseEquals()
Element-by-element inverse |
AbstractMatrix |
ebeLog()
Element-by-element neperian logarithm |
void |
ebeLogEquals()
Element-by-element neperian logarithm |
AbstractMatrix |
ebePower(double p)
Element-by-element power |
AbstractMatrix |
ebePower(Matrix B)
Element-by-element power |
void |
ebePowerEquals(AbstractMatrix B)
Element-by-element power |
void |
ebePowerEquals(double p)
Element-by-element power |
AbstractMatrix |
ebeSin()
Element-by-element sinus |
void |
ebeSinEquals()
Element-by-element sinus |
AbstractMatrix |
ebeSqrt()
Square root of each element |
void |
ebeSqrtEquals()
Element-by-element square root |
AbstractMatrix |
ebeTimes(AbstractMatrix B)
Element-by-element multiplication, C = A. |
void |
ebeTimesEquals(AbstractMatrix B)
Element-by-element multiplication, C = A. |
EigenvalueDecomposition |
eig()
Eigenvalue Decomposition |
Finding |
find(double min,
double max)
Find an element |
Finding |
find(java.lang.String test,
double val)
Find an element |
static AbstractMatrix |
fromASCIIFile(java.io.File file)
Load the Matrix from a file |
static AbstractMatrix |
fromClipBoard()
Load the Matrix from the clipboard |
static AbstractMatrix |
fromString(java.lang.String s)
Load the Matrix from a String |
static AbstractMatrix |
fromXMLElement(org.jdom.Element e)
Load the Matrix from a MathML (XML) Element |
AbstractMatrix |
getColumn(int j)
Copy an internal one-dimensional array from a column. |
AbstractMatrix |
getColumns(int[] J)
Copy an internal one-dimensional array from a column. |
AbstractMatrix |
getColumns(int j0,
int j1)
Copy an internal one-dimensional array from a column. |
AbstractMatrix |
getDiagonal()
Matrix diagonal extraction. |
AbstractMatrix |
getDiagonal(int num)
Matrix diagonal extraction. |
AbstractDoubleArray |
getDoubleArrayCopy()
|
abstract AbstractMatrix |
getInstance(int _m,
int _n)
Construct an m-by-n matrix of zeros. |
AbstractMatrix |
getInstanceCopyOf(AbstractMatrix M)
Construct an m-by-n matrix of zeros. |
AbstractMatrix |
getRow(int i)
Copy an internal one-dimensional array from a row. |
AbstractMatrix |
getRows(int[] I)
Copy an internal one-dimensional array from many rows. |
AbstractMatrix |
getRows(int i0,
int i1)
Copy an internal one-dimensional array from many rows. |
AbstractMatrix |
getSubMatrix(int i0,
int i1,
int j0,
int j1)
Get a submatrix. |
AbstractMatrix |
insertColumns(int J,
AbstractDoubleArray B)
Insert a Column into Matrix. |
AbstractMatrix |
insertRows(int I,
AbstractDoubleArray B)
Insert a Row into Matrix. |
AbstractMatrix |
inverse()
Matrix inverse or pseudoinverse |
LUDecomposition |
lu()
LU Decomposition |
AbstractMatrix |
max()
Generate a row matrix, each column contents the maximum value of the columns. |
AbstractMatrix |
mean()
Generate a row matrix, each column contents the mean value of the columns. |
AbstractMatrix |
mergeColumns(AbstractDoubleArray B)
Matrix merging. |
AbstractMatrix |
mergeRows(AbstractDoubleArray B)
Matrix merging. |
AbstractMatrix |
min()
Generate a row matrix, each column contents the minimum value of the columns. |
AbstractMatrix |
minus(AbstractDoubleArray B)
C = A - B |
AbstractMatrix |
minus(double s)
Sub a scalar to each element of a matrix, C = A .- B |
void |
minusEquals(AbstractDoubleArray B)
C = A - B |
void |
minusEquals(double s)
Sub a scalar to each element of a matrix, C = A .- B |
double |
norm1()
One norm |
double |
norm2()
Two norm |
double |
normFrobenius()
Frobenius norm |
double |
normInfinity()
Infinity norm |
AbstractMatrix |
plus(AbstractDoubleArray B)
C = A + B |
AbstractMatrix |
plus(double s)
Add a scalar to each element of a matrix, C = A .+ s |
void |
plusEquals(AbstractDoubleArray B)
C = A + B |
void |
plusEquals(double s)
Add a scalar to each element of a matrix, C = A .+ s |
AbstractMatrix |
product()
Generate a row matrix, each column contents the product value of the columns. |
QRDecomposition |
qr()
QR Decomposition |
int |
rank()
Matrix rank |
AbstractMatrix |
reshapeColumns(int m2,
int n2)
Matrix reshaping. |
AbstractMatrix |
reshapeRows(int m2,
int n2)
Matrix reshaping. |
AbstractMatrix |
resize(int m2,
int n2)
Matrix resizing. |
AbstractMatrix |
slice(int _n)
Slice the matrix |
AbstractMatrix |
slice(int[] N)
Slice the matrix |
AbstractMatrix |
solve(AbstractMatrix B)
Solve A*X = B |
AbstractMatrix |
sort(int j)
Generate a row-permuted matrix, rows are permuted in order to sort the column 'c' |
AbstractMatrix |
sum()
Generate a row matrix, each column contents the sum value of the columns. |
SingularValueDecomposition |
svd()
Singular Value Decomposition |
AbstractMatrix |
times(AbstractDoubleArray B)
Linear algebraic matrix multiplication, A * B |
AbstractMatrix |
times(double s)
Multiply a matrix by a scalar, C = s*A |
void |
timesEquals(double s)
Multiply a matrix by a scalar, C = s*A |
void |
toASCIIFile(java.io.File file)
Save the Matrix in a file. |
void |
toClipBoard()
Copy the Matrix into the clipboard |
void |
toCommandLine(java.lang.String title)
Print the Matrix in the Command Line. |
void |
toHist2DPanel(Plot2DPanel panel,
java.lang.String name,
int num)
Print the Matrix in a JPanel. |
Plot2DPanel |
toHist2DPanel(java.lang.String name,
int num)
Print the Matrix in an histogram in a JPanel. |
void |
toHist3DPanel(Plot3DPanel panel,
java.lang.String name,
int num)
Print the Matrix in a JPanel. |
Plot3DPanel |
toHist3DPanel(java.lang.String name,
int num)
Print the Matrix in a JPanel. |
void |
toPlot2DPanel(Plot2DPanel panel,
java.lang.String name,
java.lang.String type)
Print the Matrix in a JPanel. |
Plot2DPanel |
toPlot2DPanel(java.lang.String name,
java.lang.String type)
Print the Matrix in a JPanel. |
void |
toPlot3DPanel(Plot3DPanel panel,
java.lang.String name,
java.lang.String type)
Print the Matrix in a JPanel. |
Plot3DPanel |
toPlot3DPanel(java.lang.String name,
java.lang.String type)
Print the Matrix in a JPanel. |
java.lang.String |
toString()
Convert the Matrix into a String |
MatrixTablePanel |
toTablePanel()
Print the Matrix in a JPanel. |
org.jdom.Element |
toXMLElement()
Convert the Matrix into a MathML (XML) Element |
double |
trace()
Matrix trace. |
AbstractMatrix |
transpose()
Matrix transpose. |
void |
transposeEquals()
Matrix transpose. |
AbstractMatrix |
uminus()
Unary minus |
void |
uminusEquals()
Unary minus |
AbstractMatrix |
variance()
Generate a variance matrix, each column contains values of a pulling. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AbstractMatrix(int _m,
int _n)
_m - Number of rows._n - Number of colums.| Method Detail |
public abstract AbstractMatrix getInstance(int _m,
int _n)
_m - Number of rows._n - Number of colums.
public AbstractMatrix getInstanceCopyOf(AbstractMatrix M)
M - Matrix to copy
public AbstractDoubleArray getDoubleArrayCopy()
getDoubleArrayCopy in class AbstractDoubleArraypublic AbstractMatrix copy()
public AbstractMatrix getSubMatrix(int i0,
int i1,
int j0,
int j1)
i0 - Initial row indexi1 - Final row indexj0 - Initial column indexj1 - Final column index
public AbstractMatrix getRow(int i)
i - Row index
public AbstractMatrix getRows(int[] I)
I - Rows indexes
public AbstractMatrix getRows(int i0,
int i1)
i0 - First Rows indexi1 - Last Rows index
public AbstractMatrix getColumn(int j)
j - Column index
public AbstractMatrix getColumns(int[] J)
J - Columns indexes
public AbstractMatrix getColumns(int j0,
int j1)
j0 - First Columns indexj1 - Last Columns index
public AbstractMatrix getDiagonal()
public AbstractMatrix getDiagonal(int num)
num - diagonal number.
public AbstractMatrix resize(int m2,
int n2)
m2 - new lines.n2 - new columns.
public AbstractMatrix reshapeRows(int m2,
int n2)
m2 - new lines.n2 - new columns.
public AbstractMatrix reshapeColumns(int m2,
int n2)
m2 - new lines.n2 - new columns.
public AbstractMatrix mergeRows(AbstractDoubleArray B)
B - Matrix to merge.
public AbstractMatrix mergeColumns(AbstractDoubleArray B)
B - Matrix to merge.
public AbstractMatrix insertRows(int I,
AbstractDoubleArray B)
I - first row to add indexB - rows to add
public AbstractMatrix insertColumns(int J,
AbstractDoubleArray B)
J - first column to add indexB - column to add
public AbstractMatrix deleteRow(int I)
I - row number to delete
public AbstractMatrix deleteColumn(int J)
J - column number to delete
public AbstractMatrix deleteRows(int[] I)
I - row number to delete
public AbstractMatrix deleteRows(int i0,
int i1)
i0 - first row index to deletei1 - last row index to delete
public AbstractMatrix deleteColumns(int[] J)
J - column numbers to delete
public AbstractMatrix deleteColumns(int j0,
int j1)
j0 - first column index to deletej1 - last column index to delete
public double norm1()
public double norm2()
public double normInfinity()
public double normFrobenius()
public double trace()
public double determinant()
public int rank()
public double condition()
public AbstractMatrix min()
public AbstractMatrix max()
public AbstractMatrix sum()
public AbstractMatrix cumSum()
public AbstractMatrix product()
public AbstractMatrix cumProduct()
public AbstractMatrix distance(AbstractDoubleArray B,
double pow)
pow - NB - Matrix
public AbstractMatrix mean()
public AbstractMatrix covariance()
public AbstractMatrix correlation()
public AbstractMatrix variance()
public AbstractMatrix transpose()
public AbstractMatrix uminus()
public AbstractMatrix plus(double s)
s - double
public AbstractMatrix plus(AbstractDoubleArray B)
B - another matrix
public AbstractMatrix minus(double s)
s - double
public AbstractMatrix minus(AbstractDoubleArray B)
B - another matrix
public AbstractMatrix times(double s)
s - scalar
public AbstractMatrix times(AbstractDoubleArray B)
B - another matrix
java.lang.IllegalArgumentException - Matrix inner dimensions must agree.public AbstractMatrix divide(double s)
s - scalar
public AbstractMatrix divide(AbstractMatrix B)
B - another matrix
public AbstractMatrix solve(AbstractMatrix B)
B - right hand side
public AbstractMatrix inverse()
public void transposeEquals()
public void uminusEquals()
public void plusEquals(double s)
s - doublepublic void plusEquals(AbstractDoubleArray B)
B - another matrixpublic void minusEquals(double s)
s - doublepublic void minusEquals(AbstractDoubleArray B)
B - another matrixpublic void timesEquals(double s)
s - scalarpublic void divideEquals(double s)
s - scalarpublic AbstractMatrix ebeTimes(AbstractMatrix B)
B - another matrix
public AbstractMatrix ebeDivide(AbstractMatrix B)
B - another matrix
public AbstractMatrix ebeCos()
public AbstractMatrix ebeSin()
public AbstractMatrix ebeExp()
public AbstractMatrix ebePower(double p)
p - a double
public AbstractMatrix ebePower(Matrix B)
B - a matrix
public AbstractMatrix ebeLog()
public AbstractMatrix ebeInverse()
public AbstractMatrix ebeSqrt()
public AbstractMatrix ebeAbs()
public AbstractMatrix ebeFunction(DoubleFunction fun)
fun - function to apply : f(Aij)
public void ebeTimesEquals(AbstractMatrix B)
B - another matrixpublic void ebeDivideEquals(AbstractMatrix B)
B - another matrixpublic void ebeCosEquals()
public void ebeSinEquals()
public void ebeExpEquals()
public void ebePowerEquals(double p)
p - a doublepublic void ebePowerEquals(AbstractMatrix B)
B - a matrixpublic void ebeLogEquals()
public void ebeInverseEquals()
public void ebeSqrtEquals()
public void ebeAbsEquals()
public void ebeFunctionEquals(DoubleFunction fun)
fun - function to apply : f(Aij)public LUDecomposition lu()
LUDecompositionpublic QRDecomposition qr()
QRDecompositionpublic CholeskyDecomposition cholesky()
CholeskyDecompositionpublic SingularValueDecomposition svd()
SingularValueDecompositionpublic EigenvalueDecomposition eig()
EigenvalueDecompositionpublic AbstractMatrix sort(int j)
j - Number of the colum which leads the permuation
public Finding find(double min,
double max)
min - Inf bound of values to findmax - Sup bound of values to find
public Finding find(java.lang.String test,
double val)
test - Testval - Element (value) to compare
public AbstractMatrix slice(int[] N)
N - Array of number of slices for each column.
public AbstractMatrix slice(int _n)
public java.lang.String toString()
toString in interface StringPrintabletoString in class java.lang.Objectpublic void toClipBoard()
toClipBoard in interface ClipBoardPrintablepublic org.jdom.Element toXMLElement()
toXMLElement in interface XMLPrintablepublic void toASCIIFile(java.io.File file)
toASCIIFile in interface FilePrintablefile - file to save in.public void toCommandLine(java.lang.String title)
toCommandLine in interface CommandLinePrintabletitle - title to display in the command line.public MatrixTablePanel toTablePanel()
public Plot2DPanel toPlot2DPanel(java.lang.String name,
java.lang.String type)
name - name of the plot.type - type of displaying.
public Plot3DPanel toPlot3DPanel(java.lang.String name,
java.lang.String type)
type - type of displaying.name - name of the plot.
public void toPlot2DPanel(Plot2DPanel panel,
java.lang.String name,
java.lang.String type)
panel - Panel to modify.name - name of the plot.type - type of displaying.
public void toPlot3DPanel(Plot3DPanel panel,
java.lang.String name,
java.lang.String type)
panel - Panel to modify.name - name of the plot.type - type of displaying.
public Plot2DPanel toHist2DPanel(java.lang.String name,
int num)
name - name of the plot.num - number of slices.
public Plot3DPanel toHist3DPanel(java.lang.String name,
int num)
num - number of slices.name - name of the plot.
public void toHist2DPanel(Plot2DPanel panel,
java.lang.String name,
int num)
panel - Panel to modify.name - name of the plot.num - number of slices.
public void toHist3DPanel(Plot3DPanel panel,
java.lang.String name,
int num)
panel - Panel to modify.name - name of the plot.num - number of slices.public static AbstractMatrix fromASCIIFile(java.io.File file)
file - file to load
public static AbstractMatrix fromString(java.lang.String s)
s - String to load
public static AbstractMatrix fromClipBoard()
throws java.io.IOException,
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
java.awt.datatransfer.UnsupportedFlavorExceptionpublic static AbstractMatrix fromXMLElement(org.jdom.Element e)
e - Element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||