numerical evaluations of Jacobian and Hessian
| 148 | |
| 149 | // numerical evaluations of Jacobian and Hessian |
| 150 | void evaluate_jacobian(const Vector<double>& x, double* jacobian_values) const override { |
| 151 | if (this->user_model.jacobian != nullptr) { |
| 152 | const uno_int return_code = this->user_model.jacobian(this->user_model.number_variables, |
| 153 | this->user_model.number_jacobian_nonzeros, x.data(), jacobian_values, this->user_model.user_data); |
| 154 | if (0 < return_code) { |
| 155 | throw GradientEvaluationError(); |
| 156 | } |
| 157 | ++this->number_model_evaluations.jacobian; |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | void evaluate_lagrangian_hessian(const Vector<double>& x, double objective_multiplier, const Vector<double>& multipliers, |
| 162 | double* hessian_values) const override { |
nothing calls this directly
no test coverage detected