hpp::core::DoubleInequality Class Reference

Implementation of double inequality. More...

#include <hpp/core/comparison-type.hh>

Inheritance diagram for hpp::core::DoubleInequality:
Collaboration diagram for hpp::core::DoubleInequality:

Public Member Functions

virtual bool operator() (vectorOut_t value, matrixOut_t jacobian) const
 Return the result of the comparison. More...
 
virtual bool operator() (vectorOut_t value) const
 Return the result of the comparison. More...
 
void threshold (const value_type &t)
 
- Public Member Functions inherited from hpp::core::ComparisonType
virtual bool constantRightHandSide () const
 Return whether the right hand side of the comparison is constant. More...
 

Static Public Member Functions

static ComparisonTypePtr_t create (const value_type width, const value_type &threshold=1e-3)
 
- Static Public Member Functions inherited from hpp::core::ComparisonType
static ComparisonTypePtr_t createDefault ()
 

Protected Member Functions

 DoubleInequality (const value_type width, const value_type &threshold)
 

Additional Inherited Members

- Public Types inherited from hpp::core::ComparisonType
enum  Type {
  Equality,
  EqualToZero,
  Superior,
  Inferior,
  DoubleInequality
}
 
typedef std::vector< TypeVectorOfTypes
 

Detailed Description

Implementation of double inequality.

\begin{eqnarray*} -f^0/2 \leq f (\mathbf{q}) \leq f^0/2 \in \mathbb{R}^m \end{eqnarray*}

$f^0$ is set at construction by parameter width of DoubleInequality::create.

Constructor & Destructor Documentation

◆ DoubleInequality()

hpp::core::DoubleInequality::DoubleInequality ( const value_type  width,
const value_type threshold 
)
protected

Member Function Documentation

◆ create()

static ComparisonTypePtr_t hpp::core::DoubleInequality::create ( const value_type  width,
const value_type threshold = 1e-3 
)
static

◆ operator()() [1/2]

virtual bool hpp::core::DoubleInequality::operator() ( vectorOut_t  value,
matrixOut_t  jacobian 
) const
virtual

Return the result of the comparison.

Parameters
[in,out]valuethe value that will be compared and saturated.
[in,out]jacobianthe jacobian to be saturated depending on the value.
Returns
true is the constraint is - at least partially - active

Implements hpp::core::ComparisonType.

◆ operator()() [2/2]

virtual bool hpp::core::DoubleInequality::operator() ( vectorOut_t  value) const
virtual

Return the result of the comparison.

Parameters
[in,out]valuethe value that will be compared and saturated.
Returns
true is the constraint is - at least partially - active

Implements hpp::core::ComparisonType.

◆ threshold()

void hpp::core::DoubleInequality::threshold ( const value_type t)