aboutsummaryrefslogtreecommitdiffstats
path: root/core/default_data_set.hpp
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2008-12-15 07:26:12 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2008-12-15 07:26:12 +0000
commit1f4a944064bc42284c33e6b755353d191cf288e8 (patch)
treec8cb2253dea5f395e0f867aa6976433bd3eb00de /core/default_data_set.hpp
downloadopt-utilities-1f4a944064bc42284c33e6b755353d191cf288e8.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@1 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'core/default_data_set.hpp')
-rw-r--r--core/default_data_set.hpp47
1 files changed, 47 insertions, 0 deletions
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 <vector>
+
+
+namespace opt_utilities
+{
+
+template <typename Ty,typename Tx>
+class default_data_set
+ :public data_set<Ty,Tx>
+{
+private:
+ std::vector<data<Ty,Tx> > data_vec;
+
+ data_set<Ty,Tx>* do_clone()const
+ {
+ return new default_data_set<Ty,Tx>(*this);
+ }
+
+
+ const data<Ty,Tx>& 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<Ty,Tx>& d)
+ {
+ data_vec.push_back(d);
+ }
+
+ void do_clear()
+ {
+ data_vec.clear();
+ }
+
+};
+}
+
+#endif
+//EOF