|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82538 - in sandbox-branches/geometry/index: boost/geometry/extensions/index boost/geometry/extensions/index/algorithms boost/geometry/extensions/index/detail boost/geometry/extensions/index/detail/rtree/linear boost/geometry/extensions/index/detail/rtree/quadratic boost/geometry/extensions/index/detail/rtree/rstar boost/geometry/extensions/index/translator test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-01-18 16:18:34
Author: awulkiew
Date: 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
New Revision: 82538
URL: http://svn.boost.org/trac/boost/changeset/82538
Log:
indexable traits and accessors moved to index::detail namespace
Added:
sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/indexable.hpp (contents, props changed)
Removed:
sandbox-branches/geometry/index/boost/geometry/extensions/index/indexable.hpp
Text files modified:
sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_centroid.hpp | 8 ++++----
sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_far.hpp | 8 ++++----
sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_near.hpp | 8 ++++----
sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/content.hpp | 10 +++++-----
sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/is_valid.hpp | 10 +++++-----
sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/margin.hpp | 8 ++++----
sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp | 24 ++++++++++++------------
sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp | 4 ++--
sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp | 14 +++++++-------
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree.hpp | 2 +-
sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/def.hpp | 6 +++---
sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/helpers.hpp | 6 +++---
sandbox-branches/geometry/index/test/rtree/test_rtree.hpp | 8 ++++----
13 files changed, 58 insertions(+), 58 deletions(-)
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_centroid.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_centroid.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_centroid.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -44,8 +44,8 @@
inline static result_type apply(Point const& pt, BoxIndexable const& i)
{
- typedef typename index::traits::coordinate_type<Point>::type point_coord_t;
- typedef typename index::traits::coordinate_type<BoxIndexable>::type indexable_coord_t;
+ typedef typename index::detail::traits::coordinate_type<Point>::type point_coord_t;
+ typedef typename index::detail::traits::coordinate_type<BoxIndexable>::type indexable_coord_t;
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
@@ -69,9 +69,9 @@
return detail::sum_for_indexable<
Point,
Indexable,
- typename index::traits::tag<Indexable>::type,
+ typename index::detail::traits::tag<Indexable>::type,
detail::comparable_distance_centroid_tag,
- index::traits::dimension<Indexable>::value
+ index::detail::traits::dimension<Indexable>::value
>::apply(pt, i);
}
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_far.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_far.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_far.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -32,8 +32,8 @@
inline static result_type apply(Point const& pt, BoxIndexable const& i)
{
- typedef typename index::traits::coordinate_type<Point>::type point_coord_t;
- typedef typename index::traits::coordinate_type<BoxIndexable>::type indexable_coord_t;
+ typedef typename index::detail::traits::coordinate_type<Point>::type point_coord_t;
+ typedef typename index::detail::traits::coordinate_type<BoxIndexable>::type indexable_coord_t;
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
@@ -59,9 +59,9 @@
return detail::sum_for_indexable<
Point,
Indexable,
- typename index::traits::tag<Indexable>::type,
+ typename index::detail::traits::tag<Indexable>::type,
detail::comparable_distance_far_tag,
- index::traits::dimension<Indexable>::value
+ index::detail::traits::dimension<Indexable>::value
>::apply(pt, i);
}
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_near.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_near.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/comparable_distance_near.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -43,8 +43,8 @@
inline static result_type apply(Point const& pt, BoxIndexable const& i)
{
- typedef typename index::traits::coordinate_type<Point>::type point_coord_t;
- typedef typename index::traits::coordinate_type<BoxIndexable>::type indexable_coord_t;
+ typedef typename index::detail::traits::coordinate_type<Point>::type point_coord_t;
+ typedef typename index::detail::traits::coordinate_type<BoxIndexable>::type indexable_coord_t;
point_coord_t pt_c = geometry::get<DimensionIndex>(pt);
indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i);
@@ -70,9 +70,9 @@
return detail::sum_for_indexable<
Point,
Indexable,
- typename index::traits::tag<Indexable>::type,
+ typename index::detail::traits::tag<Indexable>::type,
detail::comparable_distance_near_tag,
- index::traits::dimension<Indexable>::value
+ index::detail::traits::dimension<Indexable>::value
>::apply(pt, i);
}
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/content.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/content.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/content.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -17,7 +17,7 @@
struct default_content_result
{
typedef typename select_most_precise<
- typename traits::coordinate_type<Indexable>::type,
+ typename detail::traits::coordinate_type<Indexable>::type,
long double
>::type type;
};
@@ -33,7 +33,7 @@
static inline typename default_content_result<Box>::type apply(Box const& b)
{
return content_for_each_dimension<Box, CurrentDimension - 1>::apply(b) *
- ( index::get<max_corner, CurrentDimension - 1>(b) - index::get<min_corner, CurrentDimension - 1>(b) );
+ ( detail::get<max_corner, CurrentDimension - 1>(b) - detail::get<min_corner, CurrentDimension - 1>(b) );
}
};
@@ -42,7 +42,7 @@
{
static inline typename default_area_result<Box>::type apply(Box const& b)
{
- return index::get<max_corner, 0>(b) - index::get<min_corner, 0>(b);
+ return detail::get<max_corner, 0>(b) - detail::get<min_corner, 0>(b);
}
};
@@ -70,7 +70,7 @@
{
static typename default_content_result<Indexable>::type apply(Indexable const& b)
{
- return detail::content_for_each_dimension<Indexable, traits::dimension<Indexable>::value>::apply(b);
+ return detail::content_for_each_dimension<Indexable, detail::traits::dimension<Indexable>::value>::apply(b);
}
};
@@ -79,7 +79,7 @@
template <typename Indexable>
typename default_content_result<Indexable>::type content(Indexable const& b)
{
- return dispatch::content<Indexable, typename index::traits::tag<Indexable>::type>::apply(b);
+ return dispatch::content<Indexable, typename detail::traits::tag<Indexable>::type>::apply(b);
}
}}} // namespace boost::geometry::index
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/is_valid.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/is_valid.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/is_valid.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -19,14 +19,14 @@
struct is_valid_box
{
BOOST_MPL_ASSERT_MSG(
- (0 < Dimension && Dimension <= index::traits::dimension<Box>::value),
+ (0 < Dimension && Dimension <= detail::traits::dimension<Box>::value),
INVALID_DIMENSION_PARAMETER,
(is_valid_box));
static inline bool apply(Box const& b)
{
return is_valid_box<Box, Dimension - 1>::apply(b) &&
- ( index::get<min_corner, Dimension - 1>(b) <= index::get<max_corner, Dimension - 1>(b) );
+ ( detail::get<min_corner, Dimension - 1>(b) <= detail::get<max_corner, Dimension - 1>(b) );
}
};
@@ -35,7 +35,7 @@
{
static inline bool apply(Box const& b)
{
- return index::get<min_corner, 0>(b) <= index::get<max_corner, 0>(b);
+ return detail::get<min_corner, 0>(b) <= detail::get<max_corner, 0>(b);
}
};
@@ -66,7 +66,7 @@
{
static inline bool apply(Indexable const& b)
{
- return detail::is_valid_box<Indexable, index::traits::dimension<Indexable>::value>::apply(b);
+ return detail::is_valid_box<Indexable, detail::traits::dimension<Indexable>::value>::apply(b);
}
};
@@ -75,7 +75,7 @@
template <typename Indexable>
inline bool is_valid(Indexable const& b)
{
- return dispatch::is_valid<Indexable, typename index::traits::tag<Indexable>::type>::apply(b);
+ return dispatch::is_valid<Indexable, typename detail::traits::tag<Indexable>::type>::apply(b);
}
}}} // namespace boost::geometry::index
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/margin.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/margin.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/algorithms/margin.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -72,12 +72,12 @@
struct margin_for_each_dimension
{
BOOST_STATIC_ASSERT(0 < CurrentDimension);
- BOOST_STATIC_ASSERT(CurrentDimension <= traits::dimension<Box>::value);
+ BOOST_STATIC_ASSERT(CurrentDimension <= detail::traits::dimension<Box>::value);
static inline typename default_margin_result<Box>::type apply(Box const& b)
{
return margin_for_each_dimension<Box, CurrentDimension - 1>::apply(b) +
- margin_for_each_edge<Box, CurrentDimension, traits::dimension<Box>::value>::apply(b);
+ margin_for_each_edge<Box, CurrentDimension, detail::traits::dimension<Box>::value>::apply(b);
}
};
@@ -86,7 +86,7 @@
{
static inline typename default_margin_result<Box>::type apply(Box const& b)
{
- return margin_for_each_edge<Box, 1, traits::dimension<Box>::value>::apply(b);
+ return margin_for_each_edge<Box, 1, detail::traits::dimension<Box>::value>::apply(b);
}
};
@@ -95,7 +95,7 @@
template <typename Box>
typename default_margin_result<Box>::type margin(Box const& b)
{
- return 2 * detail::margin_for_each_dimension<Box, traits::dimension<Box>::value>::apply(b);
+ return 2 * detail::margin_for_each_dimension<Box, detail::traits::dimension<Box>::value>::apply(b);
}
}}} // namespace boost::geometry::index
Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/indexable.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/indexable.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,177 @@
+// Boost.Geometry Index
+//
+// Indexable's traits and related functions
+//
+// Copyright (c) 2011-2012 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_EXTENSIONS_INDEX_DETAIL_INDEXABLE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_INDEXABLE_HPP
+
+namespace boost { namespace geometry { namespace index { namespace detail {
+
+namespace dispatch {
+
+// Distinguish between indexables and other geometries
+
+template <typename Geometry, typename GeometryTag>
+struct indexable_type
+{
+ typedef void type;
+};
+
+template <typename Point>
+struct indexable_type<Point, geometry::point_tag>
+{
+ typedef Point type;
+};
+
+template <typename Box>
+struct indexable_type<Box, geometry::box_tag>
+{
+ typedef Box type;
+};
+
+} // namespace dispatch
+
+namespace traits
+{
+
+template <typename Indexable>
+struct indexable_type
+{
+ typedef typename dispatch::indexable_type<
+ Indexable,
+ typename geometry::traits::tag<Indexable>::type
+ >::type type;
+};
+
+} // namespace traits
+
+namespace dispatch {
+
+template <typename Indexable, typename IndexableTag>
+struct point_type
+{
+ typedef void type;
+};
+
+template <typename Indexable>
+struct point_type<Indexable, geometry::box_tag>
+{
+ typedef typename geometry::traits::point_type<Indexable>::type type;
+};
+
+template <typename Indexable>
+struct point_type<Indexable, geometry::point_tag>
+{
+ typedef Indexable type;
+};
+
+} // namespace dispatch
+
+namespace traits {
+
+template <typename Indexable>
+struct point_type
+{
+ typedef typename dispatch::point_type<
+ Indexable,
+ typename geometry::traits::tag<Indexable>::type
+ >::type type;
+};
+
+template <typename Indexable>
+struct coordinate_system
+{
+ typedef typename geometry::traits::coordinate_system<
+ typename point_type<Indexable>::type
+ >::type type;
+};
+
+template <typename Indexable>
+struct coordinate_type
+{
+ typedef typename geometry::traits::coordinate_type<
+ typename point_type<Indexable>::type
+ >::type type;
+};
+
+template <typename Indexable>
+struct dimension
+{
+ static const size_t value =
+ geometry::traits::dimension<
+ typename point_type<Indexable>::type
+ >::value;
+};
+
+template <typename Indexable>
+struct tag
+{
+ typedef typename geometry::traits::tag<
+ Indexable
+ >::type type;
+};
+
+} // namespace traits
+
+namespace dispatch {
+
+template <size_t Corner, size_t DimensionIndex, typename Indexable, typename IndexableTag>
+struct indexable_indexed_access {};
+
+template <size_t Corner, size_t DimensionIndex, typename Indexable>
+struct indexable_indexed_access<Corner, DimensionIndex, Indexable, box_tag>
+{
+ typedef typename traits::point_type<Indexable>::type point_type;
+ typedef typename traits::coordinate_type<point_type>::type coordinate_type;
+
+ static inline coordinate_type get(Indexable const& i)
+ {
+ return geometry::get<Corner, DimensionIndex>(i);
+ }
+};
+
+template <size_t Corner, size_t DimensionIndex, typename Indexable>
+struct indexable_indexed_access<Corner, DimensionIndex, Indexable, point_tag>
+{
+ typedef typename traits::coordinate_type<Indexable>::type coordinate_type;
+
+ static inline coordinate_type get(Indexable const& i)
+ {
+ return geometry::get<DimensionIndex>(i);
+ }
+};
+
+} // namespace dispatch
+
+template <size_t Corner, size_t DimensionIndex, typename Indexable>
+typename traits::coordinate_type<Indexable>::type get(Indexable const& i)
+{
+ return dispatch::indexable_indexed_access<
+ Corner,
+ DimensionIndex,
+ Indexable,
+ typename geometry::traits::tag<Indexable>::type
+ >::get(i);
+}
+
+template <typename Indexable>
+struct default_box_type
+{
+ typedef geometry::model::box<
+ geometry::model::point<
+ typename traits::coordinate_type<Indexable>::type,
+ traits::dimension<Indexable>::value,
+ typename traits::coordinate_system<Indexable>::type
+ >
+ > type;
+};
+
+}}}} // namespace boost::geometry::index::detail
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_INDEXABLE_HPP
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -45,7 +45,7 @@
{
typedef typename Elements::value_type element_type;
typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
- typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::detail::traits::coordinate_type<indexable_type>::type coordinate_type;
static inline void apply(Elements const& elements,
Parameters const& parameters,
@@ -59,15 +59,15 @@
BOOST_GEOMETRY_INDEX_ASSERT(2 <= elements_count, "unexpected number of elements");
// find the lowest low, highest high
- coordinate_type lowest_low = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[0], translator));
- coordinate_type highest_high = index::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[0], translator));
+ coordinate_type lowest_low = index::detail::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[0], translator));
+ coordinate_type highest_high = index::detail::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[0], translator));
// and the lowest high
coordinate_type lowest_high = highest_high;
size_t lowest_high_index = 0;
for ( size_t i = 1 ; i < elements_count ; ++i )
{
- coordinate_type min_coord = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
- coordinate_type max_coord = index::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
+ coordinate_type min_coord = index::detail::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
+ coordinate_type max_coord = index::detail::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
if ( max_coord < lowest_high )
{
@@ -84,10 +84,10 @@
// find the highest low
size_t highest_low_index = lowest_high_index == 0 ? 1 : 0;
- coordinate_type highest_low = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[highest_low_index], translator));
+ coordinate_type highest_low = index::detail::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[highest_low_index], translator));
for ( size_t i = highest_low_index ; i < elements_count ; ++i )
{
- coordinate_type min_coord = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
+ coordinate_type min_coord = index::detail::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
if ( highest_low < min_coord &&
i != lowest_high_index )
{
@@ -124,7 +124,7 @@
typedef typename Elements::value_type element_type;
typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
- typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::detail::traits::coordinate_type<indexable_type>::type coordinate_type;
static inline void apply(Elements const& elements,
Parameters const& parameters,
@@ -154,7 +154,7 @@
{
typedef typename Elements::value_type element_type;
typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
- typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::detail::traits::coordinate_type<indexable_type>::type coordinate_type;
static inline void apply(Elements const& elements,
Parameters const& parameters,
@@ -174,9 +174,9 @@
{
typedef typename Elements::value_type element_type;
typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
- typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::detail::traits::coordinate_type<indexable_type>::type coordinate_type;
- static const size_t dimension = index::traits::dimension<indexable_type>::value;
+ static const size_t dimension = index::detail::traits::dimension<indexable_type>::value;
static inline void apply(Elements const& elements,
Parameters const& parameters,
@@ -214,7 +214,7 @@
typedef typename rtree::elements_type<Node>::type elements_type;
typedef typename elements_type::value_type element_type;
typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
- typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::detail::traits::coordinate_type<indexable_type>::type coordinate_type;
typedef typename index::default_content_result<Box>::type content_type;
elements_type & elements1 = rtree::elements(n);
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -33,7 +33,7 @@
{
typedef typename Elements::value_type element_type;
typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
- typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::detail::traits::coordinate_type<indexable_type>::type coordinate_type;
typedef Box box_type;
typedef typename index::default_content_result<box_type>::type content_type;
@@ -100,7 +100,7 @@
typedef typename rtree::elements_type<Node>::type elements_type;
typedef typename elements_type::value_type element_type;
typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
- typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::detail::traits::coordinate_type<indexable_type>::type coordinate_type;
elements_type & elements1 = rtree::elements(n);
elements_type & elements2 = rtree::elements(second_node);
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -40,8 +40,8 @@
bool operator()(Element const& e1, Element const& e2) const
{
- return index::get<Corner, AxisIndex>(rtree::element_indexable(e1, m_tr))
- < index::get<Corner, AxisIndex>(rtree::element_indexable(e2, m_tr));
+ return index::detail::get<Corner, AxisIndex>(rtree::element_indexable(e1, m_tr))
+ < index::detail::get<Corner, AxisIndex>(rtree::element_indexable(e2, m_tr));
}
private:
@@ -229,7 +229,7 @@
Parameters,
Box,
Dimension - 1,
- typename index::traits::tag<element_indexable_type>::type
+ typename index::detail::traits::tag<element_indexable_type>::type
>::apply(elements, corner, index, sum_of_margins, overlap_val, content_val, parameters, translator); // MAY THROW, STRONG
if ( sum_of_margins < smallest_sum_of_margins )
@@ -269,7 +269,7 @@
Parameters,
Box,
0,
- typename index::traits::tag<element_indexable_type>::type
+ typename index::detail::traits::tag<element_indexable_type>::type
>::apply(elements, choosen_corner, choosen_index, smallest_sum_of_margins, smallest_overlap, smallest_content, parameters, translator); // MAY THROW
}
};
@@ -325,7 +325,7 @@
typedef typename Options::parameters_type parameters_type;
- static const size_t dimension = index::traits::dimension<Box>::value;
+ static const size_t dimension = index::detail::traits::dimension<Box>::value;
typedef typename index::default_margin_result<Box>::type margin_type;
typedef typename index::default_content_result<Box>::type content_type;
@@ -355,7 +355,7 @@
rstar::choose_split_axis_and_index<
typename Options::parameters_type,
Box,
- index::traits::dimension<Box>::value
+ index::detail::traits::dimension<Box>::value
>::apply(elements1,
split_axis, split_corner, split_index,
smallest_sum_of_margins, smallest_overlap, smallest_content,
@@ -363,7 +363,7 @@
// TODO: awulkiew - get rid of following static_casts?
- BOOST_GEOMETRY_INDEX_ASSERT(split_axis < index::traits::dimension<Box>::value, "unexpected value");
+ BOOST_GEOMETRY_INDEX_ASSERT(split_axis < index::detail::traits::dimension<Box>::value, "unexpected value");
BOOST_GEOMETRY_INDEX_ASSERT(split_corner == static_cast<size_t>(min_corner) || split_corner == static_cast<size_t>(max_corner), "unexpected value");
BOOST_GEOMETRY_INDEX_ASSERT(parameters.get_min_elements() <= split_index && split_index <= parameters.get_max_elements() - parameters.get_min_elements() + 1, "unexpected value");
Deleted: sandbox-branches/geometry/index/boost/geometry/extensions/index/indexable.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/indexable.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
+++ (empty file)
@@ -1,177 +0,0 @@
-// Boost.Geometry Index
-//
-// Indexable's traits and related functions
-//
-// Copyright (c) 2011-2012 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_EXTENSIONS_INDEX_INDEXABLE_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_INDEXABLE_HPP
-
-namespace boost { namespace geometry { namespace index {
-
-namespace dispatch {
-
-// Distinguish between indexables and other geometries
-
-template <typename Geometry, typename GeometryTag>
-struct indexable_type
-{
- typedef void type;
-};
-
-template <typename Point>
-struct indexable_type<Point, geometry::point_tag>
-{
- typedef Point type;
-};
-
-template <typename Box>
-struct indexable_type<Box, geometry::box_tag>
-{
- typedef Box type;
-};
-
-} // namespace dispatch
-
-namespace traits
-{
-
-template <typename Indexable>
-struct indexable_type
-{
- typedef typename dispatch::indexable_type<
- Indexable,
- typename geometry::traits::tag<Indexable>::type
- >::type type;
-};
-
-} // namespace traits
-
-namespace dispatch {
-
-template <typename Indexable, typename IndexableTag>
-struct point_type
-{
- typedef void type;
-};
-
-template <typename Indexable>
-struct point_type<Indexable, geometry::box_tag>
-{
- typedef typename geometry::traits::point_type<Indexable>::type type;
-};
-
-template <typename Indexable>
-struct point_type<Indexable, geometry::point_tag>
-{
- typedef Indexable type;
-};
-
-} // namespace dispatch
-
-namespace traits {
-
-template <typename Indexable>
-struct point_type
-{
- typedef typename dispatch::point_type<
- Indexable,
- typename geometry::traits::tag<Indexable>::type
- >::type type;
-};
-
-template <typename Indexable>
-struct coordinate_system
-{
- typedef typename geometry::traits::coordinate_system<
- typename point_type<Indexable>::type
- >::type type;
-};
-
-template <typename Indexable>
-struct coordinate_type
-{
- typedef typename geometry::traits::coordinate_type<
- typename point_type<Indexable>::type
- >::type type;
-};
-
-template <typename Indexable>
-struct dimension
-{
- static const size_t value =
- geometry::traits::dimension<
- typename point_type<Indexable>::type
- >::value;
-};
-
-template <typename Indexable>
-struct tag
-{
- typedef typename geometry::traits::tag<
- Indexable
- >::type type;
-};
-
-} // namespace traits
-
-namespace dispatch {
-
-template <size_t Corner, size_t DimensionIndex, typename Indexable, typename IndexableTag>
-struct indexable_indexed_access {};
-
-template <size_t Corner, size_t DimensionIndex, typename Indexable>
-struct indexable_indexed_access<Corner, DimensionIndex, Indexable, box_tag>
-{
- typedef typename traits::point_type<Indexable>::type point_type;
- typedef typename traits::coordinate_type<point_type>::type coordinate_type;
-
- static inline coordinate_type get(Indexable const& i)
- {
- return geometry::get<Corner, DimensionIndex>(i);
- }
-};
-
-template <size_t Corner, size_t DimensionIndex, typename Indexable>
-struct indexable_indexed_access<Corner, DimensionIndex, Indexable, point_tag>
-{
- typedef typename traits::coordinate_type<Indexable>::type coordinate_type;
-
- static inline coordinate_type get(Indexable const& i)
- {
- return geometry::get<DimensionIndex>(i);
- }
-};
-
-} // namespace dispatch
-
-template <size_t Corner, size_t DimensionIndex, typename Indexable>
-typename traits::coordinate_type<Indexable>::type get(Indexable const& i)
-{
- return dispatch::indexable_indexed_access<
- Corner,
- DimensionIndex,
- Indexable,
- typename geometry::traits::tag<Indexable>::type
- >::get(i);
-}
-
-template <typename Indexable>
-struct default_box_type
-{
- typedef geometry::model::box<
- geometry::model::point<
- typename traits::coordinate_type<Indexable>::type,
- traits::dimension<Indexable>::value,
- typename traits::coordinate_system<Indexable>::type
- >
- > type;
-};
-
-}}} // namespace boost::geometry::index
-
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_INDEXABLE_HPP
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -116,7 +116,7 @@
/*! \brief The Indexable type to which Value is translated. */
typedef typename translator::indexable_type<Translator>::type indexable_type;
/*! \brief The Box type used by the R-tree. */
- typedef typename index::default_box_type<indexable_type>::type box_type;
+ typedef typename index::detail::default_box_type<indexable_type>::type box_type;
#if !defined(BOOST_GEOMETRY_INDEX_ENABLE_DEBUG_INTERFACE)
private:
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/def.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/def.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/def.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -28,7 +28,7 @@
{
BOOST_MPL_ASSERT_MSG(
(!detail::indexable_not_found_error<
- typename traits::indexable_type<Value>::type
+ typename index::detail::traits::indexable_type<Value>::type
>::value),
NOT_VALID_INDEXABLE_TYPE,
(Value)
@@ -60,7 +60,7 @@
{
BOOST_MPL_ASSERT_MSG(
(!detail::indexable_not_found_error<
- typename traits::indexable_type<Indexable>::type
+ typename index::detail::traits::indexable_type<Indexable>::type
>::value),
NOT_VALID_INDEXABLE_TYPE,
(Indexable)
@@ -128,7 +128,7 @@
BOOST_MPL_ASSERT_MSG(
(!detail::indexable_not_found_error<
- typename traits::indexable_type<Indexable>::type
+ typename index::detail::traits::indexable_type<Indexable>::type
>::value),
NOT_VALID_INDEXABLE_TYPE,
(Indexable)
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/helpers.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/helpers.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/translator/helpers.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -21,7 +21,7 @@
#include <boost/geometry/algorithms/equals.hpp>
-#include <boost/geometry/extensions/index/indexable.hpp>
+#include <boost/geometry/extensions/index/detail/indexable.hpp>
namespace boost { namespace geometry { namespace index { namespace translator {
@@ -88,8 +88,8 @@
{
typedef typename dispatch::choose_pair_element<
std::pair<First, Second>,
- typename traits::indexable_type<First>::type,
- typename traits::indexable_type<Second>::type
+ typename index::detail::traits::indexable_type<First>::type,
+ typename index::detail::traits::indexable_type<Second>::type
> cp;
typedef typename cp::type type;
Modified: sandbox-branches/geometry/index/test/rtree/test_rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/test_rtree.hpp (original)
+++ sandbox-branches/geometry/index/test/rtree/test_rtree.hpp 2013-01-18 16:18:32 EST (Fri, 18 Jan 2013)
@@ -477,7 +477,7 @@
typedef typename Rtree::value_type V;
typedef typename Rtree::indexable_type I;
- return generate_value_outside_impl<V, bgi::traits::dimension<I>::value>::apply();
+ return generate_value_outside_impl<V, bgi::detail::traits::dimension<I>::value>::apply();
}
template<typename Value, typename Algo, typename Box>
@@ -489,7 +489,7 @@
typedef typename T::indexable_type I;
generate_input<
- bgi::traits::dimension<I>::value
+ bgi::detail::traits::dimension<I>::value
>::apply(input, qbox);
tree.insert(input.begin(), input.end());
@@ -670,7 +670,7 @@
void test_overlaps(bgi::rtree<Value, Algo> const& tree, std::vector<Value> const& input, Box const& qbox)
{
test_overlap_impl<
- typename bgi::traits::tag<
+ typename bgi::detail::traits::tag<
typename bgi::rtree<Value, Algo>::indexable_type
>::type
>::apply(tree, input, qbox);
@@ -1171,7 +1171,7 @@
//test_touches(tree, input, qbox);
test_within(tree, input, qbox);
- typedef typename bgi::traits::point_type<B>::type P;
+ typedef typename bgi::detail::traits::point_type<B>::type P;
P pt;
bg::centroid(qbox, pt);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk