Tor
0.4.7.0-alpha-dev
|
Go to the source code of this file.
Functions | |
int64_t | sample_laplace_distribution (double mu, double b, double p) |
int64_t | add_laplace_noise (int64_t signal, double random, double delta_f, double epsilon) |
int64_t add_laplace_noise | ( | int64_t | signal_, |
double | random_, | ||
double | delta_f, | ||
double | epsilon | ||
) |
int64_t sample_laplace_distribution | ( | double | mu, |
double | b, | ||
double | p | ||
) |
Transform a random value p from the uniform distribution in [0.0, 1.0[ into a Laplace distributed value with location parameter mu and scale parameter b. Truncate the final result to be an integer in [INT64_MIN, INT64_MAX].
Definition at line 26 of file laplace.c.
Referenced by add_laplace_noise().