Drake
PolynomialCost Class Reference

Implements a cost of the form P(x, y...) where P is a multivariate polynomial in x, y, ... More...

#include <drake/solvers/cost.h>

Inheritance diagram for PolynomialCost:
Collaboration diagram for PolynomialCost:

Public Member Functions

 PolynomialCost (const VectorXPoly &polynomials, const std::vector< Polynomiald::VarType > &poly_vars)
 
const VectorXPolypolynomials () const
 
const std::vector< Polynomiald::VarType > & poly_vars () const
 
Does not allow copy, move, or assignment
 PolynomialCost (const PolynomialCost &)=delete
 
PolynomialCostoperator= (const PolynomialCost &)=delete
 
 PolynomialCost (PolynomialCost &&)=delete
 
PolynomialCostoperator= (PolynomialCost &&)=delete
 
- Public Member Functions inherited from CostShim< PolynomialConstraint >
 CostShim (Args &&...args)
 
 CostShim (const CostShim &)=delete
 
 CostShim (CostShim &&)=delete
 
CostShimoperator= (const CostShim &)=delete
 
CostShimoperator= (CostShim &&)=delete
 
- Public Member Functions inherited from Cost
 Cost (size_t num_vars)
 
 Cost (const Cost &)=delete
 
Costoperator= (const Cost &)=delete
 
 Cost (Cost &&)=delete
 
Costoperator= (Cost &&)=delete
 
- Public Member Functions inherited from EvaluatorBase
template<typename DerivedLB , typename DerivedUB >
 EvaluatorBase (size_t num_constraints, int num_vars, const Eigen::MatrixBase< DerivedLB > &lb, const Eigen::MatrixBase< DerivedUB > &ub)
 
template<typename DerivedLB , typename DerivedUB >
 EvaluatorBase (size_t num_constraints, int num_vars, const Eigen::MatrixBase< DerivedLB > &lb, const Eigen::MatrixBase< DerivedUB > &ub, const std::string &description)
 
virtual ~EvaluatorBase ()
 
void Eval (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::VectorXd &y) const
 
void Eval (const Eigen::Ref< const AutoDiffVecXd > &x, AutoDiffVecXd &y) const
 
bool CheckSatisfied (const Eigen::Ref< const Eigen::VectorXd > &x, const double tol=1E-6) const
 Return whether this constraint is satisfied by the given value, x. More...
 
bool CheckSatisfied (const Eigen::Ref< const AutoDiffVecXd > &x, const double tol=1E-6) const
 
Eigen::VectorXd const & lower_bound () const
 
Eigen::VectorXd const & upper_bound () const
 
size_t num_constraints () const
 
template<typename Derived >
void UpdateLowerBound (const Eigen::MatrixBase< Derived > &new_lb)
 
template<typename Derived >
void UpdateUpperBound (const Eigen::MatrixBase< Derived > &new_ub)
 
void set_description (const std::string &description)
 
const std::string & get_description () const
 
template<typename DerivedL , typename DerivedU >
void set_bounds (const Eigen::MatrixBase< DerivedL > &lower_bound, const Eigen::MatrixBase< DerivedU > &upper_bound)
 Set the upper and lower bounds of the constraint. More...
 
int num_vars () const
 Getter for the number of variables in the constraint, namely the number of rows in x, 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 CostShim< PolynomialConstraint >
const std::shared_ptr< PolynomialConstraint > & constraint () const
 
- Protected Member Functions inherited from CostShimBase
 CostShimBase (const std::shared_ptr< Constraint > &impl)
 
void DoEval (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::VectorXd &y) const override
 
void DoEval (const Eigen::Ref< const AutoDiffVecXd > &x, AutoDiffVecXd &y) const override
 
const std::shared_ptr< Constraint > & impl () const
 
- Protected Member Functions inherited from EvaluatorBase
virtual bool DoCheckSatisfied (const Eigen::Ref< const Eigen::VectorXd > &x, const double tol) const
 
virtual bool DoCheckSatisfied (const Eigen::Ref< const AutoDiffVecXd > &x, const double tol) const
 
 EvaluatorBase (size_t num_constraints, int num_vars)
 Constructs a constraint which has num_constraints rows, with input variables to Eval a num_vars x 1 vector. More...
 

Detailed Description

Implements a cost of the form P(x, y...) where P is a multivariate polynomial in x, y, ...

The Polynomial class uses a different variable naming scheme; thus the caller must provide a list of Polynomial::VarType variables that correspond to the members of the MathematicalProgram::Binding (the individual scalar elements of the given VariableList).

Constructor & Destructor Documentation

PolynomialCost ( const PolynomialCost )
delete
PolynomialCost ( PolynomialCost &&  )
delete
PolynomialCost ( const VectorXPoly polynomials,
const std::vector< Polynomiald::VarType > &  poly_vars 
)
inline

Member Function Documentation

PolynomialCost& operator= ( const PolynomialCost )
delete
PolynomialCost& operator= ( PolynomialCost &&  )
delete
const std::vector<Polynomiald::VarType>& poly_vars ( ) const
inline
const VectorXPoly& polynomials ( ) const
inline

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