Prev Next

@(@\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}} }@)@
Including the Eigen Examples and Tests

Purpose
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
atomic_eigen_mat_mul.hpp Atomic Eigen Matrix Multiply Class
atomic_eigen_mat_inv.hpp Atomic Eigen Matrix Inversion Class

eigen_prefix
If Eigen is installed on your system, you can specify a value for its install eigen_prefix on the cmake command line. The value of eigen_prefix must be such that, for one of the directories dir in cmake_install_includedirs ,
     
eigen_prefix/dir/Eigen/Core
is a valid way to reference to the include file Core;

Examples
If you include eigen_prefix 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. options to this program.

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.

get_eigen
If you are using Unix, you can download and install a copy of Eigen using get_eigen.sh . The corresponding eigen_prefix would be build/prefix.
Input File: omh/install/eigen_prefix.omh