MCPcopy Create free account
hub / github.com/cvanaret/Uno / objective_gradient

Function objective_gradient

interfaces/C/example/example_hs015.c:19–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19uno_int objective_gradient(uno_int /*number_variables*/, const double* x, double* gradient, void* /*user_data*/) {
20 gradient[0] = 400.*pow(x[0], 3.) - 400.*x[0]*x[1] + 2.*x[0] - 2.;
21 gradient[1] = 200.*(x[1] - pow(x[0], 2.));
22 return 0;
23}
24
25uno_int jacobian(uno_int /*number_variables*/, uno_int /*number_jacobian_nonzeros*/, const double* x,
26 double* jacobian_values, void* /*user_data*/) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected