cMHN
1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
pRC
prc
tensor_train
operator
random.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-2-Clause
2
3
#ifndef pRC_TENSOR_TRAIN_OPERATOR_RANDOM_H
4
#define pRC_TENSOR_TRAIN_OPERATOR_RANDOM_H
5
6
#include <
prc/core/basic/random.hpp
>
7
#include <
prc/tensor_train/operator/views/random.hpp
>
8
9
namespace
pRC
10
{
11
template
<
class
T
,
class
M,
class
N,
class
Ranks,
class
URNG,
12
template
<
class
...>
class
D
>
13
requires
IsRandomEngine<URNG> && IsRandomDistribution<D<Value<T>>>
14
struct
Random
<TensorTrain::Operator<T, M, 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
{
25
return
TensorTrain::OperatorViews::Random<T, M, N, Ranks, URNG, D>
(
26
mRNG, mDistribution);
27
}
28
29
private
:
30
URNG &mRNG;
31
D<Value<T>
> &mDistribution;
32
};
33
}
34
#endif
// pRC_TENSOR_TRAIN_OPERATOR_RANDOM_H
D
pRC::Size const D
Definition
CalculatePThetaTests.cpp:9
pRC::TensorTrain::OperatorViews::Random
Definition
random.hpp:15
random.hpp
T
pRC::Float<> T
Definition
externs_nonTT.hpp:1
pRC
Definition
cholesky.hpp:10
pRC::Value
typename ValueType< T >::Type Value
Definition
value.hpp:72
pRC::Random< TensorTrain::Operator< T, M, N, Ranks >, URNG, D< Value< T > > >::Random
Random(URNG &rng, D< Value< T > > &distribution)
Definition
random.hpp:17
pRC::Random< TensorTrain::Operator< T, M, N, Ranks >, URNG, D< Value< T > > >::operator()
constexpr auto operator()()
Definition
random.hpp:23
pRC::Random
Definition
random.hpp:12
random.hpp
Generated by
1.11.0