CppAD: A C++ Algorithmic Differentiation Package 20110419
void hes_fg_map ( cppad_ipopt_fg_info fg_info,
size_t  m,
size_t  n,
size_t  K,
const CppAD::vector< size_t > &  L,
const CppAD::vector< size_t > &  p,
const CppAD::vector< size_t > &  q,
const CppAD::vector< CppAD::vectorBool > &  pattern_hes_r,
CppAD::vector< size_t > &  I,
CppAD::vector< size_t > &  J,
CppAD::vector< std::map< size_t, size_t > > &  index_hes_fg 
)

Create mapping from CppAD to Ipopt sparse representations of Hessian of F(x).

The functions $ f : {\bf R}^n \rightarrow {\bf R} $ and $ g : {\bf R}^n \rightarrow {\bf R}^m $ are defined by the Users Representation. We define the function $ F : {\bf R}^n \rightarrow {\bf R} $ by

\[ F(x) = \sum_{i=0}^m fg(x)_i \]

Parameters:
fg_infoFor k = 0 , ... , K-1, for ell = 0 , ... , L[k], the function call
	fg_info->index(k, ell, I, J);	
is made by hes_fg_map. The values k and ell are inputs. The input size of I ( J ) is greater than or equal p[k] ( q[k] ) and this size is not changed. The input values of the elements of I and J are not specified. The output value of the elements of I define

\[ I_{k, \ell} = ( {\rm I[0]} , \cdots , {\rm I[p[k]-1]} ) \]

The output value of the elements of J define

\[ J_{k, \ell} = ( {\rm J[0]} , \cdots , {\rm J[q[k]-1]} ) \]

mis the dimension of the range space for $ g(x) $; i.e., $ g(x) \in {\bf R}^m $.
nis the dimension of the domain space for $ f(x) $ and $ g(x) $; i.e., $ x \in {\bf R}^n $.
Kis the number of functions $ r_k ( u ) $ used for the representation of $ f(x) $ and $ g(x) $.
Lis a vector with size K. For k = 0 , ... , K-1, L[k] is the number of terms that use $ r_k (u) $ in the representation of $ f(x) $ and $ g(x) $.
pis a vector with size K. For k = 0 , ... , K-1, p[k] is dimension of the range space for $ r_k (u) $; i.e., $ r_k (u) \in {\bf R}^{p(k)} $.
qis a vector with size K. For k = 0 , ... , K-1, q[k] is dimension of the domain space for $ r_k (u) $; i.e., $ u \in {\bf R}^{q(k)} $.
pattern_hes_ris a vector with size K. For k = 0 , ... , K-1, pattern_jac_r[k] is a CppAD sparsity pattern for the Hessian of the function

\[ R(u) = \sum_{i=0}^{p[k]-1} r_k (u)_i \]

As such, pattern_hes_r[k].size() == q[k] * q[k].
Iis a work vector of length greater than or equal p[k] for all k. The input and output value of its elements are unspecified. The size of I is not changed.
Jis a work vector of length greater than or equal q[k] for all k. The input and output value of its elements are unspecified. The size of J is not changed.
index_hes_fg,:On input, this is empty; i.e., index_jac_g.size() == 0. On output, it is the index mapping from $ (i, j) $ in the Jacobian of $ g(x) $ to the corresponding index value used by Ipopt to represent the Jacobian. Furthermore, if index_jac_g[i].find(j) == index_jac_g[i].end(), then the $ (i, j)$ entry in the Jacobian of $ g(x) $ is always zero.

Definition at line 113 of file hes_fg_map.cpp.

Referenced by cppad_ipopt_nlp::cppad_ipopt_nlp().