![]() |
Prev | Next | glossary |
F : B^n \rightarrow B^m
where B is the space corresponding to objects of type Base.
We refer to
F
as the AD function corresponding to
the operation sequence and to the object f.
(See the FunCheck discussion
for
possible differences between
F(x)
and the algorithm that defined
the operation sequence.)
AD<
Base>
(see default
or
constructor
)
or VecAD<
Base>::reference
(see VecAD
)
for some Base type.
AD<
Base>
, AD< AD<
Base> >
, AD< AD< AD<
Base> > >
,
...
f : B \rightarrow B
is referred to as a Base function,
if Base is a C++ type that represent elements of
the domain and range space of f; i.e. elements of
B
.
AD<
Base>
object,
Base is referred to as the base type for x.
e^j \in B^m
is defined by
\[
e_i^j = \left\{ \begin{array}{ll}
1 & {\rm if} \; i = j \\
0 & {\rm otherwise}
\end{array} \right.
\]
x <
y
has type bool
(where Type is not the same as bool
).
If one executes the following code
if(
x <
y )
y = cos(
x);
else
y = sin(
x);
the choice above depends on the value of x and y
and the two choices result in a different Type operation sequence.
In this case, we say that the Type operation sequence depends
on x and y.
size_t
objects,
and
x[
i]
, y are Type objects,
where Type is different from size_t
.
The Type sequence of operations corresponding to
y =
Type(0);
for(
i = 0;
i <
n;
i++)
y +=
x[
i];
does not depend on the value of x or y.
In this case, we say that the Type operation sequence
is independent of y and the elements of x.
AD<
Base>
object u is currently a parameter if
its value does not depend on the value of
an Independent
variable vector for an
active tape
.
If u is a parameter, the function
Parameter(u)
returns true
and Variable(u)
returns false.
A \in B^{n \times m}
,
a boolean valued
m \times n
matrix
P
is a
sparsity pattern for
A
if
for
i = 0, \ldots , m-1
and
j = 0 , \ldots n-1
,
\[
A_{i,j} \neq 0
\; \Rightarrow \;
P_{i,j} = {\rm true}
\]
Given two sparsity patterns
P
and Q
for a matrix A, we say that P is more efficient than
Q if P has fewer true elements than Q.
Independent(
x)
All operations that depend on the elements of x are
recorded on this active tape.
ADFun<
Base>
f(
x,
y)
or using the syntax (see f.Dependent(x, y)
)
f.Dependent(
x,
y)
After such a transfer, the tape becomes inactive.
X : B \rightarrow B^n
is a
is
p
times continuously differentiable function
in some neighborhood of zero.
For
k = 0 , \ldots , p
,
we use the column vector
x^{(k)} \in B^n
for the k-th order
Taylor coefficient corresponding to
X
which is defined by
\[
x^{(k)} = \frac{1}{k !} \Dpow{k}{t} X(0)
\]
It follows that
\[
X(t) = x^{(0)} + x^{(1)} t + \cdots + x^{(p)} t^p + R(t)
\]
where the remainder
R(t)
divided by
t^p
converges to zero and
t
goes to zero.
AD<
Base>
object u is a variable if
its value depends on an independent variable vector for
a currently active tape
.
If u is a variable,
Variable(u)
returns true and
Parameter(u)
returns false.
For example,
directly after the code sequence
Independent(
x);
AD<double>
u =
x[0];
the AD<double>
object u is currently a variable.
Directly after the code sequence
Independent(
x);
AD<double>
u =
x[0];
u = 5;
u is currently a parameter
(not a variable).
Note that we often drop the word currently and
just refer to an AD<
Base>
object as a variable
or parameter.