10 #ifndef __SOT_INTEGRATOR_ABSTRACT_H__
11 #define __SOT_INTEGRATOR_ABSTRACT_H__
18 #include <dynamic-graph/linear-algebra.h>
21 #include <dynamic-graph/all-signals.h>
22 #include <dynamic-graph/command-bind.h>
23 #include <dynamic-graph/entity.h>
24 #include <dynamic-graph/pool.h>
45 template <
class sigT,
class coefT>
50 SIN(NULL,
"sotIntegratorAbstract(" + name +
")::input(vector)::sin"),
53 SIN,
"sotIntegratorAbstract(" + name +
")::output(vector)::sout") {
54 signalRegistration(
SIN <<
SOUT);
56 using namespace dynamicgraph::command;
58 const std::string typeName =
59 Value::typeName(dynamicgraph::command::ValueHelper<coefT>::TypeID);
65 docCommandVoid1(
"Push a new numerator coefficient", typeName)));
70 docCommandVoid1(
"Push a new denominator coefficient", typeName)));
75 docCommandVoid0(
"Pop a new numerator coefficient")));
79 docCommandVoid0(
"Pop a new denominator coefficient")));
101 dynamicgraph::SignalPtr<sigT, int>
SIN;
103 dynamicgraph::SignalTimeDependent<sigT, int>
SOUT;
105 virtual void display(std::ostream &os)
const {
106 os << this->getClassName() <<
": " << getName() <<
'\n' <<
" ";
112 for (std::size_t i = 1; i <
numerator.size(); ++i)
113 os <<
" + " <<
numerator[i] <<
" s^" << i;
115 for (std::size_t i = 1; i <
denominator.size(); ++i)
integrates an ODE. If Y is the output and X the input, the following equation is integrated: a_p * d(...
Definition: integrator-abstract.hh:46
void pushNumCoef(const coefT &numCoef)
Definition: integrator-abstract.hh:87
IntegratorAbstract(const std::string &name)
Definition: integrator-abstract.hh:48
void popDenomCoef()
Definition: integrator-abstract.hh:92
virtual void display(std::ostream &os) const
Definition: integrator-abstract.hh:105
void numCoeffs(const std::vector< coefT > &coeffs)
Definition: integrator-abstract.hh:95
void pushDenomCoef(const coefT &denomCoef)
Definition: integrator-abstract.hh:88
dynamicgraph::SignalPtr< sigT, int > SIN
Definition: integrator-abstract.hh:101
std::vector< coefT > numerator
Definition: integrator-abstract.hh:120
const std::vector< coefT > & numCoeffs() const
Definition: integrator-abstract.hh:94
const std::vector< coefT > & denomCoeffs() const
Definition: integrator-abstract.hh:97
virtual sigT & integrate(sigT &res, int time)=0
void popNumCoef()
Definition: integrator-abstract.hh:91
virtual ~IntegratorAbstract()
Definition: integrator-abstract.hh:82
dynamicgraph::SignalTimeDependent< sigT, int > SOUT
Definition: integrator-abstract.hh:103
void denomCoeffs(const std::vector< coefT > &coeffs)
Definition: integrator-abstract.hh:98
std::vector< coefT > denominator
Definition: integrator-abstract.hh:121
Definition: abstract-sot-external-interface.hh:17