diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-09-05 18:15:58 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-09-05 18:15:58 +0000 |
commit | 6d41f389dc7681b15bd29764b4faa4598362e416 (patch) | |
tree | 8e653ab49e2fed0af1ee1be6ab0ad914cd1c0658 | |
parent | 3551a12c430df06f4b31daec5541efcb28e65542 (diff) | |
download | opt-utilities-6d41f389dc7681b15bd29764b4faa4598362e416.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@63 ed2142bd-67ad-457f-ba7c-d818d4011675
-rw-r--r-- | data_sets/default_data_set.hpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/data_sets/default_data_set.hpp b/data_sets/default_data_set.hpp index f369cee..be9c4eb 100644 --- a/data_sets/default_data_set.hpp +++ b/data_sets/default_data_set.hpp @@ -49,7 +49,41 @@ namespace opt_utilities { data_vec.clear(); } - + + public: + default_data_set() + {} + + default_data_set(const default_data_set<Ty,Tx>& rhs) + :data_vec(rhs.data_vec) + {} + + default_data_set(const data_set<Ty,Tx>& rhs) + { + data_vec.resize(rhs.size()); + for(int i=0;i<data_vec.size();++i) + { + data_vec[i](rhs.get_data(i)); + } + } + + default_data_set& operator=(const default_data_set<Ty,Tx>& rhs) + { + data_vec=rhs.data_vec; + return *this; + } + + default_data_set& operator=(const data_set<Ty,Tx>& rhs) + { + data_vec.resize(rhs.size()); + for(int i=0;i<data_vec.size();++i) + { + data_vec[i](rhs.get_data(i)); + } + return *this; + } + + }; } |