// $Id: eigen_prefix.omh 3757 2015-11-30 12:03:07Z bradbell $
/* --------------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell

CppAD is distributed under multiple licenses. This distribution is under
the terms of the
                    GNU General Public License Version 3.

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$$
$mindex prefix get$$

$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$$
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$$
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$$
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$$
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
