File indexing completed on 2025-01-18 09:35:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_OPTIONS_HPP
0016 #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_OPTIONS_HPP
0017
0018 #include <boost/geometry/index/parameters.hpp>
0019
0020 namespace boost { namespace geometry { namespace index {
0021
0022 namespace detail { namespace rtree {
0023
0024
0025 struct insert_default_tag {};
0026 struct insert_reinsert_tag {};
0027
0028
0029 struct choose_by_content_diff_tag {};
0030 struct choose_by_overlap_diff_tag {};
0031
0032
0033 struct split_default_tag {};
0034
0035
0036
0037 struct linear_tag {};
0038 struct quadratic_tag {};
0039 struct rstar_tag {};
0040
0041
0042 struct node_variant_dynamic_tag {};
0043 struct node_variant_static_tag {};
0044
0045
0046
0047 template <typename Parameters, typename InsertTag, typename ChooseNextNodeTag, typename SplitTag, typename RedistributeTag, typename NodeTag>
0048 struct options
0049 {
0050 typedef Parameters parameters_type;
0051 typedef InsertTag insert_tag;
0052 typedef ChooseNextNodeTag choose_next_node_tag;
0053 typedef SplitTag split_tag;
0054 typedef RedistributeTag redistribute_tag;
0055 typedef NodeTag node_tag;
0056 };
0057
0058 template <typename Parameters>
0059 struct options_type
0060 {
0061
0062 };
0063
0064 template <size_t MaxElements, size_t MinElements>
0065 struct options_type< index::linear<MaxElements, MinElements> >
0066 {
0067 typedef options<
0068 index::linear<MaxElements, MinElements>,
0069 insert_default_tag,
0070 choose_by_content_diff_tag,
0071 split_default_tag,
0072 linear_tag,
0073 node_variant_static_tag
0074 > type;
0075 };
0076
0077 template <size_t MaxElements, size_t MinElements>
0078 struct options_type< index::quadratic<MaxElements, MinElements> >
0079 {
0080 typedef options<
0081 index::quadratic<MaxElements, MinElements>,
0082 insert_default_tag,
0083 choose_by_content_diff_tag,
0084 split_default_tag,
0085 quadratic_tag,
0086 node_variant_static_tag
0087 > type;
0088 };
0089
0090 template <size_t MaxElements, size_t MinElements, size_t OverlapCostThreshold, size_t ReinsertedElements>
0091 struct options_type< index::rstar<MaxElements, MinElements, OverlapCostThreshold, ReinsertedElements> >
0092 {
0093 typedef options<
0094 index::rstar<MaxElements, MinElements, OverlapCostThreshold, ReinsertedElements>,
0095 insert_reinsert_tag,
0096 choose_by_overlap_diff_tag,
0097 split_default_tag,
0098 rstar_tag,
0099 node_variant_static_tag
0100 > type;
0101 };
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116 template <>
0117 struct options_type< index::dynamic_linear >
0118 {
0119 typedef options<
0120 index::dynamic_linear,
0121 insert_default_tag,
0122 choose_by_content_diff_tag,
0123 split_default_tag,
0124 linear_tag,
0125 node_variant_dynamic_tag
0126 > type;
0127 };
0128
0129 template <>
0130 struct options_type< index::dynamic_quadratic >
0131 {
0132 typedef options<
0133 index::dynamic_quadratic,
0134 insert_default_tag,
0135 choose_by_content_diff_tag,
0136 split_default_tag,
0137 quadratic_tag,
0138 node_variant_dynamic_tag
0139 > type;
0140 };
0141
0142 template <>
0143 struct options_type< index::dynamic_rstar >
0144 {
0145 typedef options<
0146 index::dynamic_rstar,
0147 insert_reinsert_tag,
0148 choose_by_overlap_diff_tag,
0149 split_default_tag,
0150 rstar_tag,
0151 node_variant_dynamic_tag
0152 > type;
0153 };
0154
0155 template <typename Parameters, typename Strategy>
0156 struct options_type< index::parameters<Parameters, Strategy> >
0157 : options_type<Parameters>
0158 {
0159 typedef typename options_type<Parameters>::type opt;
0160 typedef options<
0161 index::parameters<Parameters, Strategy>,
0162 typename opt::insert_tag,
0163 typename opt::choose_next_node_tag,
0164 typename opt::split_tag,
0165 typename opt::redistribute_tag,
0166 typename opt::node_tag
0167 > type;
0168 };
0169
0170 }}
0171
0172 }}}
0173
0174 #endif