CppAD: A C++ Algorithmic Differentiation Package  20130102
template<class Base >
template<class VectorBase , class VectorSet , class VectorSize >
size_t ADFun< Base >::SparseJacobianReverse ( const VectorBase &  x,
const VectorSet &  p,
const VectorSize &  row,
const VectorSize &  col,
VectorBase &  jac,
sparse_jacobian_work work 
)

Compute user specified subset of a sparse Jacobian using forward mode.

The C++ source code corresponding to this operation is

	SparceJacobianReverse(x, p, row, col, jac, work)
Template Parameters:
BaseSee SparseJacobianForward(x, p, row, col, jac, work).
VectorBaseSee SparseJacobianForward(x, p, row, col, jac, work).
VectorSetSee SparseJacobianForward(x, p, row, col, jac, work).
VectorSizeSee SparseJacobianForward(x, p, row, col, jac, work).
Parameters:
xSee SparseJacobianForward(x, p, row, col, jac, work).
pSee SparseJacobianForward(x, p, row, col, jac, work).
rowSee SparseJacobianForward(x, p, row, col, jac, work).
colSee SparseJacobianForward(x, p, row, col, jac, work).
jacSee SparseJacobianForward(x, p, row, col, jac, work).
workwork contains information that depends on the function object, sparsity pattern, row vector, and col vector. These work values are computed by SparseJacobianReverse. If they are not the same between calls, work.clear() must be called to reinitialize them. To be more specific: user_row is a copy of row with the value m at the end (m is the range dimension), user_col is a copy of col with the value n at the end (n is the domain dimension), sort_row is the index vector that sorts the user_row vector with the extra value K at the end (K is the size of jac).
Returns:
Is the number of first order reverse sweeps used to compute the reverse Jacobian values. The total work, not counting the zero order forward sweep, or the time to combine computations, is proportional to this return value.

Definition at line 946 of file sparse_jacobian.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines