30#include "qwtcore_global.h"
31#include "qwt_interval.h"
131 return !(*
this == other);
148 double added()
const;
187 return !(*
this == other);
197 for (
int i = 0; i <
set.size(); i++)
213 QwtOHLCSample(
double time = 0.0,
double open = 0.0,
double high = 0.0,
double low = 0.0,
double close = 0.0);
217 bool isValid()
const;
247 : time(t), open(o), high(h), low(l), close(c)
273 minY = qMin(minY,
high);
274 minY = qMin(minY,
low);
275 minY = qMin(minY,
close);
278 maxY = qMax(maxY,
high);
279 maxY = qMax(maxY,
low);
280 maxY = qMax(maxY,
close);
323 : x(posX), y(posY), vx(vectorX), vy(vectorY)
334 : x(pos.x()), y(pos.y()), vx(vectorX), vy(vectorY)
344 return QPointF(
x,
y);
353 return (
vx == 0.0) && (
vy == 0.0);
384 QwtBoxSample(
double position,
double whiskerLower,
double q1,
double median,
double q3,
double whiskerUpper);
390 bool isValid()
const;
399 bool hasMean()
const;
436 :
QwtStatisticalSample(pos), whiskerLower(0.0), q1(0.0), median(0.0), q3(0.0), whiskerUpper(0.0),
437 mean(qQNaN()), outlierCount(0)
443 mean(qQNaN()), outlierCount(0)
455 return qIsFinite(
mean);
497 return values.isEmpty();
503 return values.size();
518 : boxPosition(pos), values(vals)
523 : boxPosition(pos), values(std::move(vals))
Outlier values for a single boxplot position
Definition qwt_samples.h:475
bool isEmpty() const
Check if no outliers present
Definition qwt_samples.h:495
double boxPosition
Position of the parent box (matches QwtBoxSample.position)
Definition qwt_samples.h:507
QVector< double > values
All outlier values for this box
Definition qwt_samples.h:510
int count() const
Get number of outliers
Definition qwt_samples.h:501
QwtBoxOutlierSample(double boxPosition=0.0)
Default constructor
Definition qwt_samples.h:513
Sample for box-and-whisker plot (boxplot) visualization
Definition qwt_samples.h:364
double q3
Third quartile (75th percentile)
Definition qwt_samples.h:423
double whiskerLower
Lower whisker endpoint
Definition qwt_samples.h:414
double whiskerUpper
Upper whisker endpoint
Definition qwt_samples.h:426
double mean
Arithmetic mean - NaN, when unknown (the default and full constructor)
Definition qwt_samples.h:429
bool hasMean() const
Check if the sample carries a mean value
Definition qwt_samples.h:453
int outlierCount
Number of outliers (stored separately, this is count only)
Definition qwt_samples.h:432
QwtBoxSample(double position=0.0)
Default constructor
Definition qwt_samples.h:435
QwtInterval boundingInterval() const
Get bounding interval including whiskers
Definition qwt_samples.h:458
bool isValid() const
Check if sample has valid ordering
Definition qwt_samples.h:448
double q1
First quartile (25th percentile)
Definition qwt_samples.h:417
QwtInterval boxInterval() const
Get box body interval (Q1 to Q3)
Definition qwt_samples.h:463
double median
Median (50th percentile) - also stored in inherited 'center' field
Definition qwt_samples.h:420
A sample of the types (x1-x2, y) or (x, y1-y2)
Definition qwt_samples.h:75
QwtInterval interval
Interval
Definition qwt_samples.h:88
bool operator==(const QwtIntervalSample &) const
Equality comparison operator
Definition qwt_samples.h:121
bool operator!=(const QwtIntervalSample &) const
Inequality comparison operator
Definition qwt_samples.h:129
QwtIntervalSample()
Default constructor
Definition qwt_samples.h:95
double value
Value
Definition qwt_samples.h:85
A class representing an interval
Definition qwt_interval.h:39
Open-High-Low-Close sample used in financial charts
Definition qwt_samples.h:211
double high
Highest price
Definition qwt_samples.h:229
bool isValid() const
Check if a sample is valid
Definition qwt_samples.h:259
double open
Opening price
Definition qwt_samples.h:226
double close
Closing price
Definition qwt_samples.h:235
double time
Time of the sample, usually a number representing a specific interval - like a day.
Definition qwt_samples.h:223
QwtInterval boundingInterval() const
Calculate the bounding interval of the OHLC values
Definition qwt_samples.h:270
QwtOHLCSample(double time=0.0, double open=0.0, double high=0.0, double low=0.0, double close=0.0)
Constructor with all OHLC values
Definition qwt_samples.h:246
double low
Lowest price
Definition qwt_samples.h:232
A sample of the types (x1...xn, y) or (x, y1..yn)
Definition qwt_samples.h:140
double added() const
Return all values of the set added together
Definition qwt_samples.h:194
double value
value
Definition qwt_samples.h:151
QVector< double > set
Vector of values associated to value
Definition qwt_samples.h:154
bool operator!=(const QwtSetSample &other) const
Inequality comparison operator
Definition qwt_samples.h:185
bool operator==(const QwtSetSample &other) const
Equality comparison operator
Definition qwt_samples.h:177
QwtSetSample()
Default constructor
Definition qwt_samples.h:161
Base class for statistical samples with position and range
Definition qwt_samples.h:44
double lower
Lower bound of the statistical range
Definition qwt_samples.h:56
double position
Position on the "time" axis (x for vertical, y for horizontal orientation)
Definition qwt_samples.h:53
QwtStatisticalSample(double position=0.0)
Default constructor
Definition qwt_samples.h:65
double upper
Upper bound of the statistical range
Definition qwt_samples.h:59
double center
Central reference value
Definition qwt_samples.h:62
Sample used in vector fields
Definition qwt_samples.h:292
double y
y coordinate of the position
Definition qwt_samples.h:306
QwtVectorFieldSample(double x=0.0, double y=0.0, double vx=0.0, double vy=0.0)
Constructor with position and vector coordinates
Definition qwt_samples.h:322
QPointF pos() const
Return position as QPointF
Definition qwt_samples.h:342
bool isNull() const
Check if the vector is null
Definition qwt_samples.h:351
double vx
x coordinate of the vector
Definition qwt_samples.h:309
double x
x coordinate of the position
Definition qwt_samples.h:303
double vy
y coordinate of the vector
Definition qwt_samples.h:312