Loading [MathJax]/extensions/TeX/newcommand.js
 Reference documentation for deal.II version 9.1.1
\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
rtree.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2017 - 2018 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_numerics_rtree_h
17 #define dealii_numerics_rtree_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/point.h>
22 
23 #include <deal.II/boost_adaptors/bounding_box.h>
24 #include <deal.II/boost_adaptors/point.h>
25 #include <deal.II/boost_adaptors/segment.h>
26 
27 #include <boost/geometry.hpp>
28 
29 #include <memory>
30 
31 
32 DEAL_II_NAMESPACE_OPEN
33 
129 template <typename LeafType,
130  typename IndexType = boost::geometry::index::linear<16>>
131 using RTree = boost::geometry::index::rtree<LeafType, IndexType>;
132 
143 template <typename IndexType = boost::geometry::index::linear<16>,
144  typename LeafTypeIterator>
145 RTree<typename LeafTypeIterator::value_type, IndexType>
146 pack_rtree(const LeafTypeIterator &begin, const LeafTypeIterator &end);
147 
158 template <typename IndexType = boost::geometry::index::linear<16>,
159  typename ContainerType>
160 RTree<typename ContainerType::value_type, IndexType>
161 pack_rtree(const ContainerType &container);
162 
163 
164 
165 // Inline and template functions
166 #ifndef DOXYGEN
167 template <typename IndexType, typename LeafTypeIterator>
168 RTree<typename LeafTypeIterator::value_type, IndexType>
169 pack_rtree(const LeafTypeIterator &begin, const LeafTypeIterator &end)
170 {
171  return RTree<typename LeafTypeIterator::value_type, IndexType>(begin, end);
172 }
173 
174 
175 
176 template <typename IndexType, typename ContainerType>
177 RTree<typename ContainerType::value_type, IndexType>
178 pack_rtree(const ContainerType &container)
179 {
180  return pack_rtree<IndexType>(container.begin(), container.end());
181 }
182 
183 #endif
184 
185 DEAL_II_NAMESPACE_CLOSE
186 
187 #endif