CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Base>
template<class VectorBase , class VectorSet >
VectorBase CppAD::ADFun< Base >::SparseHessian ( const VectorBase &  x,
const VectorBase &  w,
const VectorSet &  p 
)

Compute a sparse Hessian.

The C++ source code coresponding to this operation is

     hes = SparseHessian(x, w, p)
Template Parameters
Baseis the base type for the recording that is stored in this ADFun<Base object.
VectorBaseis a simple vector class with elements of the Base.
VectorSetis a simple vector class with elements of type bool or std::set<size_t>.
Parameters
x[in] is a vector specifing the point at which to compute the Hessian.
w[in] The Hessian is computed for a weighted sum of the components of the function corresponding to this ADFun<Base> object. The argument w specifies the weights for each component. It must have size equal to the range dimension for this ADFun<Base> object.
p[in] is a sparsity pattern for the Hessian.
Returns
Will be a vector of size n * n containing the Hessian of at the point specified by x (where n is the domain dimension for this ADFun<Base> object).

Definition at line 749 of file sparse_hessian.hpp.