// KernelDensity.h #pragma once #include "AbstractRandom.h" #include <vector> #include <map> namespace math1d_cl { class KernelDensity : public AbstractRandom { public: KernelDensity(UncertainityOptions options); virtual void fillRandom(math1d_cl::precipitationsVector &prec, double deviation); std::vector<double> test(int num, int limitIdx); // For testing purposes, generate [num] random samples private: double getRandom(int limitIdx); int getLimitIdx(double precipValue); // Members //std::vector<std::vector<std::map<double,double>>> m_kernelEst; // Hold kernel estimate curves for each offset and each limit std::vector<std::map<double,double>> m_kernelEst; // Hold kernel estimate curves for each limit std::mt19937_64 m_uRand; std::uniform_real_distribution<double> m_randProb; }; }