dart
Public Member Functions | Protected Attributes | List of all members
dart::optimization::Function Class Referenceabstract
Inheritance diagram for dart::optimization::Function:
Inheritance graph
[legend]

Public Member Functions

 Function (const std::string &_name="function")
 Constructor.
 
virtual ~Function ()
 Destructor.
 
virtual void setName (const std::string &newName)
 Sets the name of this Function.
 
const std::string & getName () const
 Returns the name of this Function.
 
virtual double eval (const Eigen::VectorXd &x)=0
 Evaluates and returns the objective function at the point x.
 
virtual void evalGradient (const Eigen::VectorXd &_x, Eigen::Map< Eigen::VectorXd > _grad)
 Evaluates and returns the objective function at the point x.
 
void evalGradient (const Eigen::VectorXd &_x, Eigen::VectorXd &_grad)
 Evaluates and return the objective function at the point x. More...
 
virtual void evalHessian (const Eigen::VectorXd &_x, Eigen::Map< Eigen::VectorXd, Eigen::RowMajor > _Hess)
 Evaluates and return the objective function at the point x.
 

Protected Attributes

std::string mName
 Name of this function.
 

Member Function Documentation

◆ evalGradient()

void dart::optimization::Function::evalGradient ( const Eigen::VectorXd &  _x,
Eigen::VectorXd &  _grad 
)

Evaluates and return the objective function at the point x.

If you have a raw array that the gradient will be passed in, then use evalGradient(const Eigen::VectorXd&, Eigen::Map<Eigen::VectorXd>) for better performance.


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