Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BELogNormal.cpp
Go to the documentation of this file.
1
#include "
BELogNormal.h
"
2
3
#include <boost/math/distributions/lognormal.hpp>
4
5
#include "
storm/exceptions/NotSupportedException.h
"
6
7
namespace
storm::dft
{
8
namespace
storage {
9
namespace
elements {
10
11
template
<>
12
double
BELogNormal<double>::getUnreliability
(
double
time)
const
{
13
// Compute via boost as no closed form formula exists
14
// TODO: initialize once if performance is an issue
15
boost::math::lognormal_distribution<double> distribution(this->mean(), this->standardDeviation());
16
return
boost::math::cdf(distribution, time);
17
}
18
19
template
<
typename
ValueType>
20
ValueType
BELogNormal<ValueType>::getUnreliability
(ValueType time)
const
{
21
STORM_LOG_THROW
(
false
, storm::exceptions::NotSupportedException,
"Computing cumulative failure probability not supported for this data type."
);
22
}
23
24
// Explicitly instantiate the class.
25
template
class
BELogNormal<double>
;
26
template
class
BELogNormal<RationalFunction>
;
27
28
}
// namespace elements
29
}
// namespace storage
30
}
// namespace storm::dft
BELogNormal.h
NotSupportedException.h
storm::dft::storage::elements::BELogNormal
BE with log-normal failure distribution.
Definition
BELogNormal.h:13
storm::dft::storage::elements::BELogNormal::getUnreliability
ValueType getUnreliability(ValueType time) const override
Return the unreliability of the BE up to the given time point.
Definition
BELogNormal.cpp:20
STORM_LOG_THROW
#define STORM_LOG_THROW(cond, exception, message)
Definition
macros.h:30
storm::dft
Definition
SFTBDDPropertyFormulaAdapter.h:19
src
storm-dft
storage
elements
BELogNormal.cpp
Generated by
1.9.8