net.sf.javaml.tools.sampling
Class SamplingMethod

java.lang.Object
  extended by net.sf.javaml.tools.sampling.SamplingMethod
Direct Known Subclasses:
NormalBootstrapping, SubSampling

public abstract class SamplingMethod
extends java.lang.Object

Defines sampling methods to select a subset of a set integers. The original set may contain duplicates and the output set may contain duplicates.

Author:
Thomas

Constructor Summary
SamplingMethod()
           
 
Method Summary
 java.util.List<java.lang.Integer> sample(java.util.List<java.lang.Integer> set)
          Samples a set of integers and returns a new set of integers that is the result of the sampling.
 java.util.List<java.lang.Integer> sample(java.util.List<java.lang.Integer> set, int size)
          Samples a set of integers and returns a new set of integers that is the result of the sampling.
abstract  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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SamplingMethod

public SamplingMethod()
Method Detail

sample

public java.util.List<java.lang.Integer> sample(java.util.List<java.lang.Integer> set)
Samples a set of integers and returns a new set of integers that is the result of the sampling. The returned set will be the same size as the original set.

Parameters:
set - the set to sample from
Returns:
the selected of integers

sample

public java.util.List<java.lang.Integer> sample(java.util.List<java.lang.Integer> set,
                                                int size)
Samples a set of integers and returns a new set of integers that is the result of the sampling.

Parameters:
set - the set to sample from
size - the number of items that should be in the returned sample
Returns:
the selected set of integers

sample

public abstract 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.

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