#include <algorithm>
#include <iterator>
-#include <boost/assert.hpp>
+#include <boost/math/tools/assert.hpp>
#include <boost/math/tools/complex.hpp>
#include <boost/math/tools/roots.hpp>
+#include <boost/math/tools/header_deprecated.hpp>
#include <boost/math/statistics/univariate_statistics.hpp>
-#include <boost/config/header_deprecated.hpp>
-BOOST_HEADER_DEPRECATED("<boost/math/statistics/signal_statistics.hpp>");
+BOOST_MATH_HEADER_DEPRECATED("<boost/math/statistics/signal_statistics.hpp>");
namespace boost::math::tools {
{
using std::abs;
using RealOrComplex = typename std::iterator_traits<ForwardIterator>::value_type;
- BOOST_ASSERT_MSG(first != last && std::next(first) != last, "Computation of the Gini coefficient requires at least two samples.");
+ BOOST_MATH_ASSERT_MSG(first != last && std::next(first) != last, "Computation of the Gini coefficient requires at least two samples.");
std::sort(first, last, [](RealOrComplex a, RealOrComplex b) { return abs(b) > abs(a); });
using T = typename std::iterator_traits<ForwardIterator>::value_type;
using std::abs;
using std::sqrt;
- BOOST_ASSERT_MSG(first != last && std::next(first) != last, "Computation of the Hoyer sparsity requires at least two samples.");
+ BOOST_MATH_ASSERT_MSG(first != last && std::next(first) != last, "Computation of the Hoyer sparsity requires at least two samples.");
if constexpr (std::is_unsigned<T>::value)
{
auto oracle_snr(Container const & signal, Container const & noisy_signal)
{
using Real = typename Container::value_type;
- BOOST_ASSERT_MSG(signal.size() == noisy_signal.size(),
+ BOOST_MATH_ASSERT_MSG(signal.size() == noisy_signal.size(),
"Signal and noisy_signal must be have the same number of elements.");
if constexpr (std::is_integral<Real>::value)
{
auto mean_invariant_oracle_snr(Container const & signal, Container const & noisy_signal)
{
using Real = typename Container::value_type;
- BOOST_ASSERT_MSG(signal.size() == noisy_signal.size(), "Signal and noisy signal must be have the same number of elements.");
+ BOOST_MATH_ASSERT_MSG(signal.size() == noisy_signal.size(), "Signal and noisy signal must be have the same number of elements.");
Real mu = boost::math::tools::mean(signal);
Real numerator = 0;
template<class ForwardIterator>
auto m2m4_snr_estimator(ForwardIterator first, ForwardIterator last, decltype(*first) estimated_signal_kurtosis=1, decltype(*first) estimated_noise_kurtosis=3)
{
- BOOST_ASSERT_MSG(estimated_signal_kurtosis > 0, "The estimated signal kurtosis must be positive");
- BOOST_ASSERT_MSG(estimated_noise_kurtosis > 0, "The estimated noise kurtosis must be positive.");
+ BOOST_MATH_ASSERT_MSG(estimated_signal_kurtosis > 0, "The estimated signal kurtosis must be positive");
+ BOOST_MATH_ASSERT_MSG(estimated_noise_kurtosis > 0, "The estimated noise kurtosis must be positive.");
using Real = typename std::iterator_traits<ForwardIterator>::value_type;
using std::sqrt;
if constexpr (std::is_floating_point<Real>::value || std::numeric_limits<Real>::max_exponent)
}
else
{
- BOOST_ASSERT_MSG(false, "The M2M4 estimator has not been implemented for this type.");
+ BOOST_MATH_ASSERT_MSG(false, "The M2M4 estimator has not been implemented for this type.");
return std::numeric_limits<Real>::quiet_NaN();
}
}