10#include <unordered_set>
43 explicit Symbolic(
const std::string& name,
double defaultValue = 0.0)
46 type = MathNodeType::NodeType_Symbolic;
67 {
"pi", std::make_shared<Symbolic>(
"pi", 3.1415926535897932384626433832795028841971693993751058209749445923078164) },
68 {
"e", std::make_shared<Symbolic>(
"e", 2.71828182845904523536028747135266249775724709369995957496696762772407663) },
72bool hasSymbol(
const std::vector<std::shared_ptr<Symbolic>>& container,
const std::shared_ptr<Symbolic>& sym);
87 explicit Number(
const std::string& val)
89 type = MathNodeType::NodeType_Numeric;
94 value =
new char[realValue.size() + 1];
95 std::copy(realValue.begin(), realValue.end(),
value);
96 value[realValue.size()] =
'\0';
static std::map< std::string, std::shared_ptr< Symbolic > > DefaultSymbols
Definition: Operand.h:66
bool isConstant(const std::string &in)
bool hasSymbol(const std::vector< std::shared_ptr< Symbolic > > &container, const std::shared_ptr< Symbolic > &sym)
Definition: MathNode.h:43
bool isNegative
helper to determine whether a node is negated or not
Definition: MathNode.h:46
char * value
char representation of value
Definition: MathNode.h:58
MathNodeType type
node type representation
Definition: MathNode.h:50
NodeConnectionType connectionType
type of connection allowed for this node
Definition: MathNode.h:52
Number(const std::string &val)
Definition: Operand.h:87
double Evaluate() const override
Definition: Operand.h:103
double numericValue
real numerical value
Definition: Operand.h:80
Operand(const std::string &name)
Definition: Operand.h:22
double Evaluate() const override
Definition: Operand.h:63
Symbolic(const Symbolic &other)
Definition: Operand.h:53
Symbolic(const std::string &name, double defaultValue=0.0)
Definition: Operand.h:43
double evaluationValue
value which replaces symbol during evaluation
Definition: Operand.h:37