1 #ifndef MODPIECECOSTFUNCTION_H_
2 #define MODPIECECOSTFUNCTION_H_
7 namespace Optimization {
16 virtual double Cost()
override;
19 virtual Eigen::VectorXd
Gradient()
override;
22 virtual Eigen::VectorXd
ApplyHessian(Eigen::VectorXd
const& vec)
override;
27 std::shared_ptr<muq::Modeling::ModPiece>
cost;
The cost function for an optimization routine.
std::shared_ptr< muq::Modeling::ModPiece > cost
virtual double Cost() override
The value of the cost function.
virtual Eigen::VectorXd Gradient() override
Compute the gradient of the cost function.
virtual ~ModPieceCostFunction()=default
virtual Eigen::VectorXd ApplyHessian(Eigen::VectorXd const &vec) override
ModPieceCostFunction(std::shared_ptr< muq::Modeling::ModPiece > cost, double scaleIn=1.0)