|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.neem.impl.RandomSamples
public class RandomSamples
Efficient computation of random samples from a small universe. This is used for gossiping.
| Constructor Summary | |
|---|---|
RandomSamples()
|
|
| Method Summary | |
|---|---|
static int[] |
mkUniverse(int n)
Initializes the universe for computing random samples. |
static int |
uniformSample(int n,
int[] universe,
java.util.Random rand)
Efficiently calculate a random sample. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomSamples()
| Method Detail |
|---|
public static int uniformSample(int n,
int[] universe,
java.util.Random rand)
n - size of sample.universe - universe to draw from.rand - random generator.public static int[] mkUniverse(int n)
n - size of the universe
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||