mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Add SYCL testing for cauchy dist
This commit is contained in:
@@ -11,6 +11,7 @@ project : requirements
|
||||
|
||||
# Distributions
|
||||
run test_arcsine.cpp ;
|
||||
run test_cauchy.cpp ;
|
||||
|
||||
# Special Functions
|
||||
run test_beta_simple.cpp ;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
|
||||
// To compile even if Cauchy mean is used.
|
||||
#include <boost/math/tools/test.hpp>
|
||||
#include <boost/math/concepts/real_concept.hpp> // for real_concept
|
||||
#include <boost/math/distributions/cauchy.hpp>
|
||||
using boost::math::cauchy_distribution;
|
||||
@@ -38,11 +37,11 @@ void test_spots(RealType T)
|
||||
{
|
||||
// Check some bad parameters to construct the distribution,
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
BOOST_MATH_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, 0), std::domain_error); // zero scale.
|
||||
BOOST_MATH_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, -1), std::domain_error); // negative scale (shape).
|
||||
BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, 0), std::domain_error); // zero scale.
|
||||
BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, -1), std::domain_error); // negative scale (shape).
|
||||
#else
|
||||
BOOST_MATH_CHECK_THROW(boost::math::cauchy_distribution<RealType>(0, 0), std::domain_error); // zero scale.
|
||||
BOOST_MATH_CHECK_THROW(boost::math::cauchy_distribution<RealType>(0, -1), std::domain_error); // negative scale (shape).
|
||||
BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType>(0, 0), std::domain_error); // zero scale.
|
||||
BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType>(0, -1), std::domain_error); // negative scale (shape).
|
||||
#endif
|
||||
cauchy_distribution<RealType> C01;
|
||||
|
||||
@@ -667,35 +666,35 @@ void test_spots(RealType T)
|
||||
// To compile even if Cauchy mean is used.
|
||||
// See policy reference, mathematically undefined function policies
|
||||
//
|
||||
//BOOST_MATH_CHECK_THROW(
|
||||
//BOOST_CHECK_THROW(
|
||||
// mean(dist),
|
||||
// std::domain_error);
|
||||
//BOOST_MATH_CHECK_THROW(
|
||||
//BOOST_CHECK_THROW(
|
||||
// variance(dist),
|
||||
// std::domain_error);
|
||||
//BOOST_MATH_CHECK_THROW(
|
||||
//BOOST_CHECK_THROW(
|
||||
// standard_deviation(dist),
|
||||
// std::domain_error);
|
||||
//BOOST_MATH_CHECK_THROW(
|
||||
//BOOST_CHECK_THROW(
|
||||
// kurtosis(dist),
|
||||
// std::domain_error);
|
||||
//BOOST_MATH_CHECK_THROW(
|
||||
//BOOST_CHECK_THROW(
|
||||
// kurtosis_excess(dist),
|
||||
// std::domain_error);
|
||||
//BOOST_MATH_CHECK_THROW(
|
||||
//BOOST_CHECK_THROW(
|
||||
// skewness(dist),
|
||||
// std::domain_error);
|
||||
|
||||
BOOST_MATH_CHECK_THROW(
|
||||
BOOST_CHECK_THROW(
|
||||
quantile(dist, RealType(0.0)),
|
||||
std::overflow_error);
|
||||
BOOST_MATH_CHECK_THROW(
|
||||
BOOST_CHECK_THROW(
|
||||
quantile(dist, RealType(1.0)),
|
||||
std::overflow_error);
|
||||
BOOST_MATH_CHECK_THROW(
|
||||
BOOST_CHECK_THROW(
|
||||
quantile(complement(dist, RealType(0.0))),
|
||||
std::overflow_error);
|
||||
BOOST_MATH_CHECK_THROW(
|
||||
BOOST_CHECK_THROW(
|
||||
quantile(complement(dist, RealType(1.0))),
|
||||
std::overflow_error);
|
||||
|
||||
@@ -705,7 +704,7 @@ void test_spots(RealType T)
|
||||
|
||||
} // template <class RealType>void test_spots(RealType)
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_main )
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
// Check that can generate cauchy distribution using the two convenience methods:
|
||||
|
||||
Reference in New Issue
Block a user