Prev Next eigen

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@ This is cppad-20221105 documentation. Here is a link to its current documentation .
Including Eigen Examples, Tests, and sparse2eigen

Eigen Home Page

Examples and Tests
CppAD can include the following examples and tests that use the linear algebra package Eigen:
cppad_eigen.hpp Enable Use of Eigen Linear Algebra Package with CppAD
eigen_array.cpp Using Eigen Arrays: Example and Test
eigen_det.cpp Using Eigen To Compute Determinant: Example and Test
sparse2eigen.cpp Converting CppAD Sparse Matrix to Eigen Format: Example and Test
atomic_two_eigen_cholesky.hpp atomic_two Eigen Cholesky Factorization Class
atomic_two_eigen_mat_inv.hpp atomic_two Eigen Matrix Inversion Class
atomic_two_eigen_mat_mul.hpp atomic_two Eigen Matrix Multiply Class

The sparse2eigen utility will only be available if include_eigen is specified on the cmake command line.

If Eigen is installed on your system, you can specify include_eigen=true on the cmake command line. The value of PKG_CONFIG_PATH must be such that the command
    pkg-config eigen3 --path --print-errors
finds the location of the file eigen3.pc.

With Eigen it is possible to use -D eigen_prefix=eigen_prefix on the cmake command line. In this case, the sub-directory Eigen must exist in a directory
where include_dir is one of the directories in the cmake_install_includedirs list of directories.

If you specify include_eigencmakeinclude_eigen on the cmake command line, you will be able to run the Eigen examples list above by executing the following commands starting in the distribution directory :
    cd build/example
    make check_example
If you do this, you will see an indication that the examples eigen_array and eigen_det have passed their correctness check.

Test Vector
If you have specified eigen_prefix you can choose
    -D cppad_testvector=eigen
on the cmake command line. This we set the CppAD testvector to use Eigen vectors.

If you are using Unix, you can download and install a copy of Eigen using . The corresponding install prefix is build/prefix.
Input File: omh/install/eigen.omh