OASIS
Open Algebra Software
|
An algebraic variable. More...
#include <Oasis/Variable.hpp>
Public Member Functions | |
Variable ()=default | |
Variable (const Variable &other)=default | |
Variable (std::string name) | |
virtual auto | Equals (const Expression &other) const -> bool final |
Compares this expression to another expression for equality. | |
auto | GetName () const -> std::string |
Gets the name of the variable. | |
auto | Differentiate (const Expression &differentiationVariable) const -> std::unique_ptr< Expression > final |
Tries to differentiate this function. | |
auto | Integrate (const Expression &integrationVariable) const -> std::unique_ptr< Expression > final |
Attempts to integrate this expression using integration rules. | |
auto | Substitute (const Expression &var, const Expression &val) -> std::unique_ptr< Expression > override |
auto | operator= (const Variable &other) -> Variable &=default |
Public Member Functions inherited from Oasis::LeafExpression< Variable > | |
auto | Copy () const -> std::unique_ptr< Expression > final |
Copies this expression. | |
auto | StructurallyEquivalent (const Expression &other) const -> bool final |
Checks whether this expression is structurally equivalent to another expression. | |
void | Serialize (SerializationVisitor &visitor) const override |
This function serializes the expression object. | |
Public Member Functions inherited from Oasis::Expression | |
auto | FindZeros () const -> std::vector< std::unique_ptr< Expression > > |
The FindZeros function finds all rational real zeros, and up to 2 irrational/complex zeros of a polynomial. | |
virtual auto | GetCategory () const -> uint32_t |
Gets the category of this expression. | |
virtual auto | GetType () const -> ExpressionType |
Gets the type of this expression. | |
virtual auto | Generalize () const -> std::unique_ptr< Expression > |
Converts this expression to a more general expression. | |
virtual auto | IntegrateWithBounds (const Expression &, const Expression &, const Expression &) -> std::unique_ptr< Expression > |
Attempts to integrate this expression using integration rules. | |
template<IExpression T> | |
bool | Is () const |
Gets whether this expression is of a specific type. | |
template<template< typename > typename T> | |
bool | Is () const |
template<template< typename, typename > typename T> | |
bool | Is () const |
virtual auto | Simplify () const -> std::unique_ptr< Expression > |
Simplifies this expression. | |
virtual | ~Expression ()=default |
An algebraic variable.
Variables are used to represent unknown values in an expression. Variables can have names such as "x" or "y" or "x_1" and so on.
|
default |
|
default |
|
explicit |
|
finalvirtual |
Tries to differentiate this function.
Reimplemented from Oasis::LeafExpression< Variable >.
|
finalvirtual |
Compares this expression to another expression for equality.
Two expressions are equal if they are structurally equivalent and have the same value. While this method considers the associativity and commutativity of expressions, it does not simplify the expressions before comparing them. For example, Add<Real>(Real(1), Real(2))
and Add<Real>(Real(2), Real(1))
are not equal, despite being structurally equivalent.
other | The other expression. |
Implements Oasis::Expression.
auto Oasis::Variable::GetName | ( | ) | const -> std::string |
Gets the name of the variable.
|
finalvirtual |
Attempts to integrate this expression using integration rules.
Reimplemented from Oasis::LeafExpression< Variable >.
|
overridevirtual |
Reimplemented from Oasis::LeafExpression< Variable >.