Create a random array sampled from normal distribution.  
More...
|  | 
| array | randn (const dim4 &dims, const dtype ty, randomEngine &r) | 
|  | C++ Interface to create an array of random numbers normally distributed. 
 | 
|  | 
| array | randn (const dim4 &dims, const dtype ty=f32) | 
|  | C++ Interface to create an array of random numbers normally distributed. 
 | 
|  | 
| array | randn (const dim_t d0, const dtype ty=f32) | 
|  | C++ Interface to create an array of random numbers normally distributed. 
 | 
|  | 
| array | randn (const dim_t d0, const dim_t d1, const dtype ty=f32) | 
|  | C++ Interface to create an array of random numbers normally distributed. 
 | 
|  | 
| array | randn (const dim_t d0, const dim_t d1, const dim_t d2, const dtype ty=f32) | 
|  | C++ Interface to create an array of random numbers normally distributed. 
 | 
|  | 
| array | randn (const dim_t d0, const dim_t d1, const dim_t d2, const dim_t d3, const dtype ty=f32) | 
|  | C++ Interface to create an array of random numbers normally distributed. 
 | 
|  | 
| af_err | af_random_normal (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type, af_random_engine engine) | 
|  | C Interface to create an array of normal numbers using a random engine. 
 | 
|  | 
| af_err | af_randn (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type) | 
|  | 
Create a random array sampled from normal distribution. 
The type of engine used is defined by randomEngine.
The data is centered around 0.
 
◆ af_randn()
- Parameters
- 
  
    | [out] | out | generated array |  | [in] | ndims | number of dimensions |  | [in] | dims | array containing sizes of the dimension |  | [in] | type | type of array to generate |  
 
- Returns
- AF_SUCCESS, if function returns successfully, else an af_err code is given 
 
 
◆ af_random_normal()
C Interface to create an array of normal numbers using a random engine. 
- Parameters
- 
  
    | [out] | out | pointer to the returned object |  | [in] | ndims | number of dimensions |  | [in] | dims | C pointer with ndimselements; each value represents the size of that dimension |  | [in] | type | type of the af_array object |  | [in] | engine | random engine object |  
 
- Returns
- AF_SUCCESS, if function returns successfully, else an af_err code is given 
 
 
◆ randn() [1/6]
C++ Interface to create an array of random numbers normally distributed. 
- Parameters
- 
  
    | [in] | dims | dimensions of the array to be generated |  | [in] | ty | type of the array |  | [in] | r | random engine object |  
 
- Returns
- random number array of size dims
- Examples
- graphics/gravity_sim.cpp.
 
 
◆ randn() [2/6]
C++ Interface to create an array of random numbers normally distributed. 
- Parameters
- 
  
    | [in] | dims | dimensions of the array to be generated |  | [in] | ty | type of the array |  
 
- Returns
- random number array of size dims
 
 
◆ randn() [3/6]
C++ Interface to create an array of random numbers normally distributed. 
- Parameters
- 
  
    | [in] | d0 | size of the first dimension |  | [in] | d1 | size of the second dimension |  | [in] | d2 | size of the third dimension |  | [in] | d3 | size of the fourth dimension |  | [in] | ty | type of the array |  
 
- Returns
- random number array of size d0xd1xd2xd3
 
 
◆ randn() [4/6]
C++ Interface to create an array of random numbers normally distributed. 
- Parameters
- 
  
    | [in] | d0 | size of the first dimension |  | [in] | d1 | size of the second dimension |  | [in] | d2 | size of the third dimension |  | [in] | ty | type of the array |  
 
- Returns
- random number array of size d0xd1xd2
 
 
◆ randn() [5/6]
C++ Interface to create an array of random numbers normally distributed. 
- Parameters
- 
  
    | [in] | d0 | size of the first dimension |  | [in] | d1 | size of the second dimension |  | [in] | ty | type of the array |  
 
- Returns
- random number array of size d0xd1
 
 
◆ randn() [6/6]
C++ Interface to create an array of random numbers normally distributed. 
- Parameters
- 
  
    | [in] | d0 | size of the first dimension |  | [in] | ty | type of the array |  
 
- Returns
- random number array of size d0