From e031626c756d6dce1eca4ac9854332d507401a53 Mon Sep 17 00:00:00 2001 From: Daniel Langesten Date: Tue, 24 Mar 2015 12:37:28 +0100 Subject: reformated comments --- diffpriv.go | 10 ++++++---- 1 file 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 -- cgit v1.1