con_dyn_var

View page source

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.