Namespace QAccelPlot::LineCurveGapFilter¶
Namespace List > QAccelPlot > LineCurveGapFilter
Stateless helpers implementing the invalid-data-point contract shared by LineCurve subsystems.More...
Public Functions¶
| Type | Name |
|---|---|
| void | appendEnvelopeSamples (const CurveDataView & data, const DataPointRun & run, int sampledCount, std::vector< int > & indices) Appends sampledCount source indices of__run in__data to__indices , in index order. |
| std::vector< DataPointRun > | findValidRuns (const CurveDataView & data, int pointCount, bool logScaleX, bool logScaleY) Returns the maximal runs of consecutive valid data points in data . |
| bool | isValidPoint (const CurveDataView & data, int index, bool logScaleX, bool logScaleY) Returns true when both coordinates of data point__index in__data are valid. |
| std::vector< int > | planRunSampling (const std::vector< DataPointRun > & runs, int maxSampledPoints) Distributes a budget of maxSampledPoints across__runs . |
Detailed Description¶
A data point is invalid when either coordinate is non-finite, or is not strictly positive on a logarithmic dimension. See isValidCoordinate() in MathUtils.hpp.
Public Functions Documentation¶
function appendEnvelopeSamples¶
Appends sampledCount source indices of__run in__data to__indices , in index order.
void QAccelPlot::LineCurveGapFilter::appendEnvelopeSamples (
const CurveDataView & data,
const DataPointRun & run,
int sampledCount,
std::vector< int > & indices
)
Keeps every sample when sampledCount covers the run. Otherwise keeps the run's endpoints and the lowest and highest Y data point of equally sized buckets, so the decimated curve keeps its peaks.
function findValidRuns¶
Returns the maximal runs of consecutive valid data points in data .
std::vector< DataPointRun > QAccelPlot::LineCurveGapFilter::findValidRuns (
const CurveDataView & data,
int pointCount,
bool logScaleX,
bool logScaleY
)
function isValidPoint¶
Returns true when both coordinates of data point__index in__data are valid.
bool QAccelPlot::LineCurveGapFilter::isValidPoint (
const CurveDataView & data,
int index,
bool logScaleX,
bool logScaleY
)
function planRunSampling¶
Distributes a budget of maxSampledPoints across__runs .
std::vector< int > QAccelPlot::LineCurveGapFilter::planRunSampling (
const std::vector< DataPointRun > & runs,
int maxSampledPoints
)
Returns one sampled count per run. Runs with fewer than two samples receive zero (they cannot form an area). Every other run keeps at least its first and last data point, so the total may exceed the budget by at most two data points per run when a curve contains very many gaps.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/LineCurveGapFilter.hpp