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

java.lang.Object
  extended by org.apache.mahout.common.iterator.DelegatingIterator<T>
      extended by org.apache.mahout.common.iterator.FixedSizeSamplingIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>

public final class FixedSizeSamplingIterator<T>
extends DelegatingIterator<T>

Sample a fixed number of elements from an Iterator. The results can appear in any order.


Constructor Summary
FixedSizeSamplingIterator(int size, java.util.Iterator<T> source)
           
 
Method Summary
 
Methods inherited from class org.apache.mahout.common.iterator.DelegatingIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedSizeSamplingIterator

public FixedSizeSamplingIterator(int size,
                                 java.util.Iterator<T> source)


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.