net.sf.javaml.tools.sampling
Class SubSampling

java.lang.Object
  extended by net.sf.javaml.tools.sampling.SamplingMethod
      extended by net.sf.javaml.tools.sampling.SubSampling

public class SubSampling
extends SamplingMethod

Implements regular subsampling without replacement. This method cannot return samples that are larger than the original data set.

Author:
Thomas

Constructor Summary
SubSampling()
           
 
Method Summary
 java.util.List<java.lang.Integer> sample(java.util.List<java.lang.Integer> set, int size, long seed)
          Samples a set of integers and returns a new set of integers that is the result of the sampling.
 
Methods inherited from class net.sf.javaml.tools.sampling.SamplingMethod
sample, sample
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubSampling

public SubSampling()
Method Detail

sample

public java.util.List<java.lang.Integer> sample(java.util.List<java.lang.Integer> set,
                                                int size,
                                                long seed)
Description copied from class: SamplingMethod
Samples a set of integers and returns a new set of integers that is the result of the sampling.

Specified by:
sample in class SamplingMethod
Parameters:
set - the set to sample from
size - the number of items that should be in the returned sample
seed - the seed used for the random generator
Returns:
the selected set of integers


Copyright © 2006-2010 - Thomas Abeel - All Rights Reserved. SourceForge.netLogo