libeigen/eigen!2652 Closes #998, #2142, #301, #1822, #1959, #805, #462, #308, #2146, #1335, #634, #81, and #46
38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
namespace Eigen {
|
|
|
|
/** \page AutoDiffExamples AutoDiff examples
|
|
|
|
This page shows basic uses of the \ref AutoDiff_Module.
|
|
|
|
\section AutoDiffScalarExample Tracking first derivatives
|
|
|
|
AutoDiffScalar stores a scalar value together with its derivatives. The derivative vector size is the number of
|
|
independent variables. A common pattern is to seed each independent variable with one unit vector:
|
|
|
|
<table class="example">
|
|
<tr><th>Example:</th><th>Output:</th></tr>
|
|
<tr><td>
|
|
\include AutoDiffScalarExample.cpp
|
|
</td>
|
|
<td>
|
|
\verbinclude AutoDiffScalarExample.out
|
|
</td></tr></table>
|
|
|
|
\section AutoDiffJacobianExample Computing a Jacobian
|
|
|
|
AutoDiffJacobian wraps a functor whose operator() is templated on the scalar type. Calling it with a Jacobian pointer
|
|
evaluates the functor with active AutoDiffScalar inputs and fills both the value and Jacobian:
|
|
|
|
<table class="example">
|
|
<tr><th>Example:</th><th>Output:</th></tr>
|
|
<tr><td>
|
|
\include AutoDiffJacobianExample.cpp
|
|
</td>
|
|
<td>
|
|
\verbinclude AutoDiffJacobianExample.out
|
|
</td></tr></table>
|
|
|
|
*/
|
|
|
|
}
|