All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Jampack.Rand

java.lang.Object
   |
   +----Jampack.Rand

public class Rand
extends Object
The rand suite generates random objects with elements distributed randomly on [0,1] or normally with mean zero and standard deviation one.


Constructor Index

 o Rand()

Method Index

 o nd()
Generates a normal random double.
 o ndary(int)
Generates a one-dimensional array of normal random doubles.
 o ndary(int, int)
Generates a two-dimensional array of normal random doubles.
 o nz()
Generates a normal random complex number, i.e., a complex number whose real and imaginary parts are random.
 o nz1(int)
Generates a normal random Z1.
 o nzmat(int, int)
Generates a normal random Zmat.
 o setSeed(long)
Sets the seed for the random number generator.
 o ud()
Generates a random uniform double.
 o udary(int)
Generates a one-dimensional array of uniform random doubles.
 o udary(int, int)
Generates a two-dimensional array of uniform random doubles.
 o uz()
Generates a uniform random complex number, i.e., a complex number whose real and imaginary parts are random.
 o uz1(int)
Generates a uniform random Z1.
 o uzmat(int, int)
Generates a uniform random Zmat.

Constructors

 o Rand
 public Rand()

Methods

 o setSeed
 public static void setSeed(long seed)
Sets the seed for the random number generator.

Parameters:
seed - The seed
 o ud
 public static double ud()
Generates a random uniform double.

Returns:
a uniform random double
 o udary
 public static double[] udary(int n)
Generates a one-dimensional array of uniform random doubles.

Parameters:
n - The length of the array.
Returns:
The array of uniform doubles.
 o udary
 public static double[][] udary(int m,
                                int n)
Generates a two-dimensional array of uniform random doubles.

Parameters:
m - The number of rows in the array.
n - The number of columns in the array.
Returns:
The array of uniform doubles.
 o uz
 public static Z uz()
Generates a uniform random complex number, i.e., a complex number whose real and imaginary parts are random.

Returns:
The uniform random Z
 o uz1
 public static Z1 uz1(int n) throws JampackException
Generates a uniform random Z1.

Parameters:
n - The length of the Z1
Returns:
The uniform random Z1
Throws: JampackException
Passed from below.
 o uzmat
 public static Zmat uzmat(int m,
                          int n) throws JampackException
Generates a uniform random Zmat.

Parameters:
m - The number of rows in the Zmat
n - The number of columns in the Zmat
Returns:
The uniform random Zmat
Throws: JampackException
Passed from below.
 o nd
 public static double nd()
Generates a normal random double.

Returns:
a normal random double
 o ndary
 public static double[] ndary(int n)
Generates a one-dimensional array of normal random doubles.

Parameters:
n - The length of the array.
Returns:
The array of normal doubles.
 o ndary
 public static double[][] ndary(int m,
                                int n)
Generates a two-dimensional array of normal random doubles.

Parameters:
m - The number of rows in the array.
n - The number of columns in the array.
Returns:
The array of normal doubles.
 o nz
 public static Z nz()
Generates a normal random complex number, i.e., a complex number whose real and imaginary parts are random.

Returns:
The normal random Z
 o nz1
 public static Z1 nz1(int n) throws JampackException
Generates a normal random Z1.

Parameters:
n - The length of the Z1
Returns:
The normal random Z1
Throws: JampackException
Passed from below.
 o nzmat
 public static Zmat nzmat(int m,
                          int n) throws JampackException
Generates a normal random Zmat.

Parameters:
m - The number of rows in the Zmat
n - The number of columns in the Zmat
Returns:
The normal random Zmat
Throws: JampackException
Passed from below.

All Packages  Class Hierarchy  This Package  Previous  Next  Index