From aac95b5cd24e8cc4c189ab92f10a0d4bbb23cc1c Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Fri, 28 Dec 2012 00:25:29 +0800 Subject: constrainted_model: allow to constrain the defining domain of parameters new file: core/constrained_model.hpp --- core/constrained_model.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 core/constrained_model.hpp (limited to 'core') diff --git a/core/constrained_model.hpp b/core/constrained_model.hpp new file mode 100644 index 0000000..710f76c --- /dev/null +++ b/core/constrained_model.hpp @@ -0,0 +1,22 @@ +#ifndef CONSTRAINED_MODEL_HPP +#define CONSTRAINED_MODEL_HPP +#include "fitter.hpp" + +namespace opt_utilities +{ + template + class constrained_model + :public model + { + public: + bool meet_constraint(const Tp& p) + { + return do_meet_constraint(p); + } + private: + virtual bool do_meet_constraint(const Tp& p)=0; + }; + +} + +#endif -- cgit v1.2.2