]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/include/boost/geometry/strategies/agnostic/point_in_point.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / strategies / agnostic / point_in_point.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2014 Oracle and/or its affiliates.
4
5// Use, modification and distribution is subject to the Boost Software License,
6// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8
9// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10
11#ifndef BOOST_GEOMETRY_STRATEGY_AGNOSTIC_POINT_IN_POINT_HPP
12#define BOOST_GEOMETRY_STRATEGY_AGNOSTIC_POINT_IN_POINT_HPP
13
14#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
15
16#include <boost/geometry/strategies/covered_by.hpp>
17#include <boost/geometry/strategies/within.hpp>
18
19
20namespace boost { namespace geometry
21{
22
23namespace strategy { namespace within
24{
25
26template
27<
28 typename Point1, typename Point2
29>
30struct point_in_point
31{
32 static inline bool apply(Point1 const& point1, Point2 const& point2)
33 {
34 return detail::equals::equals_point_point(point1, point2);
35 }
36};
37
38
39#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
40
41namespace services
42{
43
44template <typename Point1, typename Point2>
45struct default_strategy<point_tag, point_tag, point_tag, point_tag, cartesian_tag, cartesian_tag, Point1, Point2>
46{
47 typedef strategy::within::point_in_point<Point1, Point2> type;
48};
49
50template <typename Point1, typename Point2>
51struct default_strategy<point_tag, point_tag, point_tag, point_tag, spherical_tag, spherical_tag, Point1, Point2>
52{
53 typedef strategy::within::point_in_point<Point1, Point2> type;
54};
55
56template <typename Point1, typename Point2, typename AnyCS1, typename AnyCS2>
57struct default_strategy<point_tag, point_tag, point_tag, point_tag, AnyCS1, AnyCS2, Point1, Point2>
58{
59 typedef strategy::within::point_in_point<Point1, Point2> type;
60};
61
62template <typename Point, typename MultiPoint>
63struct default_strategy<point_tag, multi_point_tag, point_tag, multi_point_tag, cartesian_tag, cartesian_tag, Point, MultiPoint>
64{
65 typedef strategy::within::point_in_point<Point, typename point_type<MultiPoint>::type> type;
66};
67
68template <typename Point, typename MultiPoint>
69struct default_strategy<point_tag, multi_point_tag, point_tag, multi_point_tag, spherical_tag, spherical_tag, Point, MultiPoint>
70{
71 typedef strategy::within::point_in_point<Point, typename point_type<MultiPoint>::type> type;
72};
73
74template <typename Point, typename MultiPoint, typename AnyCS1, typename AnyCS2>
75struct default_strategy<point_tag, multi_point_tag, point_tag, multi_point_tag, AnyCS1, AnyCS2, Point, MultiPoint>
76{
77 typedef strategy::within::point_in_point<Point, typename point_type<MultiPoint>::type> type;
78};
79
80} // namespace services
81
82#endif
83
84
85}} // namespace strategy::within
86
87
88
89#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
90namespace strategy { namespace covered_by { namespace services
91{
92
93template <typename Point1, typename Point2>
94struct default_strategy<point_tag, point_tag, point_tag, point_tag, cartesian_tag, cartesian_tag, Point1, Point2>
95{
96 typedef strategy::within::point_in_point<Point1, Point2> type;
97};
98
99template <typename Point1, typename Point2>
100struct default_strategy<point_tag, point_tag, point_tag, point_tag, spherical_tag, spherical_tag, Point1, Point2>
101{
102 typedef strategy::within::point_in_point<Point1, Point2> type;
103};
104
105template <typename Point1, typename Point2, typename AnyCS1, typename AnyCS2>
106struct default_strategy<point_tag, point_tag, point_tag, point_tag, AnyCS1, AnyCS2, Point1, Point2>
107{
108 typedef strategy::within::point_in_point<Point1, Point2> type;
109};
110
111template <typename Point, typename MultiPoint>
112struct default_strategy<point_tag, multi_point_tag, point_tag, multi_point_tag, cartesian_tag, cartesian_tag, Point, MultiPoint>
113{
114 typedef strategy::within::point_in_point<Point, typename point_type<MultiPoint>::type> type;
115};
116
117template <typename Point, typename MultiPoint>
118struct default_strategy<point_tag, multi_point_tag, point_tag, multi_point_tag, spherical_tag, spherical_tag, Point, MultiPoint>
119{
120 typedef strategy::within::point_in_point<Point, typename point_type<MultiPoint>::type> type;
121};
122
123template <typename Point, typename MultiPoint, typename AnyCS1, typename AnyCS2>
124struct default_strategy<point_tag, multi_point_tag, point_tag, multi_point_tag, AnyCS1, AnyCS2, Point, MultiPoint>
125{
126 typedef strategy::within::point_in_point<Point, typename point_type<MultiPoint>::type> type;
127};
128
129}}} // namespace strategy::covered_by::services
130#endif
131
132
133}} // namespace boost::geometry
134
135
136#endif // BOOST_GEOMETRY_STRATEGY_AGNOSTIC_POINT_IN_POINT_HPP