#include <CouenneExprHess.hpp>
Collaboration diagram for Couenne::ExprHess:
Public Member Functions | |
ExprHess () | |
empty constructor | |
ExprHess (CouenneProblem *) | |
code for refilling jacobian | |
ExprHess (const ExprHess &) | |
copy constructor | |
ExprHess & | operator= (const ExprHess &) |
code for refilling jacobian | |
ExprHess * | clone () |
Cloning operator. | |
~ExprHess () | |
Destructor. | |
int | nnz () |
int * | iRow () |
int * | jCol () |
int * | numL () |
int ** | lamI () |
expression *** | expr () |
Private Attributes | |
int | nnz_ |
number of (symbolic) nonzeroes | |
int * | iRow_ |
row indices (read this way by eval_h) | |
int * | jCol_ |
col indices | |
int * | numL_ |
There are m+1 (m constraints + 1 obj) components: size of each lamI_. | |
int ** | lamI_ |
vector of indices in the lambda vector whose constraint has nonzero entry in this position of the hessian | |
expression *** | expr_ |
list of lists of pointers to expression |
Used to evaluate the Hessian of the Lagrangian function at an optimal solution of the NLP
Definition at line 21 of file CouenneExprHess.hpp.
ExprHess::ExprHess | ( | ) |
ExprHess::ExprHess | ( | CouenneProblem * | ) |
code for refilling jacobian
for each j in (obj,con) create j->deplist()
for each variable i create dense row for each j in (obj,con) for k in j->deplist(): k<=i if d^2(j)/(di dj) nonzero add term to list [i,j] sparsify row
for each variable, fill a row of the hessian
fill term for objective
Definition at line 111 of file CouenneExprHess.cpp.
References Couenne::AUX, c, Couenne::CONST, e, expr_, HessElemFill(), iRow_, jCol_, lam, lamI_, nnz_, numL_, print(), reAlloc(), Couenne::STOP_AT_AUX, and Couenne::VAR.
ExprHess::ExprHess | ( | const ExprHess & | ) |
ExprHess::~ExprHess | ( | ) |
code for refilling jacobian
Definition at line 38 of file CouenneExprHess.cpp.
References clone(), expr_, iRow_, jCol_, lamI_, nnz_, and numL_.
Referenced by ExprHess().
ExprHess * ExprHess::clone | ( | ) |
Cloning operator.
Definition at line 69 of file CouenneExprHess.cpp.
References ExprHess().
Referenced by operator=().
int Couenne::ExprHess::nnz | ( | ) | [inline] |
int* Couenne::ExprHess::iRow | ( | ) | [inline] |
int* Couenne::ExprHess::jCol | ( | ) | [inline] |
int* Couenne::ExprHess::numL | ( | ) | [inline] |
int** Couenne::ExprHess::lamI | ( | ) | [inline] |
expression*** Couenne::ExprHess::expr | ( | ) | [inline] |
int Couenne::ExprHess::nnz_ [private] |
number of (symbolic) nonzeroes
Definition at line 25 of file CouenneExprHess.hpp.
Referenced by ExprHess(), nnz(), operator=(), and ~ExprHess().
int* Couenne::ExprHess::iRow_ [private] |
row indices (read this way by eval_h)
Definition at line 26 of file CouenneExprHess.hpp.
Referenced by ExprHess(), iRow(), operator=(), and ~ExprHess().
int* Couenne::ExprHess::jCol_ [private] |
col indices
Definition at line 27 of file CouenneExprHess.hpp.
Referenced by ExprHess(), jCol(), operator=(), and ~ExprHess().
int* Couenne::ExprHess::numL_ [private] |
There are m+1 (m constraints + 1 obj) components: size of each lamI_.
Implementing a FP requires adding one for gg', the gradient again being set up at the beginning (at least its expression members are known).
This can simply be hacked by the FP itself. Same for the changed hessian, simply replace the CouenneProblem's objective with sum (objective, norm)
Actually, we could do the gg' trick by replacing the objective with sum (objective, norm, gg')
Definition at line 44 of file CouenneExprHess.hpp.
Referenced by ExprHess(), numL(), operator=(), and ~ExprHess().
int** Couenne::ExprHess::lamI_ [private] |
vector of indices in the lambda vector whose constraint has nonzero entry in this position of the hessian
Definition at line 46 of file CouenneExprHess.hpp.
Referenced by ExprHess(), lamI(), operator=(), and ~ExprHess().
expression*** Couenne::ExprHess::expr_ [private] |
list of lists of pointers to expression
Definition at line 50 of file CouenneExprHess.hpp.
Referenced by expr(), ExprHess(), operator=(), and ~ExprHess().