17 #ifndef HPP_CONSTRAINTS_SOLVER_IMPL_BY_SUBSTITUTION_HH 18 #define HPP_CONSTRAINTS_SOLVER_IMPL_BY_SUBSTITUTION_HH 21 namespace constraints {
26 template <
typename LineSearchType>
30 LineSearchType lineSearch)
const 39 static const value_type dqMinSquaredNorm = NumTraits::dummy_precision();
43 value_type previousCost = numeric_limits::infinity();
45 bool onlyLineSearch =
false;
49 computeValue<true> (arg);
54 if (errorWasBelowThr) {
62 if (optimize && !errorIsAboveThr) qopt = arg;
65 while ( (optimize || (errorIsAboveThr && errorDecreased))) {
75 if (!onlyLineSearch) {
83 if (optimize)
dq_ *= scaling;
84 if (
dq_.squaredNorm () < dqMinSquaredNorm) {
90 lineSearch (*
this, arg,
dq_);
94 computeValue<true> (arg);
110 if (!errorIsAboveThr) {
112 if (cost < previousCost) {
115 if (scaling < 0.5) scaling *= 2;
117 onlyLineSearch =
false;
121 if (qopt.size() > 0) arg = qopt;
122 onlyLineSearch =
true;
129 if (!optimize && errorWasBelowThr) {
137 if (optimize && qopt.size() > 0) arg = qopt;
146 #endif // HPP_CONSTRAINTS_SOLVER_IMPL_BY_SUBSTITUTION_HH pinocchio::vector_t vector_t
Definition: fwd.hh:45
Definition: hierarchical-iterative.hh:172
bool lastIsOptional_
Definition: hierarchical-iterative.hh:604
size_type maxIterations_
Definition: hierarchical-iterative.hh:599
void updateJacobian(vectorIn_t arg) const
Status
Definition: hierarchical-iterative.hh:171
assert(d.lhs()._blocks()==d.rhs()._blocks())
Definition: hierarchical-iterative.hh:175
bool solve(vectorOut_t arg) const
size_type reducedDimension_
Definition: hierarchical-iterative.hh:603
std::numeric_limits< value_type > numeric_limits
Definition: by-substitution.hh:23
void computeDescentDirection() const
value_type squaredNorm_
Definition: hierarchical-iterative.hh:625
void computeSaturation(vectorIn_t arg) const
pinocchio::vectorOut_t vectorOut_t
Definition: fwd.hh:47
void computeError() const
std::vector< Data > datas_
Definition: hierarchical-iterative.hh:626
pinocchio::size_type size_type
Definition: fwd.hh:35
Eigen::NumTraits< value_type > NumTraits
Definition: by-substitution.hh:24
Definition: hierarchical-iterative.hh:174
pinocchio::value_type value_type
Definition: fwd.hh:36
Definition: hierarchical-iterative.hh:173
value_type squaredErrorThreshold_
Definition: hierarchical-iterative.hh:598
vector_t dq_
Definition: hierarchical-iterative.hh:620