aboutsummaryrefslogtreecommitdiffstats
path: root/core/constrained_model.hpp
blob: 378cabde5ed5d0dc438a2c004b5a2b9d606dd179 (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>
  {
  public:
    bool meet_constraint(const Tp& p)const
    {
      return do_meet_constraint(p);
    }
  private:
    virtual bool do_meet_constraint(const Tp& p)const=0;
  };

}

#endif