dReal4
BinaryExpressionCell Class Referenceabstract

Represents the base class for binary expressions. More...

#include </home/soonhokong/work/dreal4/third_party/com_github_robotlocomotion_drake/dreal/symbolic/symbolic_expression_cell.h>

Inheritance diagram for BinaryExpressionCell:
ExpressionCell ExpressionAtan2 ExpressionDiv ExpressionMax ExpressionMin ExpressionPow

Public Member Functions

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_first_argument () const
 Returns the first argument. More...
 
const Expressionget_second_argument () const
 Returns the second argument. More...
 
 BinaryExpressionCell (const BinaryExpressionCell &e)=delete
 Copy-constructs from an lvalue. More...
 
 BinaryExpressionCell (BinaryExpressionCell &&e)=delete
 Move-constructs from an rvalue. More...
 
 BinaryExpressionCell ()=delete
 Default constructor (DELETED). More...
 
BinaryExpressionCelloperator= (BinaryExpressionCell &&e)=delete
 Move-assigns (DELETED). More...
 
BinaryExpressionCelloperator= (const BinaryExpressionCell &e)=delete
 Copy-assigns (DELETED). More...
 
 ~BinaryExpressionCell () override=default
 Default destructor. More...
 
- Public Member Functions inherited from ExpressionCell
ExpressionKind get_kind () const
 Returns expression kind. More...
 
size_t get_hash () const
 Returns hash value. More...
 
const VariablesGetVariables () const
 Collects variables in expression. More...
 
bool is_polynomial () const
 Checks if this symbolic expression is convertible to Polynomial. More...
 
bool include_ite () const
 Returns true if this symbolic expression includes an ITE (If-Then-Else) expression. More...
 
virtual Expression Expand ()=0
 Expands out products and positive integer powers in expression. More...
 
virtual Expression Substitute (const ExpressionSubstitution &expr_subst, const FormulaSubstitution &formula_subst)=0
 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...
 
virtual Expression Differentiate (const Variable &x) const =0
 Differentiates this symbolic expression with respect to the variable var. More...
 
virtual std::ostream & Display (std::ostream &os) const =0
 Outputs string representation of expression into output stream os. More...
 
unsigned use_count () const
 Returns the reference count of this cell. More...
 
 ExpressionCell (const ExpressionCell &e)=delete
 Copy-constructs an ExpressionCell from an lvalue. More...
 
 ExpressionCell (ExpressionCell &&e)=delete
 Move-constructs an ExpressionCell from an rvalue. More...
 
 ExpressionCell ()=delete
 Default constructor (DELETED). More...
 
ExpressionCelloperator= (ExpressionCell &&e)=delete
 Move-assigns (DELETED). More...
 
ExpressionCelloperator= (const ExpressionCell &e)=delete
 Copy-assigns (DELETED). More...
 

Protected Member Functions

 BinaryExpressionCell (ExpressionKind k, const Expression &e1, const Expression &e2, bool is_poly)
 Constructs BinaryExpressionCell of kind k with hash, e1, e2, is_poly.
 
virtual double DoEvaluate (double v1, double v2) const =0
 Returns the evaluation result f(v1, v2 ). More...
 
- Protected Member Functions inherited from ExpressionCell
 ExpressionCell (ExpressionKind k, size_t hash, bool is_poly, bool include_ite, Variables variables)
 Constructs ExpressionCell of kind k with hash, is_poly, and include_ite. More...
 
virtual ~ExpressionCell ()=default
 Default destructor. More...
 
Expression GetExpression ()
 Returns an expression pointing to this ExpressionCell. More...
 

Detailed Description

Represents the base class for binary expressions.

Constructor & Destructor Documentation

◆ BinaryExpressionCell() [1/3]

Copy-constructs from an lvalue.

(DELETED)

◆ BinaryExpressionCell() [2/3]

Move-constructs from an rvalue.

(DELETED)

◆ BinaryExpressionCell() [3/3]

Default constructor (DELETED).

◆ ~BinaryExpressionCell()

~BinaryExpressionCell ( )
overridedefault

Default destructor.

Member Function Documentation

◆ DoEvaluate()

virtual double DoEvaluate ( double  v1,
double  v2 
) const
protectedpure virtual

Returns the evaluation result f(v1, v2 ).

◆ EqualTo()

bool EqualTo ( const ExpressionCell c) const
overridevirtual

Checks structural equality.

Implements ExpressionCell.

◆ Evaluate()

double Evaluate ( const Environment env) const
overridevirtual

Evaluates under a given environment (by default, an empty environment).

Exceptions
std::runtime_errorif NaN is detected during evaluation.

Implements ExpressionCell.

◆ get_first_argument()

const Expression& get_first_argument ( ) const
inline

Returns the first argument.

◆ get_second_argument()

const Expression& get_second_argument ( ) const
inline

Returns the second argument.

◆ Less()

bool Less ( const ExpressionCell c) const
overridevirtual

Provides lexicographical ordering between expressions.

Implements ExpressionCell.

◆ operator=() [1/2]

BinaryExpressionCell& operator= ( BinaryExpressionCell &&  e)
delete

Move-assigns (DELETED).

◆ operator=() [2/2]

BinaryExpressionCell& operator= ( const BinaryExpressionCell e)
delete

Copy-assigns (DELETED).


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