5 #ifndef __pycppad_independent_hpp__
6 #define __pycppad_independent_hpp__
10 #include <eigenpy/eigenpy.hpp>
11 #include <cppad/core/independent/independent.hpp>
15 namespace bp = boost::python;
17 template<
typename ADVector>
19 :
public bp::def_visitor< IndependentVisitor<ADVector> >
21 typedef Eigen::Ref<ADVector> RefADVector;
26 const size_t abort_op_index_,
27 const bool record_compare_)
29 ADVector x_(x), dynamic(0);
30 ::CppAD::Independent(x_, abort_op_index_, record_compare_, dynamic);
34 static void expose(
const std::string & func_name =
"Independent")
37 (bp::arg(
"x"), bp::arg(
"abort_op_index") = 0, bp::arg(
"record_compare") =
true),
38 "Define a variable as Independent."
41 "\tabort_op_index: operator index at which execution will be aborted (during the recording of operations). The value zero corresponds to not aborting (will not match).\n"
42 "\trecord_compare: should comparison operators be recorded.\n"
Definition: independent.hpp:20
static void Independent(RefADVector x, const size_t abort_op_index_, const bool record_compare_)
Definition: independent.hpp:25
static void expose(const std::string &func_name="Independent")
Definition: independent.hpp:34