|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.PersistentObject
org.apache.mahout.math.jet.random.sampling.RandomSamplingAssistant
@Deprecated public final class RandomSamplingAssistant
Constructor Summary | |
---|---|
RandomSamplingAssistant(long n,
long N,
java.util.Random randomGenerator)
Deprecated. Constructs a random sampler that samples n random elements from an input sequence of N elements. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Deprecated. Returns a deep copy of the receiver. |
java.util.Random |
getRandomGenerator()
Deprecated. Returns the used random generator. |
static int[] |
sampleArray(int n,
int[] elements)
Deprecated. Just shows how this class can be used; samples n elements from and int[] array. |
boolean |
sampleNextElement()
Deprecated. Returns whether the next element of the input sequence shall be sampled (picked) or not. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomSamplingAssistant(long n, long N, java.util.Random randomGenerator)
n
- the total number of elements to choose (must be >= 0).N
- number of elements to choose from (must be >= n).randomGenerator
- a random number generator. Set this parameter to null to use the default random
number generator.Method Detail |
---|
public java.lang.Object clone()
clone
in class org.apache.mahout.math.PersistentObject
public java.util.Random getRandomGenerator()
public static int[] sampleArray(int n, int[] elements)
public boolean sampleNextElement()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |