aboutsummaryrefslogtreecommitdiffstats
path: root/vmodel/powerlaw.hpp
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-12-17 17:01:15 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-12-17 17:01:15 +0000
commit4170b13f464439ab97efadb210dab0d749fa4b42 (patch)
treef6d31514c19a9a015c4d22477f5a3fb8bccd250b /vmodel/powerlaw.hpp
parenteeafd6e502bc60da664de3cf0eb9251f349df228 (diff)
downloadopt-utilities-4170b13f464439ab97efadb210dab0d749fa4b42.tar.bz2
rename vmodel to vmodels
git-svn-id: file:///home/svn/opt_utilities@103 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'vmodel/powerlaw.hpp')
-rw-r--r--vmodel/powerlaw.hpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/vmodel/powerlaw.hpp b/vmodel/powerlaw.hpp
deleted file mode 100644
index 1f05301..0000000
--- a/vmodel/powerlaw.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef POWER_LAW_MODEL_H_
-#define POWER_LAW_MODEL_H_
-#define OPT_HEADER
-#include <core/fitter.hpp>
-#include <cmath>
-#include <misc/optvec.hpp>
-
-namespace opt_utilities
-{
- template <typename T>
- class powerlaw
- :public model<optvec<T>,optvec<T>,optvec<T>,std::string>
- {
- private:
- powerlaw* do_clone()const
- {
- return new powerlaw<T>(*this);
- }
-
- const char* do_get_type_name()const
- {
- return "1d power law";
- }
- public:
- powerlaw()
- {
- this->push_param_info(param_info<optvec<T> >("Ampl",1));
- this->push_param_info(param_info<optvec<T> >("gamma",1));
- }
-
- optvec<T> do_eval(const optvec<T>& x,const optvec<T>& param)
- {
- T A=get_element(param,0);
- T gamma=get_element(param,1);
- return A*pow(x,gamma);
- }
-
- private:
- std::string do_get_information()const
- {
- return "Simple power law model\n"
- "y=A*x^gamma\n";
- }
- };
-}
-
-
-
-#endif
-//EOF