diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-08-22 17:05:30 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-08-22 17:05:30 +0000 |
commit | 554c5d6de17264b2e66726eff8569d1fe57ffe92 (patch) | |
tree | 84f9eee609466190f50a4e98257d3bbf3a7c4593 /misc | |
parent | b5742a78297257d18959385e7a88a1f230bdcafe (diff) | |
download | opt-utilities-554c5d6de17264b2e66726eff8569d1fe57ffe92.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@50 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'misc')
-rw-r--r-- | misc/data_loaders.hpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/misc/data_loaders.hpp b/misc/data_loaders.hpp index d0f07e7..0347252 100644 --- a/misc/data_loaders.hpp +++ b/misc/data_loaders.hpp @@ -1,3 +1,8 @@ +/** + \file data_loaders.hpp + a set of classes used to load data_set from std::istream + */ + #ifndef DATA_LOADERS_H #define DATA_LOADERS_H #include <core/fitter.hpp> @@ -17,15 +22,22 @@ namespace opt_utilities template <typename Ty,typename Tx> class dl_x_xe_y_ye; + template <typename Ty,typename Tx> std::istream& operator>>(std::istream& ifs,dl_x_xe_y_ye<Ty,Tx>& dl); + template <typename Ty,typename Tx> class dl_x_xu_xl_y_yu_yl; + template <typename Ty,typename Tx> std::istream& operator>> (std::istream& ifs,dl_x_xu_xl_y_yu_yl<Ty,Tx>& dl); + + /** + loading data from file in format [x] [y] [y error] + */ template <typename Ty,typename Tx> class dl_x_y_ye { @@ -67,6 +79,11 @@ namespace opt_utilities //friend std::istream& operator>> <>(std::istream& ifs,dl_x_y_ye<Ty,Tx>& dl); }; + + + /** + stream operator + */ template <typename Ty,typename Tx> std::istream& operator>>(std::istream& ifs,dl_x_y_ye<Ty,Tx>& dl) { @@ -75,6 +92,11 @@ namespace opt_utilities } + /** + loading data from stream with file + + [x] [x error] [y] [y error] + */ template <typename Ty,typename Tx> class dl_x_xe_y_ye { @@ -113,6 +135,10 @@ namespace opt_utilities } }; + + /** + stream operator + */ template <typename Ty,typename Tx> std::istream& operator>>(std::istream& ifs,dl_x_xe_y_ye<Ty,Tx>& dl) { @@ -120,6 +146,12 @@ namespace opt_utilities return ifs; } + + /** + loading data from stream with format + + [x] [x lower error] [x upper error] [y] [y lower error] [y upper error] + */ template <typename Ty,typename Tx> class dl_x_xu_xl_y_yu_yl { @@ -164,6 +196,10 @@ namespace opt_utilities } }; + + /** + stream operator + */ template <typename Ty,typename Tx> std::istream& operator>> (std::istream& ifs,dl_x_xu_xl_y_yu_yl<Ty,Tx>& dl) { |