QPComputeObjectiveAndGradient

Computes the objective and gradient at once.

Synopsis

PetscErrorCode QPComputeObjectiveAndGradient(QP qp, Vec x, Vec g, PetscReal *f)
Collective on QP

Input Parameters

qp - the QP
x - the state vector

Output Parameters

g - the gradient
f - the objective value

Notes

Computes g(x) = A*x - b and f(x) = x'*(g - b)/2

See Also

QPComputeObjective(), QPComputeObjectiveGradient(), QPComputeObjectiveFromGradient()

Level:intermediate
Location:
src/qp/interface/qp.c
Index of all QP routines
Table of Contents for all manual pages
Index of all manual pages