cMHN 1.2
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_RANDOM_H
4#define pRC_TENSOR_TRAIN_TENSOR_RANDOM_H
5
8
9namespace pRC
10{
11 template<class T, class N, class Ranks, class URNG,
12 template<class...> class D>
13 requires IsRandomEngine<URNG> && IsRandomDistribution<D<Value<T>>>
14 struct Random<TensorTrain::Tensor<T, N, Ranks>, URNG, D<Value<T>>>
15 {
16 public:
17 Random(URNG &rng, D<Value<T>> &distribution)
18 : mRNG(rng)
19 , mDistribution(distribution)
20 {
21 }
22
23 constexpr auto operator()()
24 {
26 mDistribution);
27 }
28
29 private:
30 URNG &mRNG;
31 D<Value<T>> &mDistribution;
32 };
33}
34#endif // pRC_TENSOR_TRAIN_TENSOR_RANDOM_H
pRC::Size const D
Definition CalculatePThetaTests.cpp:9
Definition tensor.hpp:25
pRC::Float<> T
Definition externs_nonTT.hpp:1
Definition cholesky.hpp:10
typename ValueType< T >::Type Value
Definition value.hpp:72
Random(URNG &rng, D< Value< T > > &distribution)
Definition random.hpp:17
Definition random.hpp:12