hpp-constraints  4.9.1
Definition of basic geometric constraints for motion planning
of-parameter-subset.hh
Go to the documentation of this file.
1 // Copyright (c) 2017 - 2018, CNRS
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr), Florent Lamiraux
3 //
4 // This file is part of hpp-constraints.
5 // hpp-constraints is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // hpp-constraints is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // hpp-constraints. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HPP_CONSTRAINTS_FUNCTION_OF_PARAMETER_SUBSET_HH
18 # define HPP_CONSTRAINTS_FUNCTION_OF_PARAMETER_SUBSET_HH
19 
21 
22 namespace hpp {
23  namespace constraints {
24  namespace function {
39  class HPP_CONSTRAINTS_DLLAPI OfParameterSubset :
41  {
42  public:
52  const size_type& nArgs, const size_type& nDers,
53  const segment_t& inArgs, const segment_t& inDers)
54  {
56  (new OfParameterSubset (g, nArgs, nDers, inArgs, inDers));
57  }
58 
59  protected:
68  const size_type& nArgs, const size_type& nDers,
69  const segment_t& inArgs, const segment_t& inDers);
70 
72  {
73  g_->value(y, arg.segment (sa_.first, sa_.second));
74  }
75 
76  void impl_jacobian (matrixOut_t J, vectorIn_t arg) const
77  {
78  g_->jacobian(J.middleCols (sd_.first, sd_.second),
79  arg.segment (sa_.first, sa_.second));
80  }
81 
82  std::ostream& print (std::ostream& os) const;
83 
85  const segment_t sa_, sd_;
86  }; // class OfParameterSubset
87  } // namespace function
88  } // namespace constraints
89 } // namespace hpp
90 #endif // HPP_CONSTRAINTS_FUNCTION_OF_PARAMETER_SUBSET_HH
void impl_compute(LiegroupElementRef y, vectorIn_t arg) const
User implementation of function evaluation.
Definition: of-parameter-subset.hh:71
pinocchio::vectorIn_t vectorIn_t
Definition: fwd.hh:46
DifferentiableFunctionPtr_t g_
Definition: of-parameter-subset.hh:84
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
std::pair< size_type, size_type > segment_t
Definition: fwd.hh:68
Definition: differentiable-function.hh:50
boost::shared_ptr< DifferentiableFunction > DifferentiableFunctionPtr_t
Definition: fwd.hh:95
Definition: of-parameter-subset.hh:39
void impl_jacobian(matrixOut_t J, vectorIn_t arg) const
Definition: of-parameter-subset.hh:76
pinocchio::size_type size_type
Definition: fwd.hh:35
Eigen::Ref< matrix_t > matrixOut_t
Definition: fwd.hh:44
boost::shared_ptr< OfParameterSubset > OfParameterSubsetPtr_t
Definition: fwd.hh:206
const segment_t sd_
Definition: of-parameter-subset.hh:85