|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspis.Util.Matrix.Matrix
Class Name : Matrix
Project ref : SPIS project
File name : Matrix.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France
http://www.onecert.fr
Status : under development
Creation : 25/08/2003
Modification :
Description : generic Matrix class
For now, it is used to store R anc C matrices of SC circuit, but matrices
are also used for solvers, with somewhat different constraints.
Before actually implemening this class it must be checked whether
those matrix classes could not be used
Versions and anomalies correction :
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
Field Summary | |
private int |
dim1
first matrix dimension |
private int |
dim2
second matrix dimension |
Constructor Summary | |
Matrix(int d1,
int d2)
Default constructor |
Method Summary | |
abstract Matrix |
buildLineNormalised()
Generates and returns a matrix built from this matrix by normalising each of its lines: Mij -> Mij / (sum_k Mik). |
abstract Matrix |
buildTranspose()
Generates and returns the transpose of this matrix Should return a matrix of subtype identical to this matrix. |
void |
doubleVectMult(double[] x,
double[] y)
Multyplies by a vector (x) and returns y = matrix x, but with the vectors (badly) typed as double[]: to be avoided! |
int |
getDim1()
Returns first matrix dimension. |
int |
getDim2()
Returns second matrix dimension. |
abstract float[][] |
getValues()
Returns a 2D array representing the matrix |
abstract void |
incrementValue(int i,
int j,
float incr)
Increments the element (i,j) of the matrix of the value incr. |
void |
linearSystemSolve(FloatScalTable y,
FloatScalTable x)
Solves the linear system matrix x = y, and returns x. |
abstract Matrix |
matMult(Matrix m)
Multyplies by another matrix m and returns (this_matrix . m). |
abstract void |
matMult(Matrix m,
Matrix result)
Multyplies by another matrix m and returns (this_matrix . m) in result. |
protected void |
setDim1(int dim1)
|
protected void |
setDim2(int dim2)
|
abstract void |
setValue(int i,
int j,
float val)
Sets the element (i,j) of the matrix to the value val. |
abstract void |
vectMult(FloatScalTable x,
FloatScalTable y)
Multyplies by a vector (x) and returns y = matrix x. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int dim1
private int dim2
Constructor Detail |
public Matrix(int d1, int d2)
Method Detail |
protected void setDim1(int dim1)
dim1
- The dim1 to set.protected void setDim2(int dim2)
dim2
- The dim2 to set.public void linearSystemSolve(FloatScalTable y, FloatScalTable x)
public void doubleVectMult(double[] x, double[] y)
public abstract void vectMult(FloatScalTable x, FloatScalTable y)
public abstract void matMult(Matrix m, Matrix result)
m
- result
- The result: this . m (remaining of the subtype of the Matrix argument)public abstract Matrix matMult(Matrix m)
m
-
public abstract Matrix buildTranspose()
public abstract Matrix buildLineNormalised()
public abstract void incrementValue(int i, int j, float incr)
i
- j
- public abstract void setValue(int i, int j, float val)
i
- j
- val
- public abstract float[][] getValues()
public int getDim1()
public int getDim2()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |