MathTypeLibrary(libmath++)
0.0.3
|
#include <nodes.h>
Public Member Functions | |
TIfNode (TNode< T > *ACondNode, TNode< T > *AThenNode, TNode< T > *AElseNode) | |
TNode< T > * | condition () const |
TNode< T > * | trueExpr () const |
TNode< T > * | falseExpr () const |
virtual void | accept (TNodeVisitor< T > &) |
calls the visit method in TNodeVisitor<> | |
virtual TIfNode * | clone () const |
clones that node | |
![]() | |
virtual TNode< T > * | left () const |
returns the right child node of the expression tree | |
virtual TNode< T > * | right () const |
returns the left child node of the expression tree | |
virtual bool | equals (const TNode< T > *ANode) const |
returns true, if given node equals to this one | |
![]() | |
virtual | ~TNode () |
each virtual class needs a virtual destructor (this one does nothing) | |
TNodeType | nodeType () const |
returns the type of this node | |
short | priority () const |
returns the node priority | |
TNode< T > * | parent () const |
returns the parent node (returns 0 if this node is the root node) | |
iterator | begin () |
iterator access to the first value node in this operator level | |
iterator | end () |
iterator access to the end |
Additional Inherited Members | |
![]() | |
enum | TNodeType { NUMBER_NODE, SYMBOL_NODE, PARAM_NODE, PLUS_NODE, NEG_NODE, MUL_NODE, DIV_NODE, MOD_NODE, POW_NODE, EQU_NODE, UNEQU_NODE, LESS_EQU_NODE, GREATER_EQU_NODE, LESS_NODE, GREATER_NODE, FUNC_NODE, SQRT_NODE, SIN_NODE, COS_NODE, TAN_NODE, LN_NODE, IF_NODE } |
typedef TNodeIterator< T > | iterator |
typedef const TNodeIterator< T > | const_iterator |
typedef TOperandIter< TNode< T > > | operand_iterator |
typedef TOperandIter< const TNode< T > > | const_operand_iterator |
![]() | |
TBinaryNodeOp (typename TBinaryNodeOp< T >::TNodeType AType, short APrio, TNode< T > *ALeft, TNode< T > *ARight) | |
creates an binary operator node of type AType |
TIfNode is a gread plus* for that library :). example: sig(x) = IF(x > 0, 1, -1) example: fib(n) = IF(n = 1, 1, n + fib(n - 1)), n element |N example: t(x) = IF(int(x) % 3 = 0, 0, IF(int(x) % 3 = 1, 1, 2))