aboutsummaryrefslogtreecommitdiffstats
path: root/core/fitter.hpp
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-21 14:51:02 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-21 14:51:02 +0000
commitc83ed75e9bf81562a5c62ea356a24ce19dab51a7 (patch)
treef67f1c3c9d0c6e1cd1e33cfa9dbeec7a8042d1f3 /core/fitter.hpp
parentad5dfcefc8fecc56cdf6e3256cef460ae358da59 (diff)
downloadopt-utilities-c83ed75e9bf81562a5c62ea356a24ce19dab51a7.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@69 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'core/fitter.hpp')
-rw-r--r--core/fitter.hpp36
1 files changed, 29 insertions, 7 deletions
diff --git a/core/fitter.hpp b/core/fitter.hpp
index 92738e5..609a2ab 100644
--- a/core/fitter.hpp
+++ b/core/fitter.hpp
@@ -330,7 +330,7 @@ namespace opt_utilities
typename element_type_trait<Tp>::element_type value;
typename element_type_trait<Tp>::element_type lower_limit;
typename element_type_trait<Tp>::element_type upper_limit;
-
+ Tstr description;
public:
/**
@@ -343,15 +343,17 @@ namespace opt_utilities
param_info(const Tstr& _name,
const typename element_type_trait<Tp>::element_type& _v,
const typename element_type_trait<Tp>::element_type& _l=0,
- const typename element_type_trait<Tp>::element_type& _u=0
- )
- :name(_name),value(_v),lower_limit(_l),upper_limit(_u){}
+ const typename element_type_trait<Tp>::element_type& _u=0,
+ const Tstr& desc=Tstr())
+ :name(_name),value(_v),lower_limit(_l),
+ upper_limit(_u),description(desc)
+ {}
/**
default construct
*/
param_info()
- :name()
+ :name(),description()
{}
@@ -359,7 +361,7 @@ namespace opt_utilities
copy construct function
*/
param_info(const param_info& rhs)
- :name(rhs.name)
+ :name(rhs.name),description(rhs.description)
{
opt_eq(value,rhs.value);
opt_eq(lower_limit,rhs.lower_limit);
@@ -373,6 +375,7 @@ namespace opt_utilities
param_info& operator=(const param_info& rhs)
{
name=rhs.name;
+ description=rhs.description;
opt_eq(value,rhs.value);
opt_eq(lower_limit,rhs.lower_limit);
opt_eq(upper_limit,rhs.upper_limit);
@@ -412,6 +415,10 @@ namespace opt_utilities
return upper_limit;
}
+ const Tstr& get_description()const
+ {
+ return description;
+ }
/**
set the value
@@ -450,6 +457,12 @@ namespace opt_utilities
{
name=_name;
}
+
+ void set_description(const Tstr& desc)
+ {
+ description=desc;
+ }
+
};
@@ -1624,7 +1637,7 @@ namespace opt_utilities
{
private:
fitter<Ty,Tx,Tp,Ts,Tstr>* p_fitter;
-
+
private:
virtual statistic<Ty,Tx,Tp,Ts,Tstr>* do_clone()const=0;
@@ -1633,6 +1646,10 @@ namespace opt_utilities
delete this;
}
+ virtual Tstr do_to_string()const
+ {
+ return Tstr();
+ }
/**
\return the type name of self
*/
@@ -1665,6 +1682,11 @@ namespace opt_utilities
return do_destroy();
}
+ Tstr to_string()const
+ {
+ return do_to_string();
+ }
+
/**
default construct
*/