OpenCurves
0.9
|
This module contains an expression parser and tree generation for creating data sets derived from existing data sets. More...
Namespaces | |
binding | |
Contains utility functions for binding expression tree branches. | |
Classes | |
class | FunctionClean |
A function which filters out infinite and NaN values. More... | |
class | FunctionDefinition |
Defines a function which can be used with the FunctionRegister . More... | |
class | FunctionMAvg |
A function which evaluates a moving average. More... | |
class | FunctionSimple |
Defines a function which is implemented by a given function object. More... | |
class | FunctionUnwrap |
A function designed to unwrap angles, but capable of unwrapping any range. More... | |
class | PlotBinaryOperator |
An extension of PlotExpression defining a binary operation. More... | |
class | PlotBinaryOperatorT< Operator > |
A template binary operator, using a functional object to evaluate the expression. More... | |
struct | BindInfo |
A structure tracking the domain for an expression during binding. More... | |
class | PlotBindingTracker |
Supports multiple bindings of the same expression to different curves. More... | |
class | PlotBracketExpression |
A unary bracket operator, ensuring operation precedence. More... | |
class | PlotConstant |
An expression yielding a constant numeric value. More... | |
class | PlotAdd |
A PlotExpression which adds the results of two other PlotExpression objects. More... | |
class | PlotSubtract |
A PlotExpression which subtracts the results one PlotExpression object from another. More... | |
class | PlotMultiply |
A PlotExpression which multiplies the results of two other PlotExpression objects. More... | |
class | PlotDivide |
A PlotExpression which divides the results one PlotExpression object from another. More... | |
class | PlotNegate |
A PlotExpression which adds the results of two other PlotExpression objects. More... | |
struct | Power< T > |
A binary_function object which raises the one value to the power of another. More... | |
class | PlotPower |
A PlotExpression which raises the results of one PlotExpression object by another. More... | |
struct | PlotExpressionBindDomain |
Core data for binding a PlotExpression . More... | |
class | PlotExpressionParser |
Parses plot expressions into a PlotExpression that can be bound and executed. More... | |
class | PlotFunction |
A function called to operation on any number of plot expressions. More... | |
struct | PlotFunctionInfo |
Plot sampling progress information for PlotFunction . More... | |
class | PlotFunctionRegister |
A PlotFunctionRegister stores function implementations to expose to the plot expression generator. More... | |
class | PlotIndexExpression |
An expression to index into an expression. More... | |
struct | ParseState |
Used as the parsing state object for Bison, essentially forming the build tree. More... | |
struct | PlotSampleId |
Details how an expression is referencing a plot sample. More... | |
class | PlotSample |
This expression class binds and references an existing curve. More... | |
class | PlotSlice |
The slice expression supports taking a slice out of another expression. More... | |
class | PlotUnaryOperator |
An extension of PlotExpression defining a unary operation. More... | |
class | PlotUnaryOperatorT< Operator > |
A template unary operator, using a functional object to evaluate the expression. More... | |
Enumerations | |
enum | BindResult { BindError = -1, BindFailure = 0, Bound, BoundMaybeMore } |
Return values for the PlotExpression::bind() method. More... | |
Functions | |
void | domainUnion (PlotExpressionBindDomain &result, const PlotExpressionBindDomain &a, const PlotExpressionBindDomain &b) |
Finds the union of two domains, a and b . More... | |
void | domainUnion (PlotExpressionBindDomain &a, const PlotExpressionBindDomain &b) |
Find the union of the domains a and b , and store in a . More... | |
void | ocurveserror (ParseState *state, const QString &msg) |
Add an error message to state . More... | |
QTextStream & | operator<< (QTextStream &stream, const PlotSampleId &sid) |
Stream operator for writing a PlotSampleId to QTextStream . More... | |
This module contains an expression parser and tree generation for creating data sets derived from existing data sets.
For example, a new curve can be generted by the expression : 'a - b', creating a data series from the difference between a and b.
enum BindResult |
Return values for the PlotExpression::bind()
method.
void domainUnion | ( | PlotExpressionBindDomain & | result, |
const PlotExpressionBindDomain & | a, | ||
const PlotExpressionBindDomain & | b | ||
) |
Finds the union of two domains, a
and b
.
The new domain has a minimum defined as the smaller of the two operand minimums and a maximum defined as the larger of the two operand maximums. The result may cover a section which neither original domain covered.
The delta is taken as the smaller, positive value of the two domain deltas. Otherwise, the sample delta is set to the domain range. The sample count is dependent on the sample delta, but is at least two for a bounded domain.
If either a
or b
are unbounded, then the result
is set to the other. Thus the result can only be unbounded if both a
and b
are unbounded.
[out] | result | Set to the union of a and b . |
a | First operand. | |
b | Second operand. |
Referenced by domainUnion().
|
inline |
Find the union of the domains a
and b
, and store in a
.
See the overload for details.
[in,out] | a | The first operand and the result. |
b | The second operand. |
References domainUnion().
void ocurveserror | ( | ParseState * | state, |
const QString & | msg | ||
) |
Add an error message to state
.
state | The parse state to modify. |
msg | The error message. |
QTextStream& operator<< | ( | QTextStream & | stream, |
const PlotSampleId & | sid | ||
) |
Stream operator for writing a PlotSampleId
to QTextStream
.
The sid
is written only if it is not empty. The quote character wraps the name appropriately and an 'r' is added as a prefix if the ID is a regular expression.
stream
object after writing.