From b2c2d2a42e5d9e7b104ecebe41c89c701ad49923 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Mon, 5 Jan 2009 01:51:52 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@7 ed2142bd-67ad-457f-ba7c-d818d4011675 --- misc/bootstrap.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/misc/bootstrap.hpp b/misc/bootstrap.hpp index 0e58efa..3ee53b1 100644 --- a/misc/bootstrap.hpp +++ b/misc/bootstrap.hpp @@ -36,6 +36,11 @@ namespace opt_utilities :p_fitter(NULL) {} + ~bootstrap() + { + reset(); + } + void set_fitter(fitter& pf) { param_pool.clear(); @@ -44,7 +49,14 @@ namespace opt_utilities origin_param=pf.get_all_params(); } - + void reset() + { + if(p_fitter!=NULL) + { + p_fitter->load_data(origin_data_set); + p_fitter->set_param_value(origin_param); + } + } void sample(int n) { -- cgit v1.2.2