|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ed.inf.utils.stats.UniformRandomUtils
public class UniformRandomUtils
Utilities for extracting with uniform random distribution
| Constructor Summary | |
|---|---|
UniformRandomUtils()
|
|
| Method Summary | |
|---|---|
static int |
extractInteger(int size)
Returns a random integer between 0 and (size-1) |
static java.util.Map.Entry |
extractUniformRandomMapEntry(java.util.Map map)
Extracts a random entry (key-value association) from a map |
static java.util.Map |
getUniformRandomSubmap(java.util.Map map,
double percentage)
Returns a submap of randomly picked map entries |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniformRandomUtils()
| Method Detail |
|---|
public static int extractInteger(int size)
size - size-1 is the biggest integer that can be extracted
public static java.util.Map.Entry extractUniformRandomMapEntry(java.util.Map map)
map - a map
public static java.util.Map getUniformRandomSubmap(java.util.Map map,
double percentage)
map - the original mappercentage - the percentage of the original map to be put in the submap
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||