17 #ifndef HPP_CONSTRAINTS_SOLVER_BY_SUBSTITUTION_HH 18 #define HPP_CONSTRAINTS_SOLVER_BY_SUBSTITUTION_HH 23 #include <hpp/constraints/config.hh> 30 namespace constraints {
89 return explicitConstraintSetHasChanged ();
112 const std::size_t priority = 0);
127 const std::size_t& priority,
155 virtual bool contains (
const ImplicitPtr_t& numericalConstraint)
const;
160 return explicitConstraintSet().notOutDers().nbIndices();
164 void explicitConstraintSetHasChanged();
166 template <
typename LineSearchType>
169 return solve <LineSearchType> (arg,
false, ls);
172 template <
typename LineSearchType>
181 return impl_solve (arg, optimize, ls);
223 bool rightHandSideFromConfig (
const ImplicitPtr_t& constraint,
254 return dimension() + explicit_.outDers().nbIndices();
263 && explicit_.isSatisfied (arg);
273 assert (error.size() == dimension() + explicit_.outDers().nbIndices());
276 residualError(error.head(dimension()));
278 explicit_.isSatisfied (arg, error.tail(explicit_.outDers().nbIndices()));
279 return iterative && _explicit;
293 bool& constraintFound)
const;
295 template <
typename LineSearchType>
298 computeValue<true> (arg);
299 updateJacobian (arg);
300 computeDescentDirection ();
301 lineSearch (*
this, arg, dq_);
302 explicit_.solve (arg);
314 explicit_.errorThreshold(threshold);
327 virtual std::ostream& print (std::ostream& os)
const;
333 explicit_.solve (result);
338 void computeActiveRowsOfJ (std::size_t iStack);
343 template <
typename LineSearchType>
359 #endif // HPP_CONSTRAINTS_SOLVER_BY_SUBSTITUTION_HH Status solve(vectorOut_t arg, LineSearchType ls=LineSearchType()) const
Definition: by-substitution.hh:167
pinocchio::vector_t vector_t
Definition: fwd.hh:45
bool integrate(vectorIn_t from, vectorIn_t velocity, vectorOut_t result) const
Definition: by-substitution.hh:329
pinocchio::vectorIn_t vectorIn_t
Definition: fwd.hh:46
pinocchio::ConfigurationOut_t ConfigurationOut_t
Definition: fwd.hh:89
void explicitSolverHasChanged() HPP_CONSTRAINTS_DEPRECATED
Definition: by-substitution.hh:87
value_type errorThreshold() const
Get error threshold.
Definition: by-substitution.hh:317
pinocchio::LiegroupSpacePtr_t LiegroupSpacePtr_t
Definition: fwd.hh:54
std::vector< segment_t > segments_t
Definition: fwd.hh:69
pinocchio::matrix_t matrix_t
Definition: fwd.hh:42
virtual ~BySubstitution()
Definition: by-substitution.hh:69
Status
Definition: hierarchical-iterative.hh:171
Definition: hierarchical-iterative.hh:63
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:88
std::vector< ComparisonType > ComparisonTypes_t
Definition: fwd.hh:170
const NumericalConstraints_t & numericalConstraints() const
Get the numerical constraints implicit and explicit.
Definition: by-substitution.hh:131
assert(d.lhs()._blocks()==d.rhs()._blocks())
std::ostream & operator<<(std::ostream &os, const BySubstitution &hs)
Definition: by-substitution.hh:351
ExplicitConstraintSet & explicitSolver() HPP_CONSTRAINTS_DEPRECATED
Definition: by-substitution.hh:75
bool isSatisfied(vectorIn_t arg) const
Definition: by-substitution.hh:259
bool isSatisfied(vectorIn_t arg, vectorOut_t error) const
Definition: by-substitution.hh:271
ExplicitConstraintSet & explicitConstraintSet()
Get explicit constraint set.
Definition: by-substitution.hh:137
bool isSatisfied(vectorIn_t arg) const
Definition: hierarchical-iterative.hh:302
boost::shared_ptr< DifferentiableFunction > DifferentiableFunctionPtr_t
Definition: fwd.hh:95
virtual std::ostream & print(std::ostream &os) const
value_type errorThreshold() const
Get error threshold.
Definition: hierarchical-iterative.hh:384
size_type errorSize() const
Definition: by-substitution.hh:252
Definition: by-substitution.hh:62
bool oneStep(vectorOut_t arg, LineSearchType &lineSearch) const
Definition: by-substitution.hh:296
pinocchio::vectorOut_t vectorOut_t
Definition: fwd.hh:47
Status solve(vectorOut_t arg, bool optimize, LineSearchType ls=LineSearchType()) const
Definition: by-substitution.hh:173
pinocchio::size_type size_type
Definition: fwd.hh:35
pinocchio::value_type value_type
Definition: fwd.hh:36
size_type numberFreeVariables() const
Return the number of free variables.
Definition: by-substitution.hh:158
void errorThreshold(const value_type &threshold)
Set error threshold.
Definition: by-substitution.hh:311
virtual bool integrate(vectorIn_t from, vectorIn_t velocity, vectorOut_t result) const
const ExplicitConstraintSet & explicitSolver() const HPP_CONSTRAINTS_DEPRECATED
Definition: by-substitution.hh:81
boost::shared_ptr< Implicit > ImplicitPtr_t
Definition: fwd.hh:157
Definition: hierarchical-iterative.hh:165
DifferentiableFunctionSet DifferentiableFunctionStack HPP_CONSTRAINTS_DEPRECATED
Definition: fwd.hh:99
const ExplicitConstraintSet & explicitConstraintSet() const
Set explicit constraint set.
Definition: by-substitution.hh:143
std::vector< constraints::ImplicitPtr_t > NumericalConstraints_t
Definition: fwd.hh:159
Definition: explicit-constraint-set.hh:93
Status solve(vectorOut_t arg) const
Definition: by-substitution.hh:211