|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.jmat.data.AbstractDoubleArray
Description : Class designed to implement manipulation of arrays of doubles
Copyright : LGPL
| Field Summary | |
protected int |
m
Row and column dimensions. |
protected int |
n
Row and column dimensions. |
| Constructor Summary | |
AbstractDoubleArray(int _m,
int _n)
Construct an m-by-n matrix of zeros. |
|
| Method Summary | |
void |
checkColumnDimension(AbstractDoubleArray B)
Check if number of Columns(A) == number of Columns(B). |
void |
checkColumnDimension(int column)
Check if number of Columns(A) == column. |
void |
checkDiagonal()
Check if A is Diagonal. |
void |
checkDimensions(AbstractDoubleArray B)
Check if size(A) == size(B). |
void |
checkDimensions(int m2,
int n2)
Check if size(A) == m2*n2. |
void |
checkRowDimension(AbstractDoubleArray B)
Check if number of Rows(A) == number of Rows(B). |
void |
checkRowDimension(int row)
Check if number of Rows(A) == row. |
void |
checkSymetric()
Check if A is Symetric. |
void |
deleteColumnEquals(int J)
Delete a Column to Matrix. |
void |
deleteColumnsEquals(int[] J)
Delete a Column to Matrix. |
void |
deleteColumnsEquals(int j0,
int j1)
Delete a Column to Matrix. |
void |
deleteRowEquals(int I)
delete a Row to Matrix. |
void |
deleteRowsEquals(int[] I)
delete a Row to Matrix. |
void |
deleteRowsEquals(int i0,
int i1)
delete a Row to Matrix. |
abstract double |
get(int i,
int j)
|
double[][] |
getArrayCopy()
|
double[] |
getColumnArrayCopy(int j)
|
int |
getColumnDimension()
Get column dimension. |
abstract AbstractDoubleArray |
getDoubleArrayCopy()
|
double[] |
getRowArrayCopy(int i)
|
int |
getRowDimension()
Get row dimension. |
void |
insertColumnsEquals(int J,
AbstractDoubleArray B)
Insert a Column into Matrix. |
void |
insertRowsEquals(int I,
AbstractDoubleArray B)
Insert a Row into Matrix. |
boolean |
isDiagonal()
Test if A is Diagonal. |
boolean |
isEqual(AbstractDoubleArray B)
Test if A == B. |
boolean |
isSymetric()
Test if A is Symetric. |
void |
mergeColumnsEquals(AbstractDoubleArray B)
Matrix merge. |
void |
mergeRowsEquals(AbstractDoubleArray B)
Matrix merge. |
protected void |
putColumnIn(int j,
AbstractDoubleArray X)
Set columns |
protected void |
putColumnsIn(int[] J,
AbstractDoubleArray X)
Set columns |
protected void |
putColumnsIn(int j0,
int j1,
AbstractDoubleArray X)
Set columns |
protected void |
putDiagonalIn(AbstractDoubleArray X)
Set diagonal |
protected void |
putDiagonalIn(int num,
AbstractDoubleArray X)
Set diagonal |
protected void |
putRowIn(int i,
AbstractDoubleArray X)
Set a row |
protected void |
putRowsIn(int[] I,
AbstractDoubleArray X)
Set rows |
protected void |
putRowsIn(int i0,
int i1,
AbstractDoubleArray X)
Set rows |
protected void |
putSubMatrixIn(int i0,
int i1,
int j0,
int j1,
AbstractDoubleArray X)
Set the submatrix |
protected abstract void |
reset(int _m,
int _n)
Construct an m-by-n matrix of zeros. |
void |
reshapeColumnsEquals(int m2,
int n2)
Matrix reshape by Column. |
void |
reshapeRowsEquals(int m2,
int n2)
Matrix reshape by Row. |
void |
resizeEquals(int m2,
int n2)
Matrix resize. |
abstract void |
set(int i,
int j,
double s)
|
protected void |
setAllConstant(double v)
Set all elements of the matrix to constant values |
protected void |
setAllDiagonal(double[] d)
Set the matrix to diagonal |
protected void |
setAllIdentity()
Set the matrix to identity |
protected void |
setAllIncrementColumns(double[] begin,
double[] pitch)
Set the matrix to increment columns |
protected void |
setAllIncrementColumns(double begin,
double pitch)
Set the matrix to increment columns |
protected void |
setAllIncrementRows(double[] begin,
double[] pitch)
Set the matrix to increment rows |
protected void |
setAllIncrementRows(double begin,
double pitch)
Set the matrix to increment rows |
protected void |
setAllMergeColumns(AbstractDoubleArray[] Xs)
Set matrix to merge columns |
protected void |
setAllMergeRows(AbstractDoubleArray[] Xs)
Set matrix to merge rows |
protected void |
setAllRandom()
Set all elements of the matrix to random values |
void |
setColumn(int j,
AbstractDoubleArray B)
Set a column to an internal one-dimensional Column. |
void |
setColumn(int j,
double B)
Set a column to an internal one-dimensional Column. |
void |
setColumns(int[] J,
AbstractDoubleArray B)
Copy an internal one-dimensional array from a column. |
void |
setColumns(int j0,
AbstractDoubleArray B)
Set a column to an internal one-dimensional Column. |
void |
setRow(int i,
AbstractDoubleArray B)
Copy an internal one-dimensional array from a row. |
void |
setRow(int i,
double B)
Copy an internal one-dimensional array from a row. |
void |
setRows(int[] I,
AbstractDoubleArray B)
Copy an internal one-dimensional array from many rows. |
void |
setRows(int i0,
AbstractDoubleArray B)
Copy an internal one-dimensional array from a row. |
void |
setSubMatrix(int i0,
int j0,
AbstractDoubleArray X)
Set a submatrix. |
void |
setSubMatrix(int i0,
int i1,
int j0,
int j1,
double v)
Set a submatrix. |
double |
toDouble()
convert the Matrix into a double value if the matrix is 1*1. |
double[][] |
toDouble2DArray()
convert the Matrix into a double value if the matrix is 1*1. |
double[] |
toDoubleArray()
|
double[] |
toDoubleColumnArray(int j)
convert the Matrix into a double value if the matrix is 1*1. |
double[] |
toDoubleRowArray(int i)
convert the Matrix into a double value if the matrix is 1*1. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int m
protected int n
| Constructor Detail |
public AbstractDoubleArray(int _m,
int _n)
_m - Number of rows._n - Number of colums.| Method Detail |
public abstract AbstractDoubleArray getDoubleArrayCopy()
public int getRowDimension()
public int getColumnDimension()
public abstract double get(int i,
int j)
public abstract void set(int i,
int j,
double s)
public void setSubMatrix(int i0,
int j0,
AbstractDoubleArray X)
i0 - Initial row indexj0 - Initial column indexX - subMatrix to set
java.lang.ArrayIndexOutOfBoundsException - Submatrix indices
public void setSubMatrix(int i0,
int i1,
int j0,
int j1,
double v)
i0 - Initial row indexi1 - Final row indexj0 - Initial column indexj1 - Final column indexv - Value to set in the submatrix
java.lang.ArrayIndexOutOfBoundsException - Submatrix indices
public void setRow(int i,
AbstractDoubleArray B)
i - Row indexB - Row-matrix
public void setRow(int i,
double B)
i - Row indexB - Row-matrix
public void setRows(int[] I,
AbstractDoubleArray B)
I - Rows indexesB - Rows-matrix
public void setRows(int i0,
AbstractDoubleArray B)
i0 - First Row indexB - Row-matrix
public void setColumn(int j,
AbstractDoubleArray B)
j - Column indexB - Column-matrix
public void setColumn(int j,
double B)
j - Column indexB - Column-matrix
public void setColumns(int[] J,
AbstractDoubleArray B)
J - Columns indexesB - Columns-matrix
public void setColumns(int j0,
AbstractDoubleArray B)
j0 - First Column indexB - Column-matrixprotected void setAllRandom()
protected void setAllConstant(double v)
v - value to setprotected void setAllDiagonal(double[] d)
d - diagonalprotected void setAllIdentity()
protected void setAllIncrementRows(double begin,
double pitch)
begin - begining value to incrementpitch - increment
protected void setAllIncrementRows(double[] begin,
double[] pitch)
begin - begining values to incrementpitch - increments
protected void setAllIncrementColumns(double begin,
double pitch)
begin - begining value to incrementpitch - increment
protected void setAllIncrementColumns(double[] begin,
double[] pitch)
begin - begining values to incrementpitch - incrementsprotected void setAllMergeRows(AbstractDoubleArray[] Xs)
Xs - rows to mergeprotected void setAllMergeColumns(AbstractDoubleArray[] Xs)
Xs - columns to merge
protected void putSubMatrixIn(int i0,
int i1,
int j0,
int j1,
AbstractDoubleArray X)
i0 - begining row of the submatrixi1 - ending row of the submatrixj0 - begining column of the submatrixj1 - ending column of the submatrixX - matrix to set
protected void putRowIn(int i,
AbstractDoubleArray X)
i - row indexX - matrix to set
protected void putRowsIn(int[] I,
AbstractDoubleArray X)
I - row indicesX - matrix to set
protected void putRowsIn(int i0,
int i1,
AbstractDoubleArray X)
i0 - begining index of rows to seti1 - ending index of rows to setX - matrix to set
protected void putColumnIn(int j,
AbstractDoubleArray X)
j - column indexX - matrix to set
protected void putColumnsIn(int[] J,
AbstractDoubleArray X)
J - row indicesX - matrix to set
protected void putColumnsIn(int j0,
int j1,
AbstractDoubleArray X)
j0 - begining index of columns to setj1 - ending index of columns to setX - matrix to setprotected void putDiagonalIn(AbstractDoubleArray X)
X - matrix to set
protected void putDiagonalIn(int num,
AbstractDoubleArray X)
num - numbre of diagonalX - matrix to set
protected abstract void reset(int _m,
int _n)
_m - Number of rows._n - Number of colums.
public void resizeEquals(int m2,
int n2)
m2 - number of rowsn2 - number of columns
public void reshapeRowsEquals(int m2,
int n2)
m2 - number of rowsn2 - number of columns
public void reshapeColumnsEquals(int m2,
int n2)
m2 - number of rowsn2 - number of columnspublic void mergeRowsEquals(AbstractDoubleArray B)
B - matrix to mergepublic void mergeColumnsEquals(AbstractDoubleArray B)
B - matrix to merge
public void insertRowsEquals(int I,
AbstractDoubleArray B)
I - first row to add indexB - rows to add
public void insertColumnsEquals(int J,
AbstractDoubleArray B)
J - first column to add indexB - column to addpublic void deleteRowEquals(int I)
I - row number to deletepublic void deleteColumnEquals(int J)
J - column number to deletepublic void deleteRowsEquals(int[] I)
I - row number to delete
public void deleteRowsEquals(int i0,
int i1)
i0 - first row index to deletei1 - last row index to deletepublic void deleteColumnsEquals(int[] J)
J - column numbers to delete
public void deleteColumnsEquals(int j0,
int j1)
j0 - first column index to deletej1 - last column index to deletepublic double toDouble()
public double[] toDoubleArray()
public double[][] toDouble2DArray()
public double[][] getArrayCopy()
public double[] toDoubleRowArray(int i)
public double[] getRowArrayCopy(int i)
public double[] toDoubleColumnArray(int j)
public double[] getColumnArrayCopy(int j)
public boolean isEqual(AbstractDoubleArray B)
B - Matrix to compare.
public boolean isDiagonal()
public boolean isSymetric()
public void checkDiagonal()
java.lang.IllegalArgumentException - All rows must have the same lengthpublic void checkSymetric()
java.lang.IllegalArgumentException - All rows must have the same lengthpublic void checkDimensions(AbstractDoubleArray B)
B - Matrix to test.
java.lang.IllegalArgumentException - All rows must have the same length
public void checkDimensions(int m2,
int n2)
m2 - Number of rows.n2 - Number of columns.
java.lang.IllegalArgumentException - All rows must have the same lengthpublic void checkRowDimension(AbstractDoubleArray B)
B - Matrix to test.
java.lang.IllegalArgumentException - All rows must have the same lengthpublic void checkRowDimension(int row)
row - number of rows.
java.lang.IllegalArgumentException - All rows must have the same lengthpublic void checkColumnDimension(AbstractDoubleArray B)
B - Matrix to test.
java.lang.IllegalArgumentException - All rows must have the same lengthpublic void checkColumnDimension(int column)
column - number of columns.
java.lang.IllegalArgumentException - All rows must have the same length
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||