From 59207b8b418106d7a00319a0f546c2f19c069cfc Mon Sep 17 00:00:00 2001 From: gerrish Date: Wed, 10 Apr 2019 16:06:30 +0300 Subject: [PATCH] small change to docs --- rand_func.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rand_func.go b/rand_func.go index e325bce..9209232 100644 --- a/rand_func.go +++ b/rand_func.go @@ -6,10 +6,14 @@ import ( const mask = ((1 << SkiplistMaxLevel) - 1) -// FAST = true, one call to rand, 0.5 probability +//FAST used to initialise skiplist with +// fast random level generation algorithm but +// set probability of 0.5 const FAST = true -//VARIABLE consecutive calls to rand, variable probability +//VARIABLE used to initialise skiplist with +//slower random level generation algorithm but +//with variable probability const VARIABLE = false func coinTosses(prob float64, maxLevels int, fast bool) (counter int) {