org.apache.hadoop.mapred.gridmix
Class RandomAlgorithms

java.lang.Object
  extended by org.apache.hadoop.mapred.gridmix.RandomAlgorithms

public class RandomAlgorithms
extends Object

Random algorithms.


Nested Class Summary
static class RandomAlgorithms.Selector
          Iteratively pick random numbers from pool 0..n-1.
 
Constructor Summary
RandomAlgorithms()
           
 
Method Summary
static int[] select(int m, int n, Random rand)
          Selecting m random integers from 0..n-1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomAlgorithms

public RandomAlgorithms()
Method Detail

select

public static int[] select(int m,
                           int n,
                           Random rand)
Selecting m random integers from 0..n-1.

Returns:
An array of selected integers.


Copyright © 2009 The Apache Software Foundation