1 #include <boost/python/suite/indexing/vector_indexing_suite.hpp> 12 template <
typename S,
typename C>
18 dg::python::exposeEntity<IE_t>()
22 return dg::python::to_py_list(e.numCoeffs().begin(),
25 +[](IE_t &e, bp::object iterable) {
26 e.numCoeffs(dg::python::to_std_vector<C>(iterable));
31 return dg::python::to_py_list(e.denomCoeffs().begin(),
32 e.denomCoeffs().end());
34 +[](IE_t &e, bp::object iterable) {
35 e.denomCoeffs(dg::python::to_std_vector<C>(iterable));
40 bp::import(
"dynamic_graph");
42 exposeIntegratorEuler<double, double>();
43 exposeIntegratorEuler<Vector, double>();
44 exposeIntegratorEuler<Vector, Matrix>();
void exposeIntegratorEuler()
BOOST_PYTHON_MODULE(wrap)
integrates an ODE using a naive Euler integration. TODO: change the integration method. For the moment, the highest derivative of the output signal is computed using the previous values of the other derivatives and the input signal, then integrated n times, which will most certainly induce a huge drift for ODEs with a high order at the denominator.
static std::string typeName(Type type)