/usr/include/boost/math/tools
NameSizeModeActions
detail/-0755rm
atomic.hpp32550644editdlrm
big_constant.hpp34120644editdlrm
bivariate_statistics.hpp28580644editdlrm
complex.hpp17440644editdlrm
condition_numbers.hpp34980644editdlrm
config.hpp145790644editdlrm
convert_from_string.hpp16560644editdlrm
cxx03_warn.hpp51280644editdlrm
fraction.hpp87330644editdlrm
minima.hpp43190644editdlrm
norms.hpp164250644editdlrm
numerical_differentiation.hpp5330644editdlrm
polynomial.hpp219460644editdlrm
polynomial_gcd.hpp60440644editdlrm
precision.hpp141330644editdlrm
promotion.hpp84340644editdlrm
rational.hpp138090644editdlrm
real_cast.hpp7440644editdlrm
recurrence.hpp129010644editdlrm
roots.hpp343730644editdlrm
series.hpp64450644editdlrm
signal_statistics.hpp120610644editdlrm
stats.hpp20560644editdlrm
test_value.hpp55230644editdlrm
toms748_solve.hpp183290644editdlrm
traits.hpp30010644editdlrm
tuple.hpp20400644editdlrm
univariate_statistics.hpp124650644editdlrm
user.hpp26360644editdlrm
workaround.hpp10670644editdlrm
Edit: /usr/include/boost/math/tools/traits.hpp (3001B)
// Copyright John Maddock 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* This header defines two traits classes, both in namespace boost::math::tools. is_distribution::value is true iff D has overloaded "cdf" and "quantile" functions, plus member typedefs value_type and policy_type. It's not much of a definitive test frankly, but if it looks like a distribution and quacks like a distribution then it must be a distribution. is_scaled_distribution::value is true iff D is a distribution as defined above, and has member functions "scale" and "location". */ #ifndef BOOST_STATS_IS_DISTRIBUTION_HPP #define BOOST_STATS_IS_DISTRIBUTION_HPP #ifdef _MSC_VER #pragma once #endif #include #include namespace boost{ namespace math{ namespace tools{ namespace detail{ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_value_type, value_type, true) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_policy_type, policy_type, true) template char cdf(const D& ...); template char quantile(const D& ...); template struct has_cdf { static D d; BOOST_STATIC_CONSTANT(bool, value = sizeof(cdf(d, 0.0f)) != 1); }; template struct has_quantile { static D d; BOOST_STATIC_CONSTANT(bool, value = sizeof(quantile(d, 0.0f)) != 1); }; template struct is_distribution_imp { BOOST_STATIC_CONSTANT(bool, value = has_quantile::value && has_cdf::value && has_value_type::value && has_policy_type::value); }; template struct result_tag{}; template double test_has_location(const volatile result_tag*); template char test_has_location(...); template double test_has_scale(const volatile result_tag*); template char test_has_scale(...); template struct is_scaled_distribution_helper { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_scaled_distribution_helper { BOOST_STATIC_CONSTANT(bool, value = (sizeof(test_has_location(0)) != 1) && (sizeof(test_has_scale(0)) != 1)); }; template struct is_scaled_distribution_imp { BOOST_STATIC_CONSTANT(bool, value = (::boost::math::tools::detail::is_scaled_distribution_helper::value>::value)); }; } // namespace detail template struct is_distribution : public boost::integral_constant::value> {}; template struct is_scaled_distribution : public boost::integral_constant::value> {}; }}} #endif