org.apache.mahout.common.iterator
Class StableFixedSizeSamplingIterator<T>

java.lang.Object
  extended by com.google.common.collect.ForwardingObject
      extended by com.google.common.collect.ForwardingIterator<T>
          extended by org.apache.mahout.common.iterator.StableFixedSizeSamplingIterator<T>
All Implemented Interfaces:
Iterator<T>

public class StableFixedSizeSamplingIterator<T>
extends com.google.common.collect.ForwardingIterator<T>

Sample a fixed number of elements from an Iterator. The results will appear in the original order at some cost in time and memory relative to a FixedSizeSampler.


Constructor Summary
StableFixedSizeSamplingIterator(int size, Iterator<T> source)
           
 
Method Summary
protected  Iterator<T> delegate()
           
 
Methods inherited from class com.google.common.collect.ForwardingIterator
hasNext, next, remove
 
Methods inherited from class com.google.common.collect.ForwardingObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StableFixedSizeSamplingIterator

public StableFixedSizeSamplingIterator(int size,
                                       Iterator<T> source)
Method Detail

delegate

protected Iterator<T> delegate()
Overrides:
delegate in class com.google.common.collect.ForwardingIterator<T>


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