diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-09-22 16:25:14 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-09-22 16:25:14 +0000 |
commit | 3805f4031bce536ea616b2ad2b6b008fade19288 (patch) | |
tree | fcf930988e014f0a9ce8c525662e695485308984 | |
parent | c83ed75e9bf81562a5c62ea356a24ce19dab51a7 (diff) | |
download | opt-utilities-3805f4031bce536ea616b2ad2b6b008fade19288.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@70 ed2142bd-67ad-457f-ba7c-d818d4011675
-rw-r--r-- | core/fitter.hpp | 9 | ||||
-rw-r--r-- | core/opt_exception.hpp | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/core/fitter.hpp b/core/fitter.hpp index 609a2ab..cd76a20 100644 --- a/core/fitter.hpp +++ b/core/fitter.hpp @@ -228,6 +228,10 @@ namespace opt_utilities private:
virtual const data<Ty,Tx>& do_get_data(size_t i)const=0;
+ virtual void do_set_data(size_t i,const data<Ty,Tx>& d)
+ {
+ throw data_unsetable();
+ }
virtual size_t do_size()const=0;
virtual void do_add_data(const data<Ty,Tx>&)=0;
virtual void do_clear()=0;
@@ -256,6 +260,11 @@ namespace opt_utilities return this->do_get_data(i);
}
+ void set_data(size_t i,const data<Ty,Tx>& d)
+ {
+ do_set_data(i,d);
+ }
+
/**
\return the size of the data set
*/
diff --git a/core/opt_exception.hpp b/core/opt_exception.hpp index 027f783..df9030a 100644 --- a/core/opt_exception.hpp +++ b/core/opt_exception.hpp @@ -143,6 +143,15 @@ namespace opt_utilities {} }; + class data_unsetable + :public opt_exception + { + public: + data_unsetable() + :opt_exception("data unsetable") + {} + }; + } |