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
template<class InputItX , class InputItY , class FF >
int jkqtpstatStoreKernelSum2D
(
FF &&
fStore,
InputItX
firstX,
InputItX
lastX,
InputItY
firstY,
InputItY
lastY,
const std::function< double(double, double)> &
kernel,
double
bandwidthX,
double
bandwidthY
)
inline
stores a part-result of the Kernel Density Estimator (KDE) at a given position
Iterates over all datapoints in firstX..lastX and firstY..lastY, for each one determines whether the floating-point values are valid and the calls fStore, which is a functor that is supposed to iterate over the KDE 2D array and over calls sum up the KDE.
This is internally used by jkqtpstatKDE2D(). The construction is not as straight-forward, as iterating over all positions in the 2D-KJDE and the calling jkqtpstatEvaluateKernelSum2D(), bt by reordering the loops it is significatyl faster (~20%)
Template Parameters
InputItX
standard iterator type of firstX and lastX.
InputItY
standard iterator type of firstY and lastY.
FF
functor
Parameters
x
where to evaluate the kernel sum, x-coordinate
y
where to evaluate the kernel sum, y-coordinate
firstX
iterator pointing to the first x-position item in the dataset to use
lastX
iterator pointing behind the last x-position item in the dataset to use
firstY
iterator pointing to the first y-position item in the dataset to use
lastY
iterator pointing behind the last y-position item in the dataset to use