org.nuiton.util
Class MatrixMap.SubMatrix<E>

java.lang.Object
  extended by org.nuiton.util.MatrixMap.AbstractMatrixMap<E>
      extended by org.nuiton.util.MatrixMap.SubMatrix<E>
All Implemented Interfaces:
Iterable<E>, MatrixMap<E>
Enclosing interface:
MatrixMap<E>

public static class MatrixMap.SubMatrix<E>
extends MatrixMap.AbstractMatrixMap<E>

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.


Nested Class Summary
protected static interface MatrixMap.SubMatrix.DimensionConverter
          Permet de faire une conversion de la dimension demandé dans la sous matrice avec la position reel de la matrice sous jacente.
protected static class MatrixMap.SubMatrix.MappingConverter
          La conversion est le mapping d'un element vers un autre element.
protected static class MatrixMap.SubMatrix.ShiftConverter
          La conversion est juste un decalage d'indice
protected  class MatrixMap.SubMatrix.SubMatrixIterator<E>
           
 
Nested classes/interfaces inherited from interface org.nuiton.util.MatrixMap
MatrixMap.AbstractMatrixMap<E>, MatrixMap.Factory, MatrixMap.MapFunction<E>, MatrixMap.Matrix<E>, MatrixMap.MatrixHelper, MatrixMap.MatrixIterator<E>, MatrixMap.MatrixMapElastic<E>, MatrixMap.MatrixMapFixed<E>, MatrixMap.MatrixMapIterator<E>, MatrixMap.MatrixMapIteratorImpl<E>, MatrixMap.SemanticList<T>, MatrixMap.SubMatrix<E>, MatrixMap.Vector<E>
 
Field Summary
protected  MatrixMap.SubMatrix.DimensionConverter converter
           
protected  MatrixMap<E> matrix
           
 
Fields inherited from class org.nuiton.util.MatrixMap.AbstractMatrixMap
dim, dimNames, name, semantics
 
Constructor Summary
MatrixMap.SubMatrix(MatrixMap<E> matrix, int dim, int[] elem)
           
MatrixMap.SubMatrix(MatrixMap<E> matrix, int dim, int start, int nb)
           
 
Method Summary
 E getValueIndex(int... coordinates)
          Retourne l'element a une certaine position en utilisant des indices ex: 2,3,1
 MatrixMap.MatrixMapIterator<E> iterator()
           
 void setValueIndex(E value, int... coordinates)
          Modifie l'element a une certaine position en utilisant des indices ex: 2,3,1
 
Methods inherited from class org.nuiton.util.MatrixMap.AbstractMatrixMap
clone, copy, equals, equals, equalsValues, extend, getDim, getDim, getDimCount, getDimensionName, getDimensionNames, getName, getSemantic, getSemantics, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrixOnSemantic, getValue, init, isValidCoordinates, isValidCoordinates, map, paste, paste, pasteIndex, reduce, reduce, reduce, reduceDims, setDimensionName, setDimensionNames, setName, setSemantic, setValue, toString, toStringGeneric
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

matrix

protected MatrixMap<E> matrix

converter

protected MatrixMap.SubMatrix.DimensionConverter converter
Constructor Detail

MatrixMap.SubMatrix

public MatrixMap.SubMatrix(MatrixMap<E> matrix,
                           int dim,
                           int start,
                           int nb)

MatrixMap.SubMatrix

public MatrixMap.SubMatrix(MatrixMap<E> matrix,
                           int dim,
                           int[] elem)
Method Detail

iterator

public MatrixMap.MatrixMapIterator<E> iterator()

getValueIndex

public E getValueIndex(int... coordinates)
Description copied from interface: MatrixMap
Retourne l'element a une certaine position en utilisant des indices ex: 2,3,1

Returns:

setValueIndex

public void setValueIndex(E value,
                          int... coordinates)
Description copied from interface: MatrixMap
Modifie l'element a une certaine position en utilisant des indices ex: 2,3,1

Parameters:
value - la nouvelle valeur


Copyright © 2004-2012 CodeLutin. All Rights Reserved.