public class MiscUtils extends Object
Constructor and Description |
---|
MiscUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
chooseRandomIndexBasedOnWeights(double[] weights,
Random random) |
static String |
getStackTraceString(Exception ex) |
static int |
maxIndex(double[] doubles)
Returns index of maximum element in a given array of doubles.
|
static int |
poisson(double lambda,
Random r) |
public static int chooseRandomIndexBasedOnWeights(double[] weights, Random random)
public static int poisson(double lambda, Random r)
public static int maxIndex(double[] doubles)
doubles
- the array of doublesCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.