Drake
FunctionEvaluator< F > Class Template Reference

An evaluator that may be specified using a callable object. More...

#include <drake/solvers/evaluator_base.h>

Inheritance diagram for FunctionEvaluator< F >:
[legend]
Collaboration diagram for FunctionEvaluator< F >:
[legend]

Public Member Functions

template<typename FF , typename... Args>
 FunctionEvaluator (FF &&f, Args &&...args)
 Constructs an instance by copying from an lvalue or rvalue of F. More...
 
Does not allow copy, move, or assignment
 FunctionEvaluator (const FunctionEvaluator &)=delete
 
FunctionEvaluatoroperator= (const FunctionEvaluator &)=delete
 
 FunctionEvaluator (FunctionEvaluator &&)=delete
 
FunctionEvaluatoroperator= (FunctionEvaluator &&)=delete
 
- Public Member Functions inherited from EvaluatorBase
virtual ~EvaluatorBase ()
 
void Eval (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::VectorXd &y) const
 Evaluates the expression with a scalar type of double. More...
 
void Eval (const Eigen::Ref< const AutoDiffVecXd > &x, AutoDiffVecXd &y) const
 Evaluates the expression with a scalar type of AutoDiffXd. More...
 
void set_description (const std::string &description)
 Set a human-friendly description for the evaluator. More...
 
const std::string & get_description () const
 Getter for a human-friendly description for the evaluator. More...
 
int num_vars () const
 Getter for the number of variables, namely the number of rows in x, as used in Eval(x, y). More...
 
int num_outputs () const
 Getter for the number of outputs, namely the number of rows in y, as used in Eval(x, y). More...
 
 EvaluatorBase (const EvaluatorBase &)=delete
 
EvaluatorBaseoperator= (const EvaluatorBase &)=delete
 
 EvaluatorBase (EvaluatorBase &&)=delete
 
EvaluatorBaseoperator= (EvaluatorBase &&)=delete
 

Related Functions

(Note that these are not member functions.)

template<typename FF >
std::shared_ptr< EvaluatorBaseMakeFunctionEvaluator (FF &&f)
 Creates a FunctionEvaluator instance bound to a given callable object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from EvaluatorBase
 EvaluatorBase (int num_outputs, int num_vars, const std::string &description="")
 Constructs a evaluator. More...
 

Detailed Description

template<typename F>
class drake::solvers::FunctionEvaluator< F >

An evaluator that may be specified using a callable object.

Consider constructing these instances using MakeFunctionEvaluator(...).

Template Parameters
FThe function / functor's type.
See also
detail::FunctionTraits.

Constructor & Destructor Documentation

FunctionEvaluator ( const FunctionEvaluator< F > &  )
delete
FunctionEvaluator ( FF &&  f,
Args &&...  args 
)
inline

Constructs an instance by copying from an lvalue or rvalue of F.

Template Parameters
FFPerfect-forwarding type of F (e.g., const F&, F&&).
Parameters
fThe callable object. If rvalue, this value will be std::move'd. Otherwise, it will be copied.
argsArguments to be forwarded to EvaluatorBase constructor.

Here is the call graph for this function:

Member Function Documentation

FunctionEvaluator& operator= ( const FunctionEvaluator< F > &  )
delete
FunctionEvaluator& operator= ( FunctionEvaluator< F > &&  )
delete

Friends And Related Function Documentation

std::shared_ptr< EvaluatorBase > MakeFunctionEvaluator ( FF &&  f)
related

Creates a FunctionEvaluator instance bound to a given callable object.

Template Parameters
FFPerfect-forwarding type of F (e.g., const F&, F&&).
Parameters
fCallable function object.
Returns
An implementation of EvaluatorBase using the callable object.
See also
detail::FunctionTraits.

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