Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::geometry::math Namespace Reference

Namespaces

 detail
 

Functions

template<typename T >
T pi ()
 
template<typename T >
T relaxed_epsilon (T const &factor)
 
template<typename T1 , typename T2 >
bool equals (T1 const &a, T2 const &b)
 returns true if both arguments are equal. More...
 
template<typename T1 , typename T2 >
bool equals_with_epsilon (T1 const &a, T2 const &b)
 
template<typename T1 , typename T2 >
bool smaller (T1 const &a, T2 const &b)
 
template<typename T1 , typename T2 >
bool larger (T1 const &a, T2 const &b)
 
template<typename T >
T hav (T const &theta)
 Calculates the haversine of an angle. More...
 
template<typename T >
T sqr (T const &value)
 Short utility to return the square. More...
 
template<typename T >
detail::square_root< T >
::return_type 
sqrt (T const &value)
 Short utility to return the square root. More...
 
template<typename T >
T abs (T const &value)
 Short utility to workaround gcc/clang problem that abs is converting to integer and that older versions of MSVC does not support abs of long long... More...
 
template<typename Result , typename T >
Result round (T const &v)
 Short utility to calculate the rounded value of a number. More...
 

Variables

double const d2r = geometry::math::pi<double>() / 180.0
 
double const r2d = 1.0 / d2r
 

Function Documentation

template<typename T >
T boost::geometry::math::abs ( T const &  value)
inline

Short utility to workaround gcc/clang problem that abs is converting to integer and that older versions of MSVC does not support abs of long long...

References T, and boost::program_options::value().

