#include <nodes.h>
|
|
using | var_map = std::unordered_map< char, Complex > |
| | Specialization for mapping name to value.
|
| |
| enum | Select { NONE,
START,
END,
ALL
} |
| |
|
|
| | Variable (Parser &p, Node *parent) |
| |
| | Variable (char name, Node *parent, bool neg=false, Node::Select s=Node::Select::NONE) |
| |
| | Variable (EqnXMLParser &in, Node *parent) |
| |
| | ~Variable () |
| |
|
| std::string | toString () const |
| |
| const std::string & | getName () const |
| |
| std::type_index | getType () const |
| |
| 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 | isLeaf () const |
| |
| virtual bool | isFactor () const |
| |
| virtual Node * | findNode (int x, int y) |
| |
| virtual Node * | findNode (const Box &b) |
| |
| virtual int | numFactors () const |
| |
| virtual void | normalize () |
| |
| virtual bool | simplify () |
| |
| virtual bool | less (NodePtr b) const |
| |
|
|
static const std::string | name = "variable" |
| | Name of Variable class.
|
| |
|
static const std::type_index | type = typeid(Variable) |
| | Type of Variable class.
|
| |
| static const std::vector< std::string > | select_tags = { "NONE", "START", "END", "ALL" } |
| |
|
|
static var_map | values |
| | Mapping of all variable name to their values.
|
| |
Represents a Variable factor node.
| Variable::Variable |
( |
char |
name, |
|
|
Node * |
parent, |
|
|
bool |
neg = false, |
|
|
Node::Select |
s = Node::Select::NONE |
|
) |
| |
|
inline |
Constructor for Constant class.
- Parameters
-
| name | Variable name. |
| parent | Parent node. |
| neg | If true, node is negative. |
| s | Selection state of node. |
Abstract base class needs virtual destructor.
Calculate origin of this node offset from the point (x,y) given it.
- Parameters
-
| gc | Graphics context. |
| x | Horizontal origin. |
| y | Vertical origin. |
Implements Node.
Calculate size of this node in given graphics context.
- Parameters
-
- Returns
- Return frame containing size of this node.
Implements Node.
Draw this node in the given graphical context.
- Parameters
-
Implements Node.
| const std::string& Variable::getName |
( |
| ) |
const |
|
inlinevirtual |
Get name of this class.
- Returns
- Name of this class.
Implements Node.
| Complex Variable::getNodeValue |
( |
| ) |
const |
|
inlineprivatevirtual |
Get value of this subtree.
- Returns
- Complex value of this subtree.
Implements Node.
| std::type_index Variable::getType |
( |
| ) |
const |
|
inlinevirtual |
Get name of this class.
- Returns
- Name of this class.
Implements Node.
Static helper function to parse Variable class.
- Parameters
-
| p | Parser object pointing to operator. |
| parent | Parent node. |
- Returns
- Variable object or null if variable not present.
| void Variable::setValue |
( |
char |
name, |
|
|
Complex |
value |
|
) |
| |
|
static |
Static helper function to set value of a variable.
- Parameters
-
| std::string Variable::toString |
( |
| ) |
const |
|
inlinevirtual |
String representation of variable is its name.
- Returns
- Name of variable.
Implements Node.
Output XML of this node.
- Parameters
-
Implements Node.
The documentation for this class was generated from the following files: