hpp::core::ComparisonTypes Class Reference

Implementation of various equation types. More...

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

Inheritance diagram for hpp::core::ComparisonTypes:
Collaboration diagram for hpp::core::ComparisonTypes:

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...
 
- 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 ComparisonTypesPtr_t create (size_t dim)
 Create a vector of comparisons. More...
 
static ComparisonTypesPtr_t create (const std::vector< ComparisonType::Type > types)
 Create a vector of comparisons. More...
 
- Static Public Member Functions inherited from hpp::core::ComparisonType
static ComparisonTypePtr_t createDefault ()
 

Protected Member Functions

 ComparisonTypes (const std::vector< ComparisonType::Type > types)
 

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 various equation types.

This class enable users to define different types of comparison for each component of the function. Comparator for each component is defined by input parameter of ComparisonTypes::create.

Note
DoubleInequality cannot be used by this class.

Constructor & Destructor Documentation

◆ ComparisonTypes()

hpp::core::ComparisonTypes::ComparisonTypes ( const std::vector< ComparisonType::Type types)
protected

Member Function Documentation

◆ create() [1/2]

static ComparisonTypesPtr_t hpp::core::ComparisonTypes::create ( size_t  dim)
static

Create a vector of comparisons.

Parameters
dimsize of the function output

Referenced by hpp::core::ProblemSolver::comparisonType().

◆ create() [2/2]

static ComparisonTypesPtr_t hpp::core::ComparisonTypes::create ( const std::vector< ComparisonType::Type types)
static

Create a vector of comparisons.

Parameters
typesvector of comparisons

◆ operator()() [1/2]

virtual bool hpp::core::ComparisonTypes::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::ComparisonTypes::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.