|
smats
0.0.1
Satisfability Modulo Arithmetic Theories Symbols
|
#include <expression_cell.h>
Public Member Functions | |
const Expression< T > & | get_argument () const |
![]() | |
long | use_count () const |
ExpressionKind | kind () const |
virtual void | hash (DelegatingHasher &) const =0 |
const Variables & | variables () const |
bool | is_polynomial () const |
bool | is_expanded () const |
virtual bool | equal_to (const ExpressionCell< T > &o) const =0 |
virtual bool | less (const ExpressionCell< T > &o) const =0 |
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 |
virtual T | evaluate (const Environment< T > &env) const =0 |
virtual Expression< T > | expand () const =0 |
virtual Expression< T > | evaluate_partial (const Environment< T > &env) const =0 |
virtual Expression< T > | substitute (const Substitution< T > &s) const =0 |
virtual Expression< T > | differentiate (const Variable &x) const =0 |
virtual std::ostream & | display (std::ostream &os) const =0 |
void | invalidate_cache () |
Protected Member Functions | |
UnaryExpressionCell (ExpressionKind k, Expression< T > e, bool is_expanded) | |
UnaryExpressionCell (ExpressionKind k, Expression< T > e, bool is_polynomial, bool is_expanded) | |
virtual T | do_evaluate (T v) const =0 |
![]() | |
ExpressionCell (ExpressionKind kind, bool is_expanded) | |
ExpressionCell (ExpressionKind kind, bool is_polynomial, bool is_expanded) | |
virtual void | compute_variables (std::optional< Variables > &variables) const =0 |
virtual void | compute_is_polynomial (std::optional< bool > &is_polynomial) const =0 |
Private Attributes | |
const Expression< T > | e_ |
The argument of the unary expression. | |
Symbolic expression used as a base for unary expressions.
The expression holds another expression internally. Some example include
\[ \log(x) \\ \exp(x) \\ \sin(x) \\ \cos(x) \\ \tan(x) \\ \]
T | type of the expression evaluation |
|
protected |
Construct a new UnaryExpressionCell of kind
with e
, is_polynomial
, and is_expanded
.
kind | kind of the expression |
e | expression |
is_expanded | whether the expression is already expanded |
|
protected |
Construct a new UnaryExpressionCell of kind
with e
, is_polynomial
, and is_expanded
.
kind | kind of the expression |
e | expression |
is_polynomial | whether the expression is a polynomial |
is_expanded | whether the expression is already expanded |
|
nodiscardprotectedpure virtual |
Evaluate the unary expression with the given value v
of the argument.
v | value |
|
inlinenodiscard |
Get read-only access to the argument of the unary expression.