Package org.nuiton.math.matrix
Class SparseVectorIterator
java.lang.Object
org.nuiton.math.matrix.SparseVectorIterator
- All Implemented Interfaces:
VectorIterator
- Direct Known Subclasses:
SparseArrayVectorIterator,SparseHashVectorIterator
- Version:
- $Revision$ Last update: $Date$ by : $Author$
- Author:
- poussin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected longprotected doubleprotected doubleprotected booleanprotected longprotected doubleprotected longprotected longprotected doubleprotected SparseVector -
Constructor Summary
ConstructorsConstructorDescriptionSparseVectorIterator(SparseVector vector) SparseVectorIterator(SparseVector vector, double exclude) -
Method Summary
-
Field Details
-
hasExclude
protected boolean hasExclude -
exclude
protected double exclude -
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
-
SparseVectorIterator
-
-
Method Details
-
setExclude
public void setExclude(double exclude) - Specified by:
setExcludein interfaceVectorIterator
-
computeNextPosAndValue
protected void computeNextPosAndValue() -
getValue
protected double getValue(long pos) -
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceVectorIterator
-
next
public double next()- Specified by:
nextin interfaceVectorIterator
-
getValue
public double getValue()- Specified by:
getValuein interfaceVectorIterator
-
setValue
public void setValue(double value) - Specified by:
setValuein interfaceVectorIterator
-
getPosition
public long getPosition()Description copied from interface:VectorIteratorreturn linear position of current value in vector- Specified by:
getPositionin interfaceVectorIterator- Returns:
-