JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
Collaboration diagram for Grouped statistics:

Typedefs

typedef std::function< double(double)> JKQTPStatGroupDefinitionFunctor1D
 a functor $ f(x): \mathbb{R}\rightarrow\mathbb{R} $ which assignes a value $ x $ to a group center $ f(x) $
 

Functions

template<class InputCatIt , class InputValueIt , class OutputGroupIt >
void jkqtpstatGroupData (InputCatIt inFirstCat, InputCatIt inLastCat, InputValueIt inFirstValue, InputValueIt inLastValue, OutputGroupIt outFirstCategory, std::map< double, std::pair< std::vector< double >, std::vector< double > > > &groupeddata, JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&jkqtpstatGroupingIdentity1D)
 groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
 
template<class InputCatIt , class InputValueIt , class OutputGroupIt >
void jkqtpstatGroupData (InputCatIt inFirstCat, InputCatIt inLastCat, InputValueIt inFirstValue, InputValueIt inLastValue, OutputGroupIt outFirstCategory, std::map< double, std::vector< double > > &groupeddata, JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&jkqtpstatGroupingIdentity1D)
 groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
 
template<class InputCatIt , class InputValueIt >
void jkqtpstatGroupData (InputCatIt inFirstCat, InputCatIt inLastCat, InputValueIt inFirstValue, InputValueIt inLastValue, std::map< double, std::pair< std::vector< double >, std::vector< double > > > &groupeddata, JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&jkqtpstatGroupingIdentity1D)
 groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
 
template<class InputCatIt , class InputValueIt >
void jkqtpstatGroupData (InputCatIt inFirstCat, InputCatIt inLastCat, InputValueIt inFirstValue, InputValueIt inLastValue, std::map< double, std::vector< double > > &groupeddata, JKQTPStatGroupDefinitionFunctor1D groupDefFunc=&jkqtpstatGroupingIdentity1D)
 groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
 
jkqtmath_LIB_EXPORT double jkqtpstatGroupingCustomRound1D (double v, double firstGroupCenter, double groupWidth)
 assign each value to groups $ \mbox{firstGroupCenter} $ , $ \mbox{firstGroupCenter}\pm\mbox{groupWidth}/2$ , $ \mbox{firstGroupCenter}\pm2\cdot\mbox{groupWidth}/2 $ , $ \mbox{firstGroupCenter}\pm3\cdot\mbox{groupWidth}/2 $ , ...
 
jkqtmath_LIB_EXPORT double jkqtpstatGroupingIdentity1D (double v)
 use a column value as group ID directly
 
jkqtmath_LIB_EXPORT double jkqtpstatGroupingRound1D (double v)
 use a rounded column value as group ID directly $ f(x)=\mbox{round}(x) $
 
jkqtmath_LIB_EXPORT JKQTPStatGroupDefinitionFunctor1D jkqtpstatMakeGroupingCustomRound1D (double firstGroupCenter, double groupWidth)
 generates a functor of jkqtpstatGroupingCustomRound1D() with the two paramaters firstGroupCenter and groupWidth fixed to the given values
 

Detailed Description

Typedef Documentation

◆ JKQTPStatGroupDefinitionFunctor1D

typedef std::function<double(double)> JKQTPStatGroupDefinitionFunctor1D

a functor $ f(x): \mathbb{R}\rightarrow\mathbb{R} $ which assignes a value $ x $ to a group center $ f(x) $

The simplest version are e.g.

See also
jkqtpstatGroupData

Function Documentation

◆ jkqtpstatGroupData() [1/4]

template<class InputCatIt , class InputValueIt , class OutputGroupIt >
void jkqtpstatGroupData ( InputCatIt  inFirstCat,
InputCatIt  inLastCat,
InputValueIt  inFirstValue,
InputValueIt  inLastValue,
OutputGroupIt  outFirstCategory,
std::map< double, std::pair< std::vector< double >, std::vector< double > > > &  groupeddata,
JKQTPStatGroupDefinitionFunctor1D  groupDefFunc = &jkqtpstatGroupingIdentity1D 
)
inline

groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .

Template Parameters
InputCatItstandard iterator type of inFirstCat and inLastCat
InputValueItstandard iterator type of inFirstValue and inLastValue
OutputGroupItstandard output iterator type of outFirstCategory
Parameters
inFirstCatiterator pointing to the first item in the category dataset to use $ c_1 $
inLastCatiterator pointing behind the last item in the category dataset to use $ c_N $
inFirstValueiterator pointing to the first item in the category dataset to use $ v_1 $
inLastValueiterator pointing behind the last item in the category dataset to use $ v_N $
[out]outFirstCategoryfor each element in the range inFirstCat / inFirstValue ... inLastCat / outFirstCat this receives the calculated category
[out]groupeddatareceives the grouped data, each key in the map represents one group, each map-value contains two vecors with the category and value data respectively
groupDefFuncassigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
Note
the contents of groupeddata is not cleared before usage, so you can also use this fucntion to append to a group!
See also
JKQTPStatGroupDefinitionFunctor1D, Tutorial (JKQTPDatastore): 1-Dimensional Group Statistics with JKQTPDatastore

◆ jkqtpstatGroupData() [2/4]

template<class InputCatIt , class InputValueIt , class OutputGroupIt >
void jkqtpstatGroupData ( InputCatIt  inFirstCat,
InputCatIt  inLastCat,
InputValueIt  inFirstValue,
InputValueIt  inLastValue,
OutputGroupIt  outFirstCategory,
std::map< double, std::vector< double > > &  groupeddata,
JKQTPStatGroupDefinitionFunctor1D  groupDefFunc = &jkqtpstatGroupingIdentity1D 
)
inline

groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .

Template Parameters
InputCatItstandard iterator type of inFirstCat and inLastCat
InputValueItstandard iterator type of inFirstValue and inLastValue
OutputGroupItstandard output iterator type of outFirstCategory
Parameters
inFirstCatiterator pointing to the first item in the category dataset to use $ c_1 $
inLastCatiterator pointing behind the last item in the category dataset to use $ c_N $
inFirstValueiterator pointing to the first item in the category dataset to use $ v_1 $
inLastValueiterator pointing behind the last item in the category dataset to use $ v_N $
[out]outFirstCategoryfor each element in the range inFirstCat / inFirstValue ... inLastCat / outFirstCat this receives the calculated category
[out]groupeddatareceives the grouped data, each key in the map represents one group, each map-value contains a vector with the value data
groupDefFuncassigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
Note
the contents of groupeddata is not cleared before usage, so you can also use this fucntion to append to a group!
See also
JKQTPStatGroupDefinitionFunctor1D, Tutorial (JKQTPDatastore): 1-Dimensional Group Statistics with JKQTPDatastore

◆ jkqtpstatGroupData() [3/4]

template<class InputCatIt , class InputValueIt >
void jkqtpstatGroupData ( InputCatIt  inFirstCat,
InputCatIt  inLastCat,
InputValueIt  inFirstValue,
InputValueIt  inLastValue,
std::map< double, std::pair< std::vector< double >, std::vector< double > > > &  groupeddata,
JKQTPStatGroupDefinitionFunctor1D  groupDefFunc = &jkqtpstatGroupingIdentity1D 
)
inline

groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .

Template Parameters
InputCatItstandard iterator type of inFirstCat and inLastCat
InputValueItstandard iterator type of inFirstValue and inLastValue
Parameters
inFirstCatiterator pointing to the first item in the category dataset to use $ c_1 $
inLastCatiterator pointing behind the last item in the category dataset to use $ c_N $
inFirstValueiterator pointing to the first item in the category dataset to use $ v_1 $
inLastValueiterator pointing behind the last item in the category dataset to use $ v_N $
[out]groupeddatareceives the grouped data, each key in the map represents one group, each map-value contains two vecors with the category and value data respectively
groupDefFuncassigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
Note
the contents of groupeddata is not cleared before usage, so you can also use this fucntion to append to a group!
See also
JKQTPStatGroupDefinitionFunctor1D, Tutorial (JKQTPDatastore): 1-Dimensional Group Statistics with JKQTPDatastore

