\(\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}} }\)
eigen¶
View page sourceIncluding Eigen Examples, Tests, and sparse2eigen¶
Eigen Home Page¶
Finding Eigen¶
These example and tests will be included and sparse2eigen will be installed if:
Eigen is installed on your system
c++14 or higher is supported by your compiler
PKG_CONFIG_PATH is such that the following command finds the location of the file eigen3.pc :
pkg-config eigen3 --path --print-errors
The output of the cmake command will report if these conditions are met.
Examples and Tests¶
CppAD can include the following examples and tests that use the linear algebra package Eigen:
cppad_eigen.hpp |
|
eigen_array.cpp |
|
eigen_det.cpp |
|
sparse2eigen.cpp |
Converting CppAD Sparse Matrix to Eigen Format: Example and Test |
atomic_two_eigen_cholesky.hpp |
|
atomic_two_eigen_mat_inv.hpp |
|
atomic_two_eigen_mat_mul.hpp |
Examples¶
If eigen is found , 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 eigen is found you can choose
-D cppad_testvector
=eigen
on the CMake Command line. This we set the CppAD testvector to use Eigen vectors.