20#ifndef JKQTPGRAPHSSTATISTICSADAPTORS_H_INCLUDED
21#define JKQTPGRAPHSSTATISTICSADAPTORS_H_INCLUDED
25#include "jkqtplotter/jkqtplotter_imexport.h"
26#include "jkqtmath/jkqtpstatisticstools.h"
27#include "jkqtcommon/jkqtpdebuggingtools.h"
28#include "jkqtplotter/jkqtpgraphsbase.h"
29#include "jkqtplotter/jkqtpgraphsbaseerrors.h"
30#include "jkqtplotter/graphs/jkqtpboxplot.h"
31#include "jkqtplotter/graphs/jkqtpscatter.h"
32#include "jkqtplotter/graphs/jkqtpsinglecolumnsymbols.h"
33#include "jkqtplotter/graphs/jkqtpbarchart.h"
34#include "jkqtplotter/graphs/jkqtpevaluatedfunction.h"
35#include "jkqtplotter/graphs/jkqtpimage.h"
36#include "jkqtplotter/graphs/jkqtpcontour.h"
37#include "jkqtplotter/graphs/jkqtpimpulses.h"
38#include "jkqtplotter/graphs/jkqtpfilledcurve.h"
39#include "jkqtplotter/graphs/jkqtpviolinplot.h"
66template <
class InputIt>
69 if (statOutput) *statOutput=stat;
111template <
class InputIt>
114 if (statOutput) *statOutput=stat;
163template <
class InputIt>
164inline std::pair<JKQTPBoxplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>
jkqtpstatAddHBoxplotAndOutliers(
JKQTBasePlotter* plotter, InputIt first, InputIt last,
double boxposY,
double quantile1Spec=0.25,
double quantile2Spec=0.75,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
const QString& outliercolumnBaseName=QString(
"boxplot"),
JKQTPStat5NumberStatistics* statOutput=
nullptr) {
166 if (statOutput) *statOutput=stat;
191 return std::pair<JKQTPBoxplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>(resB, resO);
223template <
class InputIt>
224inline std::pair<JKQTPBoxplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>
jkqtpstatAddVBoxplotAndOutliers(
JKQTBasePlotter* plotter, InputIt first, InputIt last,
double boxposX,
double quantile1Spec=0.25,
double quantile2Spec=0.75,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
const QString& outliercolumnBaseName=QString(
"boxplot"),
JKQTPStat5NumberStatistics* statOutput=
nullptr) {
226 if (statOutput) *statOutput=stat;
251 return std::pair<JKQTPBoxplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>(resB, resO);
285template <
class InputIt>
292 violinDistSamples, kernel, bandwidth);
333template <
class InputIt>
383template <
class InputIt>
390 violinDistSamples, kernel, bandwidth);
431template <
class InputIt>
489template <
class InputIt>
490inline std::pair<JKQTPViolinplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>
jkqtpstatAddHViolinplotKDEAndOutliers(
JKQTBasePlotter* plotter, InputIt first, InputIt last,
double violinposY,
const std::function<
double(
double)>& kernel=std::function<
double(
double)>(&
jkqtpstatKernel1DGaussian),
double bandwidth=-1,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
const QString& distBasename=QString(
"violin plot distribution"),
int violinDistSamples=100) {
492 std::vector<double> datain, datause;
493 std::copy(first, last, std::back_inserter(datain));
494 std::sort(datain.begin(), datain.end());
495 datause.reserve(datain.size());
496 size_t i0=jkqtp_boundedRoundTo<size_t>(0,minimumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
497 size_t i1=jkqtp_boundedRoundTo<size_t>(0,maximumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
498 for (
size_t i=0; i<datain.size(); i++) {
499 if (i<=i0 || i>=i1) {
502 datause.push_back(datain[i]);
508 if (datause.size()>0) {
513 violinDistSamples, kernel, bandwidth);
516 res->
setMax(datause[datause.size()-1]);
537 return std::pair<JKQTPViolinplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>(res,resO);
539 return std::pair<JKQTPViolinplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>(
nullptr,
nullptr);
572template <
class InputIt>
573inline std::pair<JKQTPViolinplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>
jkqtpstatAddHViolinplotHistogramAndOutliers(
JKQTBasePlotter* plotter, InputIt first, InputIt last,
double violinposY,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
const QString& distBasename=QString(
"violin plot distribution"),
int violinDistSamples=21) {
575 std::vector<double> datain, datause;
576 std::copy(first, last, std::back_inserter(datain));
577 std::sort(datain.begin(), datain.end());
578 datause.reserve(datain.size());
579 size_t i0=jkqtp_boundedRoundTo<size_t>(0,minimumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
580 size_t i1=jkqtp_boundedRoundTo<size_t>(0,maximumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
581 for (
size_t i=0; i<datain.size(); i++) {
582 if (i<=i0 || i>=i1) {
585 datause.push_back(datain[i]);
591 if (datause.size()>0) {
597 res->
setMax(datause[datause.size()-1]);
619 return std::pair<JKQTPViolinplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>(res,resO);
621 return std::pair<JKQTPViolinplotHorizontalElement*,JKQTPSingleColumnSymbolsGraph*>(
nullptr,
nullptr);
660template <
class InputIt>
661inline std::pair<JKQTPViolinplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>
jkqtpstatAddVViolinplotKDEAndOutliers(
JKQTBasePlotter* plotter, InputIt first, InputIt last,
double violinposY,
const std::function<
double(
double)>& kernel=std::function<
double(
double)>(&
jkqtpstatKernel1DGaussian),
double bandwidth=-1,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
const QString& distBasename=QString(
"violin plot distribution"),
int violinDistSamples=100) {
663 std::vector<double> datain, datause;
664 std::copy(first, last, std::back_inserter(datain));
665 std::sort(datain.begin(), datain.end());
666 datause.reserve(datain.size());
667 size_t i0=jkqtp_boundedRoundTo<size_t>(0,minimumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
668 size_t i1=jkqtp_boundedRoundTo<size_t>(0,maximumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
669 for (
size_t i=0; i<datain.size(); i++) {
670 if (i<=i0 || i>=i1) {
673 datause.push_back(datain[i]);
679 if (datause.size()>0) {
684 violinDistSamples, kernel, bandwidth);
687 res->
setMax(datause[datause.size()-1]);
708 return std::pair<JKQTPViolinplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>(res,resO);
710 return std::pair<JKQTPViolinplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>(
nullptr,
nullptr);
743template <
class InputIt>
744inline std::pair<JKQTPViolinplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>
jkqtpstatAddVViolinplotHistogramAndOutliers(
JKQTBasePlotter* plotter, InputIt first, InputIt last,
double violinposY,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
const QString& distBasename=QString(
"violin plot distribution"),
int violinDistSamples=21) {
746 std::vector<double> datain, datause;
747 std::copy(first, last, std::back_inserter(datain));
748 std::sort(datain.begin(), datain.end());
749 datause.reserve(datain.size());
750 size_t i0=jkqtp_boundedRoundTo<size_t>(0,minimumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
751 size_t i1=jkqtp_boundedRoundTo<size_t>(0,maximumQuantile*
static_cast<double>(datain.size()),datain.size()-1);
752 for (
size_t i=0; i<datain.size(); i++) {
753 if (i<=i0 || i>=i1) {
756 datause.push_back(datain[i]);
762 if (datause.size()>0) {
768 res->
setMax(datause[datause.size()-1]);
790 return std::pair<JKQTPViolinplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>(res,resO);
792 return std::pair<JKQTPViolinplotVerticalElement*,JKQTPSingleColumnSymbolsGraph*>(
nullptr,
nullptr);
827template <
class InputIt>
835 resO->
setTitle(histogramcolumnBaseName);
865template <
class InputIt>
873 resO->
setTitle(histogramcolumnBaseName);
905template <
class InputIt,
class BinsInputIt>
913 resO->
setTitle(histogramcolumnBaseName);
940template <
class InputIt>
948 resO->
setTitle(histogramcolumnBaseName);
976template <
class InputIt>
984 resO->
setTitle(histogramcolumnBaseName);
1014template <
class InputIt,
class BinsInputIt>
1022 resO->
setTitle(histogramcolumnBaseName);
1058template <
class InputItX,
class InputItY>
1059inline JKQTPColumnMathImage*
jkqtpstatAddHistogram2DImage(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
size_t xbins=10,
size_t ybins=10,
bool normalized=
true,
const QString& histogramcolumnBaseName=QString(
"histogram"),
double* oxmin=
nullptr,
double* oxmax=
nullptr,
double* oymin=
nullptr,
double* oymax=
nullptr) {
1060 double xmin=0, xmax=0;
1061 double ymin=0, ymax=0;
1067 xmin, xmax, ymin, ymax,
1068 xbins, ybins, normalized);
1076 gHist->
setTitle(QObject::tr(
"2D Histogram"));
1077 if (oxmax) *oxmax=xmax;
1078 if (oxmin) *oxmin=xmin;
1079 if (oymax) *oymax=ymax;
1080 if (oymin) *oymin=ymin;
1113template <
class InputItX,
class InputItY>
1114inline JKQTPColumnContourPlot*
jkqtpstatAddHistogram2DContour(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
size_t xbins=10,
size_t ybins=10,
bool normalized=
true,
const QString& histogramcolumnBaseName=QString(
"histogram"),
double* oxmin=
nullptr,
double* oxmax=
nullptr,
double* oymin=
nullptr,
double* oymax=
nullptr) {
1115 double xmin=0, xmax=0;
1116 double ymin=0, ymax=0;
1122 xmin, xmax, ymin, ymax,
1123 xbins, ybins,
true);
1131 gHist->
setTitle(QObject::tr(
"2D Histogram"));
1133 if (oxmax) *oxmax=xmax;
1134 if (oxmin) *oxmin=xmin;
1135 if (oymax) *oymax=ymax;
1136 if (oymin) *oymin=ymin;
1163template <
class InputItX,
class InputItY>
1164inline JKQTPColumnMathImage*
jkqtpstatAddHistogram2DImage(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
double xbinwidth,
double ybinwidth,
bool normalized=
true,
const QString& histogramcolumnBaseName=QString(
"histogram"),
double* oxmin=
nullptr,
double* oxmax=
nullptr,
double* oymin=
nullptr,
double* oymax=
nullptr) {
1165 double xmin=0, xmax=0;
1166 double ymin=0, ymax=0;
1169 size_t Nx=jkqtp_ceilTo<size_t>((xmax-xmin)/xbinwidth);
1170 size_t Ny=jkqtp_ceilTo<size_t>((ymax-ymin)/ybinwidth);
1174 xmin, xmax, ymin, ymax,
1175 Nx, Ny, normalized);
1183 gHist->
setTitle(QObject::tr(
"2D Histogram"));
1184 if (oxmax) *oxmax=xmax;
1185 if (oxmin) *oxmin=xmin;
1186 if (oymax) *oymax=ymax;
1187 if (oymin) *oymin=ymin;
1221template <
class InputItX,
class InputItY>
1222inline JKQTPColumnContourPlot*
jkqtpstatAddHistogram2DContour(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
double xbinwidth,
double ybinwidth,
bool normalized=
true,
const QString& histogramcolumnBaseName=QString(
"histogram"),
double* oxmin=
nullptr,
double* oxmax=
nullptr,
double* oymin=
nullptr,
double* oymax=
nullptr) {
1223 double xmin=0, xmax=0;
1224 double ymin=0, ymax=0;
1227 size_t Nx=jkqtp_ceilTo<size_t>((xmax-xmin)/xbinwidth);
1228 size_t Ny=jkqtp_ceilTo<size_t>((ymax-ymin)/ybinwidth);
1232 xmin, xmax, ymin, ymax,
1233 Nx, Ny, normalized);
1241 gHist->
setTitle(QObject::tr(
"2D Histogram"));
1243 if (oxmax) *oxmax=xmax;
1244 if (oxmin) *oxmin=xmin;
1245 if (oymax) *oymax=ymax;
1246 if (oymin) *oymin=ymin;
1278template <
class InputIt>
1320template <
class InputIt>
1364template <
class InputIt,
class BinsInputIt>
1406template <
class InputIt>
1456template <
class InputIt>
1498template <
class InputIt>
1542template <
class InputIt,
class BinsInputIt>
1584template <
class InputIt>
1639template <
class InputItX,
class InputItY>
1640inline JKQTPColumnMathImage*
jkqtpstatAddKDE2DImage(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
size_t xbins=10,
size_t ybins=10,
const std::function<
double(
double,
double)>& kernel=std::function<
double(
double,
double)>(&
jkqtpstatKernel2DGaussian),
double bandwidthX=1.0,
double bandwidthY=1.0,
const QString& kdecolumnBaseName=QString(
"histogram"),
double* oxmin=
nullptr,
double* oxmax=
nullptr,
double* oymin=
nullptr,
double* oymax=
nullptr) {
1641 double xmin=0, xmax=0;
1642 double ymin=0, ymax=0;
1648 xmin, xmax, ymin, ymax,
1649 xbins, ybins, kernel, bandwidthX, bandwidthY);
1657 gHist->
setTitle(QObject::tr(
"2D KDE"));
1658 if (oxmax) *oxmax=xmax;
1659 if (oxmin) *oxmin=xmin;
1660 if (oymax) *oymax=ymax;
1661 if (oymin) *oymin=ymin;
1696template <
class InputItX,
class InputItY>
1697inline JKQTPColumnContourPlot*
jkqtpstatAddKDE2DContour(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
size_t xbins=10,
size_t ybins=10,
const std::function<
double(
double,
double)>& kernel=std::function<
double(
double,
double)>(&
jkqtpstatKernel2DGaussian),
double bandwidthX=1.0,
double bandwidthY=1.0,
const QString& kdecolumnBaseName=QString(
"histogram"),
double* oxmin=
nullptr,
double* oxmax=
nullptr,
double* oymin=
nullptr,
double* oymax=
nullptr) {
1698 double xmin=0, xmax=0;
1699 double ymin=0, ymax=0;
1705 xmin, xmax, ymin, ymax,
1706 xbins, ybins, kernel, bandwidthX, bandwidthY);
1714 gHist->
setTitle(QObject::tr(
"2D KDE"));
1716 if (oxmax) *oxmax=xmax;
1717 if (oxmin) *oxmin=xmin;
1718 if (oymax) *oymax=ymax;
1719 if (oymin) *oymin=ymin;
1753template <
class InputItX,
class InputItY>
1756 if (coeffA) cA=*coeffA;
1758 if (coeffB) cB=*coeffB;
1760 JKQTPASSERT_M(!fixA || (fixA && coeffA!=
nullptr),
"if fixA=true, coeffA needs to be provided");
1761 JKQTPASSERT_M(!fixB || (fixB && coeffB!=
nullptr),
"if fixB=true, coeffB needs to be provided");
1767 g->
setTitle(QString(
"regression: $f(x) = %1%2{\\cdot}x, \\chi^2=%4, R^2=%3$").arg(
jkqtp_floattolatexqstr(cA, 2,
true, 1e-16,1e-2, 1e4,
false)).arg(
jkqtp_floattolatexqstr(cB, 2,
true, 1e-16,1e-2, 1e4,
true)).arg(
jkqtp_floattolatexqstr(
jkqtpstatCoefficientOfDetermination(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(
JKQTPStatRegressionModelType::Linear, cA, cB)),3)).arg(
jkqtp_floattolatexqstr(
jkqtpstatSumOfDeviations(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(
JKQTPStatRegressionModelType::Linear, cA, cB)),3)));
1769 if (coeffA) *coeffA=cA;
1770 if (coeffB) *coeffB=cB;
1829template <
class InputItX,
class InputItY>
1830inline JKQTPXFunctionLineGraph*
jkqtpstatAddRobustIRLSLinearRegression(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
double* coeffA=
nullptr,
double* coeffB=
nullptr,
bool fixA=
false,
bool fixB=
false,
double p=1.1,
int iterations=100) {
1832 if (coeffA) cA=*coeffA;
1834 if (coeffB) cB=*coeffB;
1836 JKQTPASSERT_M(!fixA || (fixA && coeffA!=
nullptr),
"if fixA=true, coeffA needs to be provided");
1837 JKQTPASSERT_M(!fixB || (fixB && coeffB!=
nullptr),
"if fixB=true, coeffB needs to be provided");
1843 g->
setTitle(QString(
"robust regression: $f(x) = %1%2{\\cdot}x, \\chi^2=%4, R^2=%3$").arg(
jkqtp_floattolatexqstr(cA, 2,
true, 1e-16,1e-2, 1e4,
false)).arg(
jkqtp_floattolatexqstr(cB, 2,
true, 1e-16,1e-2, 1e4,
true)).arg(
jkqtp_floattolatexqstr(
jkqtpstatCoefficientOfDetermination(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(
JKQTPStatRegressionModelType::Linear, cA, cB)),3)).arg(
jkqtp_floattolatexqstr(
jkqtpstatSumOfDeviations(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(
JKQTPStatRegressionModelType::Linear, cA, cB)),3)));
1845 if (coeffA) *coeffA=cA;
1846 if (coeffB) *coeffB=cB;
1917template <
class InputItX,
class InputItY,
class InputItW>
1918inline JKQTPXFunctionLineGraph*
jkqtpstatAddLinearWeightedRegression(
JKQTBasePlotter* plotter, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY, InputItW firstW, InputItW lastW,
double* coeffA=
nullptr,
double* coeffB=
nullptr,
bool fixA=
false,
bool fixB=
false, std::function<
double(
double)> fWeightDataToWi=&jkqtp_identity<double>) {
1920 if (coeffA) cA=*coeffA;
1922 if (coeffB) cB=*coeffB;
1924 JKQTPASSERT_M(!fixA || (fixA && coeffA!=
nullptr),
"if fixA=true, coeffA needs to be provided");
1925 JKQTPASSERT_M(!fixB || (fixB && coeffB!=
nullptr),
"if fixB=true, coeffB needs to be provided");
1927 jkqtpstatLinearWeightedRegression(firstX, lastX, firstY, lastY, firstW, lastW, cA, cB, fixA, fixB, fWeightDataToWi);
1931 g->
setTitle(QString(
"weighted regression: $f(x) = %1%2{\\cdot}x, \\chi^2=%4, R^2=%3$").arg(
jkqtp_floattolatexqstr(cA, 2,
true, 1e-16,1e-2, 1e4,
false)).arg(
jkqtp_floattolatexqstr(cB, 2,
true, 1e-16,1e-2, 1e4,
true)).arg(
jkqtp_floattolatexqstr(
jkqtpstatWeightedCoefficientOfDetermination(firstX,lastX,firstY,lastY,firstW,lastW,
jkqtpStatGenerateRegressionModel(
JKQTPStatRegressionModelType::Linear, cA, cB),fWeightDataToWi),3)).arg(
jkqtp_floattolatexqstr(
jkqtpstatWeightedSumOfDeviations(firstX,lastX,firstY,lastY,firstW,lastW,
jkqtpStatGenerateRegressionModel(
JKQTPStatRegressionModelType::Linear, cA, cB),fWeightDataToWi),3)));
1933 if (coeffA) *coeffA=cA;
1934 if (coeffB) *coeffB=cB;
2003template <
class InputItX,
class InputItY>
2006 if (coeffA) cA=*coeffA;
2008 if (coeffB) cB=*coeffB;
2010 JKQTPASSERT_M(!fixA || (fixA && coeffA!=
nullptr),
"if fixA=true, coeffA needs to be provided");
2011 JKQTPASSERT_M(!fixB || (fixB && coeffB!=
nullptr),
"if fixB=true, coeffB needs to be provided");
2016 g->
setTitle(QString(
"regression: $%1, \\chi^2=%3, R^2=%2$").arg(
jkqtpstatRegressionModel2Latex(type, cA, cB)).arg(
jkqtp_floattolatexqstr(
jkqtpstatCoefficientOfDetermination(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(type, cA, cB)),3)).arg(
jkqtp_floattolatexqstr(
jkqtpstatSumOfDeviations(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(type, cA, cB)),3)));
2018 if (coeffA) *coeffA=cA;
2019 if (coeffB) *coeffB=cB;
2079template <
class InputItX,
class InputItY>
2080inline JKQTPXFunctionLineGraph*
jkqtpstatAddRobustIRLSRegression(
JKQTBasePlotter* plotter,
JKQTPStatRegressionModelType type, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY,
double* coeffA=
nullptr,
double* coeffB=
nullptr,
bool fixA=
false,
bool fixB=
false,
double p=1.1,
int iterations=100) {
2082 if (coeffA) cA=*coeffA;
2084 if (coeffB) cB=*coeffB;
2086 JKQTPASSERT_M(!fixA || (fixA && coeffA!=
nullptr),
"if fixA=true, coeffA needs to be provided");
2087 JKQTPASSERT_M(!fixB || (fixB && coeffB!=
nullptr),
"if fixB=true, coeffB needs to be provided");
2089 jkqtpstatRobustIRLSRegression(type, firstX, lastX, firstY, lastY, cA, cB, fixA, fixB, p, iterations);
2092 g->
setTitle(QString(
"robust regression: $%1, \\chi^2=%3, R^2=%2$").arg(
jkqtpstatRegressionModel2Latex(type, cA, cB)).arg(
jkqtp_floattolatexqstr(
jkqtpstatCoefficientOfDetermination(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(type, cA, cB)),3)).arg(
jkqtp_floattolatexqstr(
jkqtpstatSumOfDeviations(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(type, cA, cB)),3)));
2094 if (coeffA) *coeffA=cA;
2095 if (coeffB) *coeffB=cB;
2169template <
class InputItX,
class InputItY,
class InputItW>
2170inline JKQTPXFunctionLineGraph*
jkqtpstatAddWeightedRegression(
JKQTBasePlotter* plotter,
JKQTPStatRegressionModelType type, InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY, InputItW firstW, InputItW lastW,
double* coeffA=
nullptr,
double* coeffB=
nullptr,
bool fixA=
false,
bool fixB=
false, std::function<
double(
double)> fWeightDataToWi=&jkqtp_identity<double>) {
2172 if (coeffA) cA=*coeffA;
2174 if (coeffB) cB=*coeffB;
2176 JKQTPASSERT_M(!fixA || (fixA && coeffA!=
nullptr),
"if fixA=true, coeffA needs to be provided");
2177 JKQTPASSERT_M(!fixB || (fixB && coeffB!=
nullptr),
"if fixB=true, coeffB needs to be provided");
2179 jkqtpstatWeightedRegression(type, firstX, lastX, firstY, lastY, firstW, lastW, cA, cB, fixA, fixB, fWeightDataToWi);
2182 g->
setTitle(QString(
"weighted regression: $%1, \\chi^2=%3, R^2=%2$").arg(
jkqtpstatRegressionModel2Latex(type, cA, cB)).arg(
jkqtp_floattolatexqstr(
jkqtpstatCoefficientOfDetermination(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(type, cA, cB)),3)).arg(
jkqtp_floattolatexqstr(
jkqtpstatSumOfDeviations(firstX,lastX,firstY,lastY,
jkqtpStatGenerateRegressionModel(type, cA, cB)),3)));
2184 if (coeffA) *coeffA=cA;
2185 if (coeffB) *coeffB=cB;
2247template <
class InputItX,
class InputItY,
class OutputItP>
2249 std::vector<double> pFit;
2253 gPoly->
setTitle(QString(
"regression: $%1, \\chi^2=%3, R^2=%2$").arg(
jkqtp_polynomialModel2Latex(pFit.begin(), pFit.end())).arg(
jkqtp_floattolatexqstr(
jkqtpstatCoefficientOfDetermination(firstX,lastX,firstY,lastY,
jkqtp_generatePolynomialModel(pFit.begin(), pFit.end())),3)).arg(
jkqtp_floattolatexqstr(
jkqtpstatSumOfDeviations(firstX,lastX,firstY,lastY,
jkqtp_generatePolynomialModel(pFit.begin(), pFit.end())),3)));
2254 std::copy(pFit.begin(), pFit.end(), firstRes);
2281template <
class InputItX,
class InputItY>
2283 std::vector<double> pFit;
2284 return jkqtpstatAddPolyFit(plotter, firstX,lastX,firstY,lastY,P,std::back_inserter(pFit));
2309template <
class OutputItP>
2366template <
class InputCatIt,
class InputValueIt,
class TGraph>
2368 std::map<double, std::vector<double> > groupeddataBar;
2369 jkqtpstatGroupData(inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupeddataBar, groupDefFunc);
2375 for (
auto it=groupeddataBar.begin(); it!=groupeddataBar.end(); ++it) {
2383 plotter->
addGraph(graph=
new TGraph(plotter));
2384 graph->setXColumn(colGroup);
2385 graph->setYColumn(colAverage);
2386 graph->setYErrorColumn(
static_cast<int>(colStdDev));
2410template <
class InputCatIt,
class InputValueIt>
2412 return jkqtpstatAddYErrorGraph<InputCatIt,InputValueIt,JKQTPXYLineErrorGraph>(plotter,inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2434template <
class InputCatIt,
class InputValueIt>
2436 return jkqtpstatAddYErrorGraph<InputCatIt,InputValueIt,JKQTPBarVerticalErrorGraph>(plotter,inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2458template <
class InputCatIt,
class InputValueIt>
2460 return jkqtpstatAddYErrorGraph<InputCatIt,InputValueIt,JKQTPImpulsesVerticalErrorGraph>(plotter,inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2482template <
class InputCatIt,
class InputValueIt>
2484 return jkqtpstatAddYErrorGraph<InputCatIt,InputValueIt,JKQTPXYParametrizedErrorScatterGraph>(plotter,inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2506template <
class InputCatIt,
class InputValueIt>
2508 return jkqtpstatAddYErrorGraph<InputCatIt,InputValueIt,JKQTPFilledCurveYErrorGraph>(plotter,inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2536template <
class InputCatIt,
class InputValueIt,
class TGraph>
2538 std::map<double, std::vector<double> > groupeddataBar;
2539 jkqtpstatGroupData(inFirstCat_Y, inLastCat_Y, inFirstValue_Y, inLastValue_Y, groupeddataBar, groupDefFunc);
2545 for (
auto it=groupeddataBar.begin(); it!=groupeddataBar.end(); ++it) {
2553 plotter->
addGraph(graph=
new TGraph(plotter));
2554 graph->setXColumn(colAverage);
2555 graph->setYColumn(colGroup);
2556 graph->setXErrorColumn(
static_cast<int>(colStdDev));
2580template <
class InputCatIt,
class InputValueIt>
2582 return jkqtpstatAddXErrorGraph<InputCatIt,InputValueIt,JKQTPXYLineErrorGraph>(plotter,inFirstCat_Y, inLastCat_Y, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2604template <
class InputCatIt,
class InputValueIt>
2606 return jkqtpstatAddXErrorGraph<InputCatIt,InputValueIt,JKQTPBarHorizontalErrorGraph>(plotter,inFirstCat_Y, inLastCat_Y, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2628template <
class InputCatIt,
class InputValueIt>
2630 return jkqtpstatAddXErrorGraph<InputCatIt,InputValueIt,JKQTPImpulsesHorizontalErrorGraph>(plotter,inFirstCat_Y, inLastCat_Y, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2652template <
class InputCatIt,
class InputValueIt>
2654 return jkqtpstatAddXErrorGraph<InputCatIt,InputValueIt,JKQTPXYParametrizedErrorScatterGraph>(plotter,inFirstCat_Y, inLastCat_Y, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2676template <
class InputCatIt,
class InputValueIt>
2678 return jkqtpstatAddXErrorGraph<InputCatIt,InputValueIt,JKQTPFilledCurveXErrorGraph>(plotter,inFirstCat_Y, inLastCat_Y, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2707template <
class InputCatIt,
class InputValueIt,
class TGraph>
2709 std::map<double, std::pair< std::vector<double>, std::vector<double> > > groupeddataBar;
2710 jkqtpstatGroupData(inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupeddataBar, groupDefFunc);
2718 for (
auto it=groupeddataBar.begin(); it!=groupeddataBar.end(); ++it) {
2728 plotter->
addGraph(graph=
new TGraph(plotter));
2729 graph->setXColumn(colAverageX);
2730 graph->setYColumn(colAverageY);
2731 graph->setXErrorColumn(
static_cast<int>(colStdDevX));
2732 graph->setYErrorColumn(
static_cast<int>(colStdDevY));
2756template <
class InputCatIt,
class InputValueIt>
2758 return jkqtpstatAddXYErrorGraph<InputCatIt,InputValueIt,JKQTPXYLineErrorGraph>(plotter,inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2781template <
class InputCatIt,
class InputValueIt>
2783 return jkqtpstatAddXYErrorGraph<InputCatIt,InputValueIt,JKQTPXYParametrizedErrorScatterGraph>(plotter,inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupDefFunc, columnBaseName);
2814template <
class InputCatIt,
class InputValueIt,
class TGraph>
2815inline TGraph*
jkqtpstatAddBoxplots(
JKQTBasePlotter* plotter, InputCatIt inFirstCat_Y, InputCatIt inLastCat_Y, InputValueIt inFirstValue_Y, InputValueIt inLastValue_Y,
double quantile1Spec=0.25,
double quantile2Spec=0.75,
double minimumQuantile=0,
double maximumQuantile=1.0,
JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&
jkqtpstatGroupingIdentity1D,
const QString& columnBaseName=QString(
"grouped boxplot data")) {
2816 std::map<double, std::vector<double> > groupeddataBar;
2817 jkqtpstatGroupData(inFirstCat_Y, inLastCat_Y, inFirstValue_Y, inLastValue_Y, groupeddataBar, groupDefFunc);
2828 for (
auto it=groupeddataBar.begin(); it!=groupeddataBar.end(); ++it) {
2830 auto stat5=
jkqtpstat5NumberStatistics(it->second.begin(), it->second.end(), quantile1Spec, quantile2Spec, minimumQuantile, maximumQuantile);
2844 plotter->
addGraph(graph=
new TGraph(plotter));
2845 graph->setPositionColumn(colGroup);
2846 graph->setMinColumn(colMin);
2847 graph->setMaxColumn(colMax);
2848 graph->setMedianColumn(colMedian);
2849 graph->setMeanColumn(colAverage);
2850 graph->setPercentile25Column(colQ25);
2851 graph->setPercentile75Column(colQ75);
2852 graph->setMedianConfidenceColumn(colIQRSig);
2880template <
class InputCatIt,
class InputValueIt>
2881inline JKQTPBoxplotVerticalGraph*
jkqtpstatVAddBoxplots(
JKQTBasePlotter* plotter, InputCatIt inFirstCat_Y, InputCatIt inLastCat_Y, InputValueIt inFirstValue_X, InputValueIt inLastValue_X,
double quantile1Spec=0.25,
double quantile2Spec=0.75,
double minimumQuantile=0,
double maximumQuantile=1.0,
JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&
jkqtpstatGroupingIdentity1D,
const QString& columnBaseName=QString(
"grouped boxplot data")) {
2883 return jkqtpstatAddBoxplots<InputCatIt,InputValueIt,JKQTPBoxplotVerticalGraph>(plotter, inFirstCat_Y, inLastCat_Y, inFirstValue_X, inLastValue_X, quantile1Spec, quantile2Spec, minimumQuantile, maximumQuantile, groupDefFunc, columnBaseName);
2909template <
class InputCatIt,
class InputValueIt>
2910inline JKQTPBoxplotHorizontalGraph*
jkqtpstatVAddBoxplots(
JKQTBasePlotter* plotter, InputCatIt inFirstCat_X, InputCatIt inLastCat_X, InputValueIt inFirstValue_Y, InputValueIt inLastValue_Y,
double quantile1Spec=0.25,
double quantile2Spec=0.75,
double minimumQuantile=0,
double maximumQuantile=1.0,
JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&
jkqtpstatGroupingIdentity1D,
const QString& columnBaseName=QString(
"grouped boxplot data")) {
2912 return jkqtpstatAddBoxplots<InputCatIt,InputValueIt,JKQTPBoxplotHorizontalGraph>(plotter, inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, quantile1Spec, quantile2Spec, minimumQuantile, maximumQuantile, groupDefFunc, columnBaseName);
2937template <
class InputCatIt,
class InputValueIt>
2938inline std::pair<JKQTPBoxplotVerticalGraph*, JKQTPXYLineGraph*>
jkqtpstatAddVBoxplotsAndOutliers(
JKQTBasePlotter* plotter, InputCatIt inFirstCat_X, InputCatIt inLastCat_X, InputValueIt inFirstValue_Y, InputValueIt inLastValue_Y,
double quantile1Spec=0.25,
double quantile2Spec=0.75,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&
jkqtpstatGroupingIdentity1D,
const QString& columnBaseName=QString(
"grouped boxplot data")) {
2939 std::map<double, std::vector<double> > groupeddataBar;
2940 jkqtpstatGroupData(inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, groupeddataBar, groupDefFunc);
2953 for (
auto it=groupeddataBar.begin(); it!=groupeddataBar.end(); ++it) {
2955 auto stat5=
jkqtpstat5NumberStatistics(it->second.begin(), it->second.end(), quantile1Spec, quantile2Spec, minimumQuantile, maximumQuantile);
2987 return std::pair<JKQTPBoxplotVerticalGraph*, JKQTPXYLineGraph*>(graph, graphOL);
3013template <
class InputCatIt,
class InputValueIt>
3014inline std::pair<JKQTPBoxplotHorizontalGraph*, JKQTPXYLineGraph*>
jkqtpstatAddHBoxplotsAndOutliers(
JKQTBasePlotter* plotter, InputCatIt inFirstCat_Y, InputCatIt inLastCat_Y, InputValueIt inFirstValue_X, InputValueIt inLastValue_X,
double quantile1Spec=0.25,
double quantile2Spec=0.75,
double minimumQuantile=0.03,
double maximumQuantile=0.97,
JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&
jkqtpstatGroupingIdentity1D,
const QString& columnBaseName=QString(
"grouped boxplot data")) {
3015 std::map<double, std::vector<double> > groupeddataBar;
3016 jkqtpstatGroupData(inFirstCat_Y, inLastCat_Y, inFirstValue_X, inLastValue_X, groupeddataBar, groupDefFunc);
3029 for (
auto it=groupeddataBar.begin(); it!=groupeddataBar.end(); ++it) {
3031 auto stat5=
jkqtpstat5NumberStatistics(it->second.begin(), it->second.end(), quantile1Spec, quantile2Spec, minimumQuantile, maximumQuantile);
3063 return std::pair<JKQTPBoxplotHorizontalGraph*, JKQTPXYLineGraph*>(graph, graphOL);
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
size_t addGraph(JKQTPPlotElement *gr)
Definition jkqtpbaseplotter.h:566
JKQTPDatastore * getDatastore()
returns a pointer to the datastore used by this object
Definition jkqtpbaseplotter.h:449
This implements a horizontal bar graph with bars between and and error indicator.
Definition jkqtpbarchart.h:202
This implements a horizontal bar graph with bars between and .
Definition jkqtpbarchart.h:155
This implements a vertical bar graph with bars between and and error indicator.
Definition jkqtpbarchart.h:90
This implements a vertical bar graph with bars between and .
Definition jkqtpbarchart.h:51
void setMin(double __value)
the minimum value to be used for the boxplot
void setMedianConfidenceIntervalWidth(double __value)
the width of the confidence interval around the median
void setDrawMean(bool __value)
indicates whether to draw the mean
void setPos(double __value)
the position of the boxplot on the "other" axis
void setDrawMedian(bool __value)
indicates whether to draw the median
void setMedian(double __value)
the median value to be used for the boxplot
void setMax(double __value)
the maximum value to be used for the boxplot
void setDrawMinMax(bool __value)
indicates whether to draw the percentiles
virtual QColor getKeyLabelColor() const override
returns the color to be used for the key label
void setMean(double __value)
the mean value to be used for the boxplot
void setDrawNotch(bool __value)
indicates whether to draw a notch with width medianConfidenceIntervalWidth
void setPercentile75(double __value)
the 75% percentile value to be used for the boxplot
void setPercentile25(double __value)
the 25% percentile value to be used for the boxplot
void setMedianConfidenceColumn(size_t __value)
the column that contains the confidence interval width of the median (e.g. 1.57*IQR/sqrt(n) )....
void setPercentile25Column(int __value)
the column that contains the 25% percentile-component of the datapoints
void setMinColumn(int __value)
the column that contains the minimum-component of the datapoints
void setPositionColumn(int __value)
the column that contains the x-component of the datapoints
void setMedianColumn(int __value)
the column that contains the median-component of the datapoints
void setMeanColumn(int __value)
the column that contains the median-component of the datapoints.
void setMaxColumn(int __value)
the column that contains the maximum-component of the datapoints
void setPercentile75Column(int __value)
the column that contains the 75% percentile-component of the datapoints
This implements a horizontal (notched) boxplot where the data is directly given to the object and not...
Definition jkqtpboxplot.h:229
This implements horizontal boxplots, optionally also a notched boxplot.
Definition jkqtpboxplot.h:140
This implements a single vertical (notched) boxplot as a "geometric element", where the data is direc...
Definition jkqtpboxplot.h:188
This implements vertical boxplots, optionally also a notched boxplot.
Definition jkqtpboxplot.h:102
class for a contour plots (same as JKQTPContourPlot) of images stored in a JKQTPDatastore column
Definition jkqtpcontour.h:253
void setImageColumn(int __value)
column containing the displayed image
class to plot an image from an 2-dimensional array of values stored in a column of the datastore
Definition jkqtpimage.h:771
virtual void setImageColumn(int __value)
column containing the displayed image
void createContourLevels(int nLevels=3)
creates at nLevels contour levels linearly spaced between the data's minimum and maximum values
This class manages data columns (with entries of type double ), used by JKQTPlotter/JKQTBasePlotter t...
Definition jkqtpdatastorage.h:282
JKQTPColumnBackInserter backInserter(int i)
returns a back-inserter iterator (JKQTPColumnBackInserter) to the i -th column in the JKQTPDatastore
void appendToColumn(size_t column, double value)
adds a value value to the column column. This changes the column length (number of rows).
size_t addImageColumn(size_t width, size_t height, const QString &name=QString(""))
add a new columns with width * height rows to the datastore and return its column ID....
size_t addCopiedColumn(TIterator first, TIterator last, const QString &name=QString(""))
add one column to the datastore. It will be filled with the values from first ... last
Definition jkqtpdatastorage.h:871
ColumnIterator begin()
returns an iterator to the first column in the JKQTPDatastore
ColumnIterator end()
returns an iterator behind the last column in the JKQTPDatastore
size_t addColumn(JKQTPColumn col)
add a new column to the datastore and return its ID
void setParamsV(double p1)
set an internal parameter vector as function parameters, initialized with {p1}
This implements filled curve plots with y errors where the area is filled between the plot line and t...
Definition jkqtpfilledcurve.h:131
This implements filled curve plots with y errors where the area is filled between the plot line and t...
Definition jkqtpfilledcurve.h:244
virtual void setPlotFunctionFunctor(jkqtpPlotFunctionType &&__value)
sets a functor to be plotted
void setSpecialFunction(SpecialFunction function)
sets function to the given special function
@ Line
a polynomial The parameters params have to be point to a QVector<double> and contain the parameters
Definition jkqtpevaluatedfunction.h:172
void setDrawBox(bool __value)
enables/disables drawing of the actual box of the boxplot (false leads to Tufte Style boxplots )
QColor getLineColor() const
get the color of the graph line
double getSymbolSize() const
get the size (=diameter in pt) of the graph symbol (in pt)
void setSymbolSize(double __value)
set the size (=diameter in pt) of the graph symbol (in pt)
void setSymbolType(JKQTPGraphSymbols __value)
set the type of the graph symbol
@ StepViolin
connect violin points by a steped line, but fully filled
Definition jkqtpviolinplotstylingmixins.h:305
void setViolinStyle(ViolinStyle style)
set the style of the violin plot
void setHeight(double __value)
height of image
void setX(double __value)
x coordinate of lower left corner
void setWidth(double __value)
width of image
void setY(double __value)
y coordinate of lower left corner
This implements an impulse plot with horizontal impulses in direction of the X axis (i....
Definition jkqtpimpulses.h:152
This implements an impulse plot with impulses in direction of the X axis (i.e. from x=0 to x=f(y) )
Definition jkqtpimpulses.h:232
virtual void setTitle(const QString &title) override
sets the title of the plot (for display in key!).
virtual void setTitle(const QString &__value)
sets the title of the plot (for display in key!).
const JKQTBasePlotter * getParent() const
returns the parent painter class
Definition jkqtpgraphsbase.h:112
void setDataColumn(int __value)
the column that contains the datapoints
@ X
the data for a JKQTPSingleColumnGraph is data belonging to the x-axis of the plot
@ Y
the data for a JKQTPSingleColumnGraph is data belonging to the y-axis of the plot
void setDataDirection(DataDirection __value)
interpret the data from dataColumn either as X- or Y-data
plots a 1-column set of data-values with symbols onto a JKQtPlotter/JKQtBasePlotter....
Definition jkqtpsinglecolumnsymbols.h:53
@ NoScatter
missing coordinate is exactly position for every datapoint in dataColumn
Definition jkqtpsinglecolumnsymbols.h:58
void setColor(QColor col)
set symbol color and fill color at the same time
void setPosition(double __value)
missing coordinate, i.e. if the data from dataColumn is interpreted as x-values, this is the y-positi...
void setPositionScatterStyle(ScatterStyle __value)
how to distribute the datapoints from dataColumn at the location position
void setDrawMedian(bool __value)
indicates whether to draw the median
void setDrawMinMax(bool __value)
indicates whether to draw the percentiles
virtual QColor getKeyLabelColor() const override
returns the color to be used for the key label
void setMax(double __value)
the maximum value to be used for the boxplot
void setPos(double __value)
the position of the boxplot on the "other" axis
void setViolinPositionColumn(int __value)
column with data for the violin outline: category values (along min-max-axis)
void setMin(double __value)
the minimum value to be used for the boxplot
void setDrawMean(bool __value)
indicates whether to draw the mean
void setMedian(double __value)
the median value to be used for the boxplot
void setMean(double __value)
the mean value to be used for the boxplot
void setViolinFrequencyColumn(int __value)
column with data for the violin outline: frequency values (perpendicular to min-max-axis)
This implements a single horizontal Violin Plot as a "geometric element".
Definition jkqtpviolinplot.h:216
This implements a single vertical Violin Plot as a "geometric element".
Definition jkqtpviolinplot.h:166
This implements line plots where the data is taken from a user supplied function .
Definition jkqtpevaluatedfunction.h:289
This virtual JKQTPGraph descendent may be used as base for all graphs that use at least two columns t...
Definition jkqtpgraphsbase.h:586
void setYColumn(int __value)
the column that contains the y-component of the datapoints
void setXColumn(int __value)
the column that contains the x-component of the datapoints
int getXColumn() const
the column that contains the x-component of the datapoints
int getYColumn() const
the column that contains the y-component of the datapoints
This implements xy line plots with x and y error indicators.
Definition jkqtplines.h:112
This implements xy line plots. This also alows to draw symbols at the data points.
Definition jkqtplines.h:61
void setDrawLine(bool __value)
indicates whether to draw a line or not
void setColor(QColor c)
set color of line and symbol
This implements xy scatter plots (like JKQTPXYScatterGraph), but the color and size of the symbols ma...
Definition jkqtpscatter.h:431
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
represents the Five-Number Statistical Summary (minimum, median, maximum and two user-defined quantil...
Definition jkqtpstatbasics.h:1091
double quantile1
first quantile value (specified by quantile1Spec)
Definition jkqtpstatbasics.h:1099
double quantile2
second quantile value (specified by quantile1Spec)
Definition jkqtpstatbasics.h:1105
std::vector< double > outliers
list with the outlier values < minimum and > maximum
Definition jkqtpstatbasics.h:1119
double minimum
minimum value
Definition jkqtpstatbasics.h:1095
double IQRSignificanceEstimate() const
interquartile range, calculated as
double median
median value
Definition jkqtpstatbasics.h:1103
double maximum
maximum value
Definition jkqtpstatbasics.h:1109