void do_test_laguerre3(const T& data, const char* type_name, const char* test_name) { typedef typename T::value_type row_type; typedef typename row_type::value_type value_type; typedef value_type (*pg)(unsigned, unsigned, value_type); #if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) pg funcp = boost::math::laguerre<unsigned, value_type>; #else pg funcp = boost::math::laguerre; #endif boost::math::tools::test_result<value_type> result; std::cout << "Testing " << test_name << " with type " << type_name << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; // // test laguerre against data: // result = boost::math::tools::test( data, bind_func_int2(funcp, 0, 1, 2), extract_result(3)); handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::laguerre(n, m, x)", test_name); std::cout << std::endl; }
void do_test_spherical_harmonic(const T& data, const char* type_name, const char* test_name) { typedef typename T::value_type row_type; typedef typename row_type::value_type value_type; typedef value_type (*pg)(unsigned, int, value_type, value_type); #if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) pg funcp = boost::math::spherical_harmonic_r<value_type, value_type>; #else pg funcp = boost::math::spherical_harmonic_r; #endif boost::math::tools::test_result<value_type> result; std::cout << "Testing " << test_name << " with type " << type_name << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; // // test Spheric Harmonic against data: // result = boost::math::tools::test( data, bind_func_int2(funcp, 0, 1, 2, 3), extract_result(4)); handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::spherical_harmonic_r", test_name); #if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) funcp = boost::math::spherical_harmonic_i<value_type, value_type>; #else funcp = boost::math::spherical_harmonic_i; #endif // // test Spheric Harmonic against data: // result = boost::math::tools::test( data, bind_func_int2(funcp, 0, 1, 2, 3), extract_result(5)); handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::spherical_harmonic_i", test_name); std::cout << std::endl; }