Package org.nuiton.math.matrix
Class MatrixSemanticsDecorator.SemanticsDecoratorMatrixIterator
java.lang.Object
org.nuiton.math.matrix.MatrixSemanticsDecorator.SemanticsDecoratorMatrixIterator
- All Implemented Interfaces:
BasicMatrixIterator,MatrixIterator
- Enclosing class:
- MatrixSemanticsDecorator
public static class MatrixSemanticsDecorator.SemanticsDecoratorMatrixIterator extends Object implements MatrixIterator
-
Field Summary
Fields Modifier and Type Field Description protected SemanticsDecoratordecoratorprotected MatrixIteratoriteratorprotected Object[]semArray -
Constructor Summary
Constructors Constructor Description SemanticsDecoratorMatrixIterator(MatrixND mat, SemanticsDecorator decorator, MatrixIterator iterator) -
Method Summary
Modifier and Type Method Description int[]getCoordinates()Retourne les coordonnés de l'élément.Object[]getSemanticsCoordinates()Retourne les coordonnés de l'élément, en sémantique.doublegetValue()Retourne la valeur courant pointé par l'iterator.booleanhasNext()Retourne vrai s'il existe un suivant.booleannext()Passe à l'élément suivant.voidsetValue(double value)Modifie la valeur courant pointé par l'iterator.
-
Field Details
-
Constructor Details
-
SemanticsDecoratorMatrixIterator
public SemanticsDecoratorMatrixIterator(MatrixND mat, SemanticsDecorator decorator, MatrixIterator iterator)
-
-
Method Details
-
getSemanticsCoordinates
Description copied from interface:MatrixIteratorRetourne les coordonnés de l'élément, en sémantique. Si la matrice n'a pas de sémantique alors retourne null. ATTENTION: Pour des raisons de performance, plusieurs appels successifs à cette méthode retourne la même instance de tableau avec de nouvelle coordonnées. Pour sauvegarder ces coordonnées, il faudra copier le tableau retourné.- Specified by:
getSemanticsCoordinatesin interfaceMatrixIterator- Returns:
- current element semantics
-
hasNext
public boolean hasNext()Description copied from interface:BasicMatrixIteratorRetourne vrai s'il existe un suivant.- Specified by:
hasNextin interfaceBasicMatrixIterator- Returns:
- vrai s'il y a un suivant, faux sinon
-
next
public boolean next()Description copied from interface:BasicMatrixIteratorPasse à l'élément suivant.- Specified by:
nextin interfaceBasicMatrixIterator- Returns:
- vrai s'il y a un suivant, faux sinon
-
getCoordinates
public int[] getCoordinates()Description copied from interface:BasicMatrixIteratorRetourne les coordonnés de l'élément.- Specified by:
getCoordinatesin interfaceBasicMatrixIterator- Returns:
- current element coordinates
-
getValue
public double getValue()Description copied from interface:BasicMatrixIteratorRetourne la valeur courant pointé par l'iterator.- Specified by:
getValuein interfaceBasicMatrixIterator- Returns:
- current element value
-
setValue
public void setValue(double value)Description copied from interface:BasicMatrixIteratorModifie la valeur courant pointé par l'iterator.- Specified by:
setValuein interfaceBasicMatrixIterator- Parameters:
value- new value to set to current element
-