public abstract class SparseVectorIterator extends Object implements VectorIterator
| Modifier and Type | Field and Description |
|---|---|
protected int |
assignedPos |
protected int |
assignedSize |
protected double |
defaultValue |
protected double |
exclude |
protected boolean |
hasExclude |
protected int |
nextPos |
protected double |
nextValue |
protected int |
pos |
protected int |
size |
protected double |
value |
protected SparseVector |
vector |
| Constructor and Description |
|---|
SparseVectorIterator(SparseVector vector) |
SparseVectorIterator(SparseVector vector,
double exclude) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeNextPosAndValue() |
int |
getPosition()
return linear position of current value in vector
|
double |
getValue() |
protected double |
getValue(int pos) |
boolean |
hasNext() |
double |
next() |
void |
setExclude(double exclude) |
void |
setValue(double value) |
protected boolean hasExclude
protected double exclude
protected SparseVector vector
protected int size
protected int assignedPos
protected int assignedSize
protected double defaultValue
protected int pos
protected int nextPos
protected double value
protected double nextValue
public SparseVectorIterator(SparseVector vector)
public SparseVectorIterator(SparseVector vector, double exclude)
public void setExclude(double exclude)
setExclude in interface VectorIteratorprotected void computeNextPosAndValue()
protected double getValue(int pos)
public boolean hasNext()
hasNext in interface VectorIteratorpublic double next()
next in interface VectorIteratorpublic double getValue()
getValue in interface VectorIteratorpublic void setValue(double value)
setValue in interface VectorIteratorpublic int getPosition()
VectorIteratorgetPosition in interface VectorIteratorCopyright © 2004–2015 CodeLutin. All rights reserved.