next up previous contents
Next: Second Derivative Reverse Sweep Up: Using OSInstance Methods: Low Previous: Using OSInstance Methods: Low   Contents

First Derivative Reverse Sweep Calculations

In order to calculate first derivatives execute the following sequence of calls.

x0[0] = 1;
x0[1] = 5;
x0[2] = 5;
std::vector<double> vlambda(3);
vlambda[0] = 0;
vlambda[1] = 0;
vlambda[2] = 1;
osinstance->forwardAD(0, x0);
osinstance->reverseAD(1, vlambda);
Since vlambda only includes the third function $ f_3$, this sequence of calls will produce the third row of the Jacobian $ J_f$, i.e

$\displaystyle \frac{\partial f_{3}(x^{(0)})}{\partial x_{0}} = 1, \quad \frac{\...
...\partial x_{1}} = 0, \quad \frac{\partial f_{3}(x^{(0)})}{\partial x_{3}} = .2
$



Kipp Martin 2008-01-16