예제 #1
0
 T cast() const {
   bool isCorrectType(type() == T::type());
   if (!isCorrectType && (T::type() != UncertaintyDescriptionType(UncertaintyDescriptionType::Generic))) {
     throw(std::bad_cast());
   }
   return T(impl());
 }
예제 #2
0
 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());
 }
예제 #3
0
UncertaintyDescriptionType ExponentialDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::exponential_uncertain);
}
예제 #4
0
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);
}
예제 #7
0
UncertaintyDescriptionType FrechetDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::frechet_uncertain);
}
예제 #8
0
UncertaintyDescriptionType BinomialDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::binomial_uncertain);
}
예제 #9
0
UncertaintyDescriptionType GumbelDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::gumbel_uncertain);
}
UncertaintyDescriptionType GenericUncertaintyDescription::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::Generic);
}
예제 #11
0
UncertaintyDescriptionType GammaDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::gamma_uncertain);
}
UncertaintyDescriptionType HistogramPointDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::histogram_point_uncertain);
}
예제 #13
0
UncertaintyDescriptionType WeibullDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::weibull_uncertain);
}
예제 #14
0
UncertaintyDescriptionType PoissonDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::poisson_uncertain);
}
예제 #15
0
UncertaintyDescriptionType TriangularDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::triangular_uncertain);
}
UncertaintyDescriptionType HistogramBinDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::histogram_bin_uncertain);
}
예제 #17
0
UncertaintyDescriptionType BetaDistribution::type() {
  return UncertaintyDescriptionType(UncertaintyDescriptionType::beta_uncertain);
}