Prev Next ForJacSweep

Forward Computation of Sparsity Pattern

Syntax
void ForJacSweep(
     size_t 
npv,
     size_t 
numvar,
     const player<
Base> *Rec,
     size_t 
TaylorColDim,
     const 
Base *Taylor,
     
Pack *ForJac
)


Rec
The information stored in Rec is a recording of the operations corresponding to a function  \[
     F : B^n \rightarrow B^m
\] 


Description
Given the sparsity pattern for the independent variables, ForJacSweep computes the sparsity pattern for all the other variables.

numvar
is the number of rows in the entire sparsity pattern ForJac. It must also be equal to Rec->TotNumVar().

npv
Is the number of elements of type Pack (per variable) in the sparsity pattern ForJac.

TaylorColDim
Is the number of columns currently stored in the matrix Taylor.

Taylor
For  i = 1 , \ldots , numvar , Taylor[i * TaylorColDim] is the value of the variable with index i.

On Input

Independent Variables and Operators
The independent variable records come first. For  i = 1, \ldots , n and  j = 0 , \ldots , npv ,
field Value
ForJac[0 * npv + j] the variable with index zero is not used
Rec->GetOp(0) the operator with index zero must be a NonOp
ForJac[i * npv + j] j-th subset of sparsity pattern for variable with index i
Rec->GetOp(i) the operator with index i must be a InvOp

Other Variables and Operators
The other variables follow the independent variables. For  i = n+1, \ldots , numvar-1 ,  j = 0 , \ldots , npv-1 , and  k = n+1, \ldots , Rec->NumOp() - 1,
field Value
ForJac[i * npv + j] j-th set of sparsity pattern for variable with index i
Rec->GetOp(i) any operator except for InvOp

On Output

Independent Variables
For  i = 1, \ldots , n and  j = 0 , \ldots , npv-1 , Taylor[i * npv + j] is not modified.

Other Variables
For  i = m+1, \ldots , numvar-1 and  j = 0 , \ldots , npv-1 , ForJac[i * npv + j] is set equal to the j-th set of sparsity pattern for the variable with index i.
Input File: cppad/local/for_jac_sweep.hpp