Prev | Next | Dependent |
f.Dependent(x, y)
Base
operation sequence
that started with the call
Independent(x)
and store the operation sequence in
f
.
The operation sequence defines an
AD function
@[@
F : \B{R}^n \rightarrow \B{R}^m
@]@
where @(@
B
@)@ is the space corresponding to objects of type
Base
.
The value @(@
n
@)@ is the dimension of the
domain
space for the operation sequence.
The value @(@
m
@)@ is the dimension of the
range
space for the operation sequence
(which is determined by the size of
y
).
f
has prototype
ADFun<Base> f
The AD of
Base
operation sequence is stored in
f
; i.e.,
it becomes the operation sequence corresponding to
f
.
If a previous operation sequence was stored in
f
,
it is deleted.
x
must be the vector argument in a previous call to
Independent
.
Neither its size, or any of its values, are allowed to change
between calling
Independent(x)
and
f.Dependent(x, y)
.
y
has prototype
const ADvector &y
(see ADvector
below).
The length of
y
must be greater than zero
and is the dimension of the range space for
f
.
ADvector
must be a SimpleVector
class with
elements of type
AD<Base>
.
The routine CheckSimpleVector
will generate an error message
if this is not the case.
Independent(x)
was called,
will stop recording.
The AD operation sequence will be transferred from
the tape to the object
f
and the tape will then be deleted.
f.size_order()
is zero (see size_order
).
Independent
,
and the corresponding call to
ADFun<Base> f( x, y)
or
f.Dependent( x, y)
or abort_recording
,
must be preformed by the same thread; i.e.,
thread_alloc::thread_num
must be the same.