A class for random number
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | random_int | 
                 it will be deplicated.  | 
        |||
| integer(kind=int32), | public, | allocatable | :: | random_int_seed(:) | 
                 It is a seed number  | 
        ||
| integer(kind=int32), | public, | allocatable | :: | random_int_vec(:) | 
                 it will be deplicated.  | 
        ||
| real(kind=real64), | public | :: | random_real | 
                 it will be deplicated.  | 
        |||
| real(kind=real64), | public, | allocatable | :: | random_real_vec(:) | 
                 it will be deplicated.  | 
        
It initializes the random number by a seed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | 
Returns integer random number
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(in) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | From | |||
| integer(kind=int32), | intent(in) | :: | To | 
Returns random name
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | 
Random choice
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(in) | :: | obj | |||
| integer(kind=int32), | intent(in), | optional | :: | Vector(:) | ||
| integer(kind=int32), | intent(in), | optional | :: | Array(:,:) | 
Random choice
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(in) | :: | obj | |||
| real(kind=real64), | intent(in), | optional | :: | Vector(:) | ||
| real(kind=real64), | intent(in), | optional | :: | Array(:,:) | 
Random choice, and the number of the set will be (-1)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(in) | :: | this | |||
| integer(kind=int32), | intent(inout), | allocatable | :: | vec(:) | 
Random choice, and the number of the set will be (-n)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(in) | :: | this | |||
| integer(kind=int32), | intent(inout), | allocatable | :: | vec(:) | ||
| integer(kind=int32), | intent(in) | :: | num | 
Random rearrange of a integer array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(in) | :: | this | |||
| integer(kind=int32), | intent(inout) | :: | intvec(:) | 
Generate uniform distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(in) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | From | |||
| real(kind=real64), | intent(in) | :: | To | 
Generate Gaussian distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | sigma | 
Generate Gaussian distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | sigma | |||
| integer(kind=int32), | intent(in) | :: | n | 
Generate Gaussian distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | sigma | |||
| integer(kind=int32), | intent(in) | :: | n | |||
| integer(kind=int32), | intent(in) | :: | m | 
Generate Gaussian distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | sigma | 
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | sigma | |||
| integer(kind=int32), | intent(in) | :: | n | 
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | sigma | |||
| integer(kind=int32), | intent(in) | :: | n | |||
| integer(kind=int32), | intent(in) | :: | m | 
Generate Chi-Squared distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | k | 
Generate Cauchy distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | gamma | 
Generate Lognormal distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | sigma | 
Generate InverseGaussian distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | mu | |||
| real(kind=real64), | intent(in) | :: | lambda | 
save random number
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | 
Generate While-Gaussian signal
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | num_sample | |||
| real(kind=real64), | intent(in), | optional | :: | mu | ||
| real(kind=real64), | intent(in), | optional | :: | sigma | 
Generate a vector of uniform random number.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | d0 | 
Generate a array of uniform random number.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | d0 | |||
| integer(kind=int32), | intent(in) | :: | d1 | 
Generate a vector/array of uniform random number.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | d0 | |||
| integer(kind=int32), | intent(in) | :: | d1 | 
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | d0 | 
Generate a vector of uniform random number.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(inout), | optional | :: | array(:,:) | ||
| real(kind=real64), | intent(inout), | optional | :: | vector(:) | 
Generate a histogram of a vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| real(kind=real64), | intent(in) | :: | list(:) | |||
| integer(kind=int32), | intent(in), | optional | :: | division | 
Generate a random scalar of uniform distribution [0,1)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | size1 | 
Generate a random vector of uniform distribution [0,1)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | size1 | 
Generate a random matrix of uniform distribution [0,1)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | size1 | |||
| integer(kind=int32), | intent(in) | :: | size2 | 
Generate a random cube (3rd order tensor) of uniform distribution [0,1)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Random_), | intent(inout) | :: | obj | |||
| integer(kind=int32), | intent(in) | :: | size1 | |||
| integer(kind=int32), | intent(in) | :: | size2 | |||
| integer(kind=int32), | intent(in) | :: | size3 |