Skip to content

Commit

Permalink
small change to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BazookaMusic committed Apr 10, 2019
1 parent 2c60f99 commit 59207b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rand_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 59207b8

Please sign in to comment.