JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches

This class represents an arbitrary function. More...

#include <jkqtpmathparser.h>

Inheritance diagram for JKQTPMathParser::jkmpFunctionNode:
[legend]
Collaboration diagram for JKQTPMathParser::jkmpFunctionNode:
[legend]

Public Member Functions

 jkmpFunctionNode (const std::string &name, jkmpNode **c, unsigned char num, JKQTPMathParser *p, jkmpNode *par)
 constructor for a jkmpFunctionNode
 
virtual ~jkmpFunctionNode () override
 standard destructor, also destroy the children (recursively)
 
virtual jkmpResult evaluate () override
 evaluate this node
 
- Public Member Functions inherited from JKQTPMathParser::jkmpNode
 jkmpNode (JKQTPMathParser *parser_=nullptr, jkmpNode *parent_=nullptr)
 
virtual ~jkmpNode ()
 virtual class destructor
 
jkmpNodegetParent ()
 returns a pointer to the parent node
 
JKQTPMathParsergetParser ()
 return a pointer to the JKQTPMathParser

 
void setParent (jkmpNode *par)
 sets the parent node

 
void setParser (JKQTPMathParser *mp)
 set the JKQTPMathParser

 

Private Attributes

jkmpNode ** child
 
std::string fun
 
jkmpEvaluateFunc function
 
unsigned char n
 

Additional Inherited Members

- Protected Attributes inherited from JKQTPMathParser::jkmpNode
jkmpNodeparent
 points to the parent node
 
JKQTPMathParserparser
 points to the parser object that is used to evaluate this node
 

Detailed Description

This class represents an arbitrary function.

When initialized this class will get the function description that is linked to the supplied function name from JKQTPMathParser object. This information is saved locally and won't be changed when evaluating!

Functions may have 8 parameters at the most.

Constructor & Destructor Documentation

◆ jkmpFunctionNode()

JKQTPMathParser::jkmpFunctionNode::jkmpFunctionNode ( const std::string &  name,
jkmpNode **  c,
unsigned char  num,
JKQTPMathParser p,
jkmpNode par 
)

constructor for a jkmpFunctionNode

Parameters
namename of the function
ca pointer to an array of jkmpNode objects that represent the parameter expressions
numnumber of children in c
pa pointer to a JKQTPMathParser object
para pointer to the parent node

◆ ~jkmpFunctionNode()

virtual JKQTPMathParser::jkmpFunctionNode::~jkmpFunctionNode ( )
overridevirtual

standard destructor, also destroy the children (recursively)

Member Function Documentation

◆ evaluate()

virtual jkmpResult JKQTPMathParser::jkmpFunctionNode::evaluate ( )
overridevirtual

evaluate this node

Implements JKQTPMathParser::jkmpNode.

Member Data Documentation

◆ child

jkmpNode** JKQTPMathParser::jkmpFunctionNode::child
private

◆ fun

std::string JKQTPMathParser::jkmpFunctionNode::fun
private

◆ function

jkmpEvaluateFunc JKQTPMathParser::jkmpFunctionNode::function
private

◆ n

unsigned char JKQTPMathParser::jkmpFunctionNode::n
private

The documentation for this class was generated from the following file: