Prev | Next |
f.rev_jac_sparsity(
pattern_in, transpose, dependency, internal_bool, pattern_out
)
f
.
Fix @(@
R \in \B{R}^{\ell \times m}
@)@ and define the function
@[@
J(x) = R * F^{(1)} ( x )
@]@
Given the sparsity pattern
for @(@
R
@)@,
rev_jac_sparsity
computes a sparsity pattern for @(@
J(x)
@)@.
f
and does not depend on
the argument
x
.
(The operation sequence may contain
CondExp
and VecAD
operations.)
SizeVector
is a SimpleVector
class with
elements of type
size_t
.
f
has prototype
ADFun<Base> f
pattern_in
has prototype
const sparse_rc<SizeVector>& pattern_in
see sparse_rc
.
If
transpose
it is false (true),
pattern_in
is a sparsity pattern for @(@
R
@)@ (@(@
R^\R{T}
@)@).
bool transpose
See pattern_in
above and
pattern_out
below.
bool dependency
see pattern_out
below.
sparse_rc<SizeVector>& pattern_out
This input value of
pattern_out
does not matter.
If
transpose
it is false (true),
upon return
pattern_out
is a sparsity pattern for
@(@
J(x)
@)@ (@(@
J(x)^\R{T}
@)@).
If
dependency
is true,
pattern_out
is a
dependency pattern
instead of sparsity pattern.
pattern_out
is a sparsity pattern for
@(@
F^{(1)} ( x )
@)@ ( @(@
F^{(1)} (x)^\R{T}
@)@ )
if
transpose
is false (true).