Prev Next

@(@\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}} }@)@This is cppad-20221105 documentation. Here is a link to its current documentation .
Constant, Dynamic, Parameter, and Variable

Syntax
b = Constant(x)
b = Dynamic(x)
b = Parameter(x)
b = Variable(x)

x
The argument x has prototype
    const AD<
Base>    &x
    const VecAD<
Base> &x

b
The return value b has prototype
    bool 
b

Constant
The return value for Constant is true is true if and only if x is a constant parameter. A VecAD<Base> object is a constant parameter if no element of the vector depends on the independent variables.

Dynamic
The return value for Dynamic is true is true if and only if x is a dynamic parameter. No element of a VecAD<Base> object can depend on the dynamic parameters and this function returns false for these objects.

Parameter
The return value for Parameter is true is true if and only if x is a parameter . A VecAD<Base> object is a parameter if no element of the vector depends on the independent variables.

Variable
The return value for Variable is true is true if and only if x is a variable . A VecAD<Base> object is a variable if any element of the vector depends on the independent variables.

Operation Sequence
The result of this operation is not an AD of Base object. Thus it will not be recorded as part of an AD of Base operation sequence .

Example
The file con_dyn_var.cpp contains an example and test of these functions.
Input File: include/cppad/core/con_dyn_var.hpp