\(\newcommand{\W}[1]{ \; #1 \; }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }\) \(\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }\) \(\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }\) \(\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }\)
number_skip
Number of Variables that Can be Skipped
Syntax
n = f . number_skip
()
See Also
Purpose
The conditional expressions use either the if_true or if_false . Hence, some terms only need to be evaluated depending on the value of the comparison in the conditional expression. The optimize option is capable of detecting some of these case and determining variables that can be skipped. This routine returns the number such variables.
n
The return value n has type size_t
is the number of variables that the optimizer has determined can be skipped
(given the independent variable values specified by the previous call to
f.Forward for order zero).
f
The object f has prototype
ADFun<
Base > f
Example
The file number_skip.cpp contains an example and test of this function.