]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/algorithms/detail/relate/implementation.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / relate / implementation.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4
1e59de90
TL
5// This file was modified by Oracle on 2013-2021.
6// Modifications copyright (c) 2013-2021 Oracle and/or its affiliates.
7c673cae
FG
7
8// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
9
10// Use, modification and distribution is subject to the Boost Software License,
11// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12// http://www.boost.org/LICENSE_1_0.txt)
13
14#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_IMPLEMENTATION_HPP
15#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_IMPLEMENTATION_HPP
16
17
18#include <boost/geometry/core/tags.hpp>
19
20#include <boost/geometry/algorithms/detail/relate/interface.hpp>
21
22#include <boost/geometry/algorithms/detail/relate/point_point.hpp>
23#include <boost/geometry/algorithms/detail/relate/point_geometry.hpp>
24#include <boost/geometry/algorithms/detail/relate/linear_linear.hpp>
25#include <boost/geometry/algorithms/detail/relate/linear_areal.hpp>
b32b8144 26#include <boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp>
7c673cae
FG
27#include <boost/geometry/algorithms/detail/relate/areal_areal.hpp>
28
1e59de90
TL
29#include <boost/geometry/strategies/relate/cartesian.hpp>
30#include <boost/geometry/strategies/relate/geographic.hpp>
31#include <boost/geometry/strategies/relate/spherical.hpp>
b32b8144 32
7c673cae
FG
33
34namespace boost { namespace geometry {
35
36
37#ifndef DOXYGEN_NO_DISPATCH
38namespace dispatch {
39
40template <typename Point1, typename Point2>
41struct relate<Point1, Point2, point_tag, point_tag, 0, 0, false>
42 : detail::relate::point_point<Point1, Point2>
43{};
44
45template <typename Point, typename MultiPoint>
46struct relate<Point, MultiPoint, point_tag, multi_point_tag, 0, 0, false>
47 : detail::relate::point_multipoint<Point, MultiPoint>
48{};
49
50template <typename MultiPoint, typename Point>
51struct relate<MultiPoint, Point, multi_point_tag, point_tag, 0, 0, false>
52 : detail::relate::multipoint_point<MultiPoint, Point>
53{};
54
55template <typename MultiPoint1, typename MultiPoint2>
56struct relate<MultiPoint1, MultiPoint2, multi_point_tag, multi_point_tag, 0, 0, false>
57 : detail::relate::multipoint_multipoint<MultiPoint1, MultiPoint2>
58{};
59
60// TODO - for now commented out because before implementing it we must consider:
61// 1. how the Box degenerated to a Point should be treated
62// 2. what should be the definition of a Box degenerated to a Point
63// 3. what fields should the matrix/mask contain for dimension > 2 and dimension > 9
64//
65//template <typename Point, typename Box, int TopDim2>
66//struct relate<Point, Box, point_tag, box_tag, 0, TopDim2, false>
67// : detail::relate::point_box<Point, Box>
68//{};
69//
70//template <typename Box, typename Point, int TopDim1>
71//struct relate<Box, Point, box_tag, point_tag, TopDim1, 0, false>
72// : detail::relate::box_point<Box, Point>
73//{};
74
75
76template <typename Point, typename Geometry, typename Tag2, int TopDim2>
77struct relate<Point, Geometry, point_tag, Tag2, 0, TopDim2, true>
78 : detail::relate::point_geometry<Point, Geometry>
79{};
80
81template <typename Geometry, typename Point, typename Tag1, int TopDim1>
82struct relate<Geometry, Point, Tag1, point_tag, TopDim1, 0, true>
83 : detail::relate::geometry_point<Geometry, Point>
84{};
85
b32b8144
FG
86template <typename MultiPoint, typename Geometry, typename Tag2, int TopDim2>
87struct relate<MultiPoint, Geometry, multi_point_tag, Tag2, 0, TopDim2, false>
88 : detail::relate::multi_point_geometry<MultiPoint, Geometry>
89{};
90
91template <typename Geometry, typename MultiPoint, typename Tag1, int TopDim1>
92struct relate<Geometry, MultiPoint, Tag1, multi_point_tag, TopDim1, 0, false>
93 : detail::relate::geometry_multi_point<Geometry, MultiPoint>
94{};
95
7c673cae
FG
96
97template <typename Linear1, typename Linear2, typename Tag1, typename Tag2>
98struct relate<Linear1, Linear2, Tag1, Tag2, 1, 1, true>
99 : detail::relate::linear_linear<Linear1, Linear2>
100{};
101
102
103template <typename Linear, typename Areal, typename Tag1, typename Tag2>
104struct relate<Linear, Areal, Tag1, Tag2, 1, 2, true>
105 : detail::relate::linear_areal<Linear, Areal>
106{};
107
108template <typename Areal, typename Linear, typename Tag1, typename Tag2>
109struct relate<Areal, Linear, Tag1, Tag2, 2, 1, true>
110 : detail::relate::areal_linear<Areal, Linear>
111{};
112
113
114template <typename Areal1, typename Areal2, typename Tag1, typename Tag2>
115struct relate<Areal1, Areal2, Tag1, Tag2, 2, 2, true>
116 : detail::relate::areal_areal<Areal1, Areal2>
117{};
118
119} // namespace dispatch
120#endif // DOXYGEN_NO_DISPATCH
121
122
123}} // namespace boost::geometry
124
125#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_IMPLEMENTATION_HPP