aboutsummaryrefslogblamecommitdiffstats
path: root/util/random/normal.cpp
blob: 478b38fd2509d919861aac4ac136ea35c7468075 (plain) (tree)

























                                                               
#include "normal.h"
#include "common_ops.h"
#include "random.h"

namespace {
    template <class T>
    struct TSysRNG: public TCommonRNG<T, TSysRNG<T>> {
        inline T GenRand() noexcept {
            return RandomNumber<T>();
        }
    };
}

template <>
float StdNormalRandom<float>() noexcept {
    return StdNormalDistribution<float>(TSysRNG<ui64>());
}

template <>
double StdNormalRandom<double>() noexcept {
    return StdNormalDistribution<double>(TSysRNG<ui64>());
}

template <>
long double StdNormalRandom<long double>() noexcept {
    return StdNormalDistribution<long double>(TSysRNG<ui64>());
}