cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
random.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_TENSOR_VIEWS_RANDOM_H
4#define pRC_TENSOR_TRAIN_TENSOR_VIEWS_RANDOM_H
5
8
10{
11 template<class T, class N, class Ranks, template<class...> class D>
12 class Random : public View<T, N, Ranks, Random<T, N, Ranks, D>>
13 {
14 private:
16
17 public:
19 : mRNG(rng)
20 , mDistribution(distribution)
21 {
22 }
23
24 template<Index C>
25 constexpr decltype(auto) core()
26 {
27 using Core = typename Base::template Cores<C>;
28 return random<Core>(mRNG, mDistribution);
29 }
30
31 private:
32 RandomEngine &mRNG;
33 D<typename T::Value> &mDistribution;
34 };
35}
36#endif // pRC_TENSOR_TRAIN_TENSOR_VIEWS_RANDOM_H
pRC::Size const D
Definition CalculatePThetaTests.cpp:9
Random(RandomEngine &rng, D< typename T::Value > &distribution)
Definition random.hpp:18
constexpr decltype(auto) core()
Definition random.hpp:25
Definition type_traits.hpp:37
Definition threefry.hpp:24
pRC::Float<> T
Definition externs_nonTT.hpp:1
Definition type_traits.hpp:35
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402