net.sourceforge.combean.mathprog.linalg
Class CombinedSparseVec<Label>
java.lang.Object
net.sourceforge.combean.mathprog.linalg.AbstractComposedSparseVec<Label>
net.sourceforge.combean.mathprog.linalg.CombinedSparseVec<Label>
- All Implemented Interfaces:
- SparseVec<Label>
- Direct Known Subclasses:
- CombinedLPSparseVector
public class CombinedSparseVec<Label>
- extends AbstractComposedSparseVec<Label>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CombinedSparseVec
public CombinedSparseVec()
iterator
public VectorIterator<Label> iterator()
- Description copied from interface:
SparseVec
- Get an iterator which iterates through all non-zero entries
of the vector. The iteration must stop after exactly
getNumNonZeroEntries() steps.
An implementation may choose to also return zero entries
during the iteration. In that case, these entries must also
be counted by getNumIterations();
The iteration does not have to return the values in order of
increasing indices.
- Specified by:
iterator
in interface SparseVec<Label>
- Specified by:
iterator
in class AbstractComposedSparseVec<Label>
- Returns:
- an iterator for the non-zero entries.
addVector
public void addVector(SparseVec<Label> newVec)
- Overrides:
addVector
in class AbstractComposedSparseVec<Label>
getNumIterations
public int getNumIterations()
- Description copied from interface:
SparseVec
- Return the number of entries of the vector through which the
iterator returned by getIterator() iterates.
- Returns:
- the number of iterations of getIterator.