/* $Id: eigen_prefix.omh 2792 2013-04-28 09:25:28Z bradbell $ */ /* -------------------------------------------------------------------------- CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell CppAD is distributed under multiple licenses. This distribution is under the terms of the Eclipse Public License Version 1.0. A copy of this license is included in the COPYING file of this distribution. Please visit http://www.coin-or.org/CppAD/ for information on other licenses. -------------------------------------------------------------------------- */ $begin eigen_prefix$$ $dollar @$$ $spell testvector dir namespace Eigen Cpp includedirs cmake det cppad $$ $section Including the Eigen Examples and Tests$$ $index eigen, example$$ $index example, eigen$$ $index test, eigen$$ $head Purpose$$ CppAD can include the following examples and tests that use the linear algebra package $href%http://eigen.tuxfamily.org%Eigen%$$: $table $rref cppad_eigen.hpp$$ $rref eigen_array.cpp$$ $rref eigen_det.cpp$$ $tend $head eigen_prefix$$ $index eigen, prefix$$ $index prefix, eigen$$ If Eigen is installed on your system, you can specify a value for its install $icode eigen_prefix$$ on the $cref cmake$$ command line. The value of $icode eigen_prefix$$ must be such that, for one of the directories $icode dir$$ in $cref/cmake_install_includedirs/cmake/cmake_install_includedirs/$$, $codei% %eigen_prefix%/%dir%/Eigen/Core %$$ is a valid way to reference to the include file $code Core$$; $head Examples$$ $index example, eigen$$ $index eigen, example$$ If you include $icode eigen_prefix$$ on the $cref cmake$$ command line, you will be able to run the Eigen examples list above by executing the following commands starting in the $cref/distribution directory/download/Distribution Directory/$$: $codei% cd build/example make check_example %$$ If you do this, you will see an indication that the examples $code eigen_array$$ and $code eigen_det$$ have passed their correctness check. options to this program. $head Test Vector$$ $index vector, eigen$$ $index eigen, vector$$ If you have specified $icode eigen_prefix$$ you can choose $codei% -D cppad_testvector=eigen %$$ on the $cref/cmake command/cmake/CMake Command/$$ line. This we set the CppAD $cref testvector$$ to use Eigen vectors. $children% bin/get_eigen.sh %$$ $head get_eigen$$ $index get, eigen$$ $index eigen, get$$ If you are using Unix, you can download and install a copy of Eigen using $cref get_eigen.sh$$. The corresponding $icode eigen_prefix$$ would be $code build/prefix$$. $end