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
6
7namespace storm::dft {
8namespace storage {
9namespace elements {
10
11template<>
12double 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
19template<typename ValueType>
20ValueType 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.
25template class BELogNormal<double>;
27
28} // namespace elements
29} // namespace storage
30} // namespace storm::dft
BE with log-normal failure distribution.
Definition BELogNormal.h:13
ValueType getUnreliability(ValueType time) const override
Return the unreliability of the BE up to the given time point.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30