QPComputeObjectiveFromGradient

Evaluate the quadratic objective function f(x) = 1/2*x'*A*x - x'*b using known gradient.

Synopsis

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

Input Parameters

qp - the QP
x - the state vector
g - the gradient

Output Parameter

f -the objective value

Notes

Computes f(x) as x'*(g - b)/2

See Also

QPComputeObjective(), QPComputeObjectiveGradient(), QPComputeObjectiveAndGradient()

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