All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
roboptim::Bind< U > Class Template Reference

Bind some function input to a constant value. More...

#include <roboptim/core/operator/bind.hh>

Inheritance diagram for roboptim::Bind< U >:

Public Types

typedef
detail::AutopromoteTrait< U >
::T_type 
parentType_t
 
typedef boost::shared_ptr< BindBindShPtr_t
 
typedef std::vector
< boost::optional< value_type > > 
boundValues_t
 

Public Member Functions

 ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (parentType_t)
 
 Bind (boost::shared_ptr< U > origin, const boundValues_t &selector)
 
 ~Bind ()
 
const boost::shared_ptr< U > & origin () const
 
boost::shared_ptr< U > & origin ()
 
void impl_compute (result_ref result, const_argument_ref x) const
 
void impl_gradient (gradient_ref gradient, const_argument_ref argument, size_type functionId=0) const
 
void impl_jacobian (jacobian_ref jacobian, const_argument_ref arg) const
 
virtual std::ostream & print (std::ostream &o) const
 Display the function on the specified output stream. More...
 

Detailed Description

template<typename U>
class roboptim::Bind< U >

Bind some function input to a constant value.

This allows to reduce any function input space by setting some inputs to particular values.

Template Parameters
Uinput function type.

Member Typedef Documentation

template<typename U>
typedef boost::shared_ptr<Bind> roboptim::Bind< U >::BindShPtr_t
template<typename U>
typedef std::vector<boost::optional<value_type> > roboptim::Bind< U >::boundValues_t
template<typename U>
typedef detail::AutopromoteTrait<U>::T_type roboptim::Bind< U >::parentType_t

Constructor & Destructor Documentation

template<typename U >
roboptim::Bind< U >::Bind ( boost::shared_ptr< U >  origin,
const boundValues_t selector 
)
explicit

References jacobian_.

template<typename U >
roboptim::Bind< U >::~Bind ( )

Member Function Documentation

template<typename U >
void roboptim::Bind< U >::impl_compute ( result_ref  result,
const_argument_ref  x 
) const

References x_.

template<typename U >
void roboptim::Bind< U >::impl_gradient ( gradient_ref  gradient,
const_argument_ref  argument,
size_type  functionId = 0 
) const

References x_.

template<typename U >
void roboptim::Bind< U >::impl_jacobian ( jacobian_ref  jacobian,
const_argument_ref  arg 
) const

References jacobian_, and x_.

template<typename U>
const boost::shared_ptr<U>& roboptim::Bind< U >::origin ( ) const
inline
template<typename U>
boost::shared_ptr<U>& roboptim::Bind< U >::origin ( )
inline
template<typename U >
std::ostream & roboptim::Bind< U >::print ( std::ostream &  o) const
virtual

Display the function on the specified output stream.

Parameters
ooutput stream used for display
Returns
output stream

References roboptim::decindent(), roboptim::iendl(), and roboptim::incindent().

template<typename U>
roboptim::Bind< U >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ ( parentType_t  )