Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Von Mises Distribution #330

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,048 changes: 1,048 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_cdf_4d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,049 changes: 1,049 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_cdf_4f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,070 changes: 1,070 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_cdf_64d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,066 changes: 1,066 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_cdf_64f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,050 changes: 1,050 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_pdf_4d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,050 changes: 1,050 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_pdf_4f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,050 changes: 1,050 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_pdf_64d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,050 changes: 1,050 additions & 0 deletions doc/graphs/von_mises/von_mises_ulps_pdf_64f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions include/boost/math/distributions/detail/common_error_handling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <boost/math/policies/error_handling.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/math/constants/constants.hpp>
// using boost::math::isfinite;
// using boost::math::isnan;

Expand Down Expand Up @@ -96,6 +97,25 @@ inline bool check_location(
return true;
}

template <class RealType, class Policy>
inline bool check_angle(
const char* function,
RealType angle,
RealType* result,
const Policy& pol)
{
if(!(boost::math::isfinite)(angle)
|| angle < -boost::math::constants::pi<RealType>()
|| angle > +boost::math::constants::pi<RealType>())
{
*result = policies::raise_domain_error<RealType>(
function,
"Angle parameter is %1%, but must be between -pi and +pi!", angle, pol);
return false;
}
return true;
}

template <class RealType, class Policy>
inline bool check_x(
const char* function,
Expand Down
4 changes: 4 additions & 0 deletions include/boost/math/distributions/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ class triangular_distribution;
template <class RealType, class Policy>
class uniform_distribution;

template <class RealType, class Policy>
class von_mises_distribution;

template <class RealType, class Policy>
class weibull_distribution;

Expand Down Expand Up @@ -148,6 +151,7 @@ class weibull_distribution;
typedef boost::math::students_t_distribution<Type, Policy> students_t;\
typedef boost::math::triangular_distribution<Type, Policy> triangular;\
typedef boost::math::uniform_distribution<Type, Policy> uniform;\
typedef boost::math::von_mises_distribution<Type, Policy> von_mises;\
typedef boost::math::weibull_distribution<Type, Policy> weibull;

#endif // BOOST_MATH_DISTRIBUTIONS_FWD_HPP
Loading