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

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

public abstract class AbstractComposedSparseVec<Label>
extends Object
implements SparseVec<Label>


Nested Class Summary
protected  class AbstractComposedSparseVec.AbstractComposedVectorIterator<ItLabel>
           
 
Field Summary
protected  LinkedList<SparseVec<Label>> vecs
           
 
Constructor Summary
AbstractComposedSparseVec()
           
 
Method Summary
 void addVector(SparseVec<Label> newVec)
           
protected  Collection<SparseVec<Label>> getInnerVecs()
           
abstract  VectorIterator<Label> iterator()
          Get an iterator which iterates through all non-zero entries of the vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.combean.interfaces.mathprog.linalg.SparseVec
getNumIterations
 

Field Detail

vecs

protected LinkedList<SparseVec<Label>> vecs
Constructor Detail

AbstractComposedSparseVec

public AbstractComposedSparseVec()
Method Detail

getInnerVecs

protected Collection<SparseVec<Label>> getInnerVecs()

addVector

public void addVector(SparseVec<Label> newVec)

iterator

public abstract 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>
Returns:
an iterator for the non-zero entries.