Prev | Next |
f.abs_normal_fun(g, a)
f
has prototype
const ADFun<Base>& f
It represents a function @(@
f : \B{R}^n \rightarrow \B{R}^m
@)@.
We assume that the only non-smooth terms in the representation are
absolute value functions and use @(@
s \in \B{Z}_+
@)@
to represent the number of these terms.
n
to denote the dimension of the domain space for
f
.
m
to denote the dimension of the range space for
f
.
s
to denote the number of absolute value terms in
f
.
a
has prototype
ADFun<Base> a
The initial function representation in
a
is lost.
Upon return it represents the result of the absolute terms
@(@
a : \B{R}^n \rightarrow \B{R}^s
@)@; see @(@
a(x)
@)@ defined below.
Note that
a
is constructed by copying
f
and then changing the dependent variables. There may
be many calculations in this representation that are not necessary
and can be removed using
a.optimize()
This optimization is not done automatically by abs_normal_fun
because it may take a significant amount of time.
g
has prototype
ADFun<Base> g
The initial function representation in
g
is lost.
Upon return it represents the smooth function
@(@
g : \B{R}^{n + s} \rightarrow \B{R}^{m + s}
@)@ is defined by
@[@
g( x , u )
=
\left[ \begin{array}{c} y(x, u) \\ z(x, u) \end{array} \right]
@]@
were @(@
y(x, u)
@)@ and @(@
z(x, u)
@)@ are defined below.