Drake
drake::symbolic Namespace Reference

Namespaces

 detail
 
 internal
 
 test
 

Classes

class  BinaryExpressionCell
 Represents the base class for binary expressions. More...
 
class  CodeGenVisitor
 Visitor class for code generation. More...
 
class  Environment
 Represents a symbolic environment (mapping from a variable to a value). More...
 
class  Expression
 Represents a symbolic form of an expression. More...
 
class  ExpressionAbs
 Symbolic expression representing absolute value function. More...
 
class  ExpressionAcos
 Symbolic expression representing arccosine function. More...
 
class  ExpressionAdd
 Symbolic expression representing an addition which is a sum of products. More...
 
class  ExpressionAddFactory
 Factory class to help build ExpressionAdd expressions. More...
 
class  ExpressionAsin
 Symbolic expression representing arcsine function. More...
 
class  ExpressionAtan
 Symbolic expression representing arctangent function. More...
 
class  ExpressionAtan2
 Symbolic expression representing atan2 function (arctangent function with two arguments). More...
 
class  ExpressionCeiling
 Symbolic expression representing ceil function. More...
 
class  ExpressionCell
 Represents an abstract class which is the base of concrete symbolic-expression classes. More...
 
class  ExpressionConstant
 Symbolic expression representing a constant. More...
 
class  ExpressionCos
 Symbolic expression representing cosine function. More...
 
class  ExpressionCosh
 Symbolic expression representing hyperbolic cosine function. More...
 
class  ExpressionDiv
 Symbolic expression representing division. More...
 
class  ExpressionExp
 Symbolic expression representing exponentiation using the base of natural logarithms. More...
 
class  ExpressionFloor
 Symbolic expression representing floor function. More...
 
class  ExpressionIfThenElse
 Symbolic expression representing if-then-else expression. More...
 
class  ExpressionLog
 Symbolic expression representing logarithms. More...
 
class  ExpressionMax
 Symbolic expression representing max function. More...
 
class  ExpressionMin
 Symbolic expression representing min function. More...
 
class  ExpressionMul
 Symbolic expression representing a multiplication of powers. More...
 
class  ExpressionMulFactory
 Factory class to help build ExpressionMul expressions. More...
 
class  ExpressionNaN
 Symbolic expression representing NaN (not-a-number). More...
 
class  ExpressionPow
 Symbolic expression representing power function. More...
 
class  ExpressionSin
 Symbolic expression representing sine function. More...
 
class  ExpressionSinh
 Symbolic expression representing hyperbolic sine function. More...
 
class  ExpressionSqrt
 Symbolic expression representing square-root. More...
 
class  ExpressionTan
 Symbolic expression representing tangent function. More...
 
class  ExpressionTanh
 Symbolic expression representing hyperbolic tangent function. More...
 
class  ExpressionUninterpretedFunction
 Symbolic expression representing an uninterpreted function. More...
 
class  ExpressionVar
 Symbolic expression representing a variable. More...
 
class  Formula
 Represents a symbolic form of a first-order logic formula. More...
 
