Drake
ExpressionExp Class Reference

Symbolic expression representing exponentiation using the base of natural logarithms. More...

#include <drake/common/symbolic_expression_cell.h>

Inheritance diagram for ExpressionExp:
[legend]
Collaboration diagram for ExpressionExp:
[legend]

Public Member Functions

 ExpressionExp (const Expression &e)
 
Polynomiald ToPolynomial () const override
 Returns a Polynomial representing this expression. More...
 
Expression Expand () const override
 Expands out products and positive integer powers in expression. More...
 
Expression Substitute (const Substitution &s) const override
 Returns an Expression obtained by replacing all occurrences of the variables in s in the current expression cell with the corresponding expressions in s. More...
 
Expression Differentiate (const Variable &x) const override
 Differentiates this symbolic expression with respect to the variable var. More...
 
std::ostream & Display (std::ostream &os) const override
 Outputs string representation of expression into output stream os. More...
 
- Public Member Functions inherited from UnaryExpressionCell
Variables GetVariables () const override
 Collects variables in expression. More...
 
bool EqualTo (const ExpressionCell &e) const override
 Checks structural equality. More...
 
bool Less (const ExpressionCell &e) const override
 Provides lexicographical ordering between expressions. More...
 
double Evaluate (const Environment &env) const override
 Evaluates under a given environment (by default, an empty environment). More...
 
const Expressionget_argument () const
 Returns the argument. More...
 
- Public Member Functions inherited from ExpressionCell
ExpressionKind get_kind () const
 Returns expression kind. More...
 
size_t get_hash () const
 Returns hash value. More...
 
bool is_polynomial () const
 Checks if this symbolic expression is convertible to Polynomial. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UnaryExpressionCell
 UnaryExpressionCell ()=delete
 Default constructor (DELETED). More...
 
 UnaryExpressionCell (UnaryExpressionCell &&e)=default
 Move-constructs from an rvalue. More...
 
 UnaryExpressionCell (const UnaryExpressionCell &e)=default
 Copy-constructs from an lvalue. More...
 
UnaryExpressionCelloperator= (UnaryExpressionCell &&e)=delete
 Move-assigns (DELETED). More...
 
UnaryExpressionCelloperator= (const UnaryExpressionCell &e)=delete
 Copy-assigns (DELETED). More...
 
 UnaryExpressionCell (ExpressionKind k, const Expression &e, bool is_poly)
 Constructs UnaryExpressionCell of kind k with hash, e, and is_poly. More...
 
- Protected Member Functions inherited from ExpressionCell
 ExpressionCell ()=default
 Default constructor. More...
 
 ExpressionCell (ExpressionCell &&e)=default
 Move-constructs an ExpressionCell from an rvalue. More...
 
 ExpressionCell (const ExpressionCell &e)=default
 Copy-constructs an ExpressionCell from an lvalue. More...
 
ExpressionCelloperator= (ExpressionCell &&e)=delete
 Move-assigns (DELETED). More...
 
ExpressionCelloperator= (const ExpressionCell &e)=delete
 Copy-assigns (DELETED). More...
 
 ExpressionCell (ExpressionKind k, size_t hash, bool is_poly)
 Constructs ExpressionCell of kind k with hash and is_poly . More...
 
virtual ~ExpressionCell ()=default
 Default destructor. More...
 

Detailed Description

Symbolic expression representing exponentiation using the base of natural logarithms.

Constructor & Destructor Documentation

ExpressionExp ( const Expression e)
explicit

Member Function Documentation

Expression Differentiate ( const Variable x) const
overridevirtual

Differentiates this symbolic expression with respect to the variable var.

Exceptions
std::runtime_errorif it is not differentiable.

Implements ExpressionCell.

Here is the call graph for this function:

ostream & Display ( std::ostream &  os) const
overridevirtual

Outputs string representation of expression into output stream os.

Implements ExpressionCell.

Here is the call graph for this function:

Expression Expand ( ) const
overridevirtual

Expands out products and positive integer powers in expression.

Exceptions
std::runtime_errorif NaN is detected during expansion.

Implements ExpressionCell.

Here is the call graph for this function:

Expression Substitute ( const Substitution s) const
overridevirtual

Returns an Expression obtained by replacing all occurrences of the variables in s in the current expression cell with the corresponding expressions in s.

Exceptions
std::runtime_errorif NaN is detected during substitution.

Implements ExpressionCell.

Here is the call graph for this function:

Polynomiald ToPolynomial ( ) const
overridevirtual

Returns a Polynomial representing this expression.

Note that the ID of a variable is preserved in this translation.

Precondition
is_polynomial() is true.

Implements ExpressionCell.


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