From 486c1e061bfe039b0d8baa7cb59cab8f3b8e07ba Mon Sep 17 00:00:00 2001 From: Bertrand Date: Tue, 9 Feb 2016 13:49:07 +0000 Subject: ajout fonction estimator --- stratified_sampling.hpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'stratified_sampling.hpp') diff --git a/stratified_sampling.hpp b/stratified_sampling.hpp index ca96a3c..e9e1823 100644 --- a/stratified_sampling.hpp +++ b/stratified_sampling.hpp @@ -54,7 +54,7 @@ struct stratified_sampling { vector get_mean(); vector get_var(); void print_mean(); - //double estimator(); + pair estimator(); private: vector p; vector M; @@ -147,6 +147,19 @@ void stratified_sampling::print_mean() { cout< +pair stratified_sampling::estimator() { + double est_mean; + double est_std; + for (int i=0; i