org.apache.mahout.math.hadoop.stochasticsvd.qr
Class QRLastStep

java.lang.Object
  extended by org.apache.mahout.math.hadoop.stochasticsvd.qr.QRLastStep
All Implemented Interfaces:
Closeable, Iterator<Vector>

public class QRLastStep
extends Object
implements Closeable, Iterator<Vector>

Second/last step of QR iterations. Takes input of qtHats and rHats and provides iterator to pull ready rows of final Q.


Constructor Summary
QRLastStep(Iterator<DenseBlockWritable> qHatInput, Iterator<VectorWritable> rHatInput, int blockNum)
           
 
Method Summary
 void close()
           
 boolean hasNext()
           
 Vector next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QRLastStep

public QRLastStep(Iterator<DenseBlockWritable> qHatInput,
                  Iterator<VectorWritable> rHatInput,
                  int blockNum)
Parameters:
qHatInput - the Q-Hat input that was output in the first step
rHatInput - all RHat outputs int the group in order of groups
blockNum - our RHat number in the group
Throws:
IOException
Method Detail

hasNext

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

next

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

remove

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

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.