Go to the documentation of this file. 1 #ifndef HOPS_MODELWRAPPER_HPP
2 #define HOPS_MODELWRAPPER_HPP
13 explicit ModelWrapper(std::shared_ptr<Model> model) : model(std::move(model)) {}
19 return model->computeNegativeLogLikelihood(state);
26 return model->computeLogLikelihoodGradient(state);
33 return model->computeExpectedFisherInformation(state);
36 [[nodiscard]]
const std::shared_ptr<Model> &
getModel()
const {
40 void setModel(
const std::shared_ptr<Model> &newModel) {
41 ModelWrapper::model = newModel;
45 return model !=
nullptr;
49 std::shared_ptr<Model> model;
53 #endif //HOPS_MODELWRAPPER_HPP
Definition: ModelWrapper.hpp:11
bool hasModel()
Definition: ModelWrapper.hpp:44
virtual MatrixType::Scalar computeNegativeLogLikelihood(const VectorType &state)
Definition: ModelWrapper.hpp:18
ModelWrapper(std::shared_ptr< Model > model)
Definition: ModelWrapper.hpp:13
const std::shared_ptr< Model > & getModel() const
Definition: ModelWrapper.hpp:36
void setModel(const std::shared_ptr< Model > &newModel)
Definition: ModelWrapper.hpp:40
Definition: CsvReader.hpp:8
Eigen::VectorXd VectorType
Definition: VectorType.hpp:7
virtual std::optional< MatrixType > computeExpectedFisherInformation(const VectorType &state)
Definition: ModelWrapper.hpp:32
virtual std::optional< VectorType > computeLogLikelihoodGradient(const VectorType &state)
Definition: ModelWrapper.hpp:25