aboutsummaryrefslogtreecommitdiff
path: root/src/lib/math/laplace.h
blob: e0dd166bbde4779f2d404daa6cbeed48225ab4f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Copyright (c) 2003, Roger Dingledine
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
 * Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */

/**
 * \file laplace.h
 *
 * \brief Header for laplace.c
 **/

#ifndef TOR_LAPLACE_H
#define TOR_LAPLACE_H

#include "lib/cc/compat_compiler.h"
#include "lib/cc/torint.h"

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);

#endif /* !defined(TOR_LAPLACE_H) */