update boost
This commit is contained in:
@@ -184,6 +184,15 @@ namespace boost{ namespace math
|
||||
|
||||
typedef triangular_distribution<double> triangular;
|
||||
|
||||
#ifdef __cpp_deduction_guides
|
||||
template <class RealType>
|
||||
triangular_distribution(RealType)->triangular_distribution<typename boost::math::tools::promote_args<RealType>::type>;
|
||||
template <class RealType>
|
||||
triangular_distribution(RealType,RealType)->triangular_distribution<typename boost::math::tools::promote_args<RealType>::type>;
|
||||
template <class RealType>
|
||||
triangular_distribution(RealType,RealType,RealType)->triangular_distribution<typename boost::math::tools::promote_args<RealType>::type>;
|
||||
#endif
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> range(const triangular_distribution<RealType, Policy>& /* dist */)
|
||||
{ // Range of permissible values for random variable x.
|
||||
@@ -517,6 +526,13 @@ namespace boost{ namespace math
|
||||
// Assuming mathworld really means kurtosis excess? Wikipedia now corrected to match this.
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType entropy(const triangular_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
using std::log;
|
||||
return constants::half<RealType>() + log((dist.upper() - dist.lower())/2);
|
||||
}
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user