net.sourceforge.combean.mathprog.linalg
Class AbstractComposedSparseVec.AbstractComposedVectorIterator<ItLabel>

Package class diagram package AbstractComposedSparseVec.AbstractComposedVectorIterator
java.lang.Object
  extended by net.sourceforge.combean.mathprog.linalg.AbstractComposedSparseVec.AbstractComposedVectorIterator<ItLabel>
All Implemented Interfaces:
Iterator<VectorValue<ItLabel>>, VectorIterator<ItLabel>
Enclosing class:
AbstractComposedSparseVec<Label>

protected abstract class AbstractComposedSparseVec.AbstractComposedVectorIterator<ItLabel>
extends Object
implements VectorIterator<ItLabel>


Constructor Summary
AbstractComposedSparseVec.AbstractComposedVectorIterator(Iterator<SparseVec<ItLabel>> itInnerVecs)
           
 
Method Summary
protected  void goToNextNonEmptyInnerVector()
           
 boolean hasNext()
           
 VectorValue<ItLabel> next()
           
 void remove()
           
protected abstract  void switchToNextInnerVector(SparseVec<ItLabel> nextInnerVec)
           
protected abstract  VectorValue<ItLabel> transformValue(VectorValue<ItLabel> origValue)
          Transform a value retrieved from an inner vector before returning it as value of the composed vector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComposedSparseVec.AbstractComposedVectorIterator

public AbstractComposedSparseVec.AbstractComposedVectorIterator(Iterator<SparseVec<ItLabel>> itInnerVecs)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<VectorValue<ItLabel>>

next

public VectorValue<ItLabel> next()
Specified by:
next in interface Iterator<VectorValue<ItLabel>>

switchToNextInnerVector

protected abstract void switchToNextInnerVector(SparseVec<ItLabel> nextInnerVec)
Parameters:
nextInnerVec -

transformValue

protected abstract VectorValue<ItLabel> transformValue(VectorValue<ItLabel> origValue)
Transform a value retrieved from an inner vector before returning it as value of the composed vector

Parameters:
origValue - the value of the inner vector
Returns:
the corresponding value of the composed vector

goToNextNonEmptyInnerVector

protected void goToNextNonEmptyInnerVector()

remove

public void remove()
Specified by:
remove in interface Iterator<VectorValue<ItLabel>>