Tor  0.4.7.0-alpha-dev
laplace.h
Go to the documentation of this file.
1 /* Copyright (c) 2003, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2021, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 /**
7  * \file laplace.h
8  *
9  * \brief Header for laplace.c
10  **/
11 
12 #ifndef TOR_LAPLACE_H
13 #define TOR_LAPLACE_H
14 
15 #include "lib/cc/compat_compiler.h"
16 #include "lib/cc/torint.h"
17 
18 int64_t sample_laplace_distribution(double mu, double b, double p);
19 int64_t add_laplace_noise(int64_t signal, double random, double delta_f,
20  double epsilon);
21 
22 #endif /* !defined(TOR_LAPLACE_H) */
Utility macros to handle different features and behavior in different compilers.
int64_t add_laplace_noise(int64_t signal, double random, double delta_f, double epsilon)
Definition: laplace.c:51
int64_t sample_laplace_distribution(double mu, double b, double p)
Definition: laplace.c:26
Integer definitions used throughout Tor.