org.nuiton.math.matrix
Class SubMatrix
java.lang.Object
org.nuiton.math.matrix.AbstractMatrixND
org.nuiton.math.matrix.SubMatrix
- All Implemented Interfaces:
- Serializable, Cloneable, MatrixND
public class SubMatrix
- extends AbstractMatrixND
Pour l'instant une sous matrice a obligatoirement le meme nombre de dimension
que la matrice qu'elle contient. Elle permet juste de reduire le nombre
d'element d'une dimension.
Created: 29 oct. 2004
- Version:
- $Revision: 187 $
Mise a jour: $Date: 2009-10-16 19:17:29 +0200 (ven., 16 oct. 2009) $
par : $Author: tchemit $
- Author:
- Benjamin Poussin
- See Also:
- Serialized Form
|
Method Summary |
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 |
setValue(int[] coordinates,
double d)
Modifie un element de la matrice en fonction des dimensions passé en
paramètre. |
| Methods inherited from class org.nuiton.math.matrix.AbstractMatrixND |
add, adds, clone, copy, cut, divs, equals, equals, equalsValues, exportCSV, fromList, getDim, getDim, getDimCount, getDimensionName, getDimensionName, getDimensionNames, getFactory, getMaxOccurence, getName, getNbDim, getSemantic, getSemantics, getSemantics, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrixOnSemantic, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, importCSV, init, isSupportedCSV, isValidCoordinates, isValidCoordinates, map, minus, minuss, mult, mults, paste, paste, pasteSemantics, reduce, reduce, reduce, reduceDims, setDimensionName, setDimensionName, setDimensionNames, setName, setSemantic, setSemantics, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, sumAll, sumOverDim, sumOverDim, sumOverDim, toList, toString, transpose |
matrix
protected MatrixND matrix
converter
protected SubMatrix.DimensionConverter converter
SubMatrix
public SubMatrix(MatrixND matrix,
int dim,
int start,
int nb)
SubMatrix
public SubMatrix(MatrixND matrix,
int dim,
int[] elem)
iterator
public MatrixIterator iterator()
- Description copied from interface:
MatrixND
- Retourne un iterator sur toute la matrice.
- Specified by:
iterator in interface MatrixND- Specified by:
iterator in class AbstractMatrixND
- Returns:
- matrix iterator
getValue
public double getValue(int[] coordinates)
- Description copied from interface:
MatrixND
- Renvoie un element de la matrice demandée en fonction des dimensions
passé en paramètre.
Exemple: Si on a un matrice 3D.
getValue(1,1,1) retourne un element de la matrice.
- Specified by:
getValue in interface MatrixND- Specified by:
getValue in class AbstractMatrixND
- Parameters:
coordinates - les différentes dimension à extraire. Le tableau doit
contenir toutes les dimensions de la matrice, et seulement des
nombres positif
- Returns:
- un entier double.
setValue
public void setValue(int[] coordinates,
double d)
- Description copied from interface:
MatrixND
- Modifie un element de la matrice en fonction des dimensions passé en
paramètre.
Exemple: Si on a un matrice 3D.
set([1,1,1], m) modifie un element de la matrice.
- Specified by:
setValue in interface MatrixND- Specified by:
setValue in class AbstractMatrixND
- Parameters:
coordinates - les différentes dimension à extraire.d - l'entier double qui doit remplacer l'entier double spécifié par
l'argument dimensions
Copyright © 2004-2010 CodeLutin. All Rights Reserved.