Drake
Drake C++ Documentation
polynomial.h File Reference
#include <algorithm>
#include <functional>
#include <map>
#include <ostream>
#include <unordered_map>
#include <utility>
#include <Eigen/Core>
#include "drake/common/drake_copyable.h"
#include "drake/common/fmt_ostream.h"
#include "drake/common/symbolic/expression.h"
#include "drake/common/symbolic/monomial.h"
Include dependency graph for polynomial.h:
This graph shows which files directly or indirectly include this file:

Classes

class  Polynomial
 Represents symbolic polynomials. More...
 
struct  Polynomial::SubstituteAndExpandCacheData
 An encapsulated data type for use with the method SubstituteAndExpand. More...
 
struct  hash< drake::symbolic::Polynomial >
 
struct  formatter< drake::symbolic::Polynomial >
 

Namespaces

 drake
 
 drake::symbolic
 
 fmt
 

Macros

#define DRAKE_COMMON_SYMBOLIC_POLYNOMIAL_H
 

Functions

Polynomial operator- (const Polynomial &p)
 Unary minus operation for polynomial. More...
 
Polynomial operator+ (Polynomial p1, const Polynomial &p2)
 
Polynomial operator+ (Polynomial p, const Monomial &m)
 
Polynomial operator+ (Polynomial p, double c)
 
Polynomial operator+ (const Monomial &m, Polynomial p)
 
Polynomial operator+ (const Monomial &m1, const Monomial &m2)
 
Polynomial operator+ (const Monomial &m, double c)
 
Polynomial operator+ (double c, Polynomial p)
 
Polynomial operator+ (double c, const Monomial &m)
 
Polynomial operator+ (Polynomial p, const Variable &v)
 
Polynomial operator+ (const Variable &v, Polynomial p)
 
Expression operator+ (const Expression &e, const Polynomial &p)
 
Expression operator+ (const Polynomial &p, const Expression &e)
 
Polynomial operator- (Polynomial p1, const Polynomial &p2)
 
Polynomial operator- (Polynomial p, const Monomial &m)
 
Polynomial operator- (Polynomial p, double c)
 
Polynomial operator- (const Monomial &m, Polynomial p)
 
Polynomial operator- (const Monomial &m1, const Monomial &m2)
 
Polynomial operator- (const Monomial &m, double c)
 
Polynomial operator- (double c, Polynomial p)
 
Polynomial operator- (double c, const Monomial &m)
 
Polynomial operator- (Polynomial p, const Variable &v)
 
Polynomial operator- (const Variable &v, const Polynomial &p)
 
Expression operator- (const Expression &e, const Polynomial &p)
 
Expression operator- (const Polynomial &p, const Expression &e)
 
Polynomial operator * (Polynomial p1, const Polynomial &p2)
 
Polynomial operator * (Polynomial p, const Monomial &m)
 
Polynomial operator * (Polynomial p, double c)
 
Polynomial operator * (const Monomial &m, Polynomial p)
 
Polynomial operator * (const Monomial &m, double c)
 
Polynomial operator * (double c, Polynomial p)
 
Polynomial operator * (double c, const Monomial &m)
 
Polynomial operator * (Polynomial p, const Variable &v)
 
Polynomial operator * (const Variable &v, Polynomial p)
 
Expression operator * (const Expression &e, const Polynomial &p)
 
Expression operator * (const Polynomial &p, const Expression &e)
 
Polynomial operator/ (Polynomial p, double v)
 Returns p / v. More...
 
Expression operator/ (double v, const Polynomial &p)
 
Expression operator/ (const Expression &e, const Polynomial &p)
 
Expression operator/ (const Polynomial &p, const Expression &e)
 
Polynomial pow (const Polynomial &p, int n)
 Returns polynomial p raised to n. More...
 
std::ostream & operator<< (std::ostream &os, const Polynomial &p)
 
template<typename MatrixL , typename MatrixR >
Eigen::Matrix< Polynomial, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > operator * (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following matrix operations: More...
 
template<typename Derived >
std::enable_if_t< std::is_same_v< typename Derived::Scalar, Polynomial >, MatrixLikewise< double, Derived > > Evaluate (const Eigen::MatrixBase< Derived > &m, const Environment &env)
 Evaluates a matrix m of symbolic polynomials using env. More...
 
MatrixX< Polynomial > Jacobian (const Eigen::Ref< const VectorX< Polynomial >> &f, const Eigen::Ref< const VectorX< Variable >> &vars)
 Computes the Jacobian matrix J of the vector function f with respect to vars. More...
 
template<typename Derived1 , typename Derived2 >
std::enable_if< is_eigen_vector_of< Derived1, symbolic::Monomial >::value &&(is_eigen_vector_of< Derived2, double >::value||is_eigen_vector_of< Derived2, symbolic::Variable >::value||is_eigen_vector_of< Derived2, symbolic::Expression >::value), symbolic::Polynomial >::type CalcPolynomialWLowerTriangularPart (const Eigen::MatrixBase< Derived1 > &monomial_basis, const Eigen::MatrixBase< Derived2 > &gram_lower)
 Returns the polynomial m(x)ᵀ * Q * m(x), where m(x) is the monomial basis, and Q is the Gram matrix. More...
 

Macro Definition Documentation

◆ DRAKE_COMMON_SYMBOLIC_POLYNOMIAL_H

#define DRAKE_COMMON_SYMBOLIC_POLYNOMIAL_H