Prev | Next |
f = adfun(a_x, a_y)
f
will store the
type( a_x[0] )
operation sequence that mapped the independent variable vector
a_x
to the dependent variable vector
a_y
.
a_x
is the numpy.array
returned by the previous call to independent
.
Neither the size of
a_x
, or the value it its elements,
may change between calling
a_x = independent(x)
and
f = adfun(a_x, a_y)
The length of the vector
a_x
determines the domain size
n
for the function
y = F(x)
below.
a_y
specifies the dependent variables.
It must be a numpy.array
with one dimension
(i.e., a vector) and with the same type of elements as
a_x
.
The object
f
stores the
type( a_x[0] )
operations
that mapped the vector
a_x
to the vector
a_y
.
The length of the vector
a_y
determines the range size
m
for the function
y = F(x)
below.
f
can be used to evaluate the function
\[
F : \B{R}^n \rightarrow \B{R}^m
\]
and its derivatives, where
y = F(x)
corresponds to the
operation sequence mentioned above.
m
is equal to the length of the vector
a_y
.
n
is equal to the length of the vector
a_x
.
f
is one less than
the AD level for the arguments
a_x
and
a_y
;
i.e., if
type( a_x[0] )
is a_float
(a2float
)
the corresponding AD level for
f
is zero (one).