◆ jkqtpstatGroupData() [4/4]

template<class InputCatIt , class InputValueIt >
void jkqtpstatGroupData ( InputCatIt  inFirstCat,
InputCatIt  inLastCat,
InputValueIt  inFirstValue,
InputValueIt  inLastValue,
std::map< double, std::vector< double > > &  groupeddata,
JKQTPStatGroupDefinitionFunctor1D  groupDefFunc = &jkqtpstatGroupingIdentity1D 
)
inline

groups data from an input range inFirstCat / inFirstValue ... inLastCat / outFirstCat representing pairs $ (c_i,v_i) $ of a category value $ c_i $ and a group value $ v_i $ into groups $ V_j=\{v_{i}|c_i\equiv c_{\text{out},j}\} $ of data that were assigned to the same group, i.e. $ c_i\equiv c_{\text{out},j} $ . A functor groupDefFunc assigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .

Template Parameters
InputCatItstandard iterator type of inFirstCat and inLastCat
InputValueItstandard iterator type of inFirstValue and inLastValue
Parameters
inFirstCatiterator pointing to the first item in the category dataset to use $ c_1 $
inLastCatiterator pointing behind the last item in the category dataset to use $ c_N $
inFirstValueiterator pointing to the first item in the category dataset to use $ v_1 $
inLastValueiterator pointing behind the last item in the category dataset to use $ v_N $
[out]groupeddatareceives the grouped data, each key in the map represents one group, each map-value contains a vector with the value data
groupDefFuncassigns a group $ c_{\text{out},j} $ to each category value $ c_i $ .
Note
the contents of groupeddata is not cleared before usage, so you can also use this fucntion to append to a group!
See also
JKQTPStatGroupDefinitionFunctor1D, Tutorial (JKQTPDatastore): 1-Dimensional Group Statistics with JKQTPDatastore

◆ jkqtpstatGroupingCustomRound1D()

jkqtmath_LIB_EXPORT double jkqtpstatGroupingCustomRound1D ( double  v,
double  firstGroupCenter,
double  groupWidth 
)

assign each value to groups $ \mbox{firstGroupCenter} $ , $ \mbox{firstGroupCenter}\pm\mbox{groupWidth}/2$ , $ \mbox{firstGroupCenter}\pm2\cdot\mbox{groupWidth}/2 $ , $ \mbox{firstGroupCenter}\pm3\cdot\mbox{groupWidth}/2 $ , ...

This is equivalent to $ \mbox{round}\left(\frac{x-\mbox{firstGroupCenter}}{\mbox{groupWidth}/2}\right) $

See also
JKQTPStatGroupDefinitionFunctor1D, jkqtpstatMakeGroupingCustomRound1D() for a factory-function that returns a functor of this function bound to specific arguments.

◆ jkqtpstatGroupingIdentity1D()

jkqtmath_LIB_EXPORT double jkqtpstatGroupingIdentity1D ( double  v)

use a column value as group ID directly

See also
JKQTPStatGroupDefinitionFunctor1D

◆ jkqtpstatGroupingRound1D()

jkqtmath_LIB_EXPORT double jkqtpstatGroupingRound1D ( double  v)

use a rounded column value as group ID directly $ f(x)=\mbox{round}(x) $

See also
JKQTPStatGroupDefinitionFunctor1D

◆ jkqtpstatMakeGroupingCustomRound1D()

jkqtmath_LIB_EXPORT JKQTPStatGroupDefinitionFunctor1D jkqtpstatMakeGroupingCustomRound1D ( double  firstGroupCenter,
double  groupWidth 
)

generates a functor of jkqtpstatGroupingCustomRound1D() with the two paramaters firstGroupCenter and groupWidth fixed to the given values

This is equivalent to std::bind(&jkqtpstatGroupingCustomRound1D,std::placeholders::_1,firstGroupCenter,groupWidth);

See also
JKQTPStatGroupDefinitionFunctor1D, jkqtpstatGroupingCustomRound1D()