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

Multiply by a constant scalar value. More...

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

Inheritance diagram for roboptim::Scalar< U >:

Public Types

typedef
detail::AutopromoteTrait< U >
::T_type 
parentType_t
 
typedef parentType_t::traits_t traits_t
 
typedef boost::shared_ptr< ScalarScalarShPtr_t
 

Public Member Functions

 ROBOPTIM_TWICE_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericTwiceDifferentiableFunction< traits_t >)
 
 Scalar (boost::shared_ptr< U > fct, value_type scalar)
 Create a scalar operator. More...
 
 ~Scalar ()
 
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
 
void impl_hessian (hessian_ref hessian, const_argument_ref x, size_type functionId=0) 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::Scalar< U >

Multiply by a constant scalar value.

Template Parameters
Uinput function type.

Member Typedef Documentation

template<typename U >
typedef detail::AutopromoteTrait<U>::T_type roboptim::Scalar< U >::parentType_t
template<typename U >
typedef boost::shared_ptr<Scalar> roboptim::Scalar< U >::ScalarShPtr_t
template<typename U >
typedef parentType_t::traits_t roboptim::Scalar< U >::traits_t

Constructor & Destructor Documentation

template<typename U >
roboptim::Scalar< U >::Scalar ( boost::shared_ptr< U >  fct,
value_type  scalar 
)
explicit

Create a scalar operator.

Parameters
fctinput function.
scalarscalar value.
template<typename U >
roboptim::Scalar< U >::~Scalar ( )

Member Function Documentation

template<typename U >
void roboptim::Scalar< U >::impl_compute ( result_ref  result,
const_argument_ref  x 
) const
template<typename U >
void roboptim::Scalar< U >::impl_gradient ( gradient_ref  gradient,
const_argument_ref  argument,
size_type  functionId = 0 
) const
template<typename U >
void roboptim::Scalar< U >::impl_hessian ( hessian_ref  hessian,
const_argument_ref  x,
size_type  functionId = 0 
) const
template<typename U >
void roboptim::Scalar< U >::impl_jacobian ( jacobian_ref  jacobian,
const_argument_ref  arg 
) const
template<typename U >
const boost::shared_ptr<U>& roboptim::Scalar< U >::origin ( ) const
inline
template<typename U >
boost::shared_ptr<U>& roboptim::Scalar< U >::origin ( )
inline
template<typename U >
std::ostream & roboptim::Scalar< 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::Scalar< U >::ROBOPTIM_TWICE_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ ( GenericTwiceDifferentiableFunction< traits_t )