hpp-constraints  4.10.1
Definition of basic geometric constraints for motion planning
implicit.hh
Go to the documentation of this file.
1 // Copyright (c) 2015 - 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 
18 #ifndef HPP_CONSTRAINTS_IMPLICIT_HH
19 # define HPP_CONSTRAINTS_IMPLICIT_HH
20 
21 # include <hpp/constraints/fwd.hh>
22 # include <hpp/constraints/config.hh>
24 
25 # include <hpp/util/serialization-fwd.hh>
26 
27 namespace hpp {
28  namespace constraints {
100  public:
102  bool operator== (const Implicit& other) const
103  {
104  return isEqual (other, true);
105  }
107  virtual ImplicitPtr_t copy () const;
111  static ImplicitPtr_t create(const DifferentiableFunctionPtr_t& function)
113 
116  static ImplicitPtr_t create
117  (const DifferentiableFunctionPtr_t& function, ComparisonTypes_t comp);
118 
121  static ImplicitPtr_t create
122  (const DifferentiableFunctionPtr_t& function,
123  ComparisonTypes_t comp, vectorIn_t rhs);
124 
126  static ImplicitPtr_t createCopy (const ImplicitPtr_t& other);
127 
128  virtual ~Implicit () {};
129 
132 
143  void rightHandSideFromConfig (ConfigurationIn_t config);
144 
147  void rightHandSide (vectorIn_t rhs);
148 
150  vectorIn_t rightHandSide () const;
151 
155  size_type parameterSize () const;
156 
160  size_type rightHandSideSize () const;
161 
163  const ComparisonTypes_t& comparisonType () const;
164 
166  void comparisonType (const ComparisonTypes_t& comp);
167 
171  vectorOut_t rightHandSide ();
172 
177  void rightHandSideFunction (const DifferentiableFunctionPtr_t& rhsF);
178 
184  {
185  return rhsFunction_;
186  }
187 
190  vectorIn_t rightHandSideAt (const value_type& s);
191 
193 
195  DifferentiableFunction& function () const
196  {
197  return *function_;
198  }
199 
202  {
203  return function_;
204  }
205 
206  protected:
212  Implicit (const DifferentiableFunctionPtr_t& function,
213  ComparisonTypes_t comp);
214 
221  Implicit (const DifferentiableFunctionPtr_t& function,
222  ComparisonTypes_t comp, vectorIn_t rhs);
223 
225  Implicit (const Implicit& other);
226 
230  virtual bool isEqual (const Implicit& other, bool swapAndTest) const;
231 
232  // Store weak pointer to itself
233  void init (const ImplicitWkPtr_t& weak)
234  {
235  weak_ = weak;
236  }
237 
238  friend class ImplicitConstraintSet;
239  private:
240  ComparisonTypes_t comparison_;
241  vector_t rhs_;
242  size_type parameterSize_;
243  DifferentiableFunctionPtr_t function_;
244  DifferentiableFunctionPtr_t rhsFunction_;
245  ImplicitWkPtr_t weak_;
246 
247  protected:
248  Implicit () {}
249  private:
250  HPP_SERIALIZABLE();
251  }; // class Implicit
253  } // namespace constraints
254 } // namespace hpp
255 
256 #endif // HPP_CONSTRAINTS_IMPLICIT_HH
pinocchio::vector_t vector_t
Definition: fwd.hh:47
pinocchio::vectorIn_t vectorIn_t
Definition: fwd.hh:48
Definition: implicit-constraint-set.hh:34
virtual ~Implicit()
Definition: implicit.hh:128
Definition: active-set-differentiable-function.hh:24
DifferentiableFunctionSet DifferentiableFunctionStack HPP_CONSTRAINTS_DEPRECATED
Definition: fwd.hh:105
bool operator==(const ComparisonTypes_t &v, const internal::ReplicateCompType &r)
Definition: comparison-types.hh:117
const DifferentiableFunctionPtr_t & rightHandSideFunction() const
Definition: implicit.hh:183
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:94
std::vector< ComparisonType > ComparisonTypes_t
Definition: fwd.hh:176
Definition: differentiable-function.hh:52
boost::shared_ptr< DifferentiableFunction > DifferentiableFunctionPtr_t
Definition: fwd.hh:101
void init(const ImplicitWkPtr_t &weak)
Definition: implicit.hh:233
const DifferentiableFunctionPtr_t & functionPtr() const
Return a reference to function .
Definition: implicit.hh:201
#define HPP_CONSTRAINTS_DLLAPI
Definition: config.hh:64
pinocchio::vectorOut_t vectorOut_t
Definition: fwd.hh:49
pinocchio::size_type size_type
Definition: fwd.hh:36
pinocchio::value_type value_type
Definition: fwd.hh:37
Definition: implicit.hh:99
Implicit()
Definition: implicit.hh:248
boost::shared_ptr< Implicit > ImplicitPtr_t
Definition: fwd.hh:163