Boost logo

Boost-Commit :

From: gautamcool88_at_[hidden]
Date: 2008-08-29 15:50:59


Author: s.gautam
Date: 2008-08-29 15:50:58 EDT (Fri, 29 Aug 2008)
New Revision: 48459
URL: http://svn.boost.org/trac/boost/changeset/48459

Log:
added logistic distribution to enable concept checking
Text files modified:
   sandbox/SOC/2008/parrallel_math/libs/math/test/compile_test/instantiate.hpp | 118 ++-------------------------------------
   1 files changed, 6 insertions(+), 112 deletions(-)

Modified: sandbox/SOC/2008/parrallel_math/libs/math/test/compile_test/instantiate.hpp
==============================================================================
--- sandbox/SOC/2008/parrallel_math/libs/math/test/compile_test/instantiate.hpp (original)
+++ sandbox/SOC/2008/parrallel_math/libs/math/test/compile_test/instantiate.hpp 2008-08-29 15:50:58 EDT (Fri, 29 Aug 2008)
@@ -16,8 +16,6 @@
 #include <boost/math/special_functions.hpp>
 #include <boost/math/concepts/distributions.hpp>
 
-#ifndef BOOST_MATH_INSTANTIATE_MINIMUM
-
 typedef boost::math::policies::policy<> test_policy;
 
 namespace test{
@@ -31,26 +29,6 @@
 BOOST_MATH_DECLARE_DISTRIBUTIONS(double, test_policy)
 
 }
-#endif
-
-namespace boost{ namespace math{
-//
-// The non central beta doesn't define some properties,
-// define some stub methods here so that we can concept
-// check everything else:
-//
-template <class T, class Policy>
-inline T mean(const non_central_beta_distribution<T, Policy>&){ return 0; }
-template <class T, class Policy>
-inline T variance(const non_central_beta_distribution<T, Policy>&){ return 0; }
-template <class T, class Policy>
-inline T skewness(const non_central_beta_distribution<T, Policy>&){ return 0; }
-template <class T, class Policy>
-inline T kurtosis_excess(const non_central_beta_distribution<T, Policy>&){ return 0; }
-template <class T, class Policy>
-inline T kurtosis(const non_central_beta_distribution<T, Policy>&){ return 0; }
-
-}} // namespaces
 
 template <class RealType>
 void instantiate(RealType)
@@ -78,11 +56,8 @@
    function_requires<DistributionConcept<triangular_distribution<RealType> > >();
    function_requires<DistributionConcept<uniform_distribution<RealType> > >();
    function_requires<DistributionConcept<weibull_distribution<RealType> > >();
- function_requires<DistributionConcept<non_central_chi_squared_distribution<RealType> > >();
- function_requires<DistributionConcept<non_central_beta_distribution<RealType> > >();
- function_requires<DistributionConcept<non_central_f_distribution<RealType> > >();
- function_requires<DistributionConcept<non_central_t_distribution<RealType> > >();
-#ifndef BOOST_MATH_INSTANTIATE_MINIMUM
+ function_requires<DistributionConcept<logistic_distribution<RealType> > >();
+
    function_requires<DistributionConcept<bernoulli_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<beta_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<binomial_distribution<RealType, test_policy> > >();
@@ -93,7 +68,6 @@
    function_requires<DistributionConcept<fisher_f_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<gamma_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<lognormal_distribution<RealType, test_policy> > >();
- function_requires<DistributionConcept<non_central_chi_squared_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<negative_binomial_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<normal_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<rayleigh_distribution<RealType, test_policy> > >();
@@ -103,10 +77,7 @@
    function_requires<DistributionConcept<triangular_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<uniform_distribution<RealType, test_policy> > >();
    function_requires<DistributionConcept<weibull_distribution<RealType, test_policy> > >();
- function_requires<DistributionConcept<non_central_chi_squared_distribution<RealType, test_policy> > >();
- function_requires<DistributionConcept<non_central_beta_distribution<RealType, test_policy> > >();
- function_requires<DistributionConcept<non_central_f_distribution<RealType, test_policy> > >();
- function_requires<DistributionConcept<non_central_t_distribution<RealType, test_policy> > >();
+ function_requires<DistributionConcept<logistic_distribution<RealType,test_policy> > >();
 
    function_requires<DistributionConcept<dist_test::bernoulli > >();
    function_requires<DistributionConcept<dist_test::beta > >();
