1 #ifndef COSTFUNCTION_H_
2 #define COSTFUNCTION_H_
9 namespace Optimization {
81 muq::Modeling::
ModPiece(Eigen::VectorXi::Constant(1,dim), Eigen::VectorXi::Ones(1)) {};
85 virtual void SetPoint(Eigen::VectorXd
const& evalPt);
106 virtual Eigen::MatrixXd
Hessian();
127 virtual Eigen::VectorXd
ApplyHessian(Eigen::VectorXd
const& vec);
147 unsigned int inputDimWrt,
149 Eigen::VectorXd
const& sensitivity)
override;
152 unsigned int inputDimWrt,
159 Eigen::VectorXd
const& sensitivity,
160 Eigen::VectorXd
const& vec)
override;
Provides an abstract interface for defining vector-valued model components.
ModPiece(std::vector< int > const &inputSizes, std::vector< int > const &outputSizes)
The cost function for an optimization routine.
virtual void ApplyHessianImpl(unsigned int outWrt, unsigned int inWrt1, unsigned int inWrt2, muq::Modeling::ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &sensitivity, Eigen::VectorXd const &vec) override
virtual void EvaluateImpl(muq::Modeling::ref_vector< Eigen::VectorXd > const &input) override
The value of the cost function.
virtual ~CostFunction()=default
virtual void JacobianImpl(unsigned int outputDimWrt, unsigned int inputDimWrt, muq::Modeling::ref_vector< Eigen::VectorXd > const &input) override
virtual Eigen::VectorXd Gradient(Eigen::VectorXd const &evalPt)
virtual double Cost(Eigen::VectorXd const &x)
The value of the cost function.
virtual void SetPoint(Eigen::VectorXd const &evalPt)
virtual Eigen::MatrixXd Hessian(Eigen::VectorXd const &evalPt)
The Hessian of the cost function.
virtual Eigen::MatrixXd HessianByFD(Eigen::VectorXd const &evalPt)
The Hessian of the cost function using finite difference.
virtual Eigen::VectorXd Gradient()
virtual Eigen::VectorXd ApplyHessian(Eigen::VectorXd const &evalPt, Eigen::VectorXd const &vec)
The Hessian of the cost function.
CostFunction(unsigned int dim)
virtual Eigen::MatrixXd HessianByFD()
virtual void GradientImpl(unsigned int outputDimWrt, unsigned int inputDimWrt, muq::Modeling::ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &sensitivity) override
Compute the gradient of the cost function.
virtual Eigen::MatrixXd Hessian()
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...