CppAD: A C++ Algorithmic Differentiation Package  20130102
void cppad_ipopt::vec_fun_pattern ( size_t  K,
const CppAD::vector< size_t > &  p,
const CppAD::vector< size_t > &  q,
const CppAD::vectorBool &  retape,
CppAD::vector< CppAD::ADFun< Ipopt::Number > > &  r_fun,
CppAD::vector< CppAD::vectorBool > &  pattern_jac_r,
CppAD::vector< CppAD::vectorBool > &  pattern_hes_r 
)

Determine a sparsity patterns for each function in a vector of functions.

Parameters:
Kis the number of functions that we are computing the sparsity pattern for.
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)} $.
retapeis a vector with size K. For k = 0 , ... , K-1, if retape[k] is true, the function object r[k] is a valid representation for $ r_k (u) $ for all $ u \in {\bf R}^{q(k)} $. Otherwise, the function object must be retaped for each value of $ u $.
r_funis the vector of AD function objects which has size size K. For k = 0 , ... , K-1, if retape[k] is true, r_fun[k] is not used. If retape[k] is false, r_fun[k] is not used. is a CppAD function object correspopnding to the function $ r_k : {\bf R}^{q[k]} \rightarrow {\bf R}^{p[k]} $. The following non-constant member functions will be called:
	r_fun[k].ForSparseJac(q[k], pattern_domain)
	r_fun[k].RevSparseHes(p[k], pattern_range)
The following const member functions r_fun[k].Range() and r_fun[k].Domain() may also be called.
pattern_jac_ris a vector with size K. On input, For k = 0 , ... , K-1, pattern_jac_r[k] is a vector of length p[k] * q[k] and the value of its elements does not matter. On output it is a CppAD sparsity pattern for the Jacobian of $ r_k (u) $.
pattern_hes_ris a vector with size K. On input, For k = 0 , ... , K-1, pattern_hes_r[k] is a vector of length q[k] * q[k] and the value of its elements does not matter. On output it is a CppAD sparsity pattern for the Hessian of $ R : {\bf R}^{q[k]} \rightarrow {\bf R} $ which is defined by

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

Definition at line 85 of file vec_fun_pattern.cpp.

Referenced by cppad_ipopt::cppad_ipopt_nlp::cppad_ipopt_nlp().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines