dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
dlinear::drake::symbolic::BinaryExpressionCell Class Referenceabstract

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

#include <symbolic_expression_cell.h>

Inheritance diagram for dlinear::drake::symbolic::BinaryExpressionCell:
dlinear::drake::symbolic::ExpressionCell dlinear::drake::symbolic::ExpressionAtan2 dlinear::drake::symbolic::ExpressionDiv dlinear::drake::symbolic::ExpressionMax dlinear::drake::symbolic::ExpressionMin dlinear::drake::symbolic::ExpressionPow

Public Member Functions

bool EqualTo (const ExpressionCell &e) const override
 Checks structural equality.
 
bool Less (const ExpressionCell &e) const override
 Provides lexicographical ordering between expressions.
 
mpq_class Evaluate (const Environment &env) const override
 Evaluates under a given environment (by default, an empty environment).
 
const Expressionget_first_argument () const
 Returns the first argument.
 
const Expressionget_second_argument () const
 Returns the second argument.
 
 BinaryExpressionCell (const BinaryExpressionCell &e)=delete
 Copy-constructs from an lvalue.
 
 BinaryExpressionCell (BinaryExpressionCell &&e)=delete
 Move-constructs from an rvalue.
 
 BinaryExpressionCell ()=delete
 Default constructor (DELETED).
 
BinaryExpressionCelloperator= (BinaryExpressionCell &&e)=delete
 Move-assigns (DELETED).
 
BinaryExpressionCelloperator= (const BinaryExpressionCell &e)=delete
 Copy-assigns (DELETED).
 
 ~BinaryExpressionCell () override=default
 Default destructor.
 
- Public Member Functions inherited from dlinear::drake::symbolic::ExpressionCell
ExpressionKind get_kind () const
 Returns expression kind.
 
size_t get_hash () const
 Returns hash value.
 
const VariablesGetVariables () const
 Collects variables in expression.
 
bool is_polynomial () const
 Checks if this symbolic expression is convertible to Polynomial.
 
bool include_ite () const
 Returns true if this symbolic expression includes an ITE (If-Then-Else) expression.
 
virtual Expression Expand ()=0
 Expands out products and positive integer powers in expression.
 
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.
 
virtual Expression Differentiate (const Variable &x) const =0
 Differentiates this symbolic expression with respect to the variable var.
 
virtual std::ostream & Display (std::ostream &os) const =0
 Outputs string representation of expression into output stream os.
 
unsigned use_count () const
 Returns the reference count of this cell.
 
 ExpressionCell (const ExpressionCell &e)=delete
 Copy-constructs an ExpressionCell from an lvalue.
 
 ExpressionCell (ExpressionCell &&e)=delete
 Move-constructs an ExpressionCell from an rvalue.
 
ExpressionCelloperator= (ExpressionCell &&e)=delete
 Move-assigns (DELETED).
 
ExpressionCelloperator= (const ExpressionCell &e)=delete
 Copy-assigns (DELETED).
 
virtual void UpdateHash ()
 Update the cached hash value.
 

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 mpq_class DoEvaluate (const mpq_class &v1, const mpq_class &v2) const =0
 Returns the evaluation result f(v1, v2 ).
 
- Protected Member Functions inherited from dlinear::drake::symbolic::ExpressionCell
 ExpressionCell (ExpressionKind k)
 Constructs ExpressionCell of kind k.
 
 ExpressionCell (ExpressionKind k, bool is_poly)
 Constructs ExpressionCell of kind k with hash, is_poly, and include_ite.
 
 ExpressionCell (ExpressionKind k, bool is_poly, bool include_ite)
 Constructs ExpressionCell of kind k with hash, is_poly, and include_ite.
 
 ExpressionCell (ExpressionKind k, bool is_poly, bool include_ite, Variables variables)
 Constructs ExpressionCell of kind k with hash, is_poly, and include_ite.
 
 ExpressionCell (ExpressionKind k, bool is_poly, bool include_ite, Variables variables, size_t hash)
 Constructs ExpressionCell of kind k with hash, is_poly, and include_ite.
 
virtual ~ExpressionCell ()=default
 Default destructor.
 
Expression GetExpression ()
 Returns an expression pointing to this ExpressionCell.
 

Detailed Description

Represents the base class for binary expressions.

Definition at line 201 of file symbolic_expression_cell.h.

Constructor & Destructor Documentation

◆ BinaryExpressionCell() [1/2]

dlinear::drake::symbolic::BinaryExpressionCell::BinaryExpressionCell ( const BinaryExpressionCell & e)
delete

Copy-constructs from an lvalue.

(DELETED)

◆ BinaryExpressionCell() [2/2]

dlinear::drake::symbolic::BinaryExpressionCell::BinaryExpressionCell ( BinaryExpressionCell && e)
delete

Move-constructs from an rvalue.

(DELETED)

Member Function Documentation

◆ Evaluate()

mpq_class dlinear::drake::symbolic::BinaryExpressionCell::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 dlinear::drake::symbolic::ExpressionCell.


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