Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:44

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2020-2023, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0006 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0007 
0008 // Licensed under the Boost Software License version 1.0.
0009 // http://www.boost.org/users/license.html
0010 
0011 #ifndef BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_CARTESIAN_HPP
0012 #define BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_CARTESIAN_HPP
0013 
0014 #include <boost/geometry/strategies/cartesian/point_in_point.hpp>
0015 #include <boost/geometry/strategies/convex_hull/services.hpp>
0016 #include <boost/geometry/strategies/compare.hpp>
0017 #include <boost/geometry/strategies/detail.hpp>
0018 #include <boost/geometry/strategies/side.hpp>
0019 
0020 #include <boost/geometry/strategy/cartesian/side_robust.hpp>
0021 
0022 #include <boost/geometry/util/type_traits.hpp>
0023 
0024 
0025 namespace boost { namespace geometry
0026 {
0027 
0028 namespace strategies { namespace convex_hull
0029 {
0030 
0031 template <typename CalculationType = void>
0032 class cartesian : public strategies::detail::cartesian_base
0033 {
0034 public:
0035     template <typename Geometry1, typename Geometry2>
0036     static auto relate(Geometry1 const&, Geometry2 const&,
0037                        std::enable_if_t
0038                             <
0039                                 util::is_pointlike<Geometry1>::value
0040                              && util::is_pointlike<Geometry2>::value
0041                             > * = nullptr)
0042     {
0043         return strategy::within::cartesian_point_point();
0044     }
0045 
0046     static auto side()
0047     {
0048         using side_strategy_type
0049             = strategy::side::side_robust<CalculationType>;
0050         return side_strategy_type();
0051     }
0052 
0053     template <typename ComparePolicy, typename EqualsPolicy>
0054     using compare_type = typename strategy::compare::cartesian
0055         <
0056             ComparePolicy,
0057             EqualsPolicy,
0058             -1
0059         >;
0060 };
0061 
0062 namespace services
0063 {
0064 
0065 template <typename Geometry>
0066 struct default_strategy<Geometry, cartesian_tag>
0067 {
0068     using type = strategies::convex_hull::cartesian<>;
0069 };
0070 
0071 } // namespace services
0072 
0073 }} // namespace strategies::convex_hull
0074 
0075 }} // namespace boost::geometry
0076 
0077 #endif // BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_CARTESIAN_HPP