T cast() const { bool isCorrectType(type() == T::type()); if (!isCorrectType && (T::type() != UncertaintyDescriptionType(UncertaintyDescriptionType::Generic))) { throw(std::bad_cast()); } return T(impl()); }
boost::optional<T> optionalCast() const { boost::optional<T> result; bool isCorrectType(type() == T::type()); if (!isCorrectType && (T::type() != UncertaintyDescriptionType(UncertaintyDescriptionType::Generic))) { return result; } return T(impl()); }
UncertaintyDescriptionType ExponentialDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::exponential_uncertain); }
UncertaintyDescriptionType LognormalDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::lognormal_uncertain); }
UncertaintyDescriptionType GeometricDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::geometric_uncertain); }
UncertaintyDescriptionType NegativeBinomialDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::negative_binomial_uncertain); }
UncertaintyDescriptionType FrechetDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::frechet_uncertain); }
UncertaintyDescriptionType BinomialDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::binomial_uncertain); }
UncertaintyDescriptionType GumbelDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::gumbel_uncertain); }
UncertaintyDescriptionType GenericUncertaintyDescription::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::Generic); }
UncertaintyDescriptionType GammaDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::gamma_uncertain); }
UncertaintyDescriptionType HistogramPointDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::histogram_point_uncertain); }
UncertaintyDescriptionType WeibullDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::weibull_uncertain); }
UncertaintyDescriptionType PoissonDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::poisson_uncertain); }
UncertaintyDescriptionType TriangularDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::triangular_uncertain); }
UncertaintyDescriptionType HistogramBinDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::histogram_bin_uncertain); }
UncertaintyDescriptionType BetaDistribution::type() { return UncertaintyDescriptionType(UncertaintyDescriptionType::beta_uncertain); }