Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
cost.h File Reference
#include <cstddef>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include <Eigen/SparseCore>
#include "drake/solvers/decision_variable.h"
#include "drake/solvers/evaluator_base.h"
#include "drake/solvers/sparse_and_dense_matrix.h"
Include dependency graph for cost.h:
This graph shows which files directly or indirectly include this file:

Classes

class  Cost
 Provides an abstract base for all costs. More...
class  LinearCost
 Implements a cost of the form. More...
class  QuadraticCost
 Implements a cost of the form. More...
class  L1NormCost
 Implements a cost of the form ‖Ax + b‖₁. More...
class  L2NormCost
 Implements a cost of the form ‖Ax + b‖₂. More...
class  LInfNormCost
 Implements a cost of the form ‖Ax + b‖∞. More...
class  PerspectiveQuadraticCost
 If \( z = Ax + b,\) implements a cost of the form: More...
class  EvaluatorCost< EvaluatorType >
 A cost that may be specified using another (potentially nonlinear) evaluator. More...
class  PolynomialCost
 Implements a cost of the form P(x, y...) where P is a multivariate polynomial in x, y, ... More...
class  ExpressionCost
 Impose a generic (potentially nonlinear) cost represented as a symbolic Expression. More...

Namespaces

namespace  drake
namespace  drake::solvers

Functions

std::shared_ptr< QuadraticCostMakeQuadraticErrorCost (const Eigen::Ref< const Eigen::MatrixXd > &Q, const Eigen::Ref< const Eigen::VectorXd > &x_desired)
 Creates a cost term of the form (x-x_desired)'Q(x-x_desired).
std::shared_ptr< QuadraticCostMake2NormSquaredCost (const Eigen::Ref< const Eigen::MatrixXd > &A, const Eigen::Ref< const Eigen::VectorXd > &b)
 Creates a quadratic cost of the form |Ax-b|²=(Ax-b)ᵀ(Ax-b)
template<typename FF>
std::shared_ptr< CostMakeFunctionCost (FF &&f)
 Converts an input of type F to a nonlinear cost.