|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.nuiton.math.matrix.AbstractMatrixND
org.nuiton.math.matrix.MatrixProxy
public class MatrixProxy
Matrix proxy contains only dimension and semantics definition, but
does not allocate memory spaces for value.
Call to getSubMatrix method will return a really allocated memory
matrix and use a MatrixProvider to fill matrix value.
This is usefull for huge matrix that need to not be filled at first
use, but after some dimensions reductions.
MatrixProvider,
Serialized Form| Field Summary | |
|---|---|
protected MatrixProvider |
matrixProvider
|
| Fields inherited from class org.nuiton.math.matrix.AbstractMatrixND |
|---|
CSV_SEPARATOR, defaultValue, dim, dimHelper, dimNames, factory, name, NUMBER, semantics |
| Constructor Summary | |
|---|---|
protected |
MatrixProxy(MatrixFactory factory,
int[] dim)
|
protected |
MatrixProxy(MatrixFactory factory,
List<?>[] semantics)
|
protected |
MatrixProxy(MatrixFactory factory,
String name,
int[] dim)
|
protected |
MatrixProxy(MatrixFactory factory,
String name,
int[] dim,
String[] dimNames)
|
protected |
MatrixProxy(MatrixFactory factory,
String name,
List<?>[] semantics)
|
protected |
MatrixProxy(MatrixFactory factory,
String name,
List<?>[] semantics,
String[] dimNames)
|
| Method Summary | |
|---|---|
boolean |
equals(MatrixND mat)
|
MatrixProvider |
getMatrixProvider()
|
MatrixND |
getSubMatrix(int[]... elems)
Permet de prendre une sous matrice dans la matrice courante. |
MatrixND |
getSubMatrix(int dim,
int[] elem)
Permet de prendre une sous matrice dans la matrice courante. |
MatrixND |
getSubMatrix(int dim,
int start,
int nb)
Permet de prendre une sous matrice dans la matrice courante. |
MatrixND |
getSubMatrix(int dim,
Object... elem)
Permet de prendre une sous matrice dans la matrice courante. |
MatrixND |
getSubMatrix(Object[]... elems)
Permet de prendre une sous matrice dans la matrice courante. |
double |
getValue(int[] coordinates)
Renvoie un element de la matrice demandée en fonction des dimensions passé en paramètre. |
MatrixIterator |
iterator()
Retourne un iterator sur toute la matrice. |
void |
setMatrixProvider(MatrixProvider matrixProvider)
|
void |
setValue(int[] coordinates,
double d)
Modifie un element de la matrice en fonction des dimensions passé en paramètre. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MatrixProvider matrixProvider
| Constructor Detail |
|---|
protected MatrixProxy(MatrixFactory factory,
int[] dim)
protected MatrixProxy(MatrixFactory factory,
List<?>[] semantics)
protected MatrixProxy(MatrixFactory factory,
String name,
int[] dim)
protected MatrixProxy(MatrixFactory factory,
String name,
int[] dim,
String[] dimNames)
protected MatrixProxy(MatrixFactory factory,
String name,
List<?>[] semantics)
protected MatrixProxy(MatrixFactory factory,
String name,
List<?>[] semantics,
String[] dimNames)
| Method Detail |
|---|
public MatrixProvider getMatrixProvider()
public void setMatrixProvider(MatrixProvider matrixProvider)
public MatrixIterator iterator()
MatrixND
public double getValue(int[] coordinates)
MatrixND
coordinates - les différentes dimension à extraire. Le tableau doit
contenir toutes les dimensions de la matrice, et seulement des
nombres positif
public void setValue(int[] coordinates,
double d)
MatrixND
coordinates - dimension indicesd - new double value to set into matrix at specified dimensions
public MatrixND getSubMatrix(int dim,
int start,
int nb)
MatrixND
getSubMatrix in interface MatrixNDgetSubMatrix in class AbstractMatrixNDdim - la dimension dans lequel on veut une sous matricestart - la position dans dim d'ou il faut partir pour prendre la
sous matrice. 0 <= start < dim.size si start est négatif alors
la position de départ est calculé par rapport à la fin de la
dimension, pour avoir le dernier élément il faut passer -1nb - le nombre d'élément à prendre dans la dimension si nb est
inférieur ou égal à 0 alors cela indique qu'il faut prendre
tous les éléments jusqu'à la fin de la dimension.
public MatrixND getSubMatrix(int dim,
Object... elem)
MatrixND
getSubMatrix in interface MatrixNDgetSubMatrix in class AbstractMatrixNDdim - la dimension dans lequel on veut une sous matriceelem - les éléments dans la dimension à conserver
public MatrixND getSubMatrix(Object[]... elems)
MatrixNDMatrixND.getSubMatrix(int, Object...) suivant
l'implémentation.
getSubMatrix in interface MatrixNDgetSubMatrix in class AbstractMatrixNDelems - les éléments dans la dimension à conserver
public MatrixND getSubMatrix(int dim,
int[] elem)
MatrixND
getSubMatrix in interface MatrixNDgetSubMatrix in class AbstractMatrixNDdim - la dimension dans lequel on veut une sous matriceelem - les indices des éléments dans la dimension à conserver
public MatrixND getSubMatrix(int[]... elems)
MatrixNDMatrixND.getSubMatrix(int, int[]) suivant
l'implementation.
getSubMatrix in interface MatrixNDgetSubMatrix in class AbstractMatrixNDelems - les indices des éléments pour chaque dimension à conserver
public boolean equals(MatrixND mat)
equals in class AbstractMatrixND
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||