we need an autodiff library at some point (or we need to roll our own but I do not think that makes sense). CppAD is well tested and header only and easy to include. It is also Liscene compatible with GPL v3.0. Here we bring it in as a dependency
29 lines
922 B
C++
29 lines
922 B
C++
# ifndef CPPAD_EXAMPLE_EIGEN_PLUGIN_HPP
|
|
# define CPPAD_EXAMPLE_EIGEN_PLUGIN_HPP
|
|
/* --------------------------------------------------------------------------
|
|
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
|
|
|
|
CppAD is distributed under the terms of the
|
|
Eclipse Public License Version 2.0.
|
|
|
|
This Source Code may also be made available under the following
|
|
Secondary License when the conditions for such availability set forth
|
|
in the Eclipse Public License, Version 2.0 are satisfied:
|
|
GNU General Public License, Version 2.0 or later.
|
|
---------------------------------------------------------------------------- */
|
|
/*$
|
|
$begin eigen_plugin.hpp$$
|
|
$spell
|
|
eigen_plugin.hpp
|
|
typedef
|
|
$$
|
|
|
|
$section Source Code for eigen_plugin.hpp$$
|
|
$srccode%cpp% */
|
|
// Declaration needed, before eigen-3.3.3, so Eigen vector is a simple vector
|
|
typedef Scalar value_type;
|
|
/* %$$
|
|
$end
|
|
*/
|
|
# endif
|