| Bsoft 2.0.5 Bernard's software package

random_numbers.h
Go to the documentation of this file.
1
9 #include <Vector3.h>
10
11
12
13 // Function prototypes
14 long get_rand_max();
15 long random_seed();
16 float* random_array_uniform(long n, double min, double max);
17 double random_gaussian(double avg, double std);
18 float* random_array_gaussian(long n, double avg, double std);
19 double random_poisson(double avg);
20 float* random_array_poisson(int n, double avg);
21 double random_logistical(double avg, double std);
22 float* random_array_logistical(long n, double avg, double std);
23 Vector3<double> vector3_random_unit_sphere();
24 Vector3<double> vector3_random(const double min, const double max);
25 Vector3<double> vector3_random(Vector3<double> min, Vector3<double> max);
26 Vector3<double> vector3_random(const double length);
27 Vector3<double> vector3_random_gaussian(double avg, double std);
28 Vector3<double> vector3_xy_random_gaussian(double avg, double std);
29
vector3_random
Vector3< double > vector3_random(const double min, const double max)
Generates a random vector within a defined cube.
Definition: random_numbers.cpp:440
random_seed
long random_seed()
Gets a random seed and sets the flag.
Definition: random_numbers.cpp:41
vector3_xy_random_gaussian
Vector3< double > vector3_xy_random_gaussian(double avg, double std)
Generates a random vector within a random gaussian-distributed length in the xy plane.
Definition: random_numbers.cpp:522
vector3_random_gaussian
Vector3< double > vector3_random_gaussian(double avg, double std)
Generates a random vector within a random gaussian-distributed length.
Definition: random_numbers.cpp:502
random_gaussian
double random_gaussian(double avg, double std)
Generates a value with a gaussian random distribution.
Definition: random_numbers.cpp:123
random_logistical
double random_logistical(double avg, double std)
Generates a value with a logistical random distribution.
Definition: random_numbers.cpp:338
vector3_random_unit_sphere
Vector3< double > vector3_random_unit_sphere()
Generates a random vector on the unit sphere.
Definition: random_numbers.cpp:419
random_array_poisson
float * random_array_poisson(int n, double avg)
Generates a series with a poisson random distribution of values.
Definition: random_numbers.cpp:296
random_array_logistical
float * random_array_logistical(long n, double avg, double std)
Generates an array with a logistical random distribution.
Definition: random_numbers.cpp:379
length
double length(vector< T > v)
Definition: Vector3.h:528
get_rand_max
long get_rand_max()
Finds the maximum random number for a system.
Definition: random_numbers.cpp:22
Vector3< double >
Vector3.h
Class for 3-value vectors.
random_array_uniform
float * random_array_uniform(long n, double min, double max)
Generates a series with a uniform random distribution.
Definition: random_numbers.cpp:76
random_poisson
double random_poisson(double avg)
Generates a value deviating from the average based on a poisson distribution.
Definition: random_numbers.cpp:221
random_array_gaussian
float * random_array_gaussian(long n, double avg, double std)
Generates a series with a gaussian random distribution of values.
Definition: random_numbers.cpp:172