/* * ModelEstimator.h * * Created on: Jun 5, 2013 * Author: steve */ #ifndef MODELESTIMATOR_H_ #define MODELESTIMATOR_H_ #include "ModelStructs.h" #include "ModelControlParameter.h" #include "EstimatorOptions.h" #include #include #include class Data; class Model; class ModelPar; using std::tr1::shared_ptr; class ModelEstimator: public ModelControlParameter { private: // list of free parameters std::map, shared_ptr , ModelStructs::stringpair_comp> free_parameters; void insertParameters(); void updateFreeModelParameters(const double *new_values); protected: // data shared_ptr data; // model used for fitting shared_ptr fit_model; public: ModelEstimator(); virtual ~ModelEstimator(); const shared_ptr getModel() const; void setModel(shared_ptr new_model); const shared_ptr getData() const; void setData(shared_ptr new_data); std::vector >& getFreeParameterList(); double evaluate(const double *par); void applyEstimatorOptions(const EstimatorOptions &estimator_options); /** * The estimator function (chi2, likelihood, etc) */ virtual double eval() const =0; }; #endif /* MODELESTIMATOR_H_ */