Class SubMatrix.SubMatrixExcludeIteratorImpl

java.lang.Object
org.nuiton.math.matrix.SubMatrix.SubMatrixExcludeIteratorImpl
All Implemented Interfaces:
BasicMatrixIterator, MatrixIterator
Enclosing class:
SubMatrix

protected class SubMatrix.SubMatrixExcludeIteratorImpl extends Object implements MatrixIterator
  • Field Details

    • exclude

      protected double exclude
    • subMatrix

      protected SubMatrix subMatrix
    • dim

      protected int[] dim
    • last

      protected int[] last
    • coordinates

      protected int[] coordinates
    • cpt

      protected int[] cpt
    • nextCpt

      protected int[] nextCpt
    • value

      protected double value
    • nextValue

      protected double nextValue
    • posSems

      protected Object[] posSems
  • Constructor Details

    • SubMatrixExcludeIteratorImpl

      public SubMatrixExcludeIteratorImpl(SubMatrix subMatrix, double exclude)
  • Method Details

    • arrayGreaterOrEquals

      protected boolean arrayGreaterOrEquals(int[] cpt1, int[] cpt2)
      retourne vrai si cpt1 est superieur ou egal a cpt2, on suppose que cpt1 et cpt2 represente la meme chose (meme dimension, meme valeur max)
      Parameters:
      cpt1 -
      cpt2 -
      Returns:
    • computeNextCpt

      protected void computeNextCpt()
    • computeNextPosAndValue

      protected void computeNextPosAndValue()
    • hasNext

      public boolean hasNext()
      Description copied from interface: BasicMatrixIterator
      Retourne vrai s'il existe un suivant.
      Specified by:
      hasNext in interface BasicMatrixIterator
      Returns:
      vrai s'il y a un suivant, faux sinon
    • next

      public boolean next()
      Description copied from interface: BasicMatrixIterator
      Passe à l'élément suivant.
      Specified by:
      next in interface BasicMatrixIterator
      Returns:
      vrai s'il y a un suivant, faux sinon
    • getCoordinates

      public int[] getCoordinates()
      Description copied from interface: BasicMatrixIterator
      Retourne les coordonnés de l'élément.
      Specified by:
      getCoordinates in interface BasicMatrixIterator
      Returns:
      current element coordinates
    • getSemanticsCoordinates

      public Object[] getSemanticsCoordinates()
      Description copied from interface: MatrixIterator
      Retourne 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:
      getSemanticsCoordinates in interface MatrixIterator
      Returns:
      current element semantics
    • getValue

      public double getValue()
      Description copied from interface: BasicMatrixIterator
      Retourne la valeur courant pointé par l'iterator.
      Specified by:
      getValue in interface BasicMatrixIterator
      Returns:
      current element value
    • setValue

      public void setValue(double value)
      Description copied from interface: BasicMatrixIterator
      Modifie la valeur courant pointé par l'iterator.
      Specified by:
      setValue in interface BasicMatrixIterator
      Parameters:
      value - new value to set to current element