|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--opale.matrix.BandMatrix
This class implements a band square matrix with real coefficients. The coefficients are stored in a one dimensional array such as : | 1 2 * * | 3 4 5 * | * 6 7 8 | * * 9 10 In this example size of band = 3.
Constructor Summary | |
BandMatrix(int n,
int b)
Construct a matrix of zeros, of size n and band size b. |
Method Summary | |
BandMatrix |
add(BandMatrix A)
Add an another matrix A to the current matrix. |
void |
add(int i,
int j,
double x)
Add a real to a coefficient. |
java.lang.Object |
clone()
Creates and return a copy of this object. |
BandMatrix |
copy()
Make a copy of the current matrix. |
double |
get(int i,
int j)
Get a coefficient of the matrix. |
double[] |
getArrayCopy()
Get a copy of array of matrix elements. |
double[] |
getInternalArray()
Get the internal one-dimensional array. |
int |
getPosition(int i,
int j)
Get the position of the coefficient (i,j) in the internal one dimensional array. |
int |
getSize()
Get the size. |
int |
getSizeOfBand()
Get the band size. |
static void |
main(java.lang.String[] arg)
|
DVect |
mul(DVect x)
Multiply the current matrix by a vector. |
void |
set(int i,
int j,
double x)
Set a coefficient of the matrix. |
java.lang.String |
toString()
Print the matrix. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BandMatrix(int n, int b)
int
- n, row dimension.int
- b, band size.Method Detail |
public int getSize()
public int getSizeOfBand()
public double get(int i, int j)
int
- i, row index.int
- j, column index.public void set(int i, int j, double x)
int
- i, row index.int
- j, column index.double
- x, the value of coeff(i,j)public int getPosition(int i, int j)
int
- i, row index.int
- j, column index.public BandMatrix copy()
public BandMatrix add(BandMatrix A)
BandMatrix
- A, an another matrixpublic void add(int i, int j, double x)
int
- i, j, the position of the coefficientdouble
- the value to addpublic DVect mul(DVect x)
DVect
- x, a vectorDVect,
- the result A*xpublic double[] getInternalArray()
public double[] getArrayCopy()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
OutOfMemoryError
- if not enough memory.Cloneable
public static void main(java.lang.String[] arg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |