|
smats
0.0.1
Satisfability Modulo Arithmetic Theories Symbols
|
#include <expression_cell.h>
Public Member Functions | |
NEW_OPERATOR_PARAMS (ExpressionDiv, PARAMS(const Expression< T > &e1, const Expression< T > &e2), PARAMS(e1, e2)) | |
Expression< T > | expand () const override |
Expression< T > | evaluate_partial (const Environment< T > &env) const override |
Expression< T > | substitute (const Substitution< T > &s) const override |
Expression< T > | differentiate (const Variable &x) const override |
std::ostream & | display (std::ostream &os) const override |
![]() | |
void | hash (DelegatingHasher &hasher) const override |
bool | equal_to (const ExpressionCell< T > &o) const override |
bool | less (const ExpressionCell< T > &o) const override |
T | evaluate (const Environment< T > &env) const override |
const Expression< T > & | lhs () const |
const Expression< T > & | rhs () const |
![]() | |
long | use_count () const |
ExpressionKind | kind () const |
const Variables & | variables () const |
bool | is_polynomial () const |
bool | is_expanded () const |
void | set_expanded () |
template<template< class > class E> | |
const E< T > & | to () const |
template<template< class > class E> | |
E< T > & | to () |
Expression< T > | to_expression () const |
void | invalidate_cache () |
Static Public Member Functions | |
static void | check_domain (const T &v1, const T &v2) |
Static Public Attributes | |
static const ExpressionKind | expression_kind = ExpressionKind::Div |
Private Member Functions | |
T | do_evaluate (const T &v1, const T &v2) const override |
Additional Inherited Members | |
![]() | |
BinaryExpressionCell (ExpressionKind kind, Expression< T > e1, Expression< T > e2, bool is_expanded) | |
void | compute_variables (std::optional< Variables > &variables) const override |
void | compute_is_polynomial (std::optional< bool > &is_polynomial) const override |
![]() | |
ExpressionCell (ExpressionKind kind, bool is_expanded) | |
ExpressionCell (ExpressionKind kind, bool is_polynomial, bool is_expanded) | |
Symbolic expression representing the power function.
The expression holds two other expressions internally. Let \( x \) be the first expression and \( y \) be the second expression. The ExpressionPow cell represents the following expression:
\[ x^y \]
T | type of the expression evaluation |
|
overridevirtual |
Differentiates this symbolic expression with respect to the variable var
.
x | variable |
std::runtime_exception | if it is not differentiable. |
Implements smats::ExpressionCell< T >.
|
overridevirtual |
Displays the expression in a human-readable format.
os | output stream |
Implements smats::ExpressionCell< T >.
|
overrideprivatevirtual |
Evaluate the binary expression, given the two values v1
and v2
of the arguments.
v1 | first value |
v2 | second value |
Implements smats::BinaryExpressionCell< T >.
|
overridevirtual |
Returns an Expression obtained by replacing all occurrences of the variables in env
in the current expression cell with the corresponding values in env
.
env | environment |
std::runtime_exception | if NaN is detected during substitution. |
Implements smats::ExpressionCell< T >.
|
overridevirtual |
Expands out products and positive integer powers in expression.
std::runtime_exception | if NaN is detected during expansion. |
Implements smats::ExpressionCell< T >.
|
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
.
s | substitution |
std::runtime_exception | if NaN is detected during substitution. |
Implements smats::ExpressionCell< T >.