From ceb836399f56b60ad82a73e67f4cbd361d834582 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Mon, 6 Apr 2009 16:36:52 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@18 ed2142bd-67ad-457f-ba7c-d818d4011675 --- data_sets/default_data_set.hpp | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 data_sets/default_data_set.hpp (limited to 'data_sets/default_data_set.hpp') diff --git a/data_sets/default_data_set.hpp b/data_sets/default_data_set.hpp new file mode 100644 index 0000000..887e3d2 --- /dev/null +++ b/data_sets/default_data_set.hpp @@ -0,0 +1,47 @@ +#ifndef DEFAULT_DATA_SET +#define DEFAULT_DATA_SET +#include "core/fitter.hpp" +#include + + +namespace opt_utilities +{ + +template +class default_data_set + :public data_set +{ +private: + std::vector > data_vec; + + data_set* do_clone()const + { + return new default_data_set(*this); + } + + + const data& do_get_data(size_t i)const + { + return data_vec.at(i); + } + + size_t do_size()const + { + return data_vec.size(); + } + + void do_add_data(const data& d) + { + data_vec.push_back(d); + } + + void do_clear() + { + data_vec.clear(); + } + +}; +} + +#endif +//EOF -- cgit v1.2.2