Class SparseVectorIterator

java.lang.Object
org.nuiton.math.matrix.SparseVectorIterator
All Implemented Interfaces:
VectorIterator
Direct Known Subclasses:
SparseArrayVectorIterator, SparseHashVectorIterator

public abstract class SparseVectorIterator extends Object implements VectorIterator
Version:
$Revision$ Last update: $Date$ by : $Author$
Author:
poussin
  • Field Details

    • hasExclude

      protected boolean hasExclude
    • exclude

      protected double exclude
    • vector

      protected SparseVector vector
    • size

      protected long size
    • assignedPos

      protected int assignedPos
    • assignedSize

      protected long assignedSize
    • defaultValue

      protected double defaultValue
    • pos

      protected long pos
    • nextPos

      protected long nextPos
    • value

      protected double value
    • nextValue

      protected double nextValue
  • Constructor Details

    • SparseVectorIterator

      public SparseVectorIterator(SparseVector vector)
    • SparseVectorIterator

      public SparseVectorIterator(SparseVector vector, double exclude)
  • Method Details

    • setExclude

      public void setExclude(double exclude)
      Specified by:
      setExclude in interface VectorIterator
    • computeNextPosAndValue

      protected void computeNextPosAndValue()
    • getValue

      protected double getValue(long pos)
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface VectorIterator
    • next

      public double next()
      Specified by:
      next in interface VectorIterator
    • getValue

      public double getValue()
      Specified by:
      getValue in interface VectorIterator
    • setValue

      public void setValue(double value)
      Specified by:
      setValue in interface VectorIterator
    • getPosition

      public long getPosition()
      Description copied from interface: VectorIterator
      return linear position of current value in vector
      Specified by:
      getPosition in interface VectorIterator
      Returns: