net.sourceforge.combean.interfaces.mathprog.linalg
Interface SparseVec<Label>

Package class diagram package SparseVec
All Known Subinterfaces:
LPSparseVector, SparseVector
All Known Implementing Classes:
AbstractComposedSparseVec, ColumnVectorOfMatrix, CombinedLPSparseVector, CombinedSparseVec, DoubleLPVector, DoubleVec, DoubleVector, LPSparseVectorWithIndexMapping, RowVectorOfMatrix, SparseDoubleVector, SparseVectorAsLPVector, SparseVectorWithConstantPattern, SparseVectorWithIndexMapping, VectorIAsSparseVector

public interface SparseVec<Label>

A sparse vector of doubles.


Method Summary
 int getNumIterations()
          Return the number of entries of the vector through which the iterator returned by getIterator() iterates.
 VectorIterator<Label> iterator()
          Get an iterator which iterates through all non-zero entries of the vector.
 

Method Detail

iterator

VectorIterator<Label> iterator()
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.

Returns:
an iterator for the non-zero entries.

getNumIterations

int getNumIterations()
Return the number of entries of the vector through which the iterator returned by getIterator() iterates.

Returns:
the number of iterations of getIterator.