|
Milo
0.1
Milo:EquationManipulationProgram
|
#include <nodes.h>


Public Types | |
| using | func_ptr = Complex(*)(Complex) |
| using | func_map = std::unordered_map< std::string, func_ptr > |
| Map that associates function name with its function call. | |
Public Types inherited from Node | |
| enum | Select { NONE, START, END, ALL } |
Public Member Functions | |
Virtual Public Member Functions | |
| std::string | toString () const |
| bool | isLeaf () const |
| Node * | findNode (int x, int y) |
| Node * | findNode (const Box &b) |
| int | numFactors () const |
| void | normalize () |
| bool | less (NodePtr b) const |
| const std::string & | getName () const |
| std::type_index | getType () const |
Constructor and Virtual Destructor | |
| Function (const std::string &name, func_ptr fp, Parser &p, Node *parent, bool neg=false, Node::Select s=Node::Select::NONE) | |
| Function (EqnXMLParser &in, Node *parent) | |
| ~Function () | |
Public Member Functions inherited from Node | |
| void | calculateSize (UI::Graphics &gc) |
| void | out (XML::Stream &xml) |
| void | calculateOrigin (UI::Graphics &gc, int x, int y) |
| void | setUpDraw (UI::Graphics &gc) |
| void | draw (UI::Graphics &gc) const |
| void | setSelect (Select s) |
| Select | getSelect () const |
| void | setDrawParenthesis (bool fDrawPar) |
| bool | getDrawParenthesis () const |
| const Frame & | getFrame () const |
| Node * | first () |
| Node * | last () |
| Node * | getNextLeft () |
| Node * | getNextRight () |
| void | setParent (Node *parent) |
| Node * | getParent () const |
| int | getDepth () const |
| int | getNth () const |
| void | addNth (int n) |
| void | multNth (int n) |
| void | setNth (int n) |
| void | negative () |
| bool | getSign () const |
| Complex | getValue () const |
| std::shared_ptr< Node > | getSharedPtr () |
| Node (Node *parent=nullptr, bool fNeg=false, Select s=NONE) | |
| Node (EqnXMLParser &in, Node *parent) | |
| virtual | ~Node () |
| Abstract base class needs virtual desctructor. | |
| virtual bool | isFactor () const |
| virtual bool | simplify () |
Static Public Member Functions | |
| static Function * | parse (Parser &p, Node *parent) |
Static Public Member Functions inherited from Node | |
| static bool | createNodeByName (std::string name, Equation &eqn) |
Static Public Attributes | |
| static const std::string | name = "function" |
| Name of Function class. | |
| static const std::type_index | type = typeid(Function) |
| Type of Function type. | |
Static Public Attributes inherited from Node | |
| static const std::vector< std::string > | select_tags = { "NONE", "START", "END", "ALL" } |
Private Member Functions | |
Virtual Private Member Functions | |
| Node * | downLeft () |
| Node * | downRight () |
| void | xml_out (XML::Stream &xml) const |
| Frame | calcSize (UI::Graphics &gc) |
| void | calcOrig (UI::Graphics &gc, int x, int y) |
| void | drawNode (UI::Graphics &gc) const |
| Complex | getNodeValue () const |
Static Private Member Functions | |
| static Complex | sinZ (Complex z) |
| Function for sin. | |
| static Complex | cosZ (Complex z) |
| Function for cos. | |
| static Complex | tanZ (Complex z) |
| Function for tan. | |
| static Complex | logZ (Complex z) |
| Function for log. | |
| static Complex | expZ (Complex z) |
| Function for exp. | |
Private Attributes | |
| std::string | m_name |
| Name of function. | |
| func_ptr | m_func |
| Function pointer to evaluate function. | |
| NodePtr | m_arg |
| Function own this tree. | |
| Box | m_internal |
| Bounding box of this node. | |
Static Private Attributes | |
| static const func_map | functions |
Represents a function by containing an expression passed to a mathematical function.
| using Function::func_ptr = Complex (*)(Complex) |
Function pointer that takes a single complex argument and returns a complex value.
|
inline |
| Function::Function | ( | EqnXMLParser & | in, |
| Node * | parent | ||
| ) |
|
inline |
Abstract base class needs virtual destructor.
|
privatevirtual |
Calculate origin of this node offset from the point (x,y) given it.
| gc | Graphics context. |
| x | Horizontal origin. |
| y | Vertical origin. |
Implements Node.
|
privatevirtual |
Calculate size of this node in given graphics context.
| gc | Graphics context. |
Implements Node.
|
inlineprivatevirtual |
|
inlineprivatevirtual |
|
privatevirtual |
|
virtual |
Rescursive search to find deepest node at point (x,y).
| x | horizontal coordinate. |
| y | vertical coordinate. |
Reimplemented from Node.
Recursive function to return first node from a top to bottom search whose frame is inside Box b.
| b | Bounding box. |
Reimplemented from Node.
|
inlinevirtual |
|
privatevirtual |
|
inlinevirtual |
|
inlinevirtual |
Override for isLeaf virtual function.
Reimplemented from Node.
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
privatevirtual |
|
staticprivate |
1.8.11