class  FormulaAnd
 Symbolic formula representing conjunctions (f1 ∧ ... More...
 
class  FormulaCell
 Represents an abstract class which is the base of concrete symbolic-formula classes (i.e. More...
 
class  FormulaEq
 Symbolic formula representing equality (e1 = e2). More...
 
class  FormulaFalse
 Symbolic formula representing false. More...
 
class  FormulaForall
 Symbolic formula representing universal quantifications (∀ x₁, ..., * xn. More...
 
class  FormulaGeq
 Symbolic formula representing 'greater-than-or-equal-to' (e1 ≥ e2). More...
 
class  FormulaGt
 Symbolic formula representing 'greater-than' (e1 > e2). More...
 
class  FormulaIsnan
 Symbolic formula representing isnan predicate. More...
 
class  FormulaLeq
 Symbolic formula representing 'less-than-or-equal-to' (e1 ≤ e2). More...
 
class  FormulaLt
 Symbolic formula representing 'less-than' (e1 < e2). More...
 
class  FormulaNeq
 Symbolic formula representing disequality (e1 ≠ e2). More...
 
class  FormulaNot
 Symbolic formula representing negations (¬f). More...
 
class  FormulaOr
 Symbolic formula representing disjunctions (f1 ∨ ... More...
 
class  FormulaPositiveSemidefinite
 Symbolic formula representing positive-semidefinite (PSD) constraint. More...
 
class  FormulaTrue
 Symbolic formula representing true. More...
 
class  FormulaVar
 Symbolic formula representing a Boolean variable. More...
 
struct  GradedReverseLexOrder
 Implements Graded reverse lexicographic order. More...
 
class  Monomial
 Represents a monomial, a product of powers of variables with non-negative integer exponents. More...
 
class  NaryFormulaCell
 Represents the base class for N-ary logic operators (∧ and ∨). More...
 
class  Polynomial
 Represents symbolic polynomials. More...
 
class  RationalFunction
 Represents symbolic rational function. More...
 
class  RelationalFormulaCell
 Represents the base class for relational operators (==, !=, <, <=, >, >=). More...
 
class  RewritingRule
 A RewritingRule, lhs => rhs, consists of two Patterns lhs and rhs. More...
 
class  UnaryExpressionCell
 Represents the base class for unary expressions. More...
 
class  Variable
 Represents a symbolic variable. More...
 
class  Variables
 Represents a set of variables. More...
 

Typedefs

using Substitution = std::unordered_map< Variable, Expression >
 
using Pattern = Expression
 A pattern is an expression which possibly includes variables which represent placeholders. More...
 
using Rewriter = std::function< Expression(const Expression &)>
 A Rewriter is a function from an Expression to an Expression. More...
 

Enumerations

enum  ExpressionKind {
  Constant, Var, Add, Mul,
  Div, Log, Abs, Exp,
  Sqrt, Pow, Sin, Cos,
  Tan, Asin, Acos, Atan,
  Atan2, Sinh, Cosh, Tanh,
  Min, Max, Ceil, Floor,
  IfThenElse, NaN, UninterpretedFunction
}
 Kinds of symbolic expressions. More...
 
enum  FormulaKind {
  False, True, Var, Eq,
  Neq, Gt, Geq, Lt,
  Leq, And, Or, Not,
  Forall, Isnan, PositiveSemidefinite
}
 Kinds of symbolic formulas. More...
 

Functions

void DecomposeLinearExpressions (const Eigen::Ref< const VectorX< Expression >> &expressions, const Eigen::Ref< const VectorX< symbolic::Variable >> &vars, EigenPtr< Eigen::MatrixXd > M)
 
void DecomposeAffineExpressions (const Eigen::Ref< const VectorX< Expression >> &expressions, const Eigen::Ref< const VectorX< symbolic::Variable >> &vars, EigenPtr< Eigen::MatrixXd > M, EigenPtr< Eigen::VectorXd > v)
 
void DecomposeLinearExpressions (const Eigen::Ref< const VectorX< Expression >> &expressions, const Eigen::Ref< const VectorX< Variable >> &vars, EigenPtr< Eigen::MatrixXd > M)
 Decomposes expressions into M * vars. More...
 
void DecomposeAffineExpressions (const Eigen::Ref< const VectorX< Expression >> &expressions, const Eigen::Ref< const VectorX< Variable >> &vars, EigenPtr< Eigen::MatrixXd > M, EigenPtr< Eigen::VectorXd > v)
 Decomposes expressions into M * vars + v. More...
 
ostream & operator<< (ostream &os, const Environment &env)
 
bool operator< (ExpressionKind k1, ExpressionKind k2)
 Total ordering between ExpressionKinds. More...
 
Expression operator+ (Expression lhs, const Expression &rhs)
 
Expressionoperator+= (Expression &lhs, const Expression &rhs)
 
Expression operator+ (const Expression &e)
 
Expression operator- (Expression lhs, const Expression &rhs)
 
Expressionoperator-= (Expression &lhs, const Expression &rhs)
 
Expression operator- (const Expression &e)
 
Expression operator* (Expression lhs, const Expression &rhs)
 
Expressionoperator*= (Expression &lhs, const Expression &rhs)
 
Expression operator/ (Expression lhs, const Expression &rhs)
 
Expressionoperator/= (Expression &lhs, const Expression &rhs)
 
ostream & operator<< (ostream &os, const Expression &e)
 
string CodeGen (const std::string &function_name, const std::vector< Variable > &parameters, const Expression &e)
 For a given symbolic expression e, generates two C functions, function_name and function_name_in. More...
 
Expression log (const Expression &e)
 
Expression abs (const Expression &e)
 
Expression exp (const Expression &e)
 
Expression sqrt (const Expression &e)
 
Expression pow (const Expression &e1, const Expression &e2)
 
Expression sin (const Expression &e)
 
Expression cos (const Expression &e)
 
Expression tan (const Expression &e)
 
Expression asin (const Expression &e)
 
Expression acos (const Expression &e)
 
Expression atan (const Expression &e)
 
Expression atan2 (const Expression &e1, const Expression &e2)
 
Expression sinh (const Expression &e)
 
Expression cosh (const Expression &e)
 
Expression tanh (const Expression &e)
 
Expression min (const Expression &e1, const Expression &e2)
 
Expression max (const Expression &e1, const Expression &e2)
 
Expression ceil (const Expression &e)
 
Expression floor (const Expression &e)
 
Expression if_then_else (const Formula &f_cond, const Expression &e_then, const Expression &e_else)
 
Expression uninterpreted_function (std::string name, std::vector< Expression > arguments)
 Constructs an uninterpreted-function expression with name and arguments. More...
 
bool is_constant (const Expression &e)
 Checks if e is a constant expression. More...
 
bool is_constant (const Expression &e, double v)
 Checks if e is a constant expression representing v. More...
 
bool is_zero (const Expression &e)
 Checks if e is 0.0. More...
 
bool is_one (const Expression &e)
 Checks if e is 1.0. More...
 
bool is_neg_one (const Expression &e)
 Checks if e is -1.0. More...
 
bool is_two (const Expression &e)
 Checks if e is 2.0. More...
 
bool is_nan (const Expression &e)
 Checks if e is NaN. More...
 
bool is_variable (const Expression &e)
 Checks if e is a variable expression. More...
 
bool is_addition (const Expression &e)
 Checks if e is an addition expression. More...
 
bool is_multiplication (const Expression &e)
 Checks if e is a multiplication expression. More...
 
bool is_division (const Expression &e)
 Checks if e is a division expression. More...
 
bool is_log (const Expression &e)
 Checks if e is a log expression. More...
 
bool is_abs (const Expression &e)
 Checks if e is an abs expression. More...
 
bool is_exp (const Expression &e)
 Checks if e is an exp expression. More...
 
bool is_sqrt (const Expression &e)
 Checks if e is a square-root expression. More...
 
bool is_pow (const Expression &e)
 Checks if e is a power-function expression. More...
 
bool is_sin (const Expression &e)
 Checks if e is a sine expression. More...
 
bool is_cos (const Expression &e)
 Checks if e is a cosine expression. More...
 
bool is_tan (const Expression &e)
 Checks if e is a tangent expression. More...
 
bool is_asin (const Expression &e)
 Checks if e is an arcsine expression. More...
 
bool is_acos (const Expression &e)
 Checks if e is an arccosine expression. More...
 
bool is_atan (const Expression &e)
 Checks if e is an arctangent expression. More...
 
bool is_atan2 (const Expression &e)
 Checks if e is an arctangent2 expression. More...
 
bool is_sinh (const Expression &e)
 Checks if e is a hyperbolic-sine expression. More...
 
bool is_cosh (const Expression &e)
 Checks if e is a hyperbolic-cosine expression. More...
 
bool is_tanh (const Expression &e)
 Checks if e is a hyperbolic-tangent expression. More...
 
bool is_min (const Expression &e)
 Checks if e is a min expression. More...
 
bool is_max (const Expression &e)
 Checks if e is a max expression. More...
 
bool is_ceil (const Expression &e)
 Checks if e is a ceil expression. More...
 
bool is_floor (const Expression &e)
 Checks if e is a floor expression. More...
 
bool is_if_then_else (const Expression &e)
 Checks if e is an if-then-else expression. More...
 
bool is_uninterpreted_function (const Expression &e)
 Checks if e is an uninterpreted-function expression. More...
 
double get_constant_value (const Expression &e)
 Returns the constant value of the constant expression e. More...
 
const Variableget_variable (const Expression &e)
 Returns the embedded variable in the variable expression e. More...
 
const Expressionget_argument (const Expression &e)
 Returns the argument in the unary expression e. More...
 
const Expressionget_first_argument (const Expression &e)
 Returns the first argument of the binary expression e. More...
 
const Expressionget_second_argument (const Expression &e)
 Returns the second argument of the binary expression e. More...
 
double get_constant_in_addition (const Expression &e)
 Returns the constant part of the addition expression e. More...
 
const map< Expression, double > & get_expr_to_coeff_map_in_addition (const Expression &e)
 Returns the map from an expression to its coefficient in the addition expression e. More...
 
double get_constant_in_multiplication (const Expression &e)
 Returns the constant part of the multiplication expression e. More...
 
const map< Expression, Expression > & get_base_to_exponent_map_in_multiplication (const Expression &e)
 Returns the map from a base expression to its exponent expression in the multiplication expression e. More...
 
const string & get_uninterpreted_function_name (const Expression &e)
 Returns the name of an uninterpreted-function expression e. More...
 
const vector< Expression > & get_uninterpreted_function_arguments (const Expression &e)
 Returns the arguments of an uninterpreted-function expression e. More...
 
const Formulaget_conditional_formula (const Expression &e)
 Returns the conditional formula in the if-then-else expression e. More...
 
const Expressionget_then_expression (const Expression &e)
 Returns the 'then' expression in the if-then-else expression e. More...
 
const Expressionget_else_expression (const Expression &e)
 Returns the 'else' expression in the if-then-else expression e. More...
 
Expression operator+ (const Variable &var)
 
Expression operator- (const Variable &var)
 
VectorX< VariableGetVariableVector (const Eigen::Ref< const VectorX< Expression >> &evec)
 Constructs a vector of variables from the vector of variable expressions. More...
 
MatrixX< ExpressionJacobian (const Eigen::Ref< const VectorX< Expression >> &f, const std::vector< Variable > &vars)
 Computes the Jacobian matrix J of the vector function f with respect to vars. More...
 
MatrixX< ExpressionJacobian (const Eigen::Ref< const VectorX< Expression >> &f, const Eigen::Ref< const VectorX< Variable >> &vars)
 Computes the Jacobian matrix J of the vector function f with respect to vars. More...
 
Expression TaylorExpand (const Expression &f, const Environment &a, int order)
 Returns the Taylor series expansion of f around a of order order. More...
 
Variables GetDistinctVariables (const Eigen::Ref< const MatrixX< Expression >> &v)
 Returns the distinct variables in the matrix of expressions. More...
 
void swap (Expression &a, Expression &b)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, Expression >::value &&std::is_same< typename MatrixR::Scalar, double >::value, Eigen::Matrix< Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following seven operations: More...
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, Expression >::value, Eigen::Matrix< Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following seven operations: More...
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, Expression >::value &&std::is_same< typename MatrixR::Scalar, Variable >::value, Eigen::Matrix< Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following seven operations: More...
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, Variable >::value &&std::is_same< typename MatrixR::Scalar, Expression >::value, Eigen::Matrix< Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following seven operations: More...
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, Variable >::value &&std::is_same< typename MatrixR::Scalar, double >::value, Eigen::Matrix< Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following seven operations: More...
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, Variable >::value, Eigen::Matrix< Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following seven operations: More...
 
template<int Dim, int LhsMode, int RhsMode, int LhsOptions, int RhsOptions>
auto operator* (const Eigen::Transform< Expression, Dim, LhsMode, LhsOptions > &t1, const Eigen::Transform< double, Dim, RhsMode, RhsOptions > &t2)
 Transform<double> * Transform<Expression> => Transform<Expression> More...
 
template<int Dim, int LhsMode, int RhsMode, int LhsOptions, int RhsOptions>
auto operator* (const Eigen::Transform< double, Dim, LhsMode, LhsOptions > &t1, const Eigen::Transform< Expression, Dim, RhsMode, RhsOptions > &t2)
 Transform<Expression> * Transform<double> => Transform<Expression> More...
 
template<typename Derived >
auto Evaluate (const Eigen::MatrixBase< Derived > &m, const Environment &env)
 Evaluates a symbolic matrix m using the env by evaluating each element. More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_base_of< Eigen::MatrixBase< DerivedA >, DerivedA >::value &&std::is_base_of< Eigen::MatrixBase< DerivedB >, DerivedB >::value &&std::is_same< typename DerivedA::Scalar, Expression >::value &&std::is_same< typename DerivedB::Scalar, Expression >::value, bool >::type CheckStructuralEquality (const DerivedA &m1, const DerivedB &m2)
 Checks if two Eigen::Matrix<Expression> m1 and m2 are structurally equal. More...
 
bool is_integer (const double v)
 
bool is_positive_integer (const double v)
 
bool is_non_negative_integer (const double v)
 
Expression DifferentiatePow (const Expression &f, const Expression &g, const Variable &x)
 
bool is_constant (const ExpressionCell &c)
 Checks if c is a constant expression. More...
 
bool is_variable (const ExpressionCell &c)
 Checks if c is a variable expression. More...
 
bool is_addition (const ExpressionCell &c)
 Checks if c is an addition expression. More...
 
bool is_multiplication (const ExpressionCell &c)
 Checks if c is an multiplication expression. More...
 
bool is_division (const ExpressionCell &c)
 Checks if c is a division expression. More...
 
bool is_log (const ExpressionCell &c)
 Checks if c is a log expression. More...
 
bool is_abs (const ExpressionCell &c)
 Checks if c is an absolute-value-function expression. More...
 
bool is_exp (const ExpressionCell &c)
 Checks if c is an exp expression. More...
 
bool is_sqrt (const ExpressionCell &c)
 Checks if c is a square-root expression. More...
 
bool is_pow (const ExpressionCell &c)
 Checks if c is a power-function expression. More...
 
bool is_sin (const ExpressionCell &c)
 Checks if c is a sine expression. More...
 
bool is_cos (const ExpressionCell &c)
 Checks if c is a cosine expression. More...
 
bool is_tan (const ExpressionCell &c)
 Checks if c is a tangent expression. More...
 
bool is_asin (const ExpressionCell &c)
 Checks if c is an arcsine expression. More...
 
bool is_acos (const ExpressionCell &c)
 Checks if c is an arccosine expression. More...
 
bool is_atan (const ExpressionCell &c)
 Checks if c is an arctangent expression. More...
 
bool is_atan2 (const ExpressionCell &c)
 Checks if c is a arctangent2 expression. More...
 
bool is_sinh (const ExpressionCell &c)
 Checks if c is a hyperbolic-sine expression. More...
 
bool is_cosh (const ExpressionCell &c)
 Checks if c is a hyperbolic-cosine expression. More...
 
bool is_tanh (const ExpressionCell &c)
 Checks if c is a hyperbolic-tangent expression. More...
 
bool is_min (const ExpressionCell &c)
 Checks if c is a min expression. More...
 
bool is_max (const ExpressionCell &c)
 Checks if c is a max expression. More...
 
bool is_ceil (const ExpressionCell &c)
 Checks if c is a ceil expression. More...
 
bool is_floor (const ExpressionCell &c)
 Checks if c is a floor expression. More...
 
bool is_if_then_else (const ExpressionCell &c)
 Checks if c is an if-then-else expression. More...
 
bool is_uninterpreted_function (const ExpressionCell &c)
 Checks if c is an uninterpreted-function expression. More...
 
shared_ptr< const ExpressionConstantto_constant (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionConstantto_constant (const Expression &e)
 Casts e to shared_ptr<const ExpressionConstant>. More...
 
shared_ptr< const ExpressionVarto_variable (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionVarto_variable (const Expression &e)
 Casts e to shared_ptr<const ExpressionVar>. More...
 
shared_ptr< const UnaryExpressionCellto_unary (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const UnaryExpressionCellto_unary (const Expression &e)
 Casts e to shared_ptr<const UnaryExpressionCell>. More...
 
shared_ptr< const BinaryExpressionCellto_binary (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const BinaryExpressionCellto_binary (const Expression &e)
 Casts e to shared_ptr<const BinaryExpressionCell>. More...
 
shared_ptr< const ExpressionAddto_addition (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionAddto_addition (const Expression &e)
 Casts e to shared_ptr<const ExpressionAdd>. More...
 
shared_ptr< const ExpressionMulto_multiplication (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionMulto_multiplication (const Expression &e)
 Casts e to shared_ptr<const ExpressionMul>. More...
 
shared_ptr< const ExpressionDivto_division (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionDivto_division (const Expression &e)
 Casts e to shared_ptr<const ExpressionDiv>. More...
 
shared_ptr< const ExpressionLogto_log (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionLogto_log (const Expression &e)
 Casts e to shared_ptr<const ExpressionLog>. More...
 
shared_ptr< const ExpressionAbsto_abs (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionAbsto_abs (const Expression &e)
 Casts e to shared_ptr<const ExpressionAbs>. More...
 
shared_ptr< const ExpressionExpto_exp (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionExpto_exp (const Expression &e)
 Casts e to shared_ptr<const ExpressionExp>. More...
 
shared_ptr< const ExpressionSqrtto_sqrt (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionSqrtto_sqrt (const Expression &e)
 Casts e to shared_ptr<const ExpressionSqrt>. More...
 
shared_ptr< const ExpressionPowto_pow (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionPowto_pow (const Expression &e)
 Casts e to shared_ptr<const ExpressionPow>. More...
 
shared_ptr< const ExpressionSinto_sin (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionSinto_sin (const Expression &e)
 Casts e to shared_ptr<const ExpressionSin>. More...
 
shared_ptr< const ExpressionCosto_cos (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionCosto_cos (const Expression &e)
 Casts e to shared_ptr<const ExpressionCos>. More...
 
shared_ptr< const ExpressionTanto_tan (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionTanto_tan (const Expression &e)
 Casts e to shared_ptr<const ExpressionTan>. More...
 
shared_ptr< const ExpressionAsinto_asin (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionAsinto_asin (const Expression &e)
 Casts e to shared_ptr<const ExpressionAsin>. More...
 
shared_ptr< const ExpressionAcosto_acos (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionAcosto_acos (const Expression &e)
 Casts e to shared_ptr<const ExpressionAcos>. More...
 
shared_ptr< const ExpressionAtanto_atan (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionAtanto_atan (const Expression &e)
 Casts e to shared_ptr<const ExpressionAtan>. More...
 
shared_ptr< const ExpressionAtan2to_atan2 (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionAtan2to_atan2 (const Expression &e)
 Casts e to shared_ptr<const ExpressionAtan2>. More...
 
shared_ptr< const ExpressionSinhto_sinh (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionSinhto_sinh (const Expression &e)
 Casts e to shared_ptr<const ExpressionSinh>. More...
 
shared_ptr< const ExpressionCoshto_cosh (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionCoshto_cosh (const Expression &e)
 Casts e to shared_ptr<const ExpressionCosh>. More...
 
shared_ptr< const ExpressionTanhto_tanh (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionTanhto_tanh (const Expression &e)
 Casts e to shared_ptr<const ExpressionTanh>. More...
 
shared_ptr< const ExpressionMinto_min (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionMinto_min (const Expression &e)
 Casts e to shared_ptr<const ExpressionMin>. More...
 
shared_ptr< const ExpressionMaxto_max (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionMaxto_max (const Expression &e)
 Casts e to shared_ptr<const ExpressionMax>. More...
 
shared_ptr< const ExpressionCeilingto_ceil (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionCeilingto_ceil (const Expression &e)
 Casts e to shared_ptr<const ExpressionCeiling>. More...
 
shared_ptr< const ExpressionFloorto_floor (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionFloorto_floor (const Expression &e)
 Casts e to shared_ptr<const ExpressionFloor>. More...
 
shared_ptr< const ExpressionIfThenElseto_if_then_else (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionIfThenElseto_if_then_else (const Expression &e)
 Casts e to shared_ptr<const ExpressionIfThenElse>. More...
 
shared_ptr< const ExpressionUninterpretedFunctionto_uninterpreted_function (const shared_ptr< const ExpressionCell > &expr_ptr)
 
shared_ptr< const ExpressionUninterpretedFunctionto_uninterpreted_function (const Expression &e)
 Casts e to shared_ptr<const ExpressionUninterpretedFunction>. More...
 
std::shared_ptr< const ExpressionConstantto_constant (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionConstant>. More...
 
std::shared_ptr< const ExpressionVarto_variable (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionVar>. More...
 
std::shared_ptr< const UnaryExpressionCellto_unary (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const UnaryExpressionCell>. More...
 
std::shared_ptr< const BinaryExpressionCellto_binary (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const BinaryExpressionCell>. More...
 
std::shared_ptr< const ExpressionAddto_addition (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionAdd>. More...
 
std::shared_ptr< const ExpressionMulto_multiplication (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionMul>. More...
 
std::shared_ptr< const ExpressionDivto_division (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionDiv>. More...
 
std::shared_ptr< const ExpressionLogto_log (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionLog>. More...
 
std::shared_ptr< const ExpressionExpto_exp (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionExp>. More...
 
std::shared_ptr< const ExpressionAbsto_abs (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionAbs>. More...
 
std::shared_ptr< const ExpressionSqrtto_sqrt (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionSqrt>. More...
 
std::shared_ptr< const ExpressionPowto_pow (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionPow>. More...
 
std::shared_ptr< const ExpressionSinto_sin (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionSin>. More...
 
std::shared_ptr< const ExpressionCosto_cos (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionCos>. More...
 
std::shared_ptr< const ExpressionTanto_tan (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionTan>. More...
 
std::shared_ptr< const ExpressionAsinto_asin (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionAsin>. More...
 
std::shared_ptr< const ExpressionAcosto_acos (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionAcos>. More...
 
std::shared_ptr< const ExpressionAtanto_atan (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionAtan>. More...
 
std::shared_ptr< const ExpressionAtan2to_atan2 (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionAtan2>. More...
 
std::shared_ptr< const ExpressionSinhto_sinh (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionSinh>. More...
 
std::shared_ptr< const ExpressionCoshto_cosh (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionCosh>. More...
 
std::shared_ptr< const ExpressionTanhto_tanh (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionTanh>. More...
 
std::shared_ptr< const ExpressionMinto_min (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionMin>. More...
 
std::shared_ptr< const ExpressionMaxto_max (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionMax>. More...
 
std::shared_ptr< const ExpressionCeilingto_ceil (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionCeiling>. More...
 
std::shared_ptr< const ExpressionFloorto_floor (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionFloor>. More...
 
std::shared_ptr< const ExpressionIfThenElseto_if_then_else (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionIfThenElse>. More...
 
std::shared_ptr< const ExpressionUninterpretedFunctionto_uninterpreted_function (const std::shared_ptr< const ExpressionCell > &expr_ptr)
 Casts expr_ptr to shared_ptr<const ExpressionUninterpretedFunction>. More...
 
template<typename Result , typename Visitor , typename... Args>
Result VisitPolynomial (Visitor *v, const Expression &e, Args &&... args)
 Calls visitor object v with a polynomial symbolic-expression e, and arguments args. More...
 
template<typename Result , typename Visitor , typename... Args>
Result VisitExpression (Visitor *v, const Expression &e, Args &&... args)
 Calls visitor object v with a symbolic-expression e, and arguments args. More...
 
bool operator< (FormulaKind k1, FormulaKind k2)
 
Formula forall (const Variables &vars, const Formula &f)
 Returns a formula f, universally quantified by variables vars. More...
 
Formula make_conjunction (const std::set< Formula > &formulas)
 Returns a conjunction of formulas. More...
 
Formula operator && (const Formula &f1, const Formula &f2)
 
Formula operator && (const Variable &v, const Formula &f)
 
Formula operator && (const Formula &f, const Variable &v)
 
Formula operator && (const Variable &v1, const Variable &v2)
 
Formula make_disjunction (const std::set< Formula > &formulas)
 Returns a disjunction of formulas. More...
 
Formula operator|| (const Formula &f1, const Formula &f2)
 
Formula operator|| (const Variable &v, const Formula &f)
 
Formula operator|| (const Formula &f, const Variable &v)
 
Formula operator|| (const Variable &v1, const Variable &v2)
 
Formula operator! (const Formula &f)
 
Formula operator! (const Variable &v)
 
ostream & operator<< (ostream &os, const Formula &f)
 
Formula operator== (const Expression &e1, const Expression &e2)
 
Formula operator!= (const Expression &e1, const Expression &e2)
 
Formula operator< (const Expression &e1, const Expression &e2)
 
Formula operator<= (const Expression &e1, const Expression &e2)
 
Formula operator> (const Expression &e1, const Expression &e2)
 
Formula operator>= (const Expression &e1, const Expression &e2)
 
Formula isnan (const Expression &e)
 Returns a Formula for the predicate isnan(e) to the given expression. More...
 
Formula isinf (const Expression &e)
 Returns a Formula determining if the given expression e is a positive or negative infinity. More...
 
Formula isfinite (const Expression &e)
 Returns a Formula determining if the given expression e has a finite value. More...
 
Formula positive_semidefinite (const Eigen::Ref< const MatrixX< Expression >> &m)
 Returns a symbolic formula constraining m to be a positive-semidefinite matrix. More...
 
Formula positive_semidefinite (const MatrixX< Expression > &m, Eigen::UpLoType mode)
 Constructs and returns a symbolic positive-semidefinite formula from m. More...
 
bool is_false (const Formula &f)
 Checks if f is structurally equal to False formula. More...
 
bool is_true (const Formula &f)
 Checks if f is structurally equal to True formula. More...
 
bool is_variable (const Formula &f)
 Checks if f is a variable formula. More...
 
bool is_equal_to (const Formula &f)
 Checks if f is a formula representing equality (==). More...
 
bool is_not_equal_to (const Formula &f)
 Checks if f is a formula representing disequality (!=). More...
 
bool is_greater_than (const Formula &f)
 Checks if f is a formula representing greater-than (>). More...
 
bool is_greater_than_or_equal_to (const Formula &f)
 Checks if f is a formula representing greater-than-or-equal-to (>=). More...
 
bool is_less_than (const Formula &f)
 Checks if f is a formula representing less-than (<). More...
 
bool is_less_than_or_equal_to (const Formula &f)
 Checks if f is a formula representing less-than-or-equal-to (<=). More...
 
bool is_relational (const Formula &f)
 Checks if f is a relational formula ({==, !=, >, >=, <, <=}). More...
 
bool is_conjunction (const Formula &f)
 Checks if f is a conjunction (∧). More...
 
bool is_disjunction (const Formula &f)
 Checks if f is a disjunction (∨). More...
 
bool is_nary (const Formula &f)
 Checks if f is a n-ary formula ({∧, ∨}). More...
 
bool is_negation (const Formula &f)
 Checks if f is a negation (¬). More...
 
bool is_forall (const Formula &f)
 Checks if f is a Forall formula (∀). More...
 
bool is_isnan (const Formula &f)
 Checks if f is an isnan formula. More...
 
bool is_positive_semidefinite (const Formula &f)
 Checks if f is a positive-semidefinite formula. More...
 
const Variableget_variable (const Formula &f)
 Returns the embedded variable in the variable formula f. More...
 
const Expressionget_lhs_expression (const Formula &f)
 Returns the lhs-argument of a relational formula f. More...
 
const Expressionget_rhs_expression (const Formula &f)
 Returns the rhs-argument of a relational formula f. More...
 
const set< Formula > & get_operands (const Formula &f)
 Returns the set of formulas in a n-ary formula f. More...
 
const Formulaget_operand (const Formula &f)
 Returns the formula in a negation formula f. More...
 
const Variablesget_quantified_variables (const Formula &f)
 Returns the quantified variables in a forall formula f. More...
 
const Formulaget_quantified_formula (const Formula &f)
 Returns the quantified formula in a forall formula f. More...
 
const MatrixX< Expression > & get_matrix_in_positive_semidefinite (const Formula &f)
 Returns the matrix in a positive-semidefinite formula f. More...
 
Formula operator && (const Formula &f1, const Formula &f2)
 
Formula operator && (const Variable &v, const Formula &f)
 
Formula operator && (const Formula &f, const Variable &v)
 
Formula operator && (const Variable &v1, const Variable &v2)
 
template<typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Derived::Scalar, Expression >::value, Formula >::type positive_semidefinite (const Eigen::TriangularView< Derived, Eigen::Lower > &l)
 Constructs and returns a symbolic positive-semidefinite formula from a lower triangular-view l. More...
 
template<typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Derived::Scalar, Expression >::value, Formula >::type positive_semidefinite (const Eigen::TriangularView< Derived, Eigen::Upper > &u)
 Constructs and returns a symbolic positive-semidefinite formula from an upper triangular-view u. More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar()==typename DerivedB::Scalar()), Formula >::value, typename detail::RelationalOpTraits< DerivedA, DerivedB >::ReturnType >::type operator== (const DerivedA &a1, const DerivedB &a2)
 Returns an Eigen array of symbolic formulas where each element includes element-wise symbolic-equality of two arrays m1 and m2. More...
 
template<typename Derived , typename ScalarType >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename Derived::Scalar()==ScalarType()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator== (const Derived &a, const ScalarType &v)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using equal-to operator (==). More...
 
template<typename ScalarType , typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(ScalarType()==typename Derived::Scalar()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator== (const ScalarType &v, const Derived &a)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using equal-to operator (==). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar()<=typename DerivedB::Scalar()), Formula >::value, typename detail::RelationalOpTraits< DerivedA, DerivedB >::ReturnType >::type operator<= (const DerivedA &a1, const DerivedB &a2)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using less-than-or-equal operator (<=). More...
 
template<typename Derived , typename ScalarType >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename Derived::Scalar()<=ScalarType()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator<= (const Derived &a, const ScalarType &v)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using less-than-or-equal operator (<=). More...
 
template<typename ScalarType , typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(ScalarType()<=typename Derived::Scalar()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator<= (const ScalarType &v, const Derived &a)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than-or-equal operator (<=). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar()< typename DerivedB::Scalar()), Formula >::value, typename detail::RelationalOpTraits< DerivedA, DerivedB >::ReturnType >::type operator< (const DerivedA &a1, const DerivedB &a2)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using less-than operator (<). More...
 
template<typename Derived , typename ScalarType >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename Derived::Scalar()< ScalarType()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator< (const Derived &a, const ScalarType &v)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using less-than operator (<). More...
 
template<typename ScalarType , typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(ScalarType()< typename Derived::Scalar()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator< (const ScalarType &v, const Derived &a)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than operator (<). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar() >=typename DerivedB::Scalar()), Formula >::value, typename detail::RelationalOpTraits< DerivedA, DerivedB >::ReturnType >::type operator>= (const DerivedA &a1, const DerivedB &a2)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using greater-than-or-equal operator (>=). More...
 
template<typename Derived , typename ScalarType >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename Derived::Scalar() >=ScalarType()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator>= (const Derived &a, const ScalarType &v)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using greater-than-or-equal operator (>=). More...
 
template<typename ScalarType , typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(ScalarType() >=typename Derived::Scalar()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator>= (const ScalarType &v, const Derived &a)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than-or-equal operator (<=) instead of greater-than-or-equal operator (>=). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar() > typename DerivedB::Scalar()), Formula >::value, typename detail::RelationalOpTraits< DerivedA, DerivedB >::ReturnType >::type operator> (const DerivedA &a1, const DerivedB &a2)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using greater-than operator (>). More...
 
template<typename Derived , typename ScalarType >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename Derived::Scalar() > ScalarType()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator> (const Derived &a, const ScalarType &v)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using greater-than operator (>). More...
 
template<typename ScalarType , typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(ScalarType() > typename Derived::Scalar()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator> (const ScalarType &v, const Derived &a)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than operator (<) instead of greater-than operator (>). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar() !=typename DerivedB::Scalar()), Formula >::value, typename detail::RelationalOpTraits< DerivedA, DerivedB >::ReturnType >::type operator!= (const DerivedA &a1, const DerivedB &a2)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using not-equal operator (!=). More...
 
template<typename Derived , typename ScalarType >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(typename Derived::Scalar() !=ScalarType()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator!= (const Derived &a, const ScalarType &v)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using not-equal operator (!=). More...
 
template<typename ScalarType , typename Derived >
std::enable_if< std::is_same< typename Eigen::internal::traits< Derived >::XprKind, Eigen::ArrayXpr >::value &&std::is_same< decltype(ScalarType() !=typename Derived::Scalar()), Formula >::value, Eigen::Array< Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > >::type operator!= (const ScalarType &v, const Derived &a)
 Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using not-equal operator (!=). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar()==typename DerivedB::Scalar()), Formula >::value, Formula >::type operator== (const DerivedA &m1, const DerivedB &m2)
 Returns a symbolic formula checking if two matrices m1 and m2 are equal. More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar() !=typename DerivedB::Scalar()), Formula >::value, Formula >::type operator!= (const DerivedA &m1, const DerivedB &m2)
 Returns a symbolic formula representing the condition whether m1 and m2 are not the same. More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar()< typename DerivedB::Scalar()), Formula >::value, Formula >::type operator< (const DerivedA &m1, const DerivedB &m2)
 Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using less-than (<) operator. More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar()<=typename DerivedB::Scalar()), Formula >::value, Formula >::type operator<= (const DerivedA &m1, const DerivedB &m2)
 Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using less-than-or-equal operator (<=). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar() > typename DerivedB::Scalar()), Formula >::value, Formula >::type operator> (const DerivedA &m1, const DerivedB &m2)
 Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using greater-than operator (>). More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename Eigen::internal::traits< DerivedA >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< typename Eigen::internal::traits< DerivedB >::XprKind, Eigen::MatrixXpr >::value &&std::is_same< decltype(typename DerivedA::Scalar() >=typename DerivedB::Scalar()), Formula >::value, Formula >::type operator>= (const DerivedA &m1, const DerivedB &m2)
 Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using greater-than-or-equal operator (>=). More...
 
bool is_false (const FormulaCell &f)
 Checks if f is structurally equal to False formula. More...
 
bool is_true (const FormulaCell &f)
 Checks if f is structurally equal to True formula. More...
 
bool is_variable (const FormulaCell &f)
 Checks if f is a variable formula. More...
 
bool is_equal_to (const FormulaCell &f)
 Checks if f is a formula representing equality (==). More...
 
bool is_not_equal_to (const FormulaCell &f)
 Checks if f is a formula representing disequality (!=). More...
 
bool is_greater_than (const FormulaCell &f)
 Checks if f is a formula representing greater-than (>). More...
 
bool is_greater_than_or_equal_to (const FormulaCell &f)
 Checks if f is a formula representing greater-than-or-equal-to (>=). More...
 
bool is_less_than (const FormulaCell &f)
 Checks if f is a formula representing less-than (<). More...
 
bool is_less_than_or_equal_to (const FormulaCell &f)
 Checks if f is a formula representing less-than-or-equal-to (<=). More...
 
bool is_relational (const FormulaCell &f)
 Checks if f is a relational formula ({==, !=, >, >=, <, <=}). More...
 
bool is_conjunction (const FormulaCell &f)
 Checks if f is a conjunction (∧). More...
 
bool is_disjunction (const FormulaCell &f)
 Checks if f is a disjunction (∨). More...
 
bool is_nary (const FormulaCell &f)
 
bool is_negation (const FormulaCell &f)
 Checks if f is a negation (¬). More...
 
bool is_forall (const FormulaCell &f)
 Checks if f is a Forall formula (∀). More...
 
bool is_isnan (const FormulaCell &f)
 Checks if f is an isnan formula. More...
 
bool is_positive_semidefinite (const FormulaCell &f)
 Checks if f is a positive semidefinite formula. More...
 
shared_ptr< const FormulaFalseto_false (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaFalseto_false (const Formula &f)
 Casts f to shared_ptr<const FormulaFalse>. More...
 
shared_ptr< const FormulaTrueto_true (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaTrueto_true (const Formula &f)
 Casts f to shared_ptr<const FormulaTrue>. More...
 
shared_ptr< const FormulaVarto_variable (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaVarto_variable (const Formula &f)
 Casts f to shared_ptr<const FormulaVar>. More...
 
shared_ptr< const RelationalFormulaCellto_relational (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const RelationalFormulaCellto_relational (const Formula &f)
 Casts f to shared_ptr<const RelationalFormulaCell>. More...
 
shared_ptr< const FormulaEqto_equal_to (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaEqto_equal_to (const Formula &f)
 Casts f to shared_ptr<const FormulaEq>. More...
 
shared_ptr< const FormulaNeqto_not_equal_to (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaNeqto_not_equal_to (const Formula &f)
 Casts f to shared_ptr<const FormulaNeq>. More...
 
shared_ptr< const FormulaGtto_greater_than (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaGtto_greater_than (const Formula &f)
 Casts f to shared_ptr<const FormulaGt>. More...
 
shared_ptr< const FormulaGeqto_greater_than_or_equal_to (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaGeqto_greater_than_or_equal_to (const Formula &f)
 Casts f to shared_ptr<const FormulaGeq>. More...
 
shared_ptr< const FormulaLtto_less_than (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaLtto_less_than (const Formula &f)
 Casts f to shared_ptr<const FormulaLt>. More...
 
shared_ptr< const FormulaLeqto_less_than_or_equal_to (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaLeqto_less_than_or_equal_to (const Formula &f)
 Casts f to shared_ptr<const FormulaLeq>. More...
 
shared_ptr< const NaryFormulaCellto_nary (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const NaryFormulaCellto_nary (const Formula &f)
 Casts f to shared_ptr<const NaryFormulaCell>. More...
 
shared_ptr< const FormulaAndto_conjunction (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaAndto_conjunction (const Formula &f)
 Casts f to shared_ptr<const FormulaAnd>. More...
 
shared_ptr< const FormulaOrto_disjunction (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaOrto_disjunction (const Formula &f)
 Casts f to shared_ptr<const FormulaOr>. More...
 
shared_ptr< const FormulaNotto_negation (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaNotto_negation (const Formula &f)
 Casts f to shared_ptr<const FormulaNot>. More...
 
shared_ptr< const FormulaForallto_forall (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaForallto_forall (const Formula &f)
 Casts f to shared_ptr<const FormulaForall>. More...
 
shared_ptr< const FormulaIsnanto_isnan (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaIsnanto_isnan (const Formula &f)
 Casts f to shared_ptr<const FormulaIsnan>. More...
 
shared_ptr< const FormulaPositiveSemidefiniteto_positive_semidefinite (const shared_ptr< const FormulaCell > &f_ptr)
 
shared_ptr< const FormulaPositiveSemidefiniteto_positive_semidefinite (const Formula &f)
 Casts f to shared_ptr<const FormulaPositiveSemidefinite>. More...
 
std::shared_ptr< const FormulaFalseto_false (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaFalse>. More...
 
std::shared_ptr< const FormulaTrueto_true (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaTrue>. More...
 
std::shared_ptr< const FormulaVarto_variable (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaVar>. More...
 
std::shared_ptr< const RelationalFormulaCellto_relational (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const RelationalFormulaCell>. More...
 
std::shared_ptr< const FormulaEqto_equal_to (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaEq>. More...
 
std::shared_ptr< const FormulaNeqto_not_equal_to (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaNeq>. More...
 
std::shared_ptr< const FormulaGtto_greater_than (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaGt>. More...
 
std::shared_ptr< const FormulaGeqto_greater_than_or_equal_to (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaGeq>. More...
 
std::shared_ptr< const FormulaLtto_less_than (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaLt>. More...
 
std::shared_ptr< const FormulaLeqto_less_than_or_equal_to (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaLeq>. More...
 
std::shared_ptr< const FormulaAndto_conjunction (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaAnd>. More...
 
std::shared_ptr< const FormulaOrto_disjunction (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaOr>. More...
 
std::shared_ptr< const NaryFormulaCellto_nary (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const NaryFormulaCell>. More...
 
std::shared_ptr< const FormulaNotto_negation (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaNot>. More...
 
std::shared_ptr< const FormulaForallto_forall (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaForall>. More...
 
std::shared_ptr< const FormulaIsnanto_isnan (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaIsnan>. More...
 
std::shared_ptr< const FormulaPositiveSemidefiniteto_positive_semidefinite (const std::shared_ptr< const FormulaCell > &f_ptr)
 Casts f_ptr to shared_ptr<const FormulaPositiveSemidefinite>. More...
 
template<typename Result , typename Visitor , typename... Args>
Result VisitFormula (Visitor *v, const Formula &f, Args &&... args)
 Calls visitor object v with a symbolic formula f, and arguments args. More...
 
ostream & operator<< (ostream &out, const Monomial &m)
 
Monomial operator* (Monomial m1, const Monomial &m2)
 Returns a multiplication of two monomials, m1 and m2. More...
 
Monomial pow (Monomial m, int p)
 Returns m1 raised to p. More...
 
Eigen::Matrix< Monomial, Eigen::Dynamic, 1 > MonomialBasis (const Variables &vars, int degree)
 Returns all monomials up to a given degree under the graded reverse lexicographic order. More...
 
constexpr int NChooseK (int n, int k)
 
template<int n, int degree>
Eigen::Matrix< Monomial, NChooseK(n+degree, degree), 1 > MonomialBasis (const Variables &vars)
 Returns all monomials up to a given degree under the graded reverse lexicographic order. More...
 
Polynomial operator- (Polynomial p)
 Unary minus operation for polynomial. More...
 
Polynomial operator+ (Polynomial p1, const Polynomial &p2)
 
Polynomial operator+ (Polynomial p, const Monomial &m)
 
Polynomial operator+ (const Monomial &m, Polynomial p)
 
Polynomial operator+ (const Monomial &m1, const Monomial &m2)
 
Polynomial operator+ (Polynomial p, const double c)
 
Polynomial operator+ (const double c, Polynomial p)
 
Polynomial operator+ (const Monomial &m, const double c)
 
Polynomial operator+ (const double c, const Monomial &m)
 
Polynomial operator- (Polynomial p1, const Polynomial &p2)
 
Polynomial operator- (Polynomial p, const Monomial &m)
 
Polynomial operator- (const Monomial &m, Polynomial p)
 
Polynomial operator- (const Monomial &m1, const Monomial &m2)
 
Polynomial operator- (Polynomial p, const double c)
 
Polynomial operator- (const double c, Polynomial p)
 
Polynomial operator- (const Monomial &m, const double c)
 
Polynomial operator- (const double c, const Monomial &m)
 
Polynomial operator* (Polynomial p1, const Polynomial &p2)
 
Polynomial operator* (Polynomial p, const Monomial &m)
 
Polynomial operator* (const Monomial &m, Polynomial p)
 
Polynomial operator* (const double c, Polynomial p)
 
Polynomial operator* (Polynomial p, const double c)
 
Polynomial operator* (const Monomial &m, double c)
 
Polynomial operator* (double c, const Monomial &m)
 
Polynomial pow (const Polynomial &p, int n)
 Returns polynomial rasied to n. More...
 
ostream & operator<< (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 seven operations: More...
 
std::ostream & operator<< (std::ostream &os, const RationalFunction &f)
 
RationalFunction operator- (RationalFunction f)
 Unary minus operation for rational function. More...
 
RationalFunction operator+ (RationalFunction f1, const RationalFunction &f2)
 
RationalFunction operator+ (RationalFunction f, const Polynomial &p)
 
RationalFunction operator+ (const Polynomial &p, RationalFunction f)
 
RationalFunction operator+ (RationalFunction f, double c)
 
RationalFunction operator+ (double c, RationalFunction f)
 
RationalFunction operator- (RationalFunction f1, const RationalFunction &f2)
 
RationalFunction operator- (RationalFunction f, const Polynomial &p)
 
RationalFunction operator- (const Polynomial &p, RationalFunction f)
 
RationalFunction operator- (RationalFunction f, double c)
 
RationalFunction operator- (double c, RationalFunction f)
 
RationalFunction operator* (RationalFunction f1, const RationalFunction &f2)
 
RationalFunction operator* (RationalFunction f, const Polynomial &p)
 
RationalFunction operator* (const Polynomial &p, RationalFunction f)
 
RationalFunction operator* (RationalFunction f, double c)
 
RationalFunction operator* (double c, RationalFunction f)
 
RationalFunction operator/ (RationalFunction f1, const RationalFunction &f2)
 
RationalFunction operator/ (RationalFunction f, const Polynomial &p)
 
RationalFunction operator/ (const Polynomial &p, const RationalFunction &f)
 
RationalFunction operator/ (RationalFunction f, double c)
 
RationalFunction operator/ (double c, const RationalFunction &f)
 
RationalFunction pow (const RationalFunction &f, int n)
 Returns the rational function f raised to n. More...
 
template<typename MatrixL , typename MatrixR >
Eigen::Matrix< RationalFunction, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > operator* (const MatrixL &lhs, const MatrixR &rhs)
 Provides the following operations: More...
 
Rewriter MakeRuleRewriter (const RewritingRule &r)
 Constructs a rewriter based on a rewriting rule r. More...
 
ostream & operator<< (ostream &os, const Variable &var)
 
ostream & operator<< (ostream &os, Variable::Type type)
 
MatrixX< VariableMakeMatrixVariable (int rows, int cols, const std::string &name, Variable::Type type)
 Creates a dynamically-sized Eigen matrix of symbolic variables. More...
 
MatrixX< VariableMakeMatrixBooleanVariable (int rows, int cols, const std::string &name)
 Creates a dynamically-sized Eigen matrix of symbolic Boolean variables. More...
 
MatrixX< VariableMakeMatrixBinaryVariable (int rows, int cols, const std::string &name)
 Creates a dynamically-sized Eigen matrix of symbolic binary variables. More...
 
MatrixX< VariableMakeMatrixContinuousVariable (int rows, int cols, const std::string &name)
 Creates a dynamically-sized Eigen matrix of symbolic continuous variables. More...
 
MatrixX< VariableMakeMatrixIntegerVariable (int rows, int cols, const std::string &name)
 Creates a dynamically-sized Eigen matrix of symbolic integer variables. More...
 
VectorX< VariableMakeVectorVariable (int rows, const std::string &name, Variable::Type type)
 Creates a dynamically-sized Eigen vector of symbolic variables. More...
 
VectorX< VariableMakeVectorBooleanVariable (int rows, const std::string &name)
 Creates a dynamically-sized Eigen vector of symbolic Boolean variables. More...
 
VectorX< VariableMakeVectorBinaryVariable (int rows, const std::string &name)
 Creates a dynamically-sized Eigen vector of symbolic binary variables. More...
 
VectorX< VariableMakeVectorContinuousVariable (int rows, const std::string &name)
 Creates a dynamically-sized Eigen vector of symbolic continuous variables. More...
 
VectorX< VariableMakeVectorIntegerVariable (int rows, const std::string &name)
 Creates a dynamically-sized Eigen vector of symbolic integer variables. More...
 
template<int rows, int cols>
Eigen::Matrix< Variable, rows, cols > MakeMatrixVariable (const std::string &name, Variable::Type type)
 Creates a static-sized Eigen matrix of symbolic variables. More...
 
template<int rows, int cols>
Eigen::Matrix< Variable, rows, cols > MakeMatrixBooleanVariable (const std::string &name)
 Creates a static-sized Eigen matrix of symbolic Boolean variables. More...
 
template<int rows, int cols>
Eigen::Matrix< Variable, rows, cols > MakeMatrixBinaryVariable (const std::string &name)
 Creates a static-sized Eigen matrix of symbolic binary variables. More...
 
template<int rows, int cols>
Eigen::Matrix< Variable, rows, cols > MakeMatrixContinuousVariable (const std::string &name)
 Creates a static-sized Eigen matrix of symbolic continuous variables. More...
 
template<int rows, int cols>
Eigen::Matrix< Variable, rows, cols > MakeMatrixIntegerVariable (const std::string &name)
 Creates a static-sized Eigen matrix of symbolic integer variables. More...
 
template<int rows>
Eigen::Matrix< Variable, rows, 1 > MakeVectorVariable (const std::string &name, Variable::Type type)
 Creates a static-sized Eigen vector of symbolic variables. More...
 
template<int rows>
Eigen::Matrix< Variable, rows, 1 > MakeVectorBooleanVariable (const std::string &name)
 Creates a static-sized Eigen vector of symbolic Boolean variables. More...
 
template<int rows>
Eigen::Matrix< Variable, rows, 1 > MakeVectorBinaryVariable (const std::string &name)
 Creates a static-sized Eigen vector of symbolic binary variables. More...
 
template<int rows>
Eigen::Matrix< Variable, rows, 1 > MakeVectorContinuousVariable (const std::string &name)
 Creates a static-sized Eigen vector of symbolic continuous variables. More...
 
template<int rows>
Eigen::Matrix< Variable, rows, 1 > MakeVectorIntegerVariable (const std::string &name)
 Creates a static-sized Eigen vector of symbolic integer variables. More...
 
template<typename DerivedA , typename DerivedB >
std::enable_if< is_eigen_scalar_same< DerivedA, Variable >::value &&is_eigen_scalar_same< DerivedB, Variable >::value, bool >::type CheckStructuralEquality (const DerivedA &m1, const DerivedB &m2)
 Checks if two Eigen::Matrix<Variable> m1 and m2 are structurally equal. More...
 
bool operator== (const Variables &vars1, const Variables &vars2)
 
bool operator< (const Variables &vars1, const Variables &vars2)
 
Variables operator+= (Variables &vars1, const Variables &vars2)
 Updates var1 with the result of set-union(var1, var2). More...
 
Variables operator+= (Variables &vars, const Variable &var)
 Updates vars with the result of set-union(vars, { var }). More...
 
Variables operator+ (Variables vars1, const Variables &vars2)
 Returns set-union of var1 and var2. More...
 
Variables operator+ (Variables vars, const Variable &var)
 Returns set-union of vars and {var}. More...
 
Variables operator+ (const Variable &var, Variables vars)
 Returns set-union of {var} and vars. More...
 
Variables operator-= (Variables &vars1, const Variables &vars2)
 Updates var1 with the result of set-minus(var1, var2). More...
 
Variables operator-= (Variables &vars, const Variable &var)
 Updates vars with the result of set-minus(vars, {var}). More...
 
Variables operator- (Variables vars1, const Variables &vars2)
 Returns set-minus(var1, vars2). More...
 
Variables operator- (Variables vars, const Variable &var)
 Returns set-minus(vars, { var }). More...
 
Variables intersect (const Variables &vars1, const Variables &vars2)
 Returns the intersection of vars1 and vars2. More...
 
ostream & operator<< (ostream &os, const Variables &vars)
 
template<typename Derived1 , typename Derived2 >
std::enable_if< std::is_same< typename Derived1::Scalar, RationalFunction >::value &&std::is_same< typename Derived2::Scalar, RationalFunction >::value >::type CompareMatrixWithRationalFunction (const Derived1 &m1, const Derived2 &m2)
 
template<typename Derived1 , typename Derived2 >
void CheckAddition (const Derived1 &m1, const Derived2 &m2)
 
template<typename Derived1 , typename Derived2 >
void CheckSubtraction (const Derived1 &m1, const Derived2 &m2)
 
template<typename Derived1 , typename Derived2 >
void CheckProduct (const Derived1 &m1, const Derived2 &m2)
 
template<typename Derived1 , typename Derived2 >
std::enable_if< is_eigen_vector< Derived1 >::value &&is_eigen_vector< Derived2 >::value >::type CheckConjugateProdocut (const Derived1 &v1, const Derived2 &v2)
 
template<typename Derived1 , typename Derived2 >
void CheckMatrixMatrixBinaryOperations (const Derived1 &m1, const Derived2 &m2)
 
template<typename Derived1 , typename Derived2 >
std::enable_if< is_eigen_vector< Derived2 >::value >::type CheckMatrixVectorBinaryOperations (const Derived1 &m1, const Derived2 &m2)
 
template<typename Derived1 , typename Derived2 >
std::enable_if< is_eigen_vector< Derived1 >::value &&is_eigen_vector< Derived2 >::value >::type CheckVectorVectorBinaryOperations (const Derived1 &m1, const Derived2 &m2)
 
 TEST_F (SymbolicRationalFunctionMatrixTest, RationalFunctionOpRationalFunction)
 
 TEST_F (SymbolicRationalFunctionMatrixTest, RationalFunctionOpPolynomial)
 
 TEST_F (SymbolicRationalFunctionMatrixTest, RationalFunctionOpDouble)
 

Typedef Documentation

◆ Pattern

A pattern is an expression which possibly includes variables which represent placeholders.

It is used to construct a RewritingRule.

◆ Rewriter

using Rewriter = std::function<Expression(const Expression&)>

A Rewriter is a function from an Expression to an Expression.

◆ Substitution

using Substitution = std::unordered_map<Variable, Expression>

Enumeration Type Documentation

◆ ExpressionKind

enum ExpressionKind
strong

Kinds of symbolic expressions.

Enumerator
Constant 

constant (double)

Var 

variable

Add 

addition (+)

Mul 

multiplication (*)

Div 

division (/)

Log 

logarithms

Abs 

absolute value function

Exp 

exponentiation

Sqrt 

square root

Pow 

power function

Sin 

sine

Cos 

cosine

Tan 

tangent

Asin 

arcsine

Acos 

arccosine

Atan 

arctangent

Atan2 

arctangent2 (atan2(y,x) = atan(y/x))

Sinh 

hyperbolic sine

Cosh 

hyperbolic cosine

Tanh 

hyperbolic tangent

Min 

min

Max 

max

Ceil 

ceil

Floor 

floor

IfThenElse 

if then else

NaN 

NaN.

UninterpretedFunction 

Uninterpreted function.

◆ FormulaKind

enum FormulaKind
strong

Kinds of symbolic formulas.

Enumerator
False 

True 

Var 

Boolean Variable.

Eq 

=

Neq 

!=

Gt 

>

Geq 

>=

Lt 

<

Leq 

<=

And 

Conjunction (∧)

Or 

Disjunction (∨)

Not 

Negation (¬)

Forall 

Universal quantification (∀)

Isnan 

NaN check predicate.

PositiveSemidefinite 

Positive semidefinite matrix.

Function Documentation

◆ abs()

Expression abs ( const Expression e)

◆ acos()

Expression acos ( const Expression e)

◆ asin()

Expression asin ( const Expression e)

◆ atan()

Expression atan ( const Expression e)

◆ atan2()

Expression atan2 ( const Expression e1,
const Expression e2 
)

◆ ceil()

Expression ceil ( const Expression e)

◆ CheckAddition()

void drake::symbolic::CheckAddition ( const Derived1 &  m1,
const Derived2 &  m2 
)

◆ CheckConjugateProdocut()

std::enable_if<is_eigen_vector<Derived1>::value && is_eigen_vector<Derived2>::value>::type drake::symbolic::CheckConjugateProdocut ( const Derived1 &  v1,
const Derived2 &  v2 
)

◆ CheckMatrixMatrixBinaryOperations()

void drake::symbolic::CheckMatrixMatrixBinaryOperations ( const Derived1 &  m1,
const Derived2 &  m2 
)

◆ CheckMatrixVectorBinaryOperations()

std::enable_if<is_eigen_vector<Derived2>::value>::type drake::symbolic::CheckMatrixVectorBinaryOperations ( const Derived1 &  m1,
const Derived2 &  m2 
)

◆ CheckProduct()

void drake::symbolic::CheckProduct ( const Derived1 &  m1,
const Derived2 &  m2 
)

◆ CheckStructuralEquality() [1/2]

std::enable_if<is_eigen_scalar_same<DerivedA, Variable>::value && is_eigen_scalar_same<DerivedB, Variable>::value, bool>::type drake::symbolic::CheckStructuralEquality ( const DerivedA &  m1,
const DerivedB &  m2 
)

Checks if two Eigen::Matrix<Variable> m1 and m2 are structurally equal.

That is, it returns true if and only if m1(i, j) is structurally equal to m2(i, j) for all i, j.

◆ CheckStructuralEquality() [2/2]

std::enable_if< std::is_base_of<Eigen::MatrixBase<DerivedA>, DerivedA>::value && std::is_base_of<Eigen::MatrixBase<DerivedB>, DerivedB>::value && std::is_same<typename DerivedA::Scalar, Expression>::value && std::is_same<typename DerivedB::Scalar, Expression>::value, bool>::type drake::symbolic::CheckStructuralEquality ( const DerivedA &  m1,
const DerivedB &  m2 
)

Checks if two Eigen::Matrix<Expression> m1 and m2 are structurally equal.

That is, it returns true if and only if m1(i, j) is structurally equal to m2(i, j) for all i, j.

◆ CheckSubtraction()

void drake::symbolic::CheckSubtraction ( const Derived1 &  m1,
const Derived2 &  m2 
)

◆ CheckVectorVectorBinaryOperations()

std::enable_if<is_eigen_vector<Derived1>::value && is_eigen_vector<Derived2>::value>::type drake::symbolic::CheckVectorVectorBinaryOperations ( const Derived1 &  m1,
const Derived2 &  m2 
)

◆ CodeGen()

std::string CodeGen ( const std::string &  function_name,
const std::vector< Variable > &  parameters,
const Expression e 
)

For a given symbolic expression e, generates two C functions, function_name and function_name_in.

The generated function_name takes an array of doubles for parameters and returns an evaluation result. function_name_in returns the length of parameters.

Parameters
[in]function_nameName of the generated C function.
[in]parametersVector of variables provide the ordering of symbolic variables.
[in]eSymbolic expression to codegen.

For example, Codegen("f", {x, y}, 1 + sin(x) + cos(y)) generates the following string.

double f(const double* p) {
    return (1 + sin(p[0]) + cos(p[1]));
}
int f_in() {
    return 2;  // size of `{x, y}`.
}

Note that in this example x and y are mapped to p[0] and p[1] respectively because we passed {x, y} to Codegen.

Note that generated code does not include any headers while it may use math functions defined in <math.h> such as sin, cos, exp, and log. A user of generated code is responsible to include <math.h> if needed to compile generated code.

Handle function_name_in.

◆ CompareMatrixWithRationalFunction()

std::enable_if< std::is_same<typename Derived1::Scalar, RationalFunction>::value && std::is_same<typename Derived2::Scalar, RationalFunction>::value>::type drake::symbolic::CompareMatrixWithRationalFunction ( const Derived1 &  m1,
const Derived2 &  m2 
)

◆ cos()

Expression cos ( const Expression e)

◆ cosh()

Expression cosh ( const Expression e)

◆ DecomposeAffineExpressions() [1/2]

void drake::symbolic::DecomposeAffineExpressions ( const Eigen::Ref< const VectorX< Expression >> &  expressions,
const Eigen::Ref< const VectorX< Variable >> &  vars,
EigenPtr< Eigen::MatrixXd >  M,
EigenPtr< Eigen::VectorXd >  v 
)

Decomposes expressions into M * vars + v.

Exceptions
std::runtime_errorif expressions is not affine in vars.
Precondition
M.rows() == expressions.rows() && M.cols() == vars.rows().
v.rows() == expressions.rows().

◆ DecomposeAffineExpressions() [2/2]

void drake::symbolic::DecomposeAffineExpressions ( const Eigen::Ref< const VectorX< Expression >> &  expressions,
const Eigen::Ref< const VectorX< symbolic::Variable >> &  vars,
EigenPtr< Eigen::MatrixXd >  M,
EigenPtr< Eigen::VectorXd >  v 
)

◆ DecomposeLinearExpressions() [1/2]

void drake::symbolic::DecomposeLinearExpressions ( const Eigen::Ref< const VectorX< Expression >> &  expressions,
const Eigen::Ref< const VectorX< Variable >> &  vars,
EigenPtr< Eigen::MatrixXd >  M 
)

Decomposes expressions into M * vars.

Exceptions
std::runtime_errorif expressions is not linear in vars.
Precondition
M.rows() == expressions.rows() && M.cols() == vars.rows().

◆ DecomposeLinearExpressions() [2/2]

void drake::symbolic::DecomposeLinearExpressions ( const Eigen::Ref< const VectorX< Expression >> &  expressions,
const Eigen::Ref< const VectorX< symbolic::Variable >> &  vars,
EigenPtr< Eigen::MatrixXd >  M 
)

◆ DifferentiatePow()

Expression drake::symbolic::DifferentiatePow ( const Expression f,
const Expression g,
const Variable x 
)

◆ Evaluate()

auto drake::symbolic::Evaluate ( const Eigen::MatrixBase< Derived > &  m,
const Environment env 
)

Evaluates a symbolic matrix m using the env by evaluating each element.

Returns
a matrix of double whose size is the size of m.
Exceptions
std::runtime_errorif NaN is detected during evaluation.

◆ exp()

Expression exp ( const Expression e)

◆ floor()

Expression floor ( const Expression e)

◆ forall()

Formula forall ( const Variables vars,
const Formula f 
)

Returns a formula f, universally quantified by variables vars.

◆ get_argument()

const Expression & get_argument ( const Expression e)

Returns the argument in the unary expression e.

Precondition
{e is a unary expression.}

◆ get_base_to_exponent_map_in_multiplication()

const std::map< Expression, Expression > & get_base_to_exponent_map_in_multiplication ( const Expression e)

Returns the map from a base expression to its exponent expression in the multiplication expression e.

For instance, given 7 * x^2 * y^3 * z^x, the return value maps 'x' to 2, 'y' to 3, and 'z' to 'x'.

Precondition
{e is a multiplication expression.}

◆ get_conditional_formula()

const Formula & get_conditional_formula ( const Expression e)

Returns the conditional formula in the if-then-else expression e.

Precondition
e is an if-then-else expression.

◆ get_constant_in_addition()

double get_constant_in_addition ( const Expression e)

Returns the constant part of the addition expression e.

For instance, given 7 + 2 * x + 3 * y, it returns 7.

Precondition
{e is an addition expression.}

◆ get_constant_in_multiplication()

double get_constant_in_multiplication ( const Expression e)

Returns the constant part of the multiplication expression e.

For instance, given 7 * x^2 * y^3, it returns 7.

Precondition
{e is a multiplication expression.}

◆ get_constant_value()

double get_constant_value ( const Expression e)

Returns the constant value of the constant expression e.

Precondition
{e is a constant expression.}

◆ get_else_expression()

const Expression & get_else_expression ( const Expression e)

Returns the 'else' expression in the if-then-else expression e.

Precondition
e is an if-then-else expression.

◆ get_expr_to_coeff_map_in_addition()

const std::map< Expression, double > & get_expr_to_coeff_map_in_addition ( const Expression e)

Returns the map from an expression to its coefficient in the addition expression e.

For instance, given 7 + 2 * x + 3 * y, the return value maps 'x' to 2 and 'y' to 3.

Precondition
{e is an addition expression.}

◆ get_first_argument()

const Expression & get_first_argument ( const Expression e)

Returns the first argument of the binary expression e.

Precondition
{e is a binary expression.}

◆ get_lhs_expression()

const Expression & get_lhs_expression ( const Formula f)

Returns the lhs-argument of a relational formula f.

Precondition
{f is a relational formula.}

◆ get_matrix_in_positive_semidefinite()

const MatrixX< Expression > & get_matrix_in_positive_semidefinite ( const Formula f)

Returns the matrix in a positive-semidefinite formula f.

Precondition
{f is a positive-semidefinite formula.}

◆ get_operand()

const Formula & get_operand ( const Formula f)

Returns the formula in a negation formula f.

Precondition
{f is a negation formula.}

◆ get_operands()

const std::set< Formula > & get_operands ( const Formula f)

Returns the set of formulas in a n-ary formula f.

Precondition
{f is a n-ary formula.}

◆ get_quantified_formula()

const Formula & get_quantified_formula ( const Formula f)

Returns the quantified formula in a forall formula f.

Precondition
{f is a forall formula.}

◆ get_quantified_variables()

const Variables & get_quantified_variables ( const Formula f)

Returns the quantified variables in a forall formula f.

Precondition
{f is a forall formula.}

◆ get_rhs_expression()

const Expression & get_rhs_expression ( const Formula f)

Returns the rhs-argument of a relational formula f.

Precondition
{f is a relational formula.}

◆ get_second_argument()

const Expression & get_second_argument ( const Expression e)

Returns the second argument of the binary expression e.

Precondition
{e is a binary expression.}

◆ get_then_expression()

const Expression & get_then_expression ( const Expression e)

Returns the 'then' expression in the if-then-else expression e.

Precondition
e is an if-then-else expression.

◆ get_uninterpreted_function_arguments()

const std::vector< Expression > & get_uninterpreted_function_arguments ( const Expression e)

Returns the arguments of an uninterpreted-function expression e.

Precondition
e is an uninterpreted-function expression.

◆ get_uninterpreted_function_name()

const std::string & get_uninterpreted_function_name ( const Expression e)

Returns the name of an uninterpreted-function expression e.

Precondition
e is an uninterpreted-function expression.

◆ get_variable() [1/2]

const Variable & get_variable ( const Formula f)

Returns the embedded variable in the variable formula f.

Precondition
f is a variable formula.

◆ get_variable() [2/2]

const Variable & get_variable ( const Expression e)

Returns the embedded variable in the variable expression e.

Precondition
{e is a variable expression.}

◆ GetDistinctVariables()

Variables GetDistinctVariables ( const Eigen::Ref< const MatrixX< Expression >> &  v)

Returns the distinct variables in the matrix of expressions.

◆ GetVariableVector()

VectorX< Variable > GetVariableVector ( const Eigen::Ref< const VectorX< Expression >> &  evec)

Constructs a vector of variables from the vector of variable expressions.

Exceptions
std::logic_errorif there is an expression in vec which is not a variable.

◆ if_then_else()

Expression if_then_else ( const Formula f_cond,
const Expression e_then,
const Expression e_else 
)
  if_then_else(cond, expr_then, expr_else)

The value returned by the above if-then-else expression is expr_then if cond is evaluated to true. Otherwise, it returns expr_else.

The semantics is similar to the C++'s conditional expression constructed by its ternary operator, ?:. However, there is a key difference between the C++'s conditional expression and our if_then_else expression in a way the arguments are evaluated during the construction.

  • In case of the C++'s conditional expression, cond ? expr_then : expr_else, the then expression expr_then (respectively, the else expression expr_else) is only evaluated when the conditional expression cond is evaluated to true (respectively, when cond is evaluated to false).
  • In case of the symbolic expression, if_then_else(cond, expr_then, expr_else), however, both arguments expr_then and expr_else are evaluated first and then passed to the if_then_else function.
Note
This function returns an expression and it is different from the C++'s if-then-else statement.
While it is still possible to define min, max, abs math functions using if_then_else expression, it is highly recommended to use the provided native definitions for them because it allows solvers to detect specific math functions and to have a room for special optimizations.
More information about the C++'s conditional expression and ternary operator is available at http://en.cppreference.com/w/cpp/language/operator_other#Conditional_operator.

◆ intersect()

Variables intersect ( const Variables vars1,
const Variables vars2 
)

Returns the intersection of vars1 and vars2.

This function has a time complexity of O(N₁ + N₂) where N₁ and N₂ are the size of vars1 and vars2 respectively.

◆ is_abs() [1/2]

bool is_abs ( const Expression e)

Checks if e is an abs expression.

◆ is_abs() [2/2]

bool is_abs ( const ExpressionCell c)

Checks if c is an absolute-value-function expression.

◆ is_acos() [1/2]

bool is_acos ( const Expression e)

Checks if e is an arccosine expression.

◆ is_acos() [2/2]

bool is_acos ( const ExpressionCell c)

Checks if c is an arccosine expression.

◆ is_addition() [1/2]

bool is_addition ( const Expression e)

Checks if e is an addition expression.

◆ is_addition() [2/2]

bool is_addition ( const ExpressionCell c)

Checks if c is an addition expression.

◆ is_asin() [1/2]

bool is_asin ( const Expression e)

Checks if e is an arcsine expression.

◆ is_asin() [2/2]

bool is_asin ( const ExpressionCell c)

Checks if c is an arcsine expression.

◆ is_atan() [1/2]

bool is_atan ( const Expression e)

Checks if e is an arctangent expression.

◆ is_atan() [2/2]

bool is_atan ( const ExpressionCell c)

Checks if c is an arctangent expression.

◆ is_atan2() [1/2]

bool is_atan2 ( const Expression e)

Checks if e is an arctangent2 expression.

◆ is_atan2() [2/2]

bool is_atan2 ( const ExpressionCell c)

Checks if c is a arctangent2 expression.

◆ is_ceil() [1/2]

bool is_ceil ( const Expression e)

Checks if e is a ceil expression.

◆ is_ceil() [2/2]

bool is_ceil ( const ExpressionCell c)

Checks if c is a ceil expression.

◆ is_conjunction() [1/2]

bool is_conjunction ( const Formula f)

Checks if f is a conjunction (∧).

◆ is_conjunction() [2/2]

bool is_conjunction ( const FormulaCell f)

Checks if f is a conjunction (∧).

◆ is_constant() [1/3]

bool is_constant ( const Expression e)

Checks if e is a constant expression.

◆ is_constant() [2/3]

bool is_constant ( const Expression e,
double  v 
)

Checks if e is a constant expression representing v.

◆ is_constant() [3/3]

bool is_constant ( const ExpressionCell c)

Checks if c is a constant expression.

◆ is_cos() [1/2]

bool is_cos ( const Expression e)

Checks if e is a cosine expression.

◆ is_cos() [2/2]

bool is_cos ( const ExpressionCell c)

Checks if c is a cosine expression.

◆ is_cosh() [1/2]

bool is_cosh ( const Expression e)

Checks if e is a hyperbolic-cosine expression.

◆ is_cosh() [2/2]

bool is_cosh ( const ExpressionCell c)

Checks if c is a hyperbolic-cosine expression.

◆ is_disjunction() [1/2]

bool is_disjunction ( const Formula f)

Checks if f is a disjunction (∨).

◆ is_disjunction() [2/2]

bool is_disjunction ( const FormulaCell f)

Checks if f is a disjunction (∨).

◆ is_division() [1/2]

bool is_division ( const Expression e)

Checks if e is a division expression.

◆ is_division() [2/2]

bool is_division ( const ExpressionCell c)

Checks if c is a division expression.

◆ is_equal_to() [1/2]

bool is_equal_to ( const Formula f)

Checks if f is a formula representing equality (==).

◆ is_equal_to() [2/2]

bool is_equal_to ( const FormulaCell f)

Checks if f is a formula representing equality (==).

◆ is_exp() [1/2]

bool is_exp ( const Expression e)

Checks if e is an exp expression.

◆ is_exp() [2/2]

bool is_exp ( const ExpressionCell c)

Checks if c is an exp expression.

◆ is_false() [1/2]

bool is_false ( const Formula f)

Checks if f is structurally equal to False formula.

◆ is_false() [2/2]

bool is_false ( const FormulaCell f)

Checks if f is structurally equal to False formula.

◆ is_floor() [1/2]

bool is_floor ( const Expression e)

Checks if e is a floor expression.

◆ is_floor() [2/2]

bool is_floor ( const ExpressionCell c)

Checks if c is a floor expression.

◆ is_forall() [1/2]

bool is_forall ( const Formula f)

Checks if f is a Forall formula (∀).

◆ is_forall() [2/2]

bool is_forall ( const FormulaCell f)

Checks if f is a Forall formula (∀).

◆ is_greater_than() [1/2]

bool is_greater_than ( const Formula f)

Checks if f is a formula representing greater-than (>).

◆ is_greater_than() [2/2]

bool is_greater_than ( const FormulaCell f)

Checks if f is a formula representing greater-than (>).

◆ is_greater_than_or_equal_to() [1/2]

bool is_greater_than_or_equal_to ( const Formula f)

Checks if f is a formula representing greater-than-or-equal-to (>=).

◆ is_greater_than_or_equal_to() [2/2]

bool is_greater_than_or_equal_to ( const FormulaCell f)

Checks if f is a formula representing greater-than-or-equal-to (>=).

◆ is_if_then_else() [1/2]

bool is_if_then_else ( const Expression e)

Checks if e is an if-then-else expression.

◆ is_if_then_else() [2/2]

bool is_if_then_else ( const ExpressionCell c)

Checks if c is an if-then-else expression.

◆ is_integer()

bool is_integer ( const double  v)

◆ is_isnan() [1/2]

bool is_isnan ( const Formula f)

Checks if f is an isnan formula.

◆ is_isnan() [2/2]

bool is_isnan ( const FormulaCell f)

Checks if f is an isnan formula.

◆ is_less_than() [1/2]

bool is_less_than ( const Formula f)

Checks if f is a formula representing less-than (<).

◆ is_less_than() [2/2]

bool is_less_than ( const FormulaCell f)

Checks if f is a formula representing less-than (<).

◆ is_less_than_or_equal_to() [1/2]

bool is_less_than_or_equal_to ( const Formula f)

Checks if f is a formula representing less-than-or-equal-to (<=).

◆ is_less_than_or_equal_to() [2/2]

bool is_less_than_or_equal_to ( const FormulaCell f)

Checks if f is a formula representing less-than-or-equal-to (<=).

◆ is_log() [1/2]

bool is_log ( const Expression e)

Checks if e is a log expression.

◆ is_log() [2/2]

bool is_log ( const ExpressionCell c)

Checks if c is a log expression.

◆ is_max() [1/2]

bool is_max ( const Expression e)

Checks if e is a max expression.

◆ is_max() [2/2]

bool is_max ( const ExpressionCell c)

Checks if c is a max expression.

◆ is_min() [1/2]

bool is_min ( const Expression e)

Checks if e is a min expression.

◆ is_min() [2/2]

bool is_min ( const ExpressionCell c)

Checks if c is a min expression.

◆ is_multiplication() [1/2]

bool is_multiplication ( const Expression e)

Checks if e is a multiplication expression.

◆ is_multiplication() [2/2]

bool is_multiplication ( const ExpressionCell c)

Checks if c is an multiplication expression.

◆ is_nan()

bool is_nan ( const Expression e)

Checks if e is NaN.

◆ is_nary() [1/2]

bool is_nary ( const Formula f)

Checks if f is a n-ary formula ({∧, ∨}).

◆ is_nary() [2/2]

bool drake::symbolic::is_nary ( const FormulaCell f)

◆ is_neg_one()

bool is_neg_one ( const Expression e)

Checks if e is -1.0.

◆ is_negation() [1/2]

bool is_negation ( const Formula f)

Checks if f is a negation (¬).

◆ is_negation() [2/2]

bool is_negation ( const FormulaCell f)

Checks if f is a negation (¬).

◆ is_non_negative_integer()

bool is_non_negative_integer ( const double  v)

◆ is_not_equal_to() [1/2]

bool is_not_equal_to ( const Formula f)

Checks if f is a formula representing disequality (!=).

◆ is_not_equal_to() [2/2]

bool is_not_equal_to ( const FormulaCell f)

Checks if f is a formula representing disequality (!=).

◆ is_one()

bool is_one ( const Expression e)

Checks if e is 1.0.

◆ is_positive_integer()

bool is_positive_integer ( const double  v)

◆ is_positive_semidefinite() [1/2]

bool is_positive_semidefinite ( const Formula f)

Checks if f is a positive-semidefinite formula.

◆ is_positive_semidefinite() [2/2]

bool is_positive_semidefinite ( const FormulaCell f)

Checks if f is a positive semidefinite formula.

◆ is_pow() [1/2]

bool is_pow ( const Expression e)

Checks if e is a power-function expression.

◆ is_pow() [2/2]

bool is_pow ( const ExpressionCell c)

Checks if c is a power-function expression.

◆ is_relational() [1/2]

bool is_relational ( const Formula f)

Checks if f is a relational formula ({==, !=, >, >=, <, <=}).

◆ is_relational() [2/2]

bool is_relational ( const FormulaCell f)

Checks if f is a relational formula ({==, !=, >, >=, <, <=}).

◆ is_sin() [1/2]

bool is_sin ( const Expression e)

Checks if e is a sine expression.

◆ is_sin() [2/2]

bool is_sin ( const ExpressionCell c)

Checks if c is a sine expression.

◆ is_sinh() [1/2]

bool is_sinh ( const Expression e)

Checks if e is a hyperbolic-sine expression.

◆ is_sinh() [2/2]

bool is_sinh ( const ExpressionCell c)

Checks if c is a hyperbolic-sine expression.

◆ is_sqrt() [1/2]

bool is_sqrt ( const Expression e)

Checks if e is a square-root expression.

◆ is_sqrt() [2/2]

bool is_sqrt ( const ExpressionCell c)

Checks if c is a square-root expression.

◆ is_tan() [1/2]

bool is_tan ( const Expression e)

Checks if e is a tangent expression.

◆ is_tan() [2/2]

bool is_tan ( const ExpressionCell c)

Checks if c is a tangent expression.

◆ is_tanh() [1/2]

bool is_tanh ( const Expression e)

Checks if e is a hyperbolic-tangent expression.

◆ is_tanh() [2/2]

bool is_tanh ( const ExpressionCell c)

Checks if c is a hyperbolic-tangent expression.

◆ is_true() [1/2]

bool is_true ( const Formula f)

Checks if f is structurally equal to True formula.

◆ is_true() [2/2]

bool is_true ( const FormulaCell f)

Checks if f is structurally equal to True formula.

◆ is_two()

bool is_two ( const Expression e)

Checks if e is 2.0.

◆ is_uninterpreted_function() [1/2]

bool is_uninterpreted_function ( const Expression e)

Checks if e is an uninterpreted-function expression.

◆ is_uninterpreted_function() [2/2]

bool is_uninterpreted_function ( const ExpressionCell c)

Checks if c is an uninterpreted-function expression.

◆ is_variable() [1/4]

bool is_variable ( const Formula f)

Checks if f is a variable formula.

◆ is_variable() [2/4]

bool is_variable ( const FormulaCell f)

Checks if f is a variable formula.

◆ is_variable() [3/4]

bool is_variable ( const Expression e)

Checks if e is a variable expression.

◆ is_variable() [4/4]

bool is_variable ( const ExpressionCell c)

Checks if c is a variable expression.

◆ is_zero()

bool is_zero ( const Expression e)

Checks if e is 0.0.

◆ isfinite()

Formula isfinite ( const Expression e)

Returns a Formula determining if the given expression e has a finite value.

Exceptions
std::runtime_errorif NaN is detected during evaluation.

◆ isinf()

Formula isinf ( const Expression e)

Returns a Formula determining if the given expression e is a positive or negative infinity.

Exceptions
std::runtime_errorif NaN is detected during evaluation.

◆ isnan()

Formula isnan ( const Expression e)

Returns a Formula for the predicate isnan(e) to the given expression.

This serves as the argument-dependent lookup related to std::isnan(double). When evaluated, this Formula will return false when the e.Evaluate() is not NaN.

Exceptions
std::runtime_errorif NaN is detected during evaluation.

◆ Jacobian() [1/2]

MatrixX< Expression > Jacobian ( const Eigen::Ref< const VectorX< Expression >> &  f,
const std::vector< Variable > &  vars 
)

Computes the Jacobian matrix J of the vector function f with respect to vars.

J(i,j) contains ∂f(i)/∂vars(j).

For example, Jacobian([x * cos(y), x * sin(y), x^2], {x, y}) returns the following 3x2 matrix:

 = |cos(y)   -x * sin(y)|
   |sin(y)    x * cos(y)|
   | 2 * x             0|
 
Precondition
{vars is non-empty}.

◆ Jacobian() [2/2]

MatrixX< Expression > Jacobian ( const Eigen::Ref< const VectorX< Expression >> &  f,
const Eigen::Ref< const VectorX< Variable >> &  vars 
)

Computes the Jacobian matrix J of the vector function f with respect to vars.

J(i,j) contains ∂f(i)/∂vars(j).

Precondition
{vars is non-empty}.

◆ log()

Expression log ( const Expression e)

◆ make_conjunction()

Formula make_conjunction ( const std::set< Formula > &  formulas)

Returns a conjunction of formulas.

It performs the following simplification:

  • make_conjunction({}) returns True.
  • make_conjunction({f₁}) returns f₁.
  • If False ∈ formulas, it returns False.
  • If True ∈ formulas, it will not appear in the return value.
  • Nested conjunctions will be flattened. For example, make_conjunction({f₁, f₂ ∧ f₃}) returns f₁ ∧ f₂ ∧ f₃.

◆ make_disjunction()

Formula make_disjunction ( const std::set< Formula > &  formulas)

Returns a disjunction of formulas.

It performs the following simplification:

  • make_disjunction({}) returns False.
  • make_disjunction({f₁}) returns f₁.
  • If True ∈ formulas, it returns True.
  • If False ∈ formulas, it will not appear in the return value.
  • Nested disjunctions will be flattened. For example, make_disjunction({f₁, f₂ ∨ f₃}) returns f₁ ∨ f₂ ∨ f₃.

◆ MakeMatrixBinaryVariable() [1/2]

MatrixX< Variable > MakeMatrixBinaryVariable ( int  rows,
int  cols,
const std::string &  name 
)

Creates a dynamically-sized Eigen matrix of symbolic binary variables.

Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixBinaryVariable() [2/2]

Eigen::Matrix<Variable, rows, cols> drake::symbolic::MakeMatrixBinaryVariable ( const std::string &  name)

Creates a static-sized Eigen matrix of symbolic binary variables.

Template Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
Parameters
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixBooleanVariable() [1/2]

MatrixX< Variable > MakeMatrixBooleanVariable ( int  rows,
int  cols,
const std::string &  name 
)

Creates a dynamically-sized Eigen matrix of symbolic Boolean variables.

Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixBooleanVariable() [2/2]

Eigen::Matrix<Variable, rows, cols> drake::symbolic::MakeMatrixBooleanVariable ( const std::string &  name)

Creates a static-sized Eigen matrix of symbolic Boolean variables.

Template Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
Parameters
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixContinuousVariable() [1/2]

MatrixX< Variable > MakeMatrixContinuousVariable ( int  rows,
int  cols,
const std::string &  name 
)

Creates a dynamically-sized Eigen matrix of symbolic continuous variables.

Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixContinuousVariable() [2/2]

Eigen::Matrix<Variable, rows, cols> drake::symbolic::MakeMatrixContinuousVariable ( const std::string &  name)

Creates a static-sized Eigen matrix of symbolic continuous variables.

Template Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
Parameters
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixIntegerVariable() [1/2]

MatrixX< Variable > MakeMatrixIntegerVariable ( int  rows,
int  cols,
const std::string &  name 
)

Creates a dynamically-sized Eigen matrix of symbolic integer variables.

Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixIntegerVariable() [2/2]

Eigen::Matrix<Variable, rows, cols> drake::symbolic::MakeMatrixIntegerVariable ( const std::string &  name)

Creates a static-sized Eigen matrix of symbolic integer variables.

Template Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
Parameters
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).

◆ MakeMatrixVariable() [1/2]

MatrixX< Variable > MakeMatrixVariable ( int  rows,
int  cols,
const std::string &  name,
Variable::Type  type 
)

Creates a dynamically-sized Eigen matrix of symbolic variables.

Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).
typeThe type of variables in the matrix.

◆ MakeMatrixVariable() [2/2]

Eigen::Matrix<Variable, rows, cols> drake::symbolic::MakeMatrixVariable ( const std::string &  name,
Variable::Type  type 
)

Creates a static-sized Eigen matrix of symbolic variables.

Template Parameters
rowsThe number of rows in the new matrix.
colsThe number of cols in the new matrix.
Parameters
nameThe common prefix for variables. The (i, j)-th element will be named as name(i, j).
typeThe type of variables in the matrix.

◆ MakeRuleRewriter()

Rewriter MakeRuleRewriter ( const RewritingRule rule)

Constructs a rewriter based on a rewriting rule r.

◆ MakeVectorBinaryVariable() [1/2]

VectorX< Variable > MakeVectorBinaryVariable ( int  rows,
const std::string &  name 
)

Creates a dynamically-sized Eigen vector of symbolic binary variables.

Parameters
rowsThe size of vector.
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorBinaryVariable() [2/2]

Eigen::Matrix<Variable, rows, 1> drake::symbolic::MakeVectorBinaryVariable ( const std::string &  name)

Creates a static-sized Eigen vector of symbolic binary variables.

Template Parameters
rowsThe size of vector.
Parameters
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorBooleanVariable() [1/2]

VectorX< Variable > MakeVectorBooleanVariable ( int  rows,
const std::string &  name 
)

Creates a dynamically-sized Eigen vector of symbolic Boolean variables.

Parameters
rowsThe size of vector.
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorBooleanVariable() [2/2]

Eigen::Matrix<Variable, rows, 1> drake::symbolic::MakeVectorBooleanVariable ( const std::string &  name)

Creates a static-sized Eigen vector of symbolic Boolean variables.

Template Parameters
rowsThe size of vector.
Parameters
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorContinuousVariable() [1/2]

VectorX< Variable > MakeVectorContinuousVariable ( int  rows,
const std::string &  name 
)

Creates a dynamically-sized Eigen vector of symbolic continuous variables.

Parameters
rowsThe size of vector.
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorContinuousVariable() [2/2]

Eigen::Matrix<Variable, rows, 1> drake::symbolic::MakeVectorContinuousVariable ( const std::string &  name)

Creates a static-sized Eigen vector of symbolic continuous variables.

Template Parameters
rowsThe size of vector.
Parameters
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorIntegerVariable() [1/2]

VectorX< Variable > MakeVectorIntegerVariable ( int  rows,
const std::string &  name 
)

Creates a dynamically-sized Eigen vector of symbolic integer variables.

Parameters
rowsThe size of vector.
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorIntegerVariable() [2/2]

Eigen::Matrix<Variable, rows, 1> drake::symbolic::MakeVectorIntegerVariable ( const std::string &  name)

Creates a static-sized Eigen vector of symbolic integer variables.

Template Parameters
rowsThe size of vector.
Parameters
nameThe common prefix for variables. The i-th element will be named as name(i).

◆ MakeVectorVariable() [1/2]

VectorX< Variable > MakeVectorVariable ( int  rows,
const std::string &  name,
Variable::Type  type 
)

Creates a dynamically-sized Eigen vector of symbolic variables.

Parameters
rowsThe size of vector.
nameThe common prefix for variables. The i-th element will be named as name(i).
typeThe type of variables in the vector.

◆ MakeVectorVariable() [2/2]

Eigen::Matrix<Variable, rows, 1> drake::symbolic::MakeVectorVariable ( const std::string &  name,
Variable::Type  type 
)

Creates a static-sized Eigen vector of symbolic variables.

Template Parameters
rowsThe size of vector.
Parameters
nameThe common prefix for variables. The i-th element will be named as name(i).
typeThe type of variables in the vector.

◆ max()

Expression max ( const Expression e1,
const Expression e2 
)

◆ min()

Expression min ( const Expression e1,
const Expression e2 
)

◆ MonomialBasis() [1/2]

Eigen::Matrix< Monomial, Eigen::Dynamic, 1 > MonomialBasis ( const Variables vars,
int  degree 
)

Returns all monomials up to a given degree under the graded reverse lexicographic order.

Note that graded reverse lexicographic order uses the total order among Variable which is based on a variable's unique ID. For example, for a given variable ordering x > y > z, MonomialBasis({x, y, z}, 2) returns a column vector [x^2, xy, y^2, xz, yz, z^2, x, y, z, 1].

Precondition
vars is a non-empty set.
degree is a non-negative integer.

◆ MonomialBasis() [2/2]

Eigen::Matrix<Monomial, NChooseK(n + degree, degree), 1> drake::symbolic::MonomialBasis ( const Variables vars)

Returns all monomials up to a given degree under the graded reverse lexicographic order.

Template Parameters
nnumber of variables.
degreemaximum total degree of monomials to compute.
Precondition
vars is a non-empty set.
vars.size() == n.

◆ NChooseK()

constexpr int drake::symbolic::NChooseK ( int  n,
int  k 
)

◆ operator &&() [1/8]

Formula drake::symbolic::operator&& ( const Formula f1,
const Formula f2 
)

◆ operator &&() [2/8]

Formula drake::symbolic::operator&& ( const Variable v,
const Formula f 
)

◆ operator &&() [3/8]

Formula drake::symbolic::operator&& ( const Formula f,
const Variable v 
)

◆ operator &&() [4/8]

Formula drake::symbolic::operator&& ( const Variable v1,
const Variable v2 
)

◆ operator &&() [5/8]

Formula drake::symbolic::operator&& ( const Formula f1,
const Formula f2 
)

◆ operator &&() [6/8]

Formula drake::symbolic::operator&& ( const Variable v,
const Formula f 
)

◆ operator &&() [7/8]

Formula drake::symbolic::operator&& ( const Formula f,
const Variable v 
)

◆ operator &&() [8/8]

Formula drake::symbolic::operator&& ( const Variable v1,
const Variable v2 
)

◆ operator!() [1/2]

Formula operator! ( const Formula f)

◆ operator!() [2/2]

Formula operator! ( const Variable v)

◆ operator!=() [1/5]

Formula operator!= ( const Expression e1,
const Expression e2 
)

◆ operator!=() [2/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::ArrayXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() != typename DerivedB::Scalar()), Formula>::value, typename detail::RelationalOpTraits<DerivedA, DerivedB>::ReturnType>::type drake::symbolic::operator!= ( const DerivedA &  a1,
const DerivedB &  a2 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using not-equal operator (!=).

◆ operator!=() [3/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename Derived::Scalar() != ScalarType()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator!= ( const Derived &  a,
const ScalarType &  v 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using not-equal operator (!=).

That is, for all i and j, the (i, j)-th entry of (a != v) has a symbolic formula a(i, j) != v.

◆ operator!=() [4/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(ScalarType() != typename Derived::Scalar()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator!= ( const ScalarType &  v,
const Derived &  a 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using not-equal operator (!=).

That is, for all i and j, the (i, j)-th entry of (v != a) has a symbolic formula v != a(i, j).

◆ operator!=() [5/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::MatrixXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() != typename DerivedB::Scalar()), Formula>::value, Formula>::type drake::symbolic::operator!= ( const DerivedA &  m1,
const DerivedB &  m2 
)

Returns a symbolic formula representing the condition whether m1 and m2 are not the same.

The following table describes the return type of m1 != m2.

LHS \ RHS EM<Expression> EM<Variable> EM<double>
EM<Expression> Formula Formula Formula
EM<Variable> Formula Formula Formula
EM<double> Formula Formula bool

In the table, EM is a short-hand of Eigen::Matrix.

Note that this function does not provide operator overloading for the following case. It returns bool and is provided by Eigen.

  • Eigen::Matrix<double> != Eigen::Matrix<double>

◆ operator*() [1/24]

Eigen::Matrix<RationalFunction, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following operations:

  • Matrix<RF> * Matrix<Polynomial> => Matrix<RF>
  • Matrix<RF> * Matrix<double> => Matrix<RF>
  • Matrix<Polynomial> * Matrix<RF> => Matrix<RF>
  • Matrix<double> * Matrix<RF> => Matrix<RF>

where RF is a shorthand for RationalFunction.

Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information

Provides the following operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [2/24]

RationalFunction operator* ( RationalFunction  f1,
const RationalFunction f2 
)

◆ operator*() [3/24]

RationalFunction operator* ( RationalFunction  f,
const Polynomial p 
)

◆ operator*() [4/24]

RationalFunction operator* ( const Polynomial p,
RationalFunction  f 
)

◆ operator*() [5/24]

RationalFunction operator* ( RationalFunction  f,
double  c 
)

◆ operator*() [6/24]

RationalFunction operator* ( double  c,
RationalFunction  f 
)

◆ operator*() [7/24]

Eigen::Matrix<Polynomial, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following seven operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [8/24]

Monomial operator* ( Monomial  m1,
const Monomial m2 
)

Returns a multiplication of two monomials, m1 and m2.

◆ operator*() [9/24]

Expression operator* ( Expression  lhs,
const Expression rhs 
)

◆ operator*() [10/24]

std::enable_if< std::is_base_of<Eigen::MatrixBase<MatrixL>, MatrixL>::value && std::is_base_of<Eigen::MatrixBase<MatrixR>, MatrixR>::value && std::is_same<typename MatrixL::Scalar, Expression>::value && std::is_same<typename MatrixR::Scalar, double>::value, Eigen::Matrix<Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> >::type drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following seven operations:

Provides the following operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [11/24]

std::enable_if< std::is_base_of<Eigen::MatrixBase<MatrixL>, MatrixL>::value && std::is_base_of<Eigen::MatrixBase<MatrixR>, MatrixR>::value && std::is_same<typename MatrixL::Scalar, double>::value && std::is_same<typename MatrixR::Scalar, Expression>::value, Eigen::Matrix<Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> >::type drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following seven operations:

Provides the following operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [12/24]

std::enable_if< std::is_base_of<Eigen::MatrixBase<MatrixL>, MatrixL>::value && std::is_base_of<Eigen::MatrixBase<MatrixR>, MatrixR>::value && std::is_same<typename MatrixL::Scalar, Expression>::value && std::is_same<typename MatrixR::Scalar, Variable>::value, Eigen::Matrix<Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> >::type drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following seven operations:

Provides the following operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [13/24]

Polynomial operator* ( Polynomial  p1,
const Polynomial p2 
)

◆ operator*() [14/24]

Polynomial operator* ( Polynomial  p,
const Monomial m 
)

◆ operator*() [15/24]

Polynomial operator* ( const Monomial m,
Polynomial  p 
)

◆ operator*() [16/24]

Polynomial operator* ( const double  c,
Polynomial  p 
)

◆ operator*() [17/24]

Polynomial operator* ( Polynomial  p,
const double  c 
)

◆ operator*() [18/24]

Polynomial operator* ( const Monomial m,
double  c 
)

◆ operator*() [19/24]

Polynomial operator* ( double  c,
const Monomial m 
)

◆ operator*() [20/24]

std::enable_if< std::is_base_of<Eigen::MatrixBase<MatrixL>, MatrixL>::value && std::is_base_of<Eigen::MatrixBase<MatrixR>, MatrixR>::value && std::is_same<typename MatrixL::Scalar, Variable>::value && std::is_same<typename MatrixR::Scalar, Expression>::value, Eigen::Matrix<Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> >::type drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following seven operations:

Provides the following operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [21/24]

std::enable_if< std::is_base_of<Eigen::MatrixBase<MatrixL>, MatrixL>::value && std::is_base_of<Eigen::MatrixBase<MatrixR>, MatrixR>::value && std::is_same<typename MatrixL::Scalar, Variable>::value && std::is_same<typename MatrixR::Scalar, double>::value, Eigen::Matrix<Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> >::type drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following seven operations:

Provides the following operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [22/24]

std::enable_if< std::is_base_of<Eigen::MatrixBase<MatrixL>, MatrixL>::value && std::is_base_of<Eigen::MatrixBase<MatrixR>, MatrixR>::value && std::is_same<typename MatrixL::Scalar, double>::value && std::is_same<typename MatrixR::Scalar, Variable>::value, Eigen::Matrix<Expression, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime> >::type drake::symbolic::operator* ( const MatrixL &  lhs,
const MatrixR &  rhs 
)

Provides the following seven operations:

Provides the following operations:

  • Matrix<Polynomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Polynomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<Monomial> => Matrix<Polynomial>
  • Matrix<Monomial> * Matrix<double> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Polynomial> => Matrix<Polynomial>
  • Matrix<double> * Matrix<Monomial> => Matrix<Polynomial>
Note
that these operator overloadings are necessary even after providing Eigen::ScalarBinaryOpTraits. See https://stackoverflow.com/questions/41494288/mixing-scalar-types-in-eigen for more information.

◆ operator*() [23/24]

auto drake::symbolic::operator* ( const Eigen::Transform< Expression, Dim, LhsMode, LhsOptions > &  t1,
const Eigen::Transform< double, Dim, RhsMode, RhsOptions > &  t2 
)

Transform<double> * Transform<Expression> => Transform<Expression>

◆ operator*() [24/24]

auto drake::symbolic::operator* ( const Eigen::Transform< double, Dim, LhsMode, LhsOptions > &  t1,
const Eigen::Transform< Expression, Dim, RhsMode, RhsOptions > &  t2 
)

Transform<Expression> * Transform<double> => Transform<Expression>

◆ operator*=()

Expression & operator*= ( Expression lhs,
const Expression rhs 
)

◆ operator+() [1/19]

Variables operator+ ( Variables  vars1,
const Variables vars2 
)

Returns set-union of var1 and var2.

◆ operator+() [2/19]

Variables operator+ ( Variables  vars,
const Variable var 
)

Returns set-union of vars and {var}.

◆ operator+() [3/19]

Variables operator+ ( const Variable var,
Variables  vars 
)

Returns set-union of {var} and vars.

◆ operator+() [4/19]

RationalFunction operator+ ( RationalFunction  f1,
const RationalFunction f2 
)

◆ operator+() [5/19]

RationalFunction operator+ ( RationalFunction  f,
const Polynomial p 
)

◆ operator+() [6/19]

RationalFunction operator+ ( const Polynomial p,
RationalFunction  f 
)

◆ operator+() [7/19]

RationalFunction operator+ ( RationalFunction  f,
double  c 
)

◆ operator+() [8/19]

RationalFunction operator+ ( double  c,
RationalFunction  f 
)

◆ operator+() [9/19]

Expression operator+ ( Expression  lhs,
const Expression rhs 
)

◆ operator+() [10/19]

Expression operator+ ( const Expression e)

◆ operator+() [11/19]

Polynomial operator+ ( Polynomial  p1,
const Polynomial p2 
)

◆ operator+() [12/19]

Polynomial operator+ ( Polynomial  p,
const Monomial m 
)

◆ operator+() [13/19]

Polynomial operator+ ( const Monomial m,
Polynomial  p 
)

◆ operator+() [14/19]

Polynomial operator+ ( const Monomial m1,
const Monomial m2 
)

◆ operator+() [15/19]

Polynomial operator+ ( Polynomial  p,
const double  c 
)

◆ operator+() [16/19]

Polynomial operator+ ( const double  c,
Polynomial  p 
)

◆ operator+() [17/19]

Polynomial operator+ ( const Monomial m,
const double  c 
)

◆ operator+() [18/19]

Polynomial operator+ ( const double  c,
const Monomial m 
)

◆ operator+() [19/19]

Expression operator+ ( const Variable var)

◆ operator+=() [1/3]

Variables operator+= ( Variables vars1,
const Variables vars2 
)

Updates var1 with the result of set-union(var1, var2).

◆ operator+=() [2/3]

Variables operator+= ( Variables vars,
const Variable var 
)

Updates vars with the result of set-union(vars, { var }).

◆ operator+=() [3/3]

Expression & operator+= ( Expression lhs,
const Expression rhs 
)

◆ operator-() [1/20]

Variables operator- ( Variables  vars1,
const Variables vars2 
)

Returns set-minus(var1, vars2).

◆ operator-() [2/20]

Variables operator- ( Variables  vars,
const Variable var 
)

Returns set-minus(vars, { var }).

◆ operator-() [3/20]

Unary minus operation for rational function.

if f(x) = p(x) / q(x), then -f(x) = (-p(x)) / q(x)

◆ operator-() [4/20]

RationalFunction operator- ( RationalFunction  f1,
const RationalFunction f2 
)

◆ operator-() [5/20]

RationalFunction operator- ( RationalFunction  f,
const Polynomial p 
)

◆ operator-() [6/20]

RationalFunction operator- ( const Polynomial p,
RationalFunction  f 
)

◆ operator-() [7/20]

RationalFunction operator- ( RationalFunction  f,
double  c 
)

◆ operator-() [8/20]

RationalFunction operator- ( double  c,
RationalFunction  f 
)

◆ operator-() [9/20]

Expression operator- ( Expression  lhs,
const Expression rhs 
)

◆ operator-() [10/20]

Expression operator- ( const Expression e)

◆ operator-() [11/20]

Polynomial operator- ( Polynomial  p)

Unary minus operation for polynomial.

◆ operator-() [12/20]

Polynomial operator- ( Polynomial  p1,
const Polynomial p2 
)

◆ operator-() [13/20]

Polynomial operator- ( Polynomial  p,
const Monomial m 
)

◆ operator-() [14/20]

Polynomial operator- ( const Monomial m,
Polynomial  p 
)

◆ operator-() [15/20]

Polynomial operator- ( const Monomial m1,
const Monomial m2 
)

◆ operator-() [16/20]

Polynomial operator- ( Polynomial  p,
const double  c 
)

◆ operator-() [17/20]

Polynomial operator- ( const double  c,
Polynomial  p 
)

◆ operator-() [18/20]

Polynomial operator- ( const Monomial m,
const double  c 
)

◆ operator-() [19/20]

Polynomial operator- ( const double  c,
const Monomial m 
)

◆ operator-() [20/20]

Expression operator- ( const Variable var)

◆ operator-=() [1/3]

Variables operator-= ( Variables vars1,
const Variables vars2 
)

Updates var1 with the result of set-minus(var1, var2).

◆ operator-=() [2/3]

Variables operator-= ( Variables vars,
const Variable var 
)

Updates vars with the result of set-minus(vars, {var}).

◆ operator-=() [3/3]

Expression & operator-= ( Expression lhs,
const Expression rhs 
)

◆ operator/() [1/6]

RationalFunction operator/ ( RationalFunction  f1,
const RationalFunction f2 
)

◆ operator/() [2/6]

RationalFunction operator/ ( RationalFunction  f,
const Polynomial p 
)

◆ operator/() [3/6]

RationalFunction operator/ ( const Polynomial p,
const RationalFunction f 
)

◆ operator/() [4/6]

RationalFunction operator/ ( RationalFunction  f,
double  c 
)

◆ operator/() [5/6]

RationalFunction operator/ ( double  c,
const RationalFunction f 
)

◆ operator/() [6/6]

Expression operator/ ( Expression  lhs,
const Expression rhs 
)

◆ operator/=()

Expression & operator/= ( Expression lhs,
const Expression rhs 
)

◆ operator<() [1/8]

bool operator< ( FormulaKind  k1,
FormulaKind  k2 
)

◆ operator<() [2/8]

bool operator< ( ExpressionKind  k1,
ExpressionKind  k2 
)

Total ordering between ExpressionKinds.

◆ operator<() [3/8]

bool drake::symbolic::operator< ( const Variables vars1,
const Variables vars2 
)

◆ operator<() [4/8]

Formula operator< ( const Expression e1,
const Expression e2 
)

◆ operator<() [5/8]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::ArrayXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() < typename DerivedB::Scalar()), Formula>::value, typename detail::RelationalOpTraits<DerivedA, DerivedB>::ReturnType>::type drake::symbolic::operator< ( const DerivedA &  a1,
const DerivedB &  a2 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using less-than operator (<).

◆ operator<() [6/8]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename Derived::Scalar() < ScalarType()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator< ( const Derived &  a,
const ScalarType &  v 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using less-than operator (<).

That is, for all i and j, the (i, j)-th entry of (a < v) has a symbolic formula a(i, j) < v.

◆ operator<() [7/8]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(ScalarType() < typename Derived::Scalar()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator< ( const ScalarType &  v,
const Derived &  a 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than operator (<).

That is, for all i and j, the (i, j)-th entry of (v < a) has a symbolic formula v < a(i, j).

◆ operator<() [8/8]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::MatrixXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() < typename DerivedB::Scalar()), Formula>::value, Formula>::type drake::symbolic::operator< ( const DerivedA &  m1,
const DerivedB &  m2 
)

Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using less-than (<) operator.

The following table describes the return type of m1 < m2.

LHS \ RHS EM<Expression> EM<Variable> EM<double>
EM<Expression> Formula Formula Formula
EM<Variable> Formula Formula Formula
EM<double> Formula Formula N/A

In the table, EM is a short-hand of Eigen::Matrix.

◆ operator<<() [1/9]

std::ostream& drake::symbolic::operator<< ( std::ostream &  os,
const RationalFunction f 
)

◆ operator<<() [2/9]

ostream& drake::symbolic::operator<< ( std::ostream &  os,
const Variable var 
)

◆ operator<<() [3/9]

std::ostream & operator<< ( ostream &  os,
Variable::Type  type 
)

◆ operator<<() [4/9]

ostream& drake::symbolic::operator<< ( std::ostream &  os,
const Environment env 
)

◆ operator<<() [5/9]

ostream& drake::symbolic::operator<< ( std::ostream &  os,
const Variables vars 
)

◆ operator<<() [6/9]

std::ostream & operator<< ( ostream &  os,
const Formula f 
)

◆ operator<<() [7/9]

std::ostream & operator<< ( ostream &  out,
const Monomial m 
)

◆ operator<<() [8/9]

std::ostream & operator<< ( ostream &  os,
const Expression e 
)

◆ operator<<() [9/9]

std::ostream & operator<< ( ostream &  os,
const Polynomial p 
)

◆ operator<=() [1/5]

Formula operator<= ( const Expression e1,
const Expression e2 
)

◆ operator<=() [2/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::ArrayXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() <= typename DerivedB::Scalar()), Formula>::value, typename detail::RelationalOpTraits<DerivedA, DerivedB>::ReturnType>::type drake::symbolic::operator<= ( const DerivedA &  a1,
const DerivedB &  a2 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using less-than-or-equal operator (<=).

◆ operator<=() [3/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename Derived::Scalar() <= ScalarType()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator<= ( const Derived &  a,
const ScalarType &  v 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using less-than-or-equal operator (<=).

That is, for all i and j, the (i, j)-th entry of (a <= v) has a symbolic formula a(i, j) <= v.

◆ operator<=() [4/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(ScalarType() <= typename Derived::Scalar()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator<= ( const ScalarType &  v,
const Derived &  a 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than-or-equal operator (<=).

That is, for all i and j, the (i, j)-th entry of (v <= a) has a symbolic formula v <= a(i, j).

◆ operator<=() [5/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::MatrixXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() <= typename DerivedB::Scalar()), Formula>::value, Formula>::type drake::symbolic::operator<= ( const DerivedA &  m1,
const DerivedB &  m2 
)

Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using less-than-or-equal operator (<=).

The following table describes the return type of m1 <= m2.

LHS \ RHS EM<Expression> EM<Variable> EM<double>
EM<Expression> Formula Formula Formula
EM<Variable> Formula Formula Formula
EM<double> Formula Formula N/A

In the table, EM is a short-hand of Eigen::Matrix.

◆ operator==() [1/6]

bool drake::symbolic::operator== ( const Variables vars1,
const Variables vars2 
)

◆ operator==() [2/6]

Formula operator== ( const Expression e1,
const Expression e2 
)

◆ operator==() [3/6]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::ArrayXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() == typename DerivedB::Scalar()), Formula>::value, typename detail::RelationalOpTraits<DerivedA, DerivedB>::ReturnType>::type drake::symbolic::operator== ( const DerivedA &  a1,
const DerivedB &  a2 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise symbolic-equality of two arrays m1 and m2.

The following table describes the return type of m1 == m2.

LHS \ RHS EA<Expression> EA<Variable> EA<double>
EA<Expression> EA<Formula> EA<Formula> EA<Formula>
EA<Variable> EA<Formula> EA<Formula> EA<Formula>
EA<double> EA<Formula> EA<Formula> EA<bool>

In the table, EA is a short-hand of Eigen::Array.

Note that this function does not provide operator overloading for the following case. It returns Eigen::Array<bool> and is provided by Eigen.

  • Eigen::Array<double> == Eigen::Array<double>

◆ operator==() [4/6]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename Derived::Scalar() == ScalarType()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator== ( const Derived &  a,
const ScalarType &  v 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using equal-to operator (==).

That is, for all i and j, the (i, j)-th entry of (a == v) has a symbolic formula a(i, j) == v.

Here is an example using this operator overloading.

Eigen::Array<Variable, 2, 2> a;
a << Variable{"x"}, Variable{"y"},
Variable{"z"}, Variable{"w"};
Eigen::Array<Formula, 2, 2> f = (a == 3.5);
// Here f = |(x == 3.5) (y == 3.5)|
// |(z == 3.5) (w == 3.5)|.

◆ operator==() [5/6]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(ScalarType() == typename Derived::Scalar()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator== ( const ScalarType &  v,
const Derived &  a 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using equal-to operator (==).

That is, for all i and j, the (i, j)-th entry of (v == a) has a symbolic formula v == a(i, j).

Here is an example using this operator overloading.

Eigen::Array<Variable, 2, 2> a;
a << Variable{"x"}, Variable{"y"},
Variable{"z"}, Variable{"w"};
Eigen::Array<Formula, 2, 2> f = (3.5 == a);
// Here f = |(3.5 == x) (3.5 == y)|
// |(3.5 == z) (3.5 == w)|.

◆ operator==() [6/6]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::MatrixXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() == typename DerivedB::Scalar()), Formula>::value, Formula>::type drake::symbolic::operator== ( const DerivedA &  m1,
const DerivedB &  m2 
)

Returns a symbolic formula checking if two matrices m1 and m2 are equal.

The following table describes the return type of m1 == m2.

LHS \ RHS EM<Expression> EM<Variable> EM<double>
EM<Expression> Formula Formula Formula
EM<Variable> Formula Formula Formula
EM<double> Formula Formula bool

In the table, EM is a short-hand of Eigen::Matrix.

Note that this function does not provide operator overloading for the following case. It returns bool and is provided by Eigen.

  • Eigen::Matrix<double> == Eigen::Matrix<double>

Note that this method returns a conjunctive formula which keeps its conjuncts as std::set<Formula> internally. This set is ordered by Formula::Less and this ordering can be different from the one in inputs. Also, any duplicated formulas are removed in construction. Please check the following example.

// set up v1 = [y x y] and v2 = [1 2 1]
VectorX<Expression> v1{3};
VectorX<Expression> v2{3};
const Variable x{"x"};
const Variable y{"y"};
v1 << y, x, y;
v2 << 1, 2, 1;
// Here v1_eq_v2 = ((x = 2) ∧ (y = 1))
const Formula v1_eq_v2{v1 == v2};
const std::set<Formula> conjuncts{get_operands(v1_eq_v2)};
for (const Formula& f : conjuncts) {
std::cerr << f << std::endl;
}
// The outcome of the above loop is:
(x = 2)
(y = 1)

◆ operator>() [1/5]

Formula operator> ( const Expression e1,
const Expression e2 
)

◆ operator>() [2/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::ArrayXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() > typename DerivedB::Scalar()), Formula>::value, typename detail::RelationalOpTraits<DerivedA, DerivedB>::ReturnType>::type drake::symbolic::operator> ( const DerivedA &  a1,
const DerivedB &  a2 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using greater-than operator (>).

◆ operator>() [3/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename Derived::Scalar() > ScalarType()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator> ( const Derived &  a,
const ScalarType &  v 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using greater-than operator (>).

That is, for all i and j, the (i, j)-th entry of (a > v) has a symbolic formula a(i, j) > v.

◆ operator>() [4/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(ScalarType() > typename Derived::Scalar()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator> ( const ScalarType &  v,
const Derived &  a 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than operator (<) instead of greater-than operator (>).

That is, for all i and j, the (i, j)-th entry of (v > a) has a symbolic formula a(i, j) < v.

Note that given v > a, this methods returns the result of a < v. First of all, this formulation is mathematically equivalent to the original formulation. We implement this method in this way to be consistent with Eigen's semantics. See the definition of EIGEN_MAKE_CWISE_COMP_R_OP in ArrayCwiseBinaryOps.h file in Eigen.

◆ operator>() [5/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::MatrixXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() > typename DerivedB::Scalar()), Formula>::value, Formula>::type drake::symbolic::operator> ( const DerivedA &  m1,
const DerivedB &  m2 
)

Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using greater-than operator (>).

The following table describes the return type of m1 > m2.

LHS \ RHS EM<Expression> EM<Variable> EM<double>
EM<Expression> Formula Formula Formula
EM<Variable> Formula Formula Formula
EM<double> Formula Formula N/A

In the table, EM is a short-hand of Eigen::Matrix.

◆ operator>=() [1/5]

Formula operator>= ( const Expression e1,
const Expression e2 
)

◆ operator>=() [2/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::ArrayXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() >= typename DerivedB::Scalar()), Formula>::value, typename detail::RelationalOpTraits<DerivedA, DerivedB>::ReturnType>::type drake::symbolic::operator>= ( const DerivedA &  a1,
const DerivedB &  a2 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison of two arrays a1 and a2 using greater-than-or-equal operator (>=).

◆ operator>=() [3/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(typename Derived::Scalar() >= ScalarType()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator>= ( const Derived &  a,
const ScalarType &  v 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between an array a and a scalar v using greater-than-or-equal operator (>=).

That is, for all i and j, the (i, j)-th entry of (a >= v) has a symbolic formula a(i, j) >= v.

◆ operator>=() [4/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::ArrayXpr>::value && std::is_same<decltype(ScalarType() >= typename Derived::Scalar()), Formula>::value, Eigen::Array<Formula, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime> >::type drake::symbolic::operator>= ( const ScalarType &  v,
const Derived &  a 
)

Returns an Eigen array of symbolic formulas where each element includes element-wise comparison between a scalar v and an array using less-than-or-equal operator (<=) instead of greater-than-or-equal operator (>=).

That is, for all i and j, the (i, j)-th entry of (v >= a) has a symbolic formula a(i, j) <= v.

Note that given v >= a, this methods returns the result of a <= v. First of all, this formulation is mathematically equivalent to the original formulation. We implement this method in this way to be consistent with Eigen's semantics. See the definition of EIGEN_MAKE_CWISE_COMP_R_OP in ArrayCwiseBinaryOps.h file in Eigen.

◆ operator>=() [5/5]

std::enable_if< std::is_same<typename Eigen::internal::traits<DerivedA>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Eigen::internal::traits<DerivedB>::XprKind, Eigen::MatrixXpr>::value && std::is_same<decltype(typename DerivedA::Scalar() >= typename DerivedB::Scalar()), Formula>::value, Formula>::type drake::symbolic::operator>= ( const DerivedA &  m1,
const DerivedB &  m2 
)

Returns a symbolic formula representing element-wise comparison between two matrices m1 and m2 using greater-than-or-equal operator (>=).

The following table describes the return type of m1 >= m2.

LHS \ RHS EM<Expression> EM<Variable> EM<double>
EM<Expression> Formula Formula Formula
EM<Variable> Formula Formula Formula
EM<double> Formula Formula N/A

In the table, EM is a short-hand of Eigen::Matrix.

◆ operator||() [1/4]

Formula operator|| ( const Formula f1,
const Formula f2 
)

◆ operator||() [2/4]

Formula operator|| ( const Variable v,
const Formula f 
)

◆ operator||() [3/4]

Formula operator|| ( const Formula f,
const Variable v 
)

◆ operator||() [4/4]

Formula operator|| ( const Variable v1,
const Variable v2 
)

◆ positive_semidefinite() [1/4]

Formula positive_semidefinite ( const Eigen::Ref< const MatrixX< Expression >> &  m)

Returns a symbolic formula constraining m to be a positive-semidefinite matrix.

By definition, a symmetric matrix m is positive-semidefinte if xᵀ m x ≥ 0 for all vector x ∈ ℝⁿ.

Exceptions
std::runtime_errorif m is not symmetric.
Note
This method checks if m is symmetric by calling math::IsSymmetric function which can be costly. If you want to avoid it, please consider using positive_semidefinite(m.triangularView<Eigen::Lower>()) or positive_semidefinite(m.triangularView<Eigen::Upper>()) instead of positive_semidefinite(m).

◆ positive_semidefinite() [2/4]

Formula positive_semidefinite ( const MatrixX< Expression > &  m,
Eigen::UpLoType  mode 
)

Constructs and returns a symbolic positive-semidefinite formula from m.

If mode is Eigen::Lower, it's using the lower-triangular part of m to construct a positive-semidefinite formula. If mode is Eigen::Upper, the upper-triangular part of m is used. It throws std::runtime_error if has other values. See the following code snippet.

Eigen::Matrix<Expression, 2, 2> m;
m << 1.0, 2.0,
3.0, 4.0;
const Formula psd_l{positive_semidefinite(m, Eigen::Lower)};
// psd_l includes [1.0 3.0]
// [3.0 4.0].
const Formula psd_u{positive_semidefinite(m, Eigen::Upper)};
// psd_u includes [1.0 2.0]
// [2.0 4.0].

◆ positive_semidefinite() [3/4]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Derived::Scalar, Expression>::value, Formula>::type drake::symbolic::positive_semidefinite ( const Eigen::TriangularView< Derived, Eigen::Lower > &  l)

Constructs and returns a symbolic positive-semidefinite formula from a lower triangular-view l.

See the following code snippet.

Eigen::Matrix<Expression, 2, 2> m;
m << 1.0, 2.0,
3.0, 4.0;
Formula psd{positive_semidefinite(m.triangularView<Eigen::Lower>())};
// psd includes [1.0 3.0]
// [3.0 4.0].

◆ positive_semidefinite() [4/4]

std::enable_if< std::is_same<typename Eigen::internal::traits<Derived>::XprKind, Eigen::MatrixXpr>::value && std::is_same<typename Derived::Scalar, Expression>::value, Formula>::type drake::symbolic::positive_semidefinite ( const Eigen::TriangularView< Derived, Eigen::Upper > &  u)

Constructs and returns a symbolic positive-semidefinite formula from an upper triangular-view u.

See the following code snippet.

Eigen::Matrix<Expression, 2, 2> m;
m << 1.0, 2.0,
3.0, 4.0;
Formula psd{positive_semidefinite(m.triangularView<Eigen::Upper>())};
// psd includes [1.0 2.0]
// [2.0 4.0].

◆ pow() [1/4]

RationalFunction pow ( const RationalFunction f,
int  n 
)

Returns the rational function f raised to n.

If n is positive, (f/g)ⁿ = fⁿ / gⁿ; If n is negative, (f/g)ⁿ = g⁻ⁿ / f⁻ⁿ; (f/g)⁰ = 1 / 1.

◆ pow() [2/4]

Monomial pow ( Monomial  m,
int  p 
)

Returns m1 raised to p.

Exceptions
std::runtime_errorif p is negative.

◆ pow() [3/4]

Expression pow ( const Expression e1,
const Expression e2 
)

◆ pow() [4/4]

Polynomial pow ( const Polynomial p,
int  n 
)

Returns polynomial rasied to n.

◆ sin()

Expression sin ( const Expression e)

◆ sinh()

Expression sinh ( const Expression e)

◆ sqrt()

Expression sqrt ( const Expression e)

◆ swap()

void drake::symbolic::swap ( Expression a,
Expression b 
)

◆ tan()

Expression tan ( const Expression e)

◆ tanh()

Expression tanh ( const Expression e)

◆ TaylorExpand()

Expression TaylorExpand ( const Expression f,
const Environment a,
int  order 
)

Returns the Taylor series expansion of f around a of order order.

Parameters
[in]fSymbolic expression to approximate using Taylor series expansion.
[in]aSymbolic environment which specifies the point of approximation. If a partial environment is provided, the unspecified variables are treated as symbolic variables (e.g. decision variable).
[in]orderPositive integer which specifies the maximum order of the resulting polynomial approximating f around a.

◆ TEST_F() [1/3]

drake::symbolic::TEST_F ( SymbolicRationalFunctionMatrixTest  ,
RationalFunctionOpRationalFunction   
)

◆ TEST_F() [2/3]

drake::symbolic::TEST_F ( SymbolicRationalFunctionMatrixTest  ,
RationalFunctionOpPolynomial   
)

◆ TEST_F() [3/3]

drake::symbolic::TEST_F ( SymbolicRationalFunctionMatrixTest  ,
RationalFunctionOpDouble   
)

◆ to_abs() [1/3]

std::shared_ptr<const ExpressionAbs> drake::symbolic::to_abs ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionAbs>.

Precondition
*expr_ptr is of ExpressionAbs.

◆ to_abs() [2/3]

shared_ptr<const ExpressionAbs> drake::symbolic::to_abs ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_abs() [3/3]

std::shared_ptr< const ExpressionAbs > to_abs ( const Expression e)

Casts e to shared_ptr<const ExpressionAbs>.

Precondition
*(e.ptr_) is of ExpressionAbs.

◆ to_acos() [1/3]

std::shared_ptr<const ExpressionAcos> drake::symbolic::to_acos ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionAcos>.

Precondition
*expr_ptr is of ExpressionAcos.

◆ to_acos() [2/3]

shared_ptr<const ExpressionAcos> drake::symbolic::to_acos ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_acos() [3/3]

std::shared_ptr< const ExpressionAcos > to_acos ( const Expression e)

Casts e to shared_ptr<const ExpressionAcos>.

Precondition
*(e.ptr_) is of ExpressionAcos.

◆ to_addition() [1/3]

std::shared_ptr<const ExpressionAdd> drake::symbolic::to_addition ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionAdd>.

Precondition
*expr_ptr is of ExpressionAdd.

◆ to_addition() [2/3]

shared_ptr<const ExpressionAdd> drake::symbolic::to_addition ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_addition() [3/3]

std::shared_ptr< const ExpressionAdd > to_addition ( const Expression e)

Casts e to shared_ptr<const ExpressionAdd>.

Precondition
*(e.ptr_) is of ExpressionAdd.

◆ to_asin() [1/3]

std::shared_ptr<const ExpressionAsin> drake::symbolic::to_asin ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionAsin>.

Precondition
*expr_ptr is of ExpressionAsin.

◆ to_asin() [2/3]

shared_ptr<const ExpressionAsin> drake::symbolic::to_asin ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_asin() [3/3]

std::shared_ptr< const ExpressionAsin > to_asin ( const Expression e)

Casts e to shared_ptr<const ExpressionAsin>.

Precondition
*(e.ptr_) is of ExpressionAsin.

◆ to_atan() [1/3]

std::shared_ptr<const ExpressionAtan> drake::symbolic::to_atan ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionAtan>.

Precondition
*expr_ptr is of ExpressionAtan.

◆ to_atan() [2/3]

shared_ptr<const ExpressionAtan> drake::symbolic::to_atan ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_atan() [3/3]

std::shared_ptr< const ExpressionAtan > to_atan ( const Expression e)

Casts e to shared_ptr<const ExpressionAtan>.

Precondition
*(e.ptr_) is of ExpressionAtan.

◆ to_atan2() [1/3]

std::shared_ptr<const ExpressionAtan2> drake::symbolic::to_atan2 ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionAtan2>.

Precondition
*expr_ptr is of ExpressionAtan2.

◆ to_atan2() [2/3]

shared_ptr<const ExpressionAtan2> drake::symbolic::to_atan2 ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_atan2() [3/3]

std::shared_ptr< const ExpressionAtan2 > to_atan2 ( const Expression e)

Casts e to shared_ptr<const ExpressionAtan2>.

Precondition
*(e.ptr_) is of ExpressionAtan2.

◆ to_binary() [1/3]

std::shared_ptr<const BinaryExpressionCell> drake::symbolic::to_binary ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const BinaryExpressionCell>.

Precondition
*expr_ptr is of BinaryExpressionCell.

◆ to_binary() [2/3]

shared_ptr<const BinaryExpressionCell> drake::symbolic::to_binary ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_binary() [3/3]

std::shared_ptr< const BinaryExpressionCell > to_binary ( const Expression e)

Casts e to shared_ptr<const BinaryExpressionCell>.

Precondition
*(e.ptr_) is of BinaryExpressionCell.

◆ to_ceil() [1/3]

std::shared_ptr<const ExpressionCeiling> drake::symbolic::to_ceil ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionCeiling>.

Precondition
*expr_ptr is of ExpressionCeiling.

◆ to_ceil() [2/3]

shared_ptr<const ExpressionCeiling> drake::symbolic::to_ceil ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_ceil() [3/3]

std::shared_ptr< const ExpressionCeiling > to_ceil ( const Expression e)

Casts e to shared_ptr<const ExpressionCeiling>.

Precondition
*(e.ptr_) is of ExpressionCeiling.

◆ to_conjunction() [1/3]

std::shared_ptr<const FormulaAnd> drake::symbolic::to_conjunction ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaAnd>.

Precondition
is_conjunction(*f_ptr) is true.

◆ to_conjunction() [2/3]

shared_ptr<const FormulaAnd> drake::symbolic::to_conjunction ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_conjunction() [3/3]

std::shared_ptr< const FormulaAnd > to_conjunction ( const Formula f)

Casts f to shared_ptr<const FormulaAnd>.

Precondition
is_conjunction(f) is true.

◆ to_constant() [1/3]

std::shared_ptr<const ExpressionConstant> drake::symbolic::to_constant ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionConstant>.

Precondition
*expr_ptr is of ExpressionConstant.

◆ to_constant() [2/3]

shared_ptr<const ExpressionConstant> drake::symbolic::to_constant ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_constant() [3/3]

std::shared_ptr< const ExpressionConstant > to_constant ( const Expression e)

Casts e to shared_ptr<const ExpressionConstant>.

Precondition
*(e.ptr_) is of ExpressionConstant.

◆ to_cos() [1/3]

std::shared_ptr<const ExpressionCos> drake::symbolic::to_cos ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionCos>.

Precondition
*expr_ptr is of ExpressionCos.

◆ to_cos() [2/3]

shared_ptr<const ExpressionCos> drake::symbolic::to_cos ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_cos() [3/3]

std::shared_ptr< const ExpressionCos > to_cos ( const Expression e)

Casts e to shared_ptr<const ExpressionCos>.

Precondition
*(e.ptr_) is of ExpressionCos.

◆ to_cosh() [1/3]

std::shared_ptr<const ExpressionCosh> drake::symbolic::to_cosh ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionCosh>.

Precondition
*expr_ptr is of ExpressionCosh.

◆ to_cosh() [2/3]

shared_ptr<const ExpressionCosh> drake::symbolic::to_cosh ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_cosh() [3/3]

std::shared_ptr< const ExpressionCosh > to_cosh ( const Expression e)

Casts e to shared_ptr<const ExpressionCosh>.

Precondition
*(e.ptr_) is of ExpressionCosh.

◆ to_disjunction() [1/3]

std::shared_ptr<const FormulaOr> drake::symbolic::to_disjunction ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaOr>.

Precondition
is_disjunction(*f_ptr) is true.

◆ to_disjunction() [2/3]

shared_ptr<const FormulaOr> drake::symbolic::to_disjunction ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_disjunction() [3/3]

std::shared_ptr< const FormulaOr > to_disjunction ( const Formula f)

Casts f to shared_ptr<const FormulaOr>.

Precondition
is_disjunction(f) is true.

◆ to_division() [1/3]

std::shared_ptr<const ExpressionDiv> drake::symbolic::to_division ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionDiv>.

Precondition
*expr_ptr is of ExpressionDiv.

◆ to_division() [2/3]

shared_ptr<const ExpressionDiv> drake::symbolic::to_division ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_division() [3/3]

std::shared_ptr< const ExpressionDiv > to_division ( const Expression e)

Casts e to shared_ptr<const ExpressionDiv>.

Precondition
*(e.ptr_) is of ExpressionDiv.

◆ to_equal_to() [1/3]

std::shared_ptr<const FormulaEq> drake::symbolic::to_equal_to ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaEq>.

Precondition
is_equal_to(*f_ptr) is true.

◆ to_equal_to() [2/3]

shared_ptr<const FormulaEq> drake::symbolic::to_equal_to ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_equal_to() [3/3]

std::shared_ptr< const FormulaEq > to_equal_to ( const Formula f)

Casts f to shared_ptr<const FormulaEq>.

Precondition
is_equal_to(f) is true.

◆ to_exp() [1/3]

std::shared_ptr< const ExpressionExp > to_exp ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionExp>.

Precondition
*expr_ptr is of ExpressionExp.

◆ to_exp() [2/3]

shared_ptr<const ExpressionExp> drake::symbolic::to_exp ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_exp() [3/3]

std::shared_ptr< const ExpressionExp > to_exp ( const Expression e)

Casts e to shared_ptr<const ExpressionExp>.

Precondition
*(e.ptr_) is of ExpressionExp.

◆ to_false() [1/3]

std::shared_ptr<const FormulaFalse> drake::symbolic::to_false ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaFalse>.

Precondition
is_false(*f_ptr) is true.

◆ to_false() [2/3]

shared_ptr<const FormulaFalse> drake::symbolic::to_false ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_false() [3/3]

std::shared_ptr< const FormulaFalse > to_false ( const Formula f)

Casts f to shared_ptr<const FormulaFalse>.

Precondition
is_false(f) is true.

◆ to_floor() [1/3]

std::shared_ptr<const ExpressionFloor> drake::symbolic::to_floor ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionFloor>.

Precondition
*expr_ptr is of ExpressionFloor.

◆ to_floor() [2/3]

shared_ptr<const ExpressionFloor> drake::symbolic::to_floor ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_floor() [3/3]

std::shared_ptr< const ExpressionFloor > to_floor ( const Expression e)

Casts e to shared_ptr<const ExpressionFloor>.

Precondition
*(e.ptr_) is of ExpressionFloor.

◆ to_forall() [1/3]

std::shared_ptr<const FormulaForall> drake::symbolic::to_forall ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaForall>.

Precondition
is_forall(*f_ptr) is true.

◆ to_forall() [2/3]

shared_ptr<const FormulaForall> drake::symbolic::to_forall ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_forall() [3/3]

std::shared_ptr< const FormulaForall > to_forall ( const Formula f)

Casts f to shared_ptr<const FormulaForall>.

Precondition
is_forall(f) is true.

◆ to_greater_than() [1/3]

std::shared_ptr<const FormulaGt> drake::symbolic::to_greater_than ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaGt>.

Precondition
is_greater_than(*f_ptr) is true.

◆ to_greater_than() [2/3]

shared_ptr<const FormulaGt> drake::symbolic::to_greater_than ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_greater_than() [3/3]

std::shared_ptr< const FormulaGt > to_greater_than ( const Formula f)

Casts f to shared_ptr<const FormulaGt>.

Precondition
is_greater_than(f) is true.

◆ to_greater_than_or_equal_to() [1/3]

std::shared_ptr<const FormulaGeq> drake::symbolic::to_greater_than_or_equal_to ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaGeq>.

Precondition
is_greater_than_or_equal_to(*f_ptr) is true.

◆ to_greater_than_or_equal_to() [2/3]

shared_ptr<const FormulaGeq> drake::symbolic::to_greater_than_or_equal_to ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_greater_than_or_equal_to() [3/3]

std::shared_ptr< const FormulaGeq > to_greater_than_or_equal_to ( const Formula f)

Casts f to shared_ptr<const FormulaGeq>.

Precondition
is_greater_than_or_equal_to(f) is true.

◆ to_if_then_else() [1/3]

std::shared_ptr<const ExpressionIfThenElse> drake::symbolic::to_if_then_else ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionIfThenElse>.

Precondition
*expr_ptr is of ExpressionIfThenElse.

◆ to_if_then_else() [2/3]

shared_ptr<const ExpressionIfThenElse> drake::symbolic::to_if_then_else ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_if_then_else() [3/3]

std::shared_ptr< const ExpressionIfThenElse > to_if_then_else ( const Expression e)

Casts e to shared_ptr<const ExpressionIfThenElse>.

Precondition
*(e.ptr_) is of ExpressionIfThenElse.

◆ to_isnan() [1/3]

std::shared_ptr<const FormulaIsnan> drake::symbolic::to_isnan ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaIsnan>.

Precondition
is_isnan(*f_ptr) is true.

◆ to_isnan() [2/3]

shared_ptr<const FormulaIsnan> drake::symbolic::to_isnan ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_isnan() [3/3]

std::shared_ptr< const FormulaIsnan > to_isnan ( const Formula f)

Casts f to shared_ptr<const FormulaIsnan>.

Precondition
is_isnan(f) is true.

◆ to_less_than() [1/3]

std::shared_ptr<const FormulaLt> drake::symbolic::to_less_than ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaLt>.

Precondition
is_less_than(*f_ptr) is true.

◆ to_less_than() [2/3]

shared_ptr<const FormulaLt> drake::symbolic::to_less_than ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_less_than() [3/3]

std::shared_ptr< const FormulaLt > to_less_than ( const Formula f)

Casts f to shared_ptr<const FormulaLt>.

Precondition
is_less_than(f) is true.

◆ to_less_than_or_equal_to() [1/3]

std::shared_ptr<const FormulaLeq> drake::symbolic::to_less_than_or_equal_to ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaLeq>.

Precondition
is_less_than_or_equal_to(*f_ptr) is true.

◆ to_less_than_or_equal_to() [2/3]

shared_ptr<const FormulaLeq> drake::symbolic::to_less_than_or_equal_to ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_less_than_or_equal_to() [3/3]

std::shared_ptr< const FormulaLeq > to_less_than_or_equal_to ( const Formula f)

Casts f to shared_ptr<const FormulaLeq>.

Precondition
is_less_than_or_equal_to(f) is true.

◆ to_log() [1/3]

std::shared_ptr<const ExpressionLog> drake::symbolic::to_log ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionLog>.

Precondition
*expr_ptr is of ExpressionLog.

◆ to_log() [2/3]

shared_ptr<const ExpressionLog> drake::symbolic::to_log ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_log() [3/3]

std::shared_ptr< const ExpressionLog > to_log ( const Expression e)

Casts e to shared_ptr<const ExpressionLog>.

Precondition
*(e.ptr_) is of ExpressionLog.

◆ to_max() [1/3]

std::shared_ptr<const ExpressionMax> drake::symbolic::to_max ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionMax>.

Precondition
*expr_ptr is of ExpressionMax.

◆ to_max() [2/3]

shared_ptr<const ExpressionMax> drake::symbolic::to_max ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_max() [3/3]

std::shared_ptr< const ExpressionMax > to_max ( const Expression e)

Casts e to shared_ptr<const ExpressionMax>.

Precondition
*(e.ptr_) is of ExpressionMax.

◆ to_min() [1/3]

std::shared_ptr<const ExpressionMin> drake::symbolic::to_min ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionMin>.

Precondition
*expr_ptr is of ExpressionMin.

◆ to_min() [2/3]

shared_ptr<const ExpressionMin> drake::symbolic::to_min ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_min() [3/3]

std::shared_ptr< const ExpressionMin > to_min ( const Expression e)

Casts e to shared_ptr<const ExpressionMin>.

Precondition
*(e.ptr_) is of ExpressionMin.

◆ to_multiplication() [1/3]

std::shared_ptr<const ExpressionMul> drake::symbolic::to_multiplication ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionMul>.

Precondition
*expr_ptr is of ExpressionMul.

◆ to_multiplication() [2/3]

shared_ptr<const ExpressionMul> drake::symbolic::to_multiplication ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_multiplication() [3/3]

std::shared_ptr< const ExpressionMul > to_multiplication ( const Expression e)

Casts e to shared_ptr<const ExpressionMul>.

Precondition
*(e.ptr_) is of ExpressionMul.

◆ to_nary() [1/3]

std::shared_ptr<const NaryFormulaCell> drake::symbolic::to_nary ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const NaryFormulaCell>.

Precondition
is_nary(*f_ptr) is true.

◆ to_nary() [2/3]

shared_ptr<const NaryFormulaCell> drake::symbolic::to_nary ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_nary() [3/3]

std::shared_ptr< const NaryFormulaCell > to_nary ( const Formula f)

Casts f to shared_ptr<const NaryFormulaCell>.

Precondition
is_nary(f) is true.

◆ to_negation() [1/3]

std::shared_ptr<const FormulaNot> drake::symbolic::to_negation ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaNot>.

Precondition
is_negation(*f_ptr) is true.

◆ to_negation() [2/3]

shared_ptr<const FormulaNot> drake::symbolic::to_negation ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_negation() [3/3]

std::shared_ptr< const FormulaNot > to_negation ( const Formula f)

Casts f to shared_ptr<const FormulaNot>.

Precondition
is_negation(f) is true.

◆ to_not_equal_to() [1/3]

std::shared_ptr<const FormulaNeq> drake::symbolic::to_not_equal_to ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaNeq>.

Precondition
is_not_equal_to(*f_ptr) is true.

◆ to_not_equal_to() [2/3]

shared_ptr<const FormulaNeq> drake::symbolic::to_not_equal_to ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_not_equal_to() [3/3]

std::shared_ptr< const FormulaNeq > to_not_equal_to ( const Formula f)

Casts f to shared_ptr<const FormulaNeq>.

Precondition
is_not_equal_to(f) is true.

◆ to_positive_semidefinite() [1/3]

std::shared_ptr<const FormulaPositiveSemidefinite> drake::symbolic::to_positive_semidefinite ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaPositiveSemidefinite>.

Precondition
is_positive_semidefinite(*f_ptr) is true.

◆ to_positive_semidefinite() [2/3]

shared_ptr<const FormulaPositiveSemidefinite> drake::symbolic::to_positive_semidefinite ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_positive_semidefinite() [3/3]

std::shared_ptr< const FormulaPositiveSemidefinite > to_positive_semidefinite ( const Formula f)

Casts f to shared_ptr<const FormulaPositiveSemidefinite>.

Precondition
is_positive_semidefinite(f) is true.

◆ to_pow() [1/3]

std::shared_ptr<const ExpressionPow> drake::symbolic::to_pow ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionPow>.

Precondition
*expr_ptr is of ExpressionPow.

◆ to_pow() [2/3]

shared_ptr<const ExpressionPow> drake::symbolic::to_pow ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_pow() [3/3]

std::shared_ptr< const ExpressionPow > to_pow ( const Expression e)

Casts e to shared_ptr<const ExpressionPow>.

Precondition
*(e.ptr_) is of ExpressionPow.

◆ to_relational() [1/3]

std::shared_ptr<const RelationalFormulaCell> drake::symbolic::to_relational ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const RelationalFormulaCell>.

Precondition
is_relational(*f_ptr) is true.

◆ to_relational() [2/3]

shared_ptr<const RelationalFormulaCell> drake::symbolic::to_relational ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_relational() [3/3]

std::shared_ptr< const RelationalFormulaCell > to_relational ( const Formula f)

Casts f to shared_ptr<const RelationalFormulaCell>.

Precondition
is_relational(f) is true.

◆ to_sin() [1/3]

std::shared_ptr<const ExpressionSin> drake::symbolic::to_sin ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionSin>.

Precondition
*expr_ptr is of ExpressionSin.

◆ to_sin() [2/3]

shared_ptr<const ExpressionSin> drake::symbolic::to_sin ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_sin() [3/3]

std::shared_ptr< const ExpressionSin > to_sin ( const Expression e)

Casts e to shared_ptr<const ExpressionSin>.

Precondition
*(e.ptr_) is of ExpressionSin.

◆ to_sinh() [1/3]

std::shared_ptr<const ExpressionSinh> drake::symbolic::to_sinh ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionSinh>.

Precondition
*expr_ptr is of ExpressionSinh.

◆ to_sinh() [2/3]

shared_ptr<const ExpressionSinh> drake::symbolic::to_sinh ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_sinh() [3/3]

std::shared_ptr< const ExpressionSinh > to_sinh ( const Expression e)

Casts e to shared_ptr<const ExpressionSinh>.

Precondition
*(e.ptr_) is of ExpressionSinh.

◆ to_sqrt() [1/3]

std::shared_ptr<const ExpressionSqrt> drake::symbolic::to_sqrt ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionSqrt>.

Precondition
*expr_ptr is of ExpressionSqrt.

◆ to_sqrt() [2/3]

shared_ptr<const ExpressionSqrt> drake::symbolic::to_sqrt ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_sqrt() [3/3]

std::shared_ptr< const ExpressionSqrt > to_sqrt ( const Expression e)

Casts e to shared_ptr<const ExpressionSqrt>.

Precondition
*(e.ptr_) is of ExpressionSqrt.

◆ to_tan() [1/3]

std::shared_ptr<const ExpressionTan> drake::symbolic::to_tan ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionTan>.

Precondition
*expr_ptr is of ExpressionTan.

◆ to_tan() [2/3]

shared_ptr<const ExpressionTan> drake::symbolic::to_tan ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_tan() [3/3]

std::shared_ptr< const ExpressionTan > to_tan ( const Expression e)

Casts e to shared_ptr<const ExpressionTan>.

Precondition
*(e.ptr_) is of ExpressionTan.

◆ to_tanh() [1/3]

std::shared_ptr<const ExpressionTanh> drake::symbolic::to_tanh ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionTanh>.

Precondition
*expr_ptr is of ExpressionTanh.

◆ to_tanh() [2/3]

shared_ptr<const ExpressionTanh> drake::symbolic::to_tanh ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_tanh() [3/3]

std::shared_ptr< const ExpressionTanh > to_tanh ( const Expression e)

Casts e to shared_ptr<const ExpressionTanh>.

Precondition
*(e.ptr_) is of ExpressionTanh.

◆ to_true() [1/3]

std::shared_ptr<const FormulaTrue> drake::symbolic::to_true ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaTrue>.

Precondition
is_true(*f_ptr) is true.

◆ to_true() [2/3]

shared_ptr<const FormulaTrue> drake::symbolic::to_true ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_true() [3/3]

std::shared_ptr< const FormulaTrue > to_true ( const Formula f)

Casts f to shared_ptr<const FormulaTrue>.

Precondition
is_true(f) is true.

◆ to_unary() [1/3]

std::shared_ptr<const UnaryExpressionCell> drake::symbolic::to_unary ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const UnaryExpressionCell>.

Precondition
*expr_ptr is of UnaryExpressionCell.

◆ to_unary() [2/3]

shared_ptr<const UnaryExpressionCell> drake::symbolic::to_unary ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_unary() [3/3]

std::shared_ptr< const UnaryExpressionCell > to_unary ( const Expression e)

Casts e to shared_ptr<const UnaryExpressionCell>.

Precondition
*(e.ptr_) is of UnaryExpressionCell.

◆ to_uninterpreted_function() [1/3]

std::shared_ptr<const ExpressionUninterpretedFunction> drake::symbolic::to_uninterpreted_function ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionUninterpretedFunction>.

Precondition
*expr_ptr is of ExpressionUninterpretedFunction.

◆ to_uninterpreted_function() [2/3]

shared_ptr<const ExpressionUninterpretedFunction> drake::symbolic::to_uninterpreted_function ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_uninterpreted_function() [3/3]

std::shared_ptr< const ExpressionUninterpretedFunction > to_uninterpreted_function ( const Expression e)

Casts e to shared_ptr<const ExpressionUninterpretedFunction>.

Precondition
*(e.ptr_) is of ExpressionUninterpretedFunction.

◆ to_variable() [1/6]

std::shared_ptr<const FormulaVar> drake::symbolic::to_variable ( const std::shared_ptr< const FormulaCell > &  f_ptr)

Casts f_ptr to shared_ptr<const FormulaVar>.

Precondition
is_variable(*f_ptr) is true.

◆ to_variable() [2/6]

shared_ptr<const FormulaVar> drake::symbolic::to_variable ( const shared_ptr< const FormulaCell > &  f_ptr)

◆ to_variable() [3/6]

std::shared_ptr< const FormulaVar > to_variable ( const Formula f)

Casts f to shared_ptr<const FormulaVar>.

Precondition
is_variable(f) is true.

◆ to_variable() [4/6]

std::shared_ptr<const ExpressionVar> drake::symbolic::to_variable ( const std::shared_ptr< const ExpressionCell > &  expr_ptr)

Casts expr_ptr to shared_ptr<const ExpressionVar>.

Precondition
*expr_ptr is of ExpressionVar.

◆ to_variable() [5/6]

shared_ptr<const ExpressionVar> drake::symbolic::to_variable ( const shared_ptr< const ExpressionCell > &  expr_ptr)

◆ to_variable() [6/6]

std::shared_ptr< const ExpressionVar > to_variable ( const Expression e)

Casts e to shared_ptr<const ExpressionVar>.

Precondition
*(e.ptr_) is of ExpressionVar.

◆ uninterpreted_function()

Expression uninterpreted_function ( std::string  name,
std::vector< Expression arguments 
)

Constructs an uninterpreted-function expression with name and arguments.

An uninterpreted function is an opaque function that has no other property than its name and a list of its arguments. This is useful to applications where it is good enough to provide abstract information of a function without exposing full details. Declaring sparsity of a system is a typical example.

◆ VisitExpression()

Result drake::symbolic::VisitExpression ( Visitor *  v,
const Expression e,
Args &&...  args 
)

Calls visitor object v with a symbolic-expression e, and arguments args.

Visitor object is expected to implement the following methods which take f and args: VisitConstant, VisitVariable, VisitAddition, VisitMultiplication, VisitDivision, VisitLog, VisitAbs, VisitExp, VisitSqrt, VisitPow, VisitSin, VisitCos, VisitTan, VisitAsin, VisitAtan, VisitAtan2, VisitSinh, VisitCosh, VisitTanh, VisitMin, VisitMax, VisitCeil, VisitFloor, VisitIfThenElse, `VisitUninterpretedFunction.

Exceptions
std::runtime_errorif NaN is detected during a visit.

◆ VisitFormula()

Result drake::symbolic::VisitFormula ( Visitor *  v,
const Formula f,
Args &&...  args 
)

Calls visitor object v with a symbolic formula f, and arguments args.

Visitor object is expected to implement the following methods which take f and args: VisitFalse, VisitTrue, VisitVariable, VisitEqualTo, VisitNotEqualTo, VisitGreaterThan, VisitGreaterThanOrEqualTo, VisitLessThan, VisitLessThanOrEqualTo, VisitConjunction, VisitDisjunction, VisitNegation, VisitForall, VisitIsnan, VisitPositiveSemidefinite.

Check the implementation of NegationNormalFormConverter class in drake/common/test/symbolic_formula_visitor_test.cc file to find an example.

◆ VisitPolynomial()

Result drake::symbolic::VisitPolynomial ( Visitor *  v,
const Expression e,
Args &&...  args 
)

Calls visitor object v with a polynomial symbolic-expression e, and arguments args.

Visitor object is expected to implement the following methods which take f and args: VisitConstant, VisitVariable, VisitAddition, VisitMultiplication, VisitDivision, VisitPow.

Exceptions
std::runtime_errorif NaN is detected during a visit.

See the implementation of DegreeVisitor class and Degree function in drake/common/symbolic_monomial.cc as an example usage.

Precondition
e.is_polynomial() is true.