core/random.h File Reference


Detailed Description

Id
random.h 1182 2008-12-22 22:08:36Z dchassin
Copyright (C) 2008 Battelle Memorial Institute

Definition in file random.h.

Go to the source code of this file.

Enumerations

enum  RANDOMTYPE {
  RT_INVALID = -1, RT_DEGENERATE, RT_UNIFORM, RT_NORMAL,
  RT_LOGNORMAL, RT_BERNOULLI, RT_PARETO, RT_EXPONENTIAL,
  RT_SAMPLED, RT_RAYLEIGH, RT_WEIBULL, RT_GAMMA,
  RT_BETA, RT_TRIANGLE, RT_INVALID = -1, RT_DEGENERATE,
  RT_UNIFORM, RT_NORMAL, RT_LOGNORMAL, RT_BERNOULLI,
  RT_PARETO, RT_EXPONENTIAL, RT_SAMPLED, RT_RAYLEIGH,
  RT_WEIBULL
}

Functions

double pseudorandom_value (RANDOMTYPE type, unsigned int *state,...)
 Generate a pseudo-random value using the known state that is updated.
int random_apply (char *group_expression, char *property, RANDOMTYPE type,...)
 Apply a random number to property of a group of objects.
double random_bernoulli (double p)
 Generate a Bernoulli distributed random number.
double random_beta (double alpha, double beta)
 Generate a Beta distributed random number.
double random_degenerate (double a)
 Generate the same number always.
double random_exponential (double lambda)
 Generate an exponentially distributed random number.
double random_gamma (double alpha, double beta)
 Generate a Gamma distributed random number.
double random_lognormal (double gmu, double gsigma)
 Generate a log Gaussian distributed random number.
int random_nargs (char *name)
 Gets the number of arguments required by distribution (0=failed, -1=variable).
double random_normal (double m, double s)
 Generate a Gaussian distributed random number.
double random_pareto (double m, double k)
 Generate a Pareto distributed random number.
double random_rayleigh (double sigma)
 Generate a Rayleigh distributed random number.
int random_test (void)
 Test random distributions.
double random_triangle (double a, double b)
 Generate a symmetric triangle distributed random number.
RANDOMTYPE random_type (char *name)
 Converts a distribution name to a RANDOMTYPE.
double random_uniform (double a, double b)
 Generate a uniformly distributed random number.
double random_value (RANDOMTYPE type,...)
 Generate a random value.
double random_weibull (double lambda, double k)
 Generate a Weibull distributed random number.
int randwarn ()
 randwarn checks to see if non-determinism warning is necessary


GridLAB-DTM Version 2.0
An open-source project initiated by the US Department of Energy