Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,6 @@
|
|||
let avg (a:float) (v:float) n =
|
||||
a + (1. / ((float n) + 1.)) * (v - a)
|
||||
|
||||
let mean_series list =
|
||||
let a, _ = List.fold_left (fun (a, n) h -> avg a (float h) n, n + 1) (0., 0) list in
|
||||
a
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
> mean_series [1; 8; 2; 8; 1; 7; 1; 8; 2; 7; 3; 6; 1; 8; 100] ;;
|
||||
val it : float = 10.86666667
|
||||
> mean_series [] ;;
|
||||
val it : float = 0.0
|
||||
|
|
@ -0,0 +1 @@
|
|||
List.average [4;1;7;5;8;4;5;2;1;5;2;5]
|
||||
Loading…
Add table
Add a link
Reference in a new issue