]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/test/compile_test/dist_find_location_incl_test.cpp
1 // Copyright John Maddock 2006.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 // Basic sanity check that header <boost/math/distributions/find_location.hpp>
7 // #includes all the files that it needs to.
9 #include <boost/math/distributions/find_location.hpp>
11 // Note this header includes no other headers, this is
12 // important if this test is to be meaningful:
14 #include "test_compile_result.hpp"
16 template <class T
, class Policy
= boost::math::policies::policy
<> >
17 class test_distribution
21 typedef Policy policy_type
;
25 template <class T
, class Policy
>
26 T
quantile(const test_distribution
<T
, Policy
>&, T
)
31 template <class T
, class Policy
>
32 T
quantile(const boost::math::complemented2_type
<test_distribution
<T
, Policy
>, T
>&)
37 namespace boost
{ namespace math
{ namespace tools
{
39 template <class T
, class Policy
> struct is_distribution
<test_distribution
<T
, Policy
> > : public mpl::true_
{};
40 template <class T
, class Policy
> struct is_scaled_distribution
<test_distribution
<T
, Policy
> > : public mpl::true_
{};
44 void compile_and_link_test()
46 check_result
<float>(boost::math::find_location
<test_distribution
<float> >(f
, f
, f
, boost::math::policies::policy
<>()));
47 check_result
<double>(boost::math::find_location
<test_distribution
<double> >(d
, d
, d
, boost::math::policies::policy
<>()));
48 check_result
<long double>(boost::math::find_location
<test_distribution
<long double> >(l
, l
, l
, boost::math::policies::policy
<>()));
50 check_result
<float>(boost::math::find_location
<test_distribution
<float> >(f
, f
, f
));
51 check_result
<double>(boost::math::find_location
<test_distribution
<double> >(d
, d
, d
));
52 check_result
<long double>(boost::math::find_location
<test_distribution
<long double> >(l
, l
, l
));
54 check_result
<float>(boost::math::find_location
<test_distribution
<float> >(boost::math::complement(f
, f
, f
, boost::math::policies::policy
<>())));
55 check_result
<double>(boost::math::find_location
<test_distribution
<double> >(boost::math::complement(d
, d
, d
, boost::math::policies::policy
<>())));
56 check_result
<long double>(boost::math::find_location
<test_distribution
<long double> >(boost::math::complement(l
, l
, l
, boost::math::policies::policy
<>())));
58 check_result
<float>(boost::math::find_location
<test_distribution
<float> >(boost::math::complement(f
, f
, f
)));
59 check_result
<double>(boost::math::find_location
<test_distribution
<double> >(boost::math::complement(d
, d
, d
)));
60 check_result
<long double>(boost::math::find_location
<test_distribution
<long double> >(boost::math::complement(l
, l
, l
)));