3#ifndef cMHN_UTILITY_GENERATE_DATA_H
4#define cMHN_UTILITY_GENERATE_DATA_H
33 template<
class T, pRC::Size D>
36 std::string
const &header, std::string
const &filename)
53 std::ofstream file(filename,
54 std::ofstream::out | std::ofstream::trunc);
62 file << header << std::endl;
71 exp(extractDiagonal(smallThetaGT));
82 while(sumRejected + transitionRates(newEvent) <
85 sumRejected += transitionRates(newEvent);
99 transitionRates[j] *= exp(smallThetaGT(j, newEvent));
120 "Zero column detected in generated dataset, "
127 while(!worked && at_try < 10);
145 template<
class T, pRC::Size D>
147 pRC::Size const &size, std::string
const &header,
148 std::string
const &filename)
154 return generateData(rng, smallThetaGT, size, header, filename);
pRC::Size const D
Definition CalculatePThetaTests.cpp:9
Definition subscripts.hpp:20
Definition threefry.hpp:24
Definition calculate_pTheta.hpp:16
static auto generateData(pRC::RandomEngine &rng, pRC::Tensor< T, D, D > const &smallThetaGT, pRC::Size const &size, std::string const &header, std::string const &filename)
Generates a data file from a given ground truth model.
Definition generate_data.hpp:34
static void warning(Xs &&...args)
Definition log.hpp:21
static void error(Xs &&...args)
Definition log.hpp:14
bool Bool
Definition type_traits.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
Size Index
Definition type_traits.hpp:21
std::size_t Size
Definition type_traits.hpp:20
static constexpr auto zero()
Definition zero.hpp:12