diff options
author | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-24 12:37:28 +0100 |
---|---|---|
committer | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-24 12:37:28 +0100 |
commit | e031626c756d6dce1eca4ac9854332d507401a53 (patch) | |
tree | 1207886da2a8c6ca96ef71aefe1288d052fa1e02 | |
parent | 448cd51fc01bcc987033d11d1de2409855718939 (diff) |
reformated comments
-rw-r--r-- | diffpriv.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/diffpriv.go b/diffpriv.go index 14919b7..6cf09f1 100644 --- a/diffpriv.go +++ b/diffpriv.go @@ -10,10 +10,12 @@ var ( rnd = rand.New(rand.NewSource(time.Now().UnixNano())) ) -//Returns 0 if epsilon is less than or equal to 0. -//Otherwise it picks a number from the laplace distribution -//with the mean 0 and standard deviation sensitivity/epsilon. -//This follows the definition of differential privacy noise addition. +// Returns 0 if epsilon is less than or equal to 0. +// Otherwise it picks a number from the laplace +// distribution with the mean 0 and standard deviation +// sensitivity/epsilon. +// This follows the definition of differential privacy +// noise addition. func diffpriv(value int, sensitivity, epsilon float64) int { if epsilon <= 0 { return 0 |