math/constraint-inequality.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS
3 //
4 // This file is part of tsid
5 // tsid 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 // tsid is distributed in the hope that it will be
10 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Lesser Public License for more details. You should have
13 // received a copy of the GNU Lesser General Public License along with
14 // tsid. If not, see
15 // <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef __invdyn_math_constraint_inequality_hpp__
19 #define __invdyn_math_constraint_inequality_hpp__
20 
22 
23 namespace tsid {
24 namespace math {
25 
27  public:
28  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29 
30  ConstraintInequality(const std::string& name);
31 
32  ConstraintInequality(const std::string& name, const unsigned int rows,
33  const unsigned int cols);
34 
35  ConstraintInequality(const std::string& name, ConstRefMatrix A,
37 
38  unsigned int rows() const override;
39  unsigned int cols() const override;
40  void resize(unsigned int r, unsigned int c) override;
41 
42  bool isEquality() const override;
43  bool isInequality() const override;
44  bool isBound() const override;
45 
46  const Vector& vector() const override;
47  const Vector& lowerBound() const override;
48  const Vector& upperBound() const override;
49 
50  Vector& vector() override;
51  Vector& lowerBound() override;
52  Vector& upperBound() override;
53 
54  bool setVector(ConstRefVector b) override;
55  bool setLowerBound(ConstRefVector lb) override;
56  bool setUpperBound(ConstRefVector ub) override;
57 
58  bool checkConstraint(ConstRefVector x, double tol = 1e-6) const override;
59 
60  protected:
63 };
64 
65 } // namespace math
66 } // namespace tsid
67 
68 #endif // ifndef __invdyn_math_constraint_equality_hpp__
ex_4_plan_LIPM_romeo.A
A
Definition: ex_4_plan_LIPM_romeo.py:110
test_Constraint.ub
ub
Definition: test_Constraint.py:13
tsid::math::ConstraintInequality::isInequality
bool isInequality() const override
Definition: src/math/constraint-inequality.cpp:59
tsid::math::ConstraintInequality::vector
const Vector & vector() const override
Definition: src/math/constraint-inequality.cpp:62
tsid::math::ConstraintBase
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:35
c
Vec3f c
tsid::math::ConstraintInequality::cols
unsigned int cols() const override
Definition: src/math/constraint-inequality.cpp:48
tsid::math::ConstraintInequality::lowerBound
const Vector & lowerBound() const override
Definition: src/math/constraint-inequality.cpp:66
tsid::math::ConstraintBase::name
virtual const std::string & name() const
Definition: constraint-base.cpp:33
tsid::math::ConstraintInequality::isBound
bool isBound() const override
Definition: src/math/constraint-inequality.cpp:60
b
Vec3f b
tsid::math::ConstraintInequality::setVector
bool setVector(ConstRefVector b) override
Definition: src/math/constraint-inequality.cpp:76
tsid::math::ConstraintInequality::isEquality
bool isEquality() const override
Definition: src/math/constraint-inequality.cpp:58
r
FCL_REAL r
test_Constraint.tol
int tol
Definition: test_Constraint.py:10
tsid::math::ConstraintInequality::setUpperBound
bool setUpperBound(ConstRefVector ub) override
Definition: src/math/constraint-inequality.cpp:84
tsid::math::ConstraintInequality::setLowerBound
bool setLowerBound(ConstRefVector lb) override
Definition: src/math/constraint-inequality.cpp:80
tsid::math::ConstraintInequality::resize
void resize(unsigned int r, unsigned int c) override
Definition: src/math/constraint-inequality.cpp:52
tsid::math::ConstraintInequality::m_lb
Vector m_lb
Definition: math/constraint-inequality.hpp:61
tsid::math::ConstraintInequality::checkConstraint
bool checkConstraint(ConstRefVector x, double tol=1e-6) const override
Definition: src/math/constraint-inequality.cpp:89
test_Constraint.lb
float lb
Definition: test_Constraint.py:12
constraint-base.hpp
tsid::math::ConstraintInequality
Definition: math/constraint-inequality.hpp:26
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: math/fwd.hpp:48
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
tsid::math::ConstraintInequality::ConstraintInequality
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ConstraintInequality(const std::string &name)
Definition: src/math/constraint-inequality.cpp:22
tsid
Definition: bindings/python/constraint/constraint-bound.cpp:21
test_Solvers.x
x
Definition: test_Solvers.py:67
tsid::math::ConstRefMatrix
const typedef Eigen::Ref< const Matrix > ConstRefMatrix
Definition: math/fwd.hpp:51
tsid::math::ConstraintInequality::upperBound
const Vector & upperBound() const override
Definition: src/math/constraint-inequality.cpp:67
tsid::math::ConstraintInequality::rows
unsigned int rows() const override
Definition: src/math/constraint-inequality.cpp:42
tsid::math::ConstraintInequality::m_ub
Vector m_ub
Definition: math/constraint-inequality.hpp:62


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Thu Apr 3 2025 02:47:15