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

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

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

Implantation de MatrixMap dont les dimensions sont fixees a la creation Les dimensions ne change plus par la suite


Nested Class Summary
 
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.Matrix<E> matrix
           
 
Fields inherited from class org.nuiton.util.MatrixMap.AbstractMatrixMap
dim, dimNames, name, semantics
 
Constructor Summary
MatrixMap.MatrixMapFixed(List... semantics)
           
MatrixMap.MatrixMapFixed(MatrixMap<E> matrix)
           
MatrixMap.MatrixMapFixed(String name, List... semantics)
           
MatrixMap.MatrixMapFixed(String name, String[] dimNames, List... semantics)
           
 
Method Summary
protected  MatrixMap.Matrix<E> getMatrix()
           
 E getValueIndex(int... coordinates)
          Retourne l'element a une certaine position en utilisant des indices ex: 2,3,1
 MatrixMap.MatrixMapIterator<E> iterator()
           
 MatrixMap<E> map(MatrixMap.MapFunction<E> f)
          Retourne la matrice elle meme.
 MatrixMap<E> paste(int[] origin, MatrixMap<E> mat)
          Copie une matrice dans la matrice actuelle.
 void setValueIndex(E value, int... coordinates)
          Modifie un element de la matrice en fonction des dimensions passé en paramètre.
Exemple: Si on a un matrice 3D.
m.set(v, [1,1,1]) modifie un element de la matrice.
 
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, 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.Matrix<E> matrix
Constructor Detail

MatrixMap.MatrixMapFixed

public MatrixMap.MatrixMapFixed(List... semantics)

MatrixMap.MatrixMapFixed

public MatrixMap.MatrixMapFixed(String name,
                                List... semantics)

MatrixMap.MatrixMapFixed

public MatrixMap.MatrixMapFixed(String name,
                                String[] dimNames,
                                List... semantics)

MatrixMap.MatrixMapFixed

public MatrixMap.MatrixMapFixed(MatrixMap<E> matrix)
Method Detail

getMatrix

protected MatrixMap.Matrix<E> getMatrix()

iterator

public MatrixMap.MatrixMapIterator<E> iterator()

map

public MatrixMap<E> map(MatrixMap.MapFunction<E> f)
Description copied from class: MatrixMap.AbstractMatrixMap
Retourne la matrice elle meme. Les modifications sont faites directement dessus

Specified by:
map in interface MatrixMap<E>
Overrides:
map in class MatrixMap.AbstractMatrixMap<E>
Parameters:
f - la fonction a appliquer
Returns:
Retourne la matrice elle meme. Les modifications sont faites directement dessus

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)
Modifie un element de la matrice en fonction des dimensions passé en paramètre.
Exemple: Si on a un matrice 3D.
m.set(v, [1,1,1]) modifie un element de la matrice.

Parameters:
dimensions - les différentes dimension à extraire.
d - l'entier double qui doit remplacer l'entier double spécifié par l'argument dimensions

paste

public MatrixMap<E> paste(int[] origin,
                          MatrixMap<E> mat)
Copie une matrice dans la matrice actuelle. La matrice à copier à le même nombre de dimension. Si la matrice à copier est trop grande seul les éléments pouvant être copier le seront.

Overrides:
paste in class MatrixMap.AbstractMatrixMap<E>
Parameters:
origin - le point à partir duquel il faut faire la copie
mat - la matrice à copier
Returns:
return la matrice courante.


Copyright © 2004-2011 CodeLutin. All Rights Reserved.