24 template <
typename scalar_t,
size_t kSize,
typename generator_t>
26 -> std::pair<Eigen::Matrix<scalar_t, kSize, 1>,
27 Eigen::Matrix<scalar_t, kSize, kSize>> {
29 using ParametersVector = Eigen::Matrix<scalar_t, kSize, 1>;
30 using CovarianceMatrix = Eigen::Matrix<scalar_t, kSize, kSize>;
32 std::normal_distribution<Scalar> distNormal(0, 1);
33 std::uniform_real_distribution<Scalar> distCorr(-1, 1);
36 ParametersVector stddev;
37 for (
auto i = 0
u;
i < kSize; ++
i) {
38 stddev[
i] = std::abs(distNormal(
rng));
41 CovarianceMatrix
corr;
42 for (
auto i = 0
u;
i < kSize; ++
i) {
45 for (
auto j = 0
u;
j <
i; ++
j) {
50 CovarianceMatrix
cov = stddev.asDiagonal() * corr * stddev.asDiagonal();
55 ParametersVector params;
56 for (
auto i = 0
u;
i < kSize; ++
i) {
57 params[
i] = stddev[
i] * distNormal(
rng);
60 return std::make_pair(params, cov);
64 template <
typename generator_t>
66 auto parCov = generateParametersCovariance<ActsScalar, eBoundSize>(
rng);
75 template <
typename generator_t>
77 return generateParametersCovariance<ActsScalar, eFreeSize>(
rng);