aboutsummaryrefslogtreecommitdiffstats
path: root/core/constrained_model.hpp
blob: 710f76cf19346684a436efb105fb1f24525464a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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