diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/constrained_model.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
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 <typename Ty,typename Tx,typename Tp,typename Tstr=std::string> + class constrained_model + :public model<Ty,Tx,Tp,Tstr=std::string> + { + public: + bool meet_constraint(const Tp& p) + { + return do_meet_constraint(p); + } + private: + virtual bool do_meet_constraint(const Tp& p)=0; + }; + +} + +#endif |