25 double const precision) {
26 constexpr size_t chunksize{1001};
29 std::vector<double> timepoints{};
30 timepoints.resize(chunksize);
31 linspace(timepoints, 0.0, stepsize);
37 double y1{0.0}, y2{0.0}, y3{1.0 - probabilities[0]};
39 auto currentStepsize{stepsize};
40 while (std::abs(delta) > precision) {
41 if (i + 1 >= probabilities.size()) {
42 double const start{timepoints.back()};
44 if (currentStepsize < 1e-3) {
47 linspace(timepoints, start, currentStepsize);
53 y2 = 1.0 - probabilities[i];
54 y3 = 1.0 - probabilities[i + 1];
57 delta = y1 + 4.0 * y2 + y3;
59 delta *= currentStepsize;
67 constexpr size_t chunksize{1001};
70 std::vector<double> timepoints{};
71 timepoints.resize(
static_cast<size_t>(1 / stepsize) - 1);
72 for (
size_t i{0}; i < timepoints.size(); ++i) {
73 double x = (i + 1) * stepsize;
81 for (
size_t i{0}; i < probabilities.size(); ++i) {
82 double x{(i + 1) * stepsize};
85 auto& p{probabilities[i]};
91 rval -= (probabilities.front() + probabilities.back()) / 2;
double MTTFHelperProceeding(storm::dft::DftEnvironment const &env, std::shared_ptr< storm::dft::storage::DFT< double > > const dft, double const stepsize, double const precision)
Tries to numerically approximate the mttf of the given dft by integrating 1 - cdf(dft) with Simpson's...
double MTTFHelperVariableChange(storm::dft::DftEnvironment const &env, std::shared_ptr< storm::dft::storage::DFT< double > > const dft, double const stepsize)
Tries to numerically approximate the mttf of the given dft by integrating 1 - cdf(dft) by changing th...