| 83 | } |
| 84 | |
| 85 | void evaluate_constraints(const Vector<double>& x, Vector<double>& constraints) const override { |
| 86 | if (this->user_model.constraint_functions != nullptr) { |
| 87 | const uno_int return_code = this->user_model.constraint_functions(this->user_model.number_variables, |
| 88 | this->user_model.number_constraints, x.data(), constraints.data(), this->user_model.user_data); |
| 89 | if (0 < return_code) { |
| 90 | throw FunctionEvaluationError(); |
| 91 | } |
| 92 | ++this->number_model_evaluations.constraints; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // dense objective gradient |
| 97 | void evaluate_objective_gradient(const Vector<double>& x, Vector<double>& gradient) const override { |
nothing calls this directly
no test coverage detected