10 #include <dynamic-graph/factory.h> 12 #include <boost/function.hpp> 16 namespace dg = ::dynamicgraph;
33 gradientSIN(NULL,
"GradientAscent(" + n +
")::input(vector)::gradient"),
35 "GradientAscent(" + n +
")::input(double)::learningRate"),
36 refresherSINTERN(
"GradientAscent(" + n +
")::intern(dummy)::refresher"),
38 gradientSIN << refresherSINTERN,
39 "GradientAscent(" + n +
")::output(vector)::value"),
61 res.resize(
value.size());
64 value += learningRate * gradient;
dynamicgraph::Vector & update(dynamicgraph::Vector &res, const int &inTime)
void signalRegistration(const SignalArray< int > &signals)
virtual ~GradientAscent(void)
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(FeaturePosture, "FeaturePosture")
void setDependencyType(DependencyType dep)
SignalPtr< dynamicgraph::Vector, int > gradientSIN
SignalPtr< double, int > learningRateSIN
GradientAscent(const std::string &n)
SignalTimeDependent< dynamicgraph::Vector, int > valueSOUT
SignalTimeDependent< int, int > refresherSINTERN
AABB & update(const Vec3f &a, const Vec3f &b)
dynamicgraph::Vector value