30 #ifndef HPP_CONSTRAINTS_DIFFERENTIABLE_FUNCTION_SET_HH
31 #define HPP_CONSTRAINTS_DIFFERENTIABLE_FUNCTION_SET_HH
37 namespace constraints {
65 if (functions_.empty()) {
66 inputSize_ = func->inputSize();
67 inputDerivativeSize_ = func->inputDerivativeSize();
68 activeParameters_ = func->activeParameters();
69 activeDerivativeParameters_ = func->activeDerivativeParameters();
71 assert(inputSize_ == func->inputSize());
72 assert(inputDerivativeSize_ == func->inputDerivativeSize());
74 activeParameters_ = activeParameters_ || func->activeParameters();
75 activeDerivativeParameters_ =
76 activeDerivativeParameters_ || func->activeDerivativeParameters();
78 functions_.push_back(func);
80 *outputSpace_ *= func->outputSpace();
86 for (Functions_t::const_iterator _f = functions.begin();
87 _f != functions.end(); ++_f)
93 std::ostream&
print(std::ostream& os)
const;
107 for (Functions_t::const_iterator _f = functions_.begin();
108 _f != functions_.end(); ++_f) {
111 assert(hpp::pinocchio::checkNormalized(result_[i]));
112 result.vector().segment(row, f.
outputSize()) = result_[i].vector();
116 assert(hpp::pinocchio::checkNormalized(result));
120 for (Functions_t::const_iterator _f = functions_.begin();
121 _f != functions_.end(); ++_f) {
133 if (functions_ != castother.functions_)
return false;
134 if (result_.size() != castother.result_.size())
return false;
135 for (std::size_t i = 0; i < result_.size(); i++)
136 if (result_[i] != castother.result_[i])
return false;
142 Functions_t functions_;
143 mutable std::vector<LiegroupElement> result_;
Definition: differentiable-function-set.hh:45
void impl_jacobian(matrixOut_t jacobian, ConfigurationIn_t arg) const
Definition: differentiable-function-set.hh:118
static DifferentiableFunctionSetPtr_t create(const std::string &name)
Definition: differentiable-function-set.hh:52
DifferentiableFunctionSet()
Definition: differentiable-function-set.hh:101
std::ostream & print(std::ostream &os) const
Display object in a stream.
std::vector< DifferentiableFunctionPtr_t > Functions_t
Definition: differentiable-function-set.hh:47
void add(const DifferentiableFunctionPtr_t &func)
Definition: differentiable-function-set.hh:64
void impl_compute(LiegroupElementRef result, ConfigurationIn_t arg) const
Definition: differentiable-function-set.hh:104
void merge(const DifferentiableFunctionSetPtr_t &other)
The output columns selection of other is not taken into account.
Definition: differentiable-function-set.hh:84
virtual ~DifferentiableFunctionSet()
Definition: differentiable-function-set.hh:56
DifferentiableFunctionSet(const std::string &name)
Definition: differentiable-function-set.hh:98
bool isEqual(const DifferentiableFunction &other) const
Definition: differentiable-function-set.hh:128
const Functions_t & functions() const
Get the stack of functions.
Definition: differentiable-function-set.hh:62
Definition: differentiable-function.hh:63
virtual bool isEqual(const DifferentiableFunction &other) const
Definition: differentiable-function.hh:206
size_type outputSize() const
Get dimension of output vector.
Definition: differentiable-function.hh:116
virtual void impl_jacobian(matrixOut_t jacobian, vectorIn_t arg) const =0
size_type outputDerivativeSize() const
Get dimension of output derivative vector.
Definition: differentiable-function.hh:118
virtual void impl_compute(LiegroupElementRef result, vectorIn_t argument) const =0
User implementation of function evaluation.
#define HPP_CONSTRAINTS_DLLAPI
Definition: config.hh:88
assert(d.lhs()._blocks()==d.rhs()._blocks())
pinocchio::LiegroupElement LiegroupElement
Definition: fwd.hh:65
shared_ptr< DifferentiableFunction > DifferentiableFunctionPtr_t
Definition: fwd.hh:113
shared_ptr< DifferentiableFunctionSet > DifferentiableFunctionSetPtr_t
Definition: fwd.hh:114
pinocchio::size_type size_type
Definition: fwd.hh:47
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:106
Eigen::Ref< matrix_t > matrixOut_t
Definition: fwd.hh:58
pinocchio::LiegroupElementRef LiegroupElementRef
Definition: fwd.hh:66
Definition: active-set-differentiable-function.hh:36