|
CppAD: A C++ Algorithmic Differentiation Package
20171217
|
| size_t CppAD::ADFun< Base >::SparseHessian | ( | const VectorBase & | x, |
| const VectorBase & | w, | ||
| const VectorSet & | p, | ||
| const VectorSize & | row, | ||
| const VectorSize & | col, | ||
| VectorBase & | hes, | ||
| sparse_hessian_work & | work | ||
| ) |
Compute user specified subset of a sparse Hessian.
The C++ source code corresponding to this operation is
SparceHessian(x, w, p, row, col, hes, work)
| Base | is the base type for the recording that is stored in this ADFun<Base object. |
| VectorBase | is a simple vector class with elements of type Base. |
| VectorSet | is a simple vector class with elements of type bool or std::set<size_t>. |
| VectorSize | is a simple vector class with elements of type size_t. |
| x | [in] is a vector specifing the point at which to compute the Hessian. |
| w | [in] is the weighting vector that defines a scalar valued function by a weighted sum of the components of the vector valued function $latex F(x)$$. |
| p | [in] is the sparsity pattern for the Hessian that we are calculating. |
| row | [in] is the vector of row indices for the returned Hessian values. |
| col | [in] is the vector of columns indices for the returned Hessian values. It must have the same size are r. |
| hes | [out] is the vector of Hessian values. It must have the same size are r. The return value hes[k] is the second partial of with respect to the row[k] and col[k] component of . |
| work | This structure contains information that is computed by SparseHessianCompute. If the sparsity pattern, row vector, or col vectors are not the same between calls to SparseHessian, work.clear() must be called to reinitialize work. |
Definition at line 652 of file sparse_hessian.hpp.