// Boost.Geometry Index // // R-tree options, algorithms, parameters // // Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland. // // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_OPTIONS_HPP #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_OPTIONS_HPP #include namespace boost { namespace geometry { namespace index { namespace detail { namespace rtree { // InsertTag struct insert_default_tag {}; struct insert_reinsert_tag {}; // ChooseNextNodeTag struct choose_by_content_diff_tag {}; struct choose_by_overlap_diff_tag {}; // SplitTag struct split_default_tag {}; //struct split_kmeans_tag {}; // RedistributeTag struct linear_tag {}; struct quadratic_tag {}; struct rstar_tag {}; // NodeTag struct node_variant_dynamic_tag {}; struct node_variant_static_tag {}; //struct node_weak_dynamic_tag {}; //struct node_weak_static_tag {}; template struct options { typedef Parameters parameters_type; typedef InsertTag insert_tag; typedef ChooseNextNodeTag choose_next_node_tag; typedef SplitTag split_tag; typedef RedistributeTag redistribute_tag; typedef NodeTag node_tag; }; template struct options_type { // TODO: awulkiew - use static assert }; template struct options_type< index::linear > { typedef options< index::linear, insert_default_tag, choose_by_content_diff_tag, split_default_tag, linear_tag, node_variant_static_tag > type; }; template struct options_type< index::quadratic > { typedef options< index::quadratic, insert_default_tag, choose_by_content_diff_tag, split_default_tag, quadratic_tag, node_variant_static_tag > type; }; template struct options_type< index::rstar > { typedef options< index::rstar, insert_reinsert_tag, choose_by_overlap_diff_tag, split_default_tag, rstar_tag, node_variant_static_tag > type; }; //template //struct options_type< kmeans > //{ // typedef options< // kmeans, // insert_default_tag, // choose_by_content_diff_tag, // change it? // split_kmeans_tag, // int, // dummy tag - not used for now // node_variant_static_tag // > type; //}; template <> struct options_type< index::dynamic_linear > { typedef options< index::dynamic_linear, insert_default_tag, choose_by_content_diff_tag, split_default_tag, linear_tag, node_variant_dynamic_tag > type; }; template <> struct options_type< index::dynamic_quadratic > { typedef options< index::dynamic_quadratic, insert_default_tag, choose_by_content_diff_tag, split_default_tag, quadratic_tag, node_variant_dynamic_tag > type; }; template <> struct options_type< index::dynamic_rstar > { typedef options< index::dynamic_rstar, insert_reinsert_tag, choose_by_overlap_diff_tag, split_default_tag, rstar_tag, node_variant_dynamic_tag > type; }; }} // namespace detail::rtree }}} // namespace boost::geometry::index #endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_OPTIONS_HPP