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.
C'est comme une "vue" réduite sur la vraie matrices.
Created: 29 oct. 2004
- Version:
- $Revision: 323 $
Mise a jour: $Date: 2011-01-22 10:32:20 +0100 (sam., 22 janv. 2011) $
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, getMaxOccurrence, getName, getNbDim, getSemantic, getSemantics, getSemantics, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrixOnSemantic, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, importCSV, init, isSupportedCSV, isValidCoordinates, isValidCoordinates, map, meanAll, meanOverDim, meanOverDim, 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.
- 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.
- 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.
- 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-2011 CodeLutin. All Rights Reserved.