Referenced by boost::geometry::strategy::buffer::distance_symmetric< NumericType >::apply(), boost::geometry::strategy::buffer::distance_asymmetric< NumericType >::apply(), boost::geometry::math::detail::equals< Type, true >::apply(), boost::geometry::strategy::buffer::join_miter::apply(), boost::geometry::strategy::distance::cross_track_point_box< CalculationType, Strategy >::apply(), boost::geometry::strategy::buffer::join_round_by_divide::apply(), boost::geometry::strategy::distance::cross_track< CalculationType, Strategy >::apply(), boost::geometry::strategy::intersection::relate_cartesian_segments< Policy, CalculationType >::apply(), boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::apply(), boost::geometry::strategy::buffer::join_round::apply(), boost::bandwidth(), boost::units::BOOST_PREVENT_MACRO_SUBSTITUTION(), boost::units::autoprefix_norm_impl< T, true >::call(), boost::geometry::strategy::transform::detail::cartesian_to_spherical2(), boost::geometry::segment_ratio< Type >::close_to(), boost::hypercube_topology< 3, RandomNumberGenerator >::distance_from_boundary(), boost::rectangle_topology< RandomNumberGenerator >::distance_from_boundary(), boost::numeric::odeint::rosenbrock4_controller< Stepper >::error(), boost::multiprecision::backends::eval_add(), boost::multiprecision::backends::eval_divide(), boost::multiprecision::backends::eval_gcd(), boost::multiprecision::backends::eval_integer_modulus(), boost::multiprecision::backends::eval_lcm(), boost::multiprecision::backends::eval_modulus(), boost::multiprecision::backends::eval_multiply(), boost::multiprecision::backends::eval_subtract(), fabs(), boost::math::detail::hankel_imp(), boost::ith_bandwidth(), boost::geometry::strategy::buffer::distance_symmetric< NumericType >::max_distance(), boost::geometry::strategy::buffer::distance_asymmetric< NumericType >::max_distance(), boost::numeric::odeint::array_algebra::norm_inf(), boost::numeric::odeint::openmp_range_algebra::norm_inf(), boost::geometry::side_info::one_of_all_zero(), boost::numeric::odeint::vector_space_norm_inf< nt2::container::table< T, S > >::operator()(), boost::numeric::odeint::detail::fusion_maximum< Value >::operator()(), boost::numeric::odeint::vector_space_norm_inf< double >::operator()(), boost::numeric::odeint::vector_space_norm_inf< float >::operator()(), boost::numeric::odeint::vector_space_norm_inf< std::complex< T > >::operator()(), boost::accumulators::impl::weighted_p_square_quantile_impl< Sample, Weight, Impl >::operator()(), boost::accumulators::impl::weighted_p_square_cumulative_distribution_impl< Sample, Weight >::operator()(), boost::geometry::strategy::compare::circular_comparator< CoordinateType, Units, Compare >::operator()(), boost::accumulators::impl::p_square_cumulative_distribution_impl< Sample >::operator()(), boost::accumulators::impl::p_square_quantile_impl< Sample, Impl >::operator()(), boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >::operator()(), boost::accumulators::impl::extended_p_square_impl< Sample >::operator()(), boost::numeric::odeint::thrust_operations::rel_error< Fac1 >::operator()(), boost::numeric::odeint::default_operations::rel_error< Fac1 >::operator()(), boost::numeric::odeint::default_operations::default_rel_error< Fac1 >::operator()(), boost::numeric::odeint::default_operations::maximum< Value >::operator()(), boost::numeric::odeint::default_operations::rel_error_max< Fac1 >::operator()(), boost::numeric::odeint::default_operations::rel_error_max2< Fac1 >::operator()(), boost::numeric::odeint::default_operations::rel_error_l2< Fac1 >::operator()(), boost::numeric::odeint::default_operations::rel_error_l2_2< Fac1 >::operator()(), boost::multiprecision::backends::tommath_int::operator=(), boost::polygon::polygon_90_set_data< T >::resize_poly_down(), boost::polygon::polygon_set_data< T >::resize_poly_down(), boost::geometry::strategy::buffer::distance_symmetric< NumericType >::simplify_distance(), boost::geometry::strategy::buffer::distance_asymmetric< NumericType >::simplify_distance(), boost::math::sinhc_pi(), boost::math::detail::sinhc_pi_imp(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::str(), and boost::cpp_regex_traits< charT >::toi().

template<typename T1 , typename T2 >
bool boost::geometry::math::equals ( T1 const &  a,
T2 const &  b 
)
inline

returns true if both arguments are equal.

Parameters
afirst argument
bsecond argument
Returns
true if a == b
Note
If both a and b are of an integral type, comparison is done by ==. If one of the types is floating point, comparison is done by abs and comparing with epsilon. If one of the types is non-fundamental, it might be a high-precision number and comparison is done using the == operator of that class.

References boost::program_options::value().

Referenced by boost::geometry::detail::compare::compare_loop< Direction, Point, Strategy, Dimension, DimensionCount >::apply(), boost::geometry::strategy::side::side_by_cross_track< CalculationType >::apply(), boost::geometry::strategy::buffer::side_straight::apply(), boost::geometry::detail::equals::box_box< 0, DimensionCount >::apply(), boost::geometry::strategy::side::side_by_triangle< CalculationType >::apply(), boost::geometry::detail::segment_ratio::equal< Type, false >::apply(), boost::geometry::strategy::within::winding_side_equal< cartesian_tag >::apply(), boost::geometry::strategy::distance::cross_track< CalculationType, Strategy >::apply(), boost::geometry::strategy::buffer::end_round::apply(), boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::apply(), boost::geometry::detail::equals::area_check::apply(), boost::geometry::detail::equals::length_check::apply(), boost::geometry::strategy::distance::detail::projected_point_ax< CalculationType, Strategy >::apply(), boost::geometry::segment_ratio< Type >::is_one(), boost::geometry::segment_ratio< Type >::is_zero(), boost::geometry::detail::point_on_surface::specific_coordinate_first< CoordinateType, Dimension >::operator()(), boost::geometry::detail::point_on_surface::select_below< Dimension, Value >::operator()(), boost::geometry::policies::relate::segments_de9im< S1, S2 >::rays_intersect(), boost::geometry::strategy::centroid::weighted_length< Point, PointOfSegment >::result(), and boost::geometry::strategy::centroid::bashein_detmer< Point, PointOfSegment, CalculationType >::result().

template<typename T1 , typename T2 >
bool boost::geometry::math::equals_with_epsilon ( T1 const &  a,
T2 const &  b 
)
inline
template<typename T >
T boost::geometry::math::hav ( T const &  theta)
inline

Calculates the haversine of an angle.

Note
See http://en.wikipedia.org/wiki/Haversine_formula haversin(alpha) = sin2(alpha/2)

References boost::math::ef::sin(), and T.

template<typename T1 , typename T2 >
bool boost::geometry::math::larger ( T1 const &  a,
T2 const &  b 
)
inline
template<typename T >
T boost::geometry::math::pi ( )
inline
template<typename T >
T boost::geometry::math::relaxed_epsilon ( T const &  factor)
inline
template<typename Result , typename T >
Result boost::geometry::math::round ( T const &  v)
inline

Short utility to calculate the rounded value of a number.

Note
If the source T is NOT an integral type and Result is an integral type the value is rounded towards the closest integral value. Otherwise it's just casted.

References boost::geometry::math::detail::round< Result, Source, ResultIsInteger, SourceIsInteger >::apply().

template<typename T1 , typename T2 >
bool boost::geometry::math::smaller ( T1 const &  a,
T2 const &  b 
)
inline
template<typename T >
T boost::geometry::math::sqr ( T const &  value)
inline

Short utility to return the square.

Parameters
valueValue to calculate the square from
Returns
The squared value

References boost::program_options::value().

template<typename T >
detail::square_root<T>::return_type boost::geometry::math::sqrt ( T const &  value)
inline

Short utility to return the square root.

Parameters
valueValue to calculate the square root from
Returns
The square root value

References T, and boost::program_options::value().

Referenced by boost::math::abs(), boost::math::acos(), boost::math::detail::acosh_imp(), boost::math::detail::airy_ai_imp(), boost::math::detail::airy_ai_prime_imp(), boost::math::detail::airy_ai_zero_imp(), boost::math::detail::airy_bi_imp(), boost::math::detail::airy_bi_prime_imp(), boost::math::detail::airy_bi_zero_imp(), boost::geometry::strategy::buffer::side_straight::apply(), boost::geometry::strategy::buffer::join_miter::apply(), boost::geometry::strategy::buffer::join_round_by_divide::apply(), boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::apply(), boost::geometry::math::detail::square_root< T, IsFundemantal >::apply(), boost::geometry::strategy::buffer::join_round::apply(), boost::geometry::math::detail::square_root< float, true >::apply(), boost::geometry::math::detail::square_root< long double, true >::apply(), boost::geometry::math::detail::square_root< T, true >::apply(), boost::geometry::strategy::distance::haversine< identity< T > >::apply(), boost::geometry::strategy::distance::pythagoras< CalculationType >::apply(), boost::geometry::strategy::distance::pythagoras_point_box< CalculationType >::apply(), boost::geometry::strategy::distance::pythagoras_box_box< CalculationType >::apply(), boost::math::asin(), boost::math::detail::asinh_imp(), boost::math::detail::bessel_i0(), boost::math::detail::bessel_i1(), boost::math::detail::beta_imp(), boost::multiprecision::backends::cpp_dec_float< Digits10, ExponentType, Allocator >::calculate_sqrt(), boost::geometry::strategy::transform::detail::cartesian_to_spherical3(), boost::geometry::strategy::transform::detail::cartesian_to_spherical_equatorial3(), boost::math::cdf(), boost::numeric::odeint::detail::symplectic_rkn_sb3a_m4_mclachlan::coef_a_type< Value >::coef_a_type(), boost::polygon::polygon_set_data< T >::compute_offset_edge(), boost::detail::graph::kamada_kawai_spring_layout_impl< Topology, Graph, PositionMap, WeightMap, EdgeOrSideLength, Done, VertexIndexMap, DistanceMatrix, SpringStrengthMatrix, PartialDerivativeMap >::compute_partial_derivative(), boost::detail::graph::kamada_kawai_spring_layout_impl< Topology, Graph, PositionMap, WeightMap, EdgeOrSideLength, Done, VertexIndexMap, DistanceMatrix, SpringStrengthMatrix, PartialDerivativeMap >::compute_partial_derivatives(), boost::math::detail::cyl_bessel_i_imp(), boost::math::double_factorial(), boost::math::detail::ellint_pi_imp(), boost::math::detail::ellint_rc_imp(), boost::math::detail::ellint_rd_imp(), boost::math::detail::ellint_rf_imp(), boost::math::detail::ellint_rj_imp(), boost::math::detail::erf_asympt_series_t< T >::erf_asympt_series_t(), boost::math::detail::erf_imp(), boost::math::detail::erf_inv_imp(), boost::polygon::euclidean_distance(), boost::multiprecision::concepts::eval_sqrt(), boost::math::detail::finite_half_gamma_q(), boost::math::tools::detail::forth_root_epsilon_imp(), boost::grid_force_pairs< Topology, PositionMap >::grid_force_pairs(), boost::math::detail::guess_ig(), boost::gursoy_atun_layout(), boost::math::detail::hypot_imp(), boost::math::detail::ibeta_imp(), boost::math::detail::ibeta_power_terms(), boost::math::detail::ibeta_series(), boost::polygon::polygon_set_data< T >::insert_with_resize_dispatch(), boost::math::binomial_detail::inverse_binomial_cornish_fisher(), boost::math::detail::jacobi_imp(), boost::math::detail::jacobi_recurse(), boost::polygon::make_resizing_vertex_list(), boost::math::mean(), boost::math::detail::mean(), boost::math::median(), boost::geometry::strategy::buffer::join_round_by_divide::mid_points(), boost::math::mode(), boost::math::detail::nccs_pdf(), boost::math::detail::non_central_t_pdf(), boost::math::detail::non_central_t_quantile(), boost::random::student_t_distribution< RealType >::operator()(), boost::graph::distributed::neighboring_tiles_force_pairs< PositionMap >::operator()(), boost::random::triangle_distribution< RealType >::operator()(), boost::random::gamma_distribution< RealType >::operator()(), boost::random::uniform_on_sphere< RealType, Cont >::operator()(), boost::math::detail::owens_t_T1_accelerated(), boost::math::detail::owens_t_T2_accelerated(), boost::math::pdf(), boost::math::quantile(), boost::math::detail::regularised_gamma_prefix(), boost::accumulators::impl::error_of_mean_impl< Sample, Variance >::result(), boost::accumulators::impl::skewness_impl< Sample >::result(), boost::accumulators::impl::weighted_skewness_impl< Sample, Weight >::result(), boost::math::tools::stats< T >::rms(), boost::rms_wavefront(), boost::math::tools::detail::root_epsilon_imp(), boost::detail::graph::kamada_kawai_spring_layout_impl< Topology, Graph, PositionMap, WeightMap, EdgeOrSideLength, Done, VertexIndexMap, DistanceMatrix, SpringStrengthMatrix, PartialDerivativeMap >::run(), boost::math::detail::safe_max(), boost::math::detail::safe_min(), boost::math::sinhc_pi(), boost::math::detail::sinhc_pi_imp(), boost::math::skewness(), boost::math::detail::sph_bessel_j_imp(), boost::math::detail::sph_bessel_j_small_z_series(), boost::math::detail::sph_hankel_imp(), boost::math::detail::sph_neumann_imp(), boost::math::detail::spherical_harmonic_prefix(), boost::math::sqrt1pm1(), boost::math::standard_deviation(), boost::math::constants::detail::detail::zeta_series_2(), and boost::math::constants::detail::detail::zeta_series_derivative_2().

Variable Documentation