edu.cmu.minorthird.classify.experiments
Class SubpopSorter<T>

java.lang.Object
  extended by edu.cmu.minorthird.classify.experiments.SubpopSorter<T>

public class SubpopSorter<T>
extends java.lang.Object

Helper class for splitting up iterators over Instances

Author:
William Cohen

Constructor Summary
SubpopSorter(java.util.Iterator<T> i)
          Create a SubpopSorter.
SubpopSorter(java.util.Random random, java.util.Iterator<T> i)
          Create a SubpopSorter.
 
Method Summary
 java.util.Iterator<java.util.List<T>> subpopIterator()
          Return an iterator over lists of subpopulations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubpopSorter

public SubpopSorter(java.util.Random random,
                    java.util.Iterator<T> i)
Create a SubpopSorter. Iterator i must iterate over Instances.


SubpopSorter

public SubpopSorter(java.util.Iterator<T> i)
Create a SubpopSorter. Iterator i must iterate over Instances.

Method Detail

subpopIterator

public java.util.Iterator<java.util.List<T>> subpopIterator()
Return an iterator over lists of subpopulations. The subpopulations, and the lists of Instances within each subpopulation, are randomly ordered.