Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -9,7 +9,7 @@ F newv(n, p)
|
|||
R (0 .< n).map(i -> Int(nonrandom() < @p))
|
||||
|
||||
F runs(v)
|
||||
R sum(zip(v, v[1..] [+] [0]).map((a, b) -> (a [&] (-)b)))
|
||||
R sum(zip(v, v[1..] [+] [0]).map((a, b) -> (a [&] ~b)))
|
||||
|
||||
F mean_run_density(n, p)
|
||||
R runs(newv(n, p)) / Float(n)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import "random" for Random
|
||||
import "/fmt" for Fmt
|
||||
import "./fmt" for Fmt
|
||||
|
||||
var rand = Random.new()
|
||||
var RAND_MAX = 32767
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue