类 RandomUtil
- java.lang.Object
-
- org.meteoinfo.math.RandomUtil
-
public class RandomUtil extends java.lang.Object- 作者:
- Yaqiang Wang
-
-
构造器概要
构造器 构造器 说明 RandomUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static doublepoisson(double mean)Get random data from a Poisson distributionstatic ucar.ma2.Arraypoisson(double mean, int n)Get random data from a Poisson distributionstatic ucar.ma2.Arraypoisson(double mean, java.util.List<java.lang.Integer> shape)Get random data from a Poisson distributionstatic doublerand()Get random valuestatic ucar.ma2.Arrayrand(int n)Get random array - one dimensionstatic ucar.ma2.Arrayrand(java.util.List<java.lang.Integer> shape)Get random arraystatic intrandint(int bound)Get random int valuestatic ucar.ma2.Arrayrandint(int bound, int n)Get random integer arraystatic ucar.ma2.Arrayrandint(int bound, java.util.List<java.lang.Integer> shape)Get random integer arraystatic doublerandn()Get random valuestatic ucar.ma2.Arrayrandn(int n)Get random array - one dimensionstatic ucar.ma2.Arrayrandn(java.util.List<java.lang.Integer> shape)Get random array
-
-
-
方法详细资料
-
rand
public static double rand()
Get random value- 返回:
- Random value
-
rand
public static ucar.ma2.Array rand(int n)
Get random array - one dimension- 参数:
n- Array length- 返回:
- Result array
-
rand
public static ucar.ma2.Array rand(java.util.List<java.lang.Integer> shape)
Get random array- 参数:
shape- Shape- 返回:
- Array Result array
-
randn
public static double randn()
Get random value- 返回:
- Random value
-
randn
public static ucar.ma2.Array randn(int n)
Get random array - one dimension- 参数:
n- Array length- 返回:
- Result array
-
randn
public static ucar.ma2.Array randn(java.util.List<java.lang.Integer> shape)
Get random array- 参数:
shape- Shape- 返回:
- Array Result array
-
randint
public static int randint(int bound)
Get random int value- 参数:
bound- Highest value- 返回:
- Random int value
-
randint
public static ucar.ma2.Array randint(int bound, int n)Get random integer array- 参数:
bound- Highest valuen- Array length- 返回:
- Array Result array
-
randint
public static ucar.ma2.Array randint(int bound, java.util.List<java.lang.Integer> shape)Get random integer array- 参数:
bound- Highest valueshape- Shape- 返回:
- Array Result array
-
poisson
public static double poisson(double mean)
Get random data from a Poisson distribution- 参数:
mean- Poisson mean- 返回:
- Random value
-
poisson
public static ucar.ma2.Array poisson(double mean, int n)Get random data from a Poisson distribution- 参数:
mean- Poisson meann- Array length- 返回:
- Array Result array
-
poisson
public static ucar.ma2.Array poisson(double mean, java.util.List<java.lang.Integer> shape)Get random data from a Poisson distribution- 参数:
mean- Poisson meanshape- Shape- 返回:
- Array Result array
-
-