net.sourceforge.combean.mathprog.linalg
Class CombinedSparseVec<Label>

Package class diagram package CombinedSparseVec
java.lang.Object
  extended by net.sourceforge.combean.mathprog.linalg.AbstractComposedSparseVec<Label>
      extended by net.sourceforge.combean.mathprog.linalg.CombinedSparseVec<Label>
All Implemented Interfaces:
SparseVec<Label>
Direct Known Subclasses:
CombinedLPSparseVector

public class CombinedSparseVec<Label>
extends AbstractComposedSparseVec<Label>


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.combean.mathprog.linalg.AbstractComposedSparseVec
AbstractComposedSparseVec.AbstractComposedVectorIterator<ItLabel>
 
Field Summary
 
Fields inherited from class net.sourceforge.combean.mathprog.linalg.AbstractComposedSparseVec
vecs
 
Constructor Summary
CombinedSparseVec()
           
 
Method Summary
 void addVector(SparseVec<Label> newVec)
           
 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.
 
Methods inherited from class net.sourceforge.combean.mathprog.linalg.AbstractComposedSparseVec
getInnerVecs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinedSparseVec

public CombinedSparseVec()
Method Detail

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.