OpenCurves
0.9
|
Result value from a PlotFunction
.
More...
#include <plotfunctionresult.h>
Public Member Functions | |
PlotFunctionResult (double value=0) | |
Constructor - both display and logical values are set to value . More... | |
PlotFunctionResult (double display, double logical) | |
Constructor accepting distinct display and logical values. More... | |
PlotFunctionResult (const PlotFunctionResult &other) | |
Copy constructor. More... | |
PlotFunctionResult & | operator= (double value) |
Assignment - both display and logical values are set to value . More... | |
PlotFunctionResult & | operator= (const PlotFunctionResult &other) |
Assignment - copy. More... | |
Public Attributes | |
double | displayValue |
Value to display. | |
double | logicalValue |
Value referenced in further evaluations of the function. | |
Result value from a PlotFunction
.
This structure allows a distinction between the value displayed by the function
displayValue
- and that used in future evaluations - the logicalValue
.The displayValue
is what is returned in as the current sample value. The logical can prevent bad results in certain calculates, such as the total()
function. Actual use depends on the function implementation. In most cases, the logicalValue
should be treated as authoritative.
Note that the logicalValue
is used in calculating PlotFunctionInfo::total
.
The results of evaluation are generally assigned using the assignment operator. This writes to both the display and logical value. In some cases, the logical value may mark an invalid result (NaN or infinite), in which case a different display value may be written (e.g., 0).
|
inline |
Constructor - both display and logical values are set to value
.
value | The value to set. |
|
inline |
Constructor accepting distinct display and logical values.
display | The displayValue to set. |
logical | The logicalValue to set. |
|
inline |
Copy constructor.
other | The object to copy values from. |
|
inline |
Assignment - both display and logical values are set to value
.
value | The value to set. |
|
inline |
Assignment - copy.
other | The object to copy values from. |
References displayValue, and logicalValue.