|
smats
0.0.1
Satisfability Modulo Arithmetic Theories Symbols
|
#include <expression_cell.h>
Public Member Functions | |
NEW_OPERATOR_PARAMS (ExpressionVar, Variable v, v) | |
const Variable & | variable () const |
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 |
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 |
![]() | |
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 Attributes | |
static const ExpressionKind | expression_kind = ExpressionKind::Var |
Private Member Functions | |
void | compute_variables (std::optional< Variables > &variables) const override |
void | compute_is_polynomial (std::optional< bool > &is_polynomial) const override |
Private Attributes | |
const Variable | var_ |
Variable contained in the Expression. Cannot be a Boolean variable. | |
Additional Inherited Members | |
![]() | |
ExpressionCell (ExpressionKind kind, bool is_expanded) | |
ExpressionCell (ExpressionKind kind, bool is_polynomial, bool is_expanded) | |
Symbolic expression representing a variable.
The expression holds a variable internally.
T | type of the expression evaluation |
|
overrideprivatevirtual |
Implements smats::ExpressionCell< T >.
|
overrideprivatevirtual |
Implements smats::ExpressionCell< T >.
|
nodiscardoverridevirtual |
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 >.
|
nodiscardoverridevirtual |
Compare two expression cells to determine if they are equal.
o | other object to compare against |
Implements smats::ExpressionCell< T >.
|
nodiscardoverridevirtual |
Evaluates under a given environment (by default, an empty environment).
env | environment |
std::runtime_exception | if NaN is detected during evaluation. |
Implements smats::ExpressionCell< T >.
|
nodiscardoverridevirtual |
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 >.
|
nodiscardoverridevirtual |
Expands out products and positive integer powers in expression.
std::runtime_exception | if NaN is detected during expansion. |
Implements smats::ExpressionCell< T >.
|
overridevirtual |
Sends all hash-relevant bytes for this ExpressionCell type into the given hasher, per the hash_append concept, except for kind(), because Expression already sends that.
Implements smats::ExpressionCell< T >.
|
nodiscardoverridevirtual |
Compare two expression cells to determine the order between them.
o | other object to compare against |
Implements smats::ExpressionCell< T >.
|
nodiscardoverridevirtual |
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 >.
|
inlinenodiscard |
Get read-only access to the variable of the variable expression.