StatData.
More...
#include <statdata.h>
|
static QVector< int > | calculateRanks (const QVector< double > &data, bool descending=false) |
| rank data. More...
|
|
static void | normalize (QVector< double > &data, double targetSum) |
| normalize, i.e. the sum of all items after processing is targetSum More...
|
|
StatData.
Helper class for statistics. This class calculates from a double-vector relevant information used for BoxPlots.
◆ StatData() [1/2]
◆ StatData() [2/2]
StatData::StatData |
( |
QVector< double > & |
data | ) |
|
◆ calculate()
void StatData::calculate |
( |
| ) |
|
◆ calculateRanks()
QVector< int > StatData::calculateRanks |
( |
const QVector< double > & |
data, |
|
|
bool |
descending = false |
|
) |
| |
|
static |
rank data.
calculate Ranks.
- Parameters
-
data | values for N items, |
descending | true: better ranks for lower values |
- Returns
- a vector that contains for the Nth data item the resulting rank. Example: in: {5, 2, 7, 5} out: {2, 1, 4, 2}
◆ max()
double StatData::max |
( |
| ) |
const |
|
inline |
◆ mean()
double StatData::mean |
( |
| ) |
const |
|
inline |
◆ median()
double StatData::median |
( |
| ) |
const |
|
inline |
◆ min()
double StatData::min |
( |
| ) |
const |
|
inline |
◆ normalize()
void StatData::normalize |
( |
QVector< double > & |
data, |
|
|
double |
targetSum |
|
) |
| |
|
static |
normalize, i.e. the sum of all items after processing is targetSum
scale the data in such a way that the sum of all data items is "targetSum"
◆ percentile()
double StatData::percentile |
( |
const int |
percent | ) |
const |
get value of a given percentile (0..100)
◆ percentile25()
double StatData::percentile25 |
( |
| ) |
const |
|
inline |
◆ percentile75()
double StatData::percentile75 |
( |
| ) |
const |
|
inline |
◆ setData()
void StatData::setData |
( |
QVector< double > & |
data | ) |
|
|
inline |
◆ standardDev()
double StatData::standardDev |
( |
| ) |
const |
|
inline |
get the standard deviation (of the population)
◆ sum()
double StatData::sum |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: