From 1f4a944064bc42284c33e6b755353d191cf288e8 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Mon, 15 Dec 2008 07:26:12 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@1 ed2142bd-67ad-457f-ba7c-d818d4011675 --- core/default_data_set.hpp | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 core/default_data_set.hpp (limited to 'core/default_data_set.hpp') diff --git a/core/default_data_set.hpp b/core/default_data_set.hpp new file mode 100644 index 0000000..be06c04 --- /dev/null +++ b/core/default_data_set.hpp @@ -0,0 +1,47 @@ +#ifndef DEFAULT_DATA_SET +#define DEFAULT_DATA_SET +#include "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(int i)const + { + return data_vec.at(i); + } + + int do_size()const + { + return data_vec.size(); + } + + void do_push_back(const data& d) + { + data_vec.push_back(d); + } + + void do_clear() + { + data_vec.clear(); + } + +}; +} + +#endif +//EOF -- cgit v1.2.2