Drake
Binding< C > Class Template Reference

A binding on constraint type C is a mapping of the decision variables onto the inputs of C. More...

#include <drake/solvers/binding.h>

Public Member Functions

 Binding (const std::shared_ptr< C > &c, const Eigen::Ref< const VectorXDecisionVariable > &v)
 
 Binding (const std::shared_ptr< C > &c, const VariableRefList &v)
 Concatenates each VectorDecisionVariable object in v into a single column vector, binds this column vector of decision variables with the constraint c. More...
 
template<typename U >
 Binding (const Binding< U > &b, typename std::enable_if< std::is_convertible< std::shared_ptr< U >, std::shared_ptr< C >>::value >::type *=nullptr)
 
const std::shared_ptr< C > & constraint () const
 
const VectorXDecisionVariablevariables () const
 
bool ContainsVariable (const symbolic::Variable &var) const
 Returns true iff the given var is included in this Binding. More...
 
size_t GetNumElements () const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 Binding (const Binding &)=default
 
Bindingoperator= (const Binding &)=default
 
 Binding (Binding &&)=default
 
Bindingoperator= (Binding &&)=default
 

Detailed Description

template<typename C>
class drake::solvers::Binding< C >

A binding on constraint type C is a mapping of the decision variables onto the inputs of C.

This allows the constraint to operate on a vector made up of different elements of the decision variables.

Constructor & Destructor Documentation

Binding ( const Binding< C > &  )
default
Binding ( Binding< C > &&  )
default
Binding ( const std::shared_ptr< C > &  c,
const Eigen::Ref< const VectorXDecisionVariable > &  v 
)
inline
Binding ( const std::shared_ptr< C > &  c,
const VariableRefList v 
)
inline

Concatenates each VectorDecisionVariable object in v into a single column vector, binds this column vector of decision variables with the constraint c.

Binding ( const Binding< U > &  b,
typename std::enable_if< std::is_convertible< std::shared_ptr< U >, std::shared_ptr< C >>::value >::type *  = nullptr 
)
inline

Member Function Documentation

const std::shared_ptr<C>& constraint ( ) const
inline

Here is the caller graph for this function:

bool ContainsVariable ( const symbolic::Variable var) const
inline

Returns true iff the given var is included in this Binding.

size_t GetNumElements ( ) const
inline

Here is the caller graph for this function:

Binding& operator= ( const Binding< C > &  )
default
Binding& operator= ( Binding< C > &&  )
default
const VectorXDecisionVariable& variables ( ) const
inline

Here is the caller graph for this function:


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