From 7cd53b75c10831e01e288b01f63cab069d3e3035 Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Mon, 8 Dec 2014 15:00:58 +0100 Subject: Add better support to obfuscate statistics. --- src/common/util.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/common/util.h') diff --git a/src/common/util.h b/src/common/util.h index 921dd79da0..b8fd20fd7d 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -172,6 +172,10 @@ uint64_t round_to_power_of_2(uint64_t u64); unsigned round_to_next_multiple_of(unsigned number, unsigned divisor); uint32_t round_uint32_to_next_multiple_of(uint32_t number, uint32_t divisor); uint64_t round_uint64_to_next_multiple_of(uint64_t number, uint64_t divisor); +int64_t round_int64_to_next_multiple_of(int64_t number, int64_t divisor); +double sample_laplace_distribution(double mu, double b, double p); +int64_t add_laplace_noise(int64_t signal, double random, double delta_f, + double epsilon); int n_bits_set_u8(uint8_t v); /* Compute the CEIL of a divided by b, for nonnegative a -- cgit v1.2.3-54-g00ecf