Drake
VisualizationCallback Class Reference

Defines a simple evaluator with no outputs that takes a callback function pointer. More...

#include <drake/solvers/evaluator_base.h>

Inheritance diagram for VisualizationCallback:
[legend]
Collaboration diagram for VisualizationCallback:
[legend]

Public Types

typedef std::function< void(const Eigen::Ref< const Eigen::VectorXd > &)> CallbackFunction
 

Public Member Functions

 VisualizationCallback (int num_inputs, const CallbackFunction &callback, const std::string &description="")
 
void EvalCallback (const Eigen::Ref< const Eigen::VectorXd > &x) const
 
Does not allow copy, move, or assignment
 VisualizationCallback (const VisualizationCallback &)=delete
 
VisualizationCallbackoperator= (const VisualizationCallback &)=delete
 
 VisualizationCallback (VisualizationCallback &&)=delete
 
VisualizationCallbackoperator= (VisualizationCallback &&)=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 Eval (const Eigen::Ref< const VectorX< symbolic::Variable >> &x, VectorX< symbolic::Expression > *y) const
 Evaluates the expression with a scalar type of symbolic::Expression. 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
 

Additional Inherited Members

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

Detailed Description

Defines a simple evaluator with no outputs that takes a callback function pointer.

This is intended for debugging / visualization of intermediate results during an optimization (for solvers that support it).

Member Typedef Documentation

typedef std::function<void(const Eigen::Ref<const Eigen::VectorXd>&)> CallbackFunction

Constructor & Destructor Documentation

VisualizationCallback ( int  num_inputs,
const CallbackFunction callback,
const std::string &  description = "" 
)
inline

Member Function Documentation

void EvalCallback ( const Eigen::Ref< const Eigen::VectorXd > &  x) const
inline

Here is the call graph for this function:

VisualizationCallback& operator= ( const VisualizationCallback )
delete
VisualizationCallback& operator= ( VisualizationCallback &&  )
delete

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