6 #ifndef __PLOTEXPRESSIONARITHMETIC_H_
7 #define __PLOTEXPRESSIONARITHMETIC_H_
9 #include "plotsconfig.h"
11 #include "plotbinaryoperator.h"
12 #include "plotunaryoperator.h"
39 struct Power :
public std::binary_function<T, T, T>
45 inline T
operator()(
const T &left,
const T &right)
const {
return T(pow(left, right)); }
52 #endif // __PLOTEXPRESSIONARITHMETIC_H_
void setOperand(PlotExpression *operand)
Set the operand expression.
Definition: plotunaryoperator.h:32
A PlotExpression which raises the results of one PlotExpression object by another.
Definition: plotexpressionarithmetic.h:50
const PlotExpression * right() const
Get the right branch.
Definition: plotbinaryoperator.h:47
A PlotExpression which adds the results of two other PlotExpression objects.
Definition: plotexpressionarithmetic.h:34
void setLeft(PlotExpression *left)
Set the left branch.
Definition: plotbinaryoperator.h:35
const PlotExpression * operand() const
Get the operand expression.
Definition: plotunaryoperator.h:36
A PlotExpression which multiplies the results of two other PlotExpression objects.
Definition: plotexpressionarithmetic.h:26
A PlotExpression which adds the results of two other PlotExpression objects.
Definition: plotexpressionarithmetic.h:18
A PlotExpression which divides the results one PlotExpression object from another.
Definition: plotexpressionarithmetic.h:30
void setOpStr(const QString &str)
Sets the string used to prefix the operand.
Definition: plotunaryoperator.h:96
A PlotExpression which subtracts the results one PlotExpression object from another.
Definition: plotexpressionarithmetic.h:22
const PlotExpression * left() const
Get the left branch.
Definition: plotbinaryoperator.h:39
A template binary operator, using a functional object to evaluate the expression. ...
Definition: plotbinaryoperator.h:82
A template unary operator, using a functional object to evaluate the expression.
Definition: plotunaryoperator.h:68
void setOpStr(const QString &str)
Sets the string used to combine left and right branches.
Definition: plotbinaryoperator.h:114
A binary_function object which raises the one value to the power of another.
Definition: plotexpressionarithmetic.h:39
A PlotExpression represents an operation in a plot equation.
Definition: plotexpression.h:91
T operator()(const T &left, const T &right) const
Expression effector calculating left raised to the power of right.
Definition: plotexpressionarithmetic.h:45
void setRight(PlotExpression *right)
Set the right branch.
Definition: plotbinaryoperator.h:43