Main class for all unary operations. More...
#include <unary_operators.hpp>
Public Types | |
| typedef InterfaceType::numeric_type | numeric_type |
Public Member Functions | |
| op_unary () | |
| op_unary (UnaryOperation const &uo) | |
| UnaryOperation const & | op () const |
| Returns the expression tag. | |
| std::string | str () const |
| Returns a string representation of the operator. | |
| op_interface< InterfaceType > * | clone () const |
| Returns a copy of the operator. The caller must ensure the proper deletion of the returned pointer. | |
| numeric_type | apply (numeric_type value) const |
| Applies the unary operation to the value. | |
| bool | is_unary () const |
| Returns whether this operation is a unary operation (which is the case...). | |
| InterfaceType * | diff (const InterfaceType *e, const InterfaceType *diff_var) const |
| Differentiates the unary operation acting on 'e' with respect to the variable passed. | |
| InterfaceType * | simplify (const InterfaceType *lhs, const InterfaceType *rhs) const |
| Returns a simplified form of the unary expression (collect constants, remove trivial operations, etc.). The caller is responsible for deleting the pointer returned. | |
| bool | can_simplify () const |
| Returns true if (and only if) the underlying unary expression can be simplified (collect constants, remove trivial operations, etc.). | |
| bool | equal (const op_interface< InterfaceType > *other) const |
| Returns true if the passed 'other' operation equals this operation. | |
Main class for all unary operations.
| UnaryOperation | Type of the unary operation to be wrapped at runtime. | |
| InterfaceType | The expression runtime interface used for expression manipulation. |
| typedef InterfaceType::numeric_type numeric_type |
Reimplemented from op_interface< InterfaceType >.
| op_unary | ( | ) | [inline] |
| op_unary | ( | UnaryOperation const & | uo | ) | [inline] |
| numeric_type apply | ( | numeric_type | value | ) | const [inline, virtual] |
Applies the unary operation to the value.
Reimplemented from op_interface< InterfaceType >.
| bool can_simplify | ( | ) | const [inline, virtual] |
Returns true if (and only if) the underlying unary expression can be simplified (collect constants, remove trivial operations, etc.).
Implements op_interface< InterfaceType >.
| op_interface<InterfaceType>* clone | ( | ) | const [inline, virtual] |
Returns a copy of the operator. The caller must ensure the proper deletion of the returned pointer.
Implements op_interface< InterfaceType >.
| InterfaceType* diff | ( | const InterfaceType * | e, | |
| const InterfaceType * | diff_var | |||
| ) | const [inline, virtual] |
Differentiates the unary operation acting on 'e' with respect to the variable passed.
Reimplemented from op_interface< InterfaceType >.
| bool equal | ( | const op_interface< InterfaceType > * | other | ) | const [inline] |
Returns true if the passed 'other' operation equals this operation.
| bool is_unary | ( | ) | const [inline, virtual] |
Returns whether this operation is a unary operation (which is the case...).
Reimplemented from op_interface< InterfaceType >.
| UnaryOperation const& op | ( | ) | const [inline] |
Returns the expression tag.
| InterfaceType * simplify | ( | const InterfaceType * | lhs, | |
| const InterfaceType * | rhs | |||
| ) | const [virtual] |
Returns a simplified form of the unary expression (collect constants, remove trivial operations, etc.). The caller is responsible for deleting the pointer returned.
Implements op_interface< InterfaceType >.
| std::string str | ( | ) | const [inline, virtual] |
Returns a string representation of the operator.
Implements op_interface< InterfaceType >.
1.7.1