|
C Configuration Space and Tuning Library (CCS)
|
CCS rng define random number generators. More...
#include <gsl/gsl_rng.h>

Go to the source code of this file.
Functions | |
| ccs_result_t | ccs_create_rng (ccs_rng_t *rng_ret) |
| Create a new random number generator using the gsl default type (see gsl_rng_default). | |
| ccs_result_t | ccs_create_rng_with_type (const gsl_rng_type *rng_type, ccs_rng_t *rng_ret) |
| Create a new random number generator using the provided gsl type (see gsl_rng_type). | |
| ccs_result_t | ccs_rng_get_type (ccs_rng_t rng, const gsl_rng_type **rng_type_ret) |
| Get the gsl type of a random number generator. | |
| ccs_result_t | ccs_rng_set_seed (ccs_rng_t rng, unsigned long int seed) |
| Set the seed of a random number generator. | |
| ccs_result_t | ccs_rng_get (ccs_rng_t rng, unsigned long int *value_ret) |
| Get a random integer from a random number generator. | |
| ccs_result_t | ccs_rng_uniform (ccs_rng_t rng, ccs_float_t *value_ret) |
| Get a random floating point value uniformly sampled in the interval [0.0, 1.0). | |
| ccs_result_t | ccs_rng_min (ccs_rng_t rng, unsigned long int *value_ret) |
| Get the minimum value that can be returned by ccs_rng_get. | |
| ccs_result_t | ccs_rng_max (ccs_rng_t rng, unsigned long int *value_ret) |
| Get the maximum value that can be returned by ccs_rng_get. | |
CCS rng define random number generators.
For now they are wrappers over gsl random number generators.
|
extern |
Create a new random number generator using the gsl default type (see gsl_rng_default).
| [out] | rng_ret | a pointer to the variable that will contain the returned random number generator |
rng_ret is NULL
|
extern |
Create a new random number generator using the provided gsl type (see gsl_rng_type).
| [in] | rng_type | a pointer to the type of gsl random number generator to use. |
| [out] | rng_ret | a pointer to the variable that will contain the returned random number generator |
rng_ret or rng_type are NULL
|
extern |
Get a random integer from a random number generator.
Integer is contained between the value returned by ccs_rng_min and ccs_rng_max, both included.
| [in] | rng | |
| [out] | value_ret | a pointer to the variable that will contain the returned value |
rng is not a valid CCS random number generator value_ret is NULL
|
extern |
Get the gsl type of a random number generator.
| [in] | rng | |
| [out] | rng_type_ret | a pointer that will contained a pointer to the returned gsl random number generator type. |
rng is not a valid CCS random number generator rng_type_ret is NULL
|
extern |
Get the maximum value that can be returned by ccs_rng_get.
| [in] | rng | |
| [out] | value_ret | a pointer to the variable that will contain the returned value |
rng is not a valid CCS random number generator value_ret is NULL
|
extern |
Get the minimum value that can be returned by ccs_rng_get.
| [in] | rng | |
| [out] | value_ret | a pointer to the variable that will contain the returned value |
rng is not a valid CCS random number generator value_ret is NULL
|
extern |
Set the seed of a random number generator.
| [in] | rng | |
| [in] | seed | the seed to use with the random number generator |
rng is not a valid CCS random number generator
|
extern |
Get a random floating point value uniformly sampled in the interval [0.0, 1.0).
| [in] | rng | |
| [out] | value_ret | a pointer to the variable that will contain the returned value |
rng is not a valid CCS random number generator value_ret is NULL