@@ -127,11 +98,8 @@
    function_requires<DistributionConcept<dist_test::triangular > >();
    function_requires<DistributionConcept<dist_test::uniform > >();
    function_requires<DistributionConcept<dist_test::weibull > >();
- function_requires<DistributionConcept<dist_test::non_central_chi_squared > >();
- function_requires<DistributionConcept<dist_test::non_central_beta > >();
- function_requires<DistributionConcept<dist_test::non_central_f > >();
- function_requires<DistributionConcept<dist_test::non_central_t > >();
-#endif
+ function_requires<DistributionConcept<dist_test::logistic> >();
+
    int i;
    RealType v1(0.5), v2(0.5), v3(0.5);
    boost::math::tgamma(v1);
@@ -226,30 +194,6 @@
    boost::math::sph_bessel(i, 1);
    boost::math::sph_neumann(i, v2);
    boost::math::sph_neumann(i, i);
- boost::math::expint(v1);
- boost::math::expint(i);
- boost::math::expint(i, v2);
- boost::math::expint(i, i);
- boost::math::zeta(v1);
- boost::math::zeta(i);
- boost::math::trunc(v1);
- boost::math::itrunc(v1);
- boost::math::ltrunc(v1);
- boost::math::round(v1);
- boost::math::iround(v1);
- boost::math::lround(v1);
- boost::math::modf(v1, &v1);
- boost::math::modf(v1, &i);
- long l;
- boost::math::modf(v1, &l);
-#ifdef BOOST_HAS_LONG_LONG
- boost::math::lltrunc(v1);
- boost::math::llround(v1);
- boost::long_long_type ll;
- boost::math::modf(v1, &ll);
-#endif
- boost::math::pow<2>(v1);
-#ifndef BOOST_MATH_INSTANTIATE_MINIMUM
    //
    // All over again, with a policy this time:
    //
@@ -345,33 +289,6 @@
    boost::math::sph_bessel(i, 1, pol);
    boost::math::sph_neumann(i, v2, pol);
    boost::math::sph_neumann(i, i, pol);
- boost::math::expint(v1, pol);
- boost::math::expint(i, pol);
- boost::math::expint(i, v2, pol);
- boost::math::expint(i, i, pol);
- boost::math::zeta(v1, pol);
- boost::math::zeta(i, pol);
- //
- // These next functions are intended to be found via ADL:
- //
- BOOST_MATH_STD_USING
- trunc(v1, pol);
- itrunc(v1, pol);
- ltrunc(v1, pol);
- round(v1, pol);
- iround(v1, pol);
- lround(v1, pol);
- modf(v1, &v1, pol);
- modf(v1, &i, pol);
- modf(v1, &l, pol);
-#ifdef BOOST_HAS_LONG_LONG
- using boost::math::lltrunc;
- using boost::math::llround;
- lltrunc(v1, pol);
- llround(v1, pol);
- modf(v1, &ll, pol);
-#endif
- boost::math::pow<2>(v1, pol);
    //
    // All over again with the versions in test::
    //
@@ -466,28 +383,6 @@
    test::sph_bessel(i, 1);
    test::sph_neumann(i, v2);
    test::sph_neumann(i, i);
- test::expint(v1);
- test::expint(i);
- test::expint(i, v2);
- test::expint(i, i);
- test::zeta(v1);
- test::zeta(i);
- test::trunc(v1);
- test::itrunc(v1);
- test::ltrunc(v1);
- test::round(v1);
- test::iround(v1);
- test::lround(v1);
- test::modf(v1, &v1);
- test::modf(v1, &i);
- test::modf(v1, &l);
-#ifdef BOOST_HAS_LONG_LONG
- test::lltrunc(v1);
- test::llround(v1);
- test::modf(v1, &ll);
-#endif
- test::pow<2>(v1);
-#endif
 }
 
 template <class RealType>
@@ -495,7 +390,7 @@
 {
    using namespace boost;
    using namespace boost::math;
-#ifndef BOOST_MATH_INSTANTIATE_MINIMUM
+
    int i = 1;
    long l = 1;
    short s = 1;
@@ -844,7 +739,6 @@
    test::sph_bessel(i, 1);
    test::sph_neumann(i, lr);
    test::sph_neumann(i, i);
-#endif
 }
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk