Class MatrixMap.MatrixMapFixed<E>

java.lang.Object
org.nuiton.util.MatrixMap.AbstractMatrixMap<E>
org.nuiton.util.MatrixMap.MatrixMapFixed<E>
Type Parameters:
E - FIXME
All Implemented Interfaces:
java.lang.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
  • Field Details

  • Constructor Details

    • MatrixMapFixed

      public MatrixMapFixed​(java.util.List... semantics)
    • MatrixMapFixed

      public MatrixMapFixed​(java.lang.String name, java.util.List... semantics)
    • MatrixMapFixed

      public MatrixMapFixed​(java.lang.String name, java.lang.String[] dimNames, java.util.List... semantics)
    • MatrixMapFixed

      public MatrixMapFixed​(MatrixMap<E> matrix)
  • Method Details

    • 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
      Parameters:
      coordinates - FIXME
      Returns:
      FIXME
    • 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:
      value - la value a inserer
      coordinates - les coordonées où faire le remplacement
    • 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.