Prev | Next | size_order |
s = f.size_order()
f
.
See the discussion under
Constructor
,
Forward
, and
capacity_order
for a description of when this value can change.
f
has prototype
const ADFun<Base> f
s
has prototype
size_t s
and is the number of Taylor coefficient orders,
per variable,direction in the AD operation sequence,
currently calculated and stored in the ADFun object
f
.
ADFun<Base> f(x, y)
the value of
s
returned by size_order
is one.
This is because
there is an implicit call to Forward
that computes
the zero order Taylor coefficients during this constructor.
f.Forward(q, x_q)
the value of
s
returned by size_order
would be @(@
q + 1
@)@.
The call to Forward
above
uses the lower order Taylor coefficients to compute and store
the q
-th order Taylor coefficients for all
the variables in the operation sequence corresponding to
f
.
Thus there are @(@
q + 1
@)@ (order zero through
q
)
Taylor coefficients per variable,direction.
(You can determine the number of variables in the operation sequence
using the size_var
function.)
f
is less than or equal
c
,
a call to capacity_order
with the syntax
f.capacity_order(c)
does not affect the value
s
returned by size_order
.
Otherwise,
the value
s
returned by size_order
is equal to
c
(only Taylor coefficients of order zero through @(@
c-1
@)@
have been retained).