Drake
LinearComplementarityConstraint Class Reference

Implements a constraint of the form: More...

#include <drake/solvers/Constraint.h>

Inheritance diagram for LinearComplementarityConstraint:
Collaboration diagram for LinearComplementarityConstraint:

Public Member Functions

template<typename DerivedM , typename Derivedq >
 LinearComplementarityConstraint (const Eigen::MatrixBase< DerivedM > &M, const Eigen::MatrixBase< Derivedq > &q)
 
 ~LinearComplementarityConstraint () override
 
void eval (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::VectorXd &y) const override
 Return Mx + q (the value of the slack variable). More...
 
void eval (const Eigen::Ref< const Drake::TaylorVecXd > &x, Drake::TaylorVecXd &y) const override
 
const Eigen::MatrixXd & M () const
 
const Eigen::VectorXd & q () const
 
- Public Member Functions inherited from Constraint
 Constraint (size_t num_constraints)
 
template<typename DerivedLB , typename DerivedUB >
 Constraint (size_t num_constraints, Eigen::MatrixBase< DerivedLB > const &lb, Eigen::MatrixBase< DerivedUB > const &ub)
 
virtual ~Constraint ()
 
Eigen::VectorXd const & lower_bound () const
 
Eigen::VectorXd const & upper_bound () const
 
size_t num_constraints () const
 

Additional Inherited Members

- Protected Attributes inherited from Constraint
Eigen::VectorXd lower_bound_
 
Eigen::VectorXd upper_bound_
 

Detailed Description

Implements a constraint of the form:

  Mx + q >= 0
  x >= 0
  x'(Mx + q) == 0

An implied slack variable complements any 0 component of x. To get the slack values at a given solution x, use eval(x).

Constructor & Destructor Documentation

LinearComplementarityConstraint ( const Eigen::MatrixBase< DerivedM > &  M,
const Eigen::MatrixBase< Derivedq > &  q 
)
inline
~LinearComplementarityConstraint ( )
inlineoverride

Member Function Documentation

void eval ( const Eigen::Ref< const Eigen::VectorXd > &  x,
Eigen::VectorXd &  y 
) const
inlineoverridevirtual

Return Mx + q (the value of the slack variable).

Implements Constraint.

Here is the call graph for this function:

void eval ( const Eigen::Ref< const Drake::TaylorVecXd > &  x,
Drake::TaylorVecXd y 
) const
inlineoverridevirtual

Implements Constraint.

Here is the call graph for this function:

const Eigen::MatrixXd& M ( ) const
inline
const Eigen::VectorXd& q ( ) const
inline

The documentation for this class was generated from the following file: