|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82023 - in branches/release: boost/geometry boost/geometry/algorithms boost/geometry/arithmetic boost/geometry/core boost/geometry/geometries boost/geometry/io boost/geometry/io/dsv boost/geometry/iterators boost/geometry/multi boost/geometry/multi/algorithms boost/geometry/policies boost/geometry/strategies boost/geometry/util boost/geometry/views libs/geometry/doc libs/geometry/doc/concept libs/geometry/doc/doxy libs/geometry/doc/generated libs/geometry/doc/html libs/geometry/doc/reference libs/geometry/doc/src libs/geometry/example libs/geometry/test
From: barend.gehrels_at_[hidden]
Date: 2012-12-16 11:08:34
Author: barendgehrels
Date: 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
New Revision: 82023
URL: http://svn.boost.org/trac/boost/changeset/82023
Log:
[geometry] merged revisions r78001:r78851 which were not yet merged earlier
Added:
branches/release/libs/geometry/doc/generated/disjoint_status.qbk
- copied unchanged from r78851, /trunk/libs/geometry/doc/generated/disjoint_status.qbk
branches/release/libs/geometry/doc/generated/envelope_status.qbk
- copied unchanged from r78851, /trunk/libs/geometry/doc/generated/envelope_status.qbk
branches/release/libs/geometry/doc/generated/expand_status.qbk
- copied unchanged from r78851, /trunk/libs/geometry/doc/generated/expand_status.qbk
branches/release/libs/geometry/doc/generated/overlaps_status.qbk
- copied unchanged from r78851, /trunk/libs/geometry/doc/generated/overlaps_status.qbk
Properties modified:
branches/release/boost/geometry/algorithms/ (props changed)
branches/release/boost/geometry/arithmetic/ (props changed)
branches/release/boost/geometry/core/ (props changed)
branches/release/boost/geometry/geometries/ (props changed)
branches/release/boost/geometry/geometry.hpp (props changed)
branches/release/boost/geometry/io/ (props changed)
branches/release/boost/geometry/io/dsv/ (props changed)
branches/release/boost/geometry/iterators/ (props changed)
branches/release/boost/geometry/multi/ (props changed)
branches/release/boost/geometry/policies/ (props changed)
branches/release/boost/geometry/strategies/ (props changed)
branches/release/boost/geometry/util/ (props changed)
branches/release/boost/geometry/views/ (props changed)
branches/release/libs/geometry/doc/ (props changed)
branches/release/libs/geometry/doc/about_documentation.qbk (props changed)
branches/release/libs/geometry/doc/acknowledgments.qbk (props changed)
branches/release/libs/geometry/doc/compiling.qbk (props changed)
branches/release/libs/geometry/doc/concept/ (props changed)
branches/release/libs/geometry/doc/copyright_note_policy.txt (props changed)
branches/release/libs/geometry/doc/design_rationale.qbk (props changed)
branches/release/libs/geometry/doc/doxy/ (props changed)
branches/release/libs/geometry/doc/generated/ (props changed)
branches/release/libs/geometry/doc/geometry.qbk (props changed)
branches/release/libs/geometry/doc/html/ (props changed)
branches/release/libs/geometry/doc/imports.qbk (props changed)
branches/release/libs/geometry/doc/introduction.qbk (props changed)
branches/release/libs/geometry/doc/make_qbk.py (props changed)
branches/release/libs/geometry/doc/matrix.qbk (props changed)
branches/release/libs/geometry/doc/quickref.xml (props changed)
branches/release/libs/geometry/doc/quickstart.qbk (props changed)
branches/release/libs/geometry/doc/readme.txt (props changed)
branches/release/libs/geometry/doc/reference/ (props changed)
branches/release/libs/geometry/doc/reference.qbk (props changed)
branches/release/libs/geometry/doc/release_notes.qbk (props changed)
branches/release/libs/geometry/doc/src/ (props changed)
branches/release/libs/geometry/example/ (props changed)
branches/release/libs/geometry/test/ (props changed)
Text files modified:
branches/release/boost/geometry/algorithms/envelope.hpp | 136 +++++++--------------------------
branches/release/boost/geometry/algorithms/equals.hpp | 159 +++++++++++++++------------------------
branches/release/boost/geometry/algorithms/expand.hpp | 107 +++++++++++---------------
branches/release/boost/geometry/algorithms/overlaps.hpp | 44 +++-------
branches/release/boost/geometry/multi/algorithms/envelope.hpp | 34 ++-----
branches/release/boost/geometry/multi/algorithms/equals.hpp | 26 ++----
branches/release/libs/geometry/doc/generated/equals_status.qbk | 17 ++-
7 files changed, 177 insertions(+), 346 deletions(-)
Modified: branches/release/boost/geometry/algorithms/envelope.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/envelope.hpp (original)
+++ branches/release/boost/geometry/algorithms/envelope.hpp 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
@@ -14,13 +14,13 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_ENVELOPE_HPP
#define BOOST_GEOMETRY_ALGORITHMS_ENVELOPE_HPP
-#include <boost/mpl/assert.hpp>
#include <boost/range.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/expand.hpp>
+#include <boost/geometry/algorithms/not_implemented.hpp>
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
@@ -35,9 +35,9 @@
/// Calculate envelope of an 2D or 3D segment
-template<typename Geometry, typename Box>
struct envelope_expand_one
{
+ template<typename Geometry, typename Box>
static inline void apply(Geometry const& geometry, Box& mbr)
{
assign_inverse(mbr);
@@ -63,10 +63,10 @@
/// Generic range dispatching struct
-template <typename Range, typename Box>
struct envelope_range
{
/// Calculate envelope of range using a strategy
+ template <typename Range, typename Box>
static inline void apply(Range const& range, Box& mbr)
{
assign_inverse(mbr);
@@ -82,122 +82,54 @@
{
-// Note, the strategy is for future use (less/greater -> compare spherical
-// using other methods), defaults are OK for now.
-// However, they are already in the template methods
-
template
<
- typename Tag1, typename Tag2,
- typename Geometry, typename Box,
- typename StrategyLess, typename StrategyGreater
+ typename Geometry,
+ typename Tag = typename tag<Geometry>::type
>
-struct envelope
-{
- BOOST_MPL_ASSERT_MSG
- (
- false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
- , (types<Geometry>)
- );
-};
+struct envelope: not_implemented<Tag>
+{};
-template
-<
- typename Point, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope
- <
- point_tag, box_tag,
- Point, Box,
- StrategyLess, StrategyGreater
- >
- : detail::envelope::envelope_expand_one<Point, Box>
+template <typename Point>
+struct envelope<Point, point_tag>
+ : detail::envelope::envelope_expand_one
{};
-template
-<
- typename BoxIn, typename BoxOut,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope
- <
- box_tag, box_tag,
- BoxIn, BoxOut,
- StrategyLess, StrategyGreater
- >
- : detail::envelope::envelope_expand_one<BoxIn, BoxOut>
+template <typename Box>
+struct envelope<Box, box_tag>
+ : detail::envelope::envelope_expand_one
{};
-template
-<
- typename Segment, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope
- <
- segment_tag, box_tag,
- Segment, Box,
- StrategyLess, StrategyGreater
- >
- : detail::envelope::envelope_expand_one<Segment, Box>
+template <typename Segment>
+struct envelope<Segment, segment_tag>
+ : detail::envelope::envelope_expand_one
{};
-template
-<
- typename Linestring, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope
- <
- linestring_tag, box_tag,
- Linestring, Box,
- StrategyLess, StrategyGreater
- >
- : detail::envelope::envelope_range<Linestring, Box>
+template <typename Linestring>
+struct envelope<Linestring, linestring_tag>
+ : detail::envelope::envelope_range
{};
-template
-<
- typename Ring, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope
- <
- ring_tag, box_tag,
- Ring, Box,
- StrategyLess, StrategyGreater
- >
- : detail::envelope::envelope_range<Ring, Box>
+template <typename Ring>
+struct envelope<Ring, ring_tag>
+ : detail::envelope::envelope_range
{};
-template
-<
- typename Polygon, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope
- <
- polygon_tag, box_tag,
- Polygon, Box,
- StrategyLess, StrategyGreater
- >
+template <typename Polygon>
+struct envelope<Polygon, polygon_tag>
+ : detail::envelope::envelope_range
{
+ template <typename Box>
static inline void apply(Polygon const& poly, Box& mbr)
{
// For polygon, inspecting outer ring is sufficient
-
- detail::envelope::envelope_range
- <
- typename ring_type<Polygon>::type,
- Box
- >::apply(exterior_ring(poly), mbr);
+ detail::envelope::envelope_range::apply(exterior_ring(poly), mbr);
}
};
@@ -228,12 +160,7 @@
concept::check<Geometry const>();
concept::check<Box>();
- dispatch::envelope
- <
- typename tag<Geometry>::type, typename tag<Box>::type,
- Geometry, Box,
- void, void
- >::apply(geometry, mbr);
+ dispatch::envelope<Geometry>::apply(geometry, mbr);
}
@@ -259,12 +186,7 @@
concept::check<Box>();
Box mbr;
- dispatch::envelope
- <
- typename tag<Geometry>::type, typename tag<Box>::type,
- Geometry, Box,
- void, void
- >::apply(geometry, mbr);
+ dispatch::envelope<Geometry>::apply(geometry, mbr);
return mbr;
}
Modified: branches/release/boost/geometry/algorithms/equals.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/equals.hpp (original)
+++ branches/release/boost/geometry/algorithms/equals.hpp 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
@@ -18,8 +18,6 @@
#include <cstddef>
#include <vector>
-#include <boost/mpl/if.hpp>
-#include <boost/static_assert.hpp>
#include <boost/range.hpp>
#include <boost/geometry/core/access.hpp>
@@ -30,6 +28,7 @@
#include <boost/geometry/algorithms/detail/disjoint.hpp>
#include <boost/geometry/algorithms/detail/not.hpp>
+#include <boost/geometry/algorithms/not_implemented.hpp>
// For trivial checks
#include <boost/geometry/algorithms/area.hpp>
@@ -51,13 +50,12 @@
template
<
- typename Box1,
- typename Box2,
std::size_t Dimension,
std::size_t DimensionCount
>
struct box_box
{
+ template <typename Box1, typename Box2>
static inline bool apply(Box1 const& box1, Box2 const& box2)
{
if (!geometry::math::equals(get<min_corner, Dimension>(box1), get<min_corner, Dimension>(box2))
@@ -65,13 +63,14 @@
{
return false;
}
- return box_box<Box1, Box2, Dimension + 1, DimensionCount>::apply(box1, box2);
+ return box_box<Dimension + 1, DimensionCount>::apply(box1, box2);
}
};
-template <typename Box1, typename Box2, std::size_t DimensionCount>
-struct box_box<Box1, Box2, DimensionCount, DimensionCount>
+template <std::size_t DimensionCount>
+struct box_box<DimensionCount, DimensionCount>
{
+ template <typename Box1, typename Box2>
static inline bool apply(Box1 const& , Box2 const& )
{
return true;
@@ -103,9 +102,10 @@
};
-template <typename Geometry1, typename Geometry2, typename TrivialCheck>
+template <typename TrivialCheck>
struct equals_by_collection
{
+ template <typename Geometry1, typename Geometry2>
static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2)
{
if (! TrivialCheck::apply(geometry1, geometry2))
@@ -152,17 +152,42 @@
template
<
- typename Tag1, typename Tag2,
typename Geometry1,
typename Geometry2,
- std::size_t DimensionCount
+ typename Tag1 = typename tag<Geometry1>::type,
+ typename Tag2 = typename tag<Geometry2>::type,
+ std::size_t DimensionCount = dimension<Geometry1>::type::value,
+ bool Reverse = reverse_dispatch<Geometry1, Geometry2>::type::value
>
-struct equals
+struct equals: not_implemented<Tag1, Tag2>
{};
-template <typename P1, typename P2, std::size_t DimensionCount>
-struct equals<point_tag, point_tag, P1, P2, DimensionCount>
+// If reversal is needed, perform it
+template
+<
+ typename Geometry1, typename Geometry2,
+ typename Tag1, typename Tag2,
+ std::size_t DimensionCount
+>
+struct equals<Geometry1, Geometry2, Tag1, Tag2, DimensionCount, true>
+ : equals<Geometry2, Geometry1, Tag2, Tag1, DimensionCount, false>
+{
+ static inline bool apply(Geometry1 const& g1, Geometry2 const& g2)
+ {
+ return equals
+ <
+ Geometry2, Geometry1,
+ Tag2, Tag1,
+ DimensionCount,
+ false
+ >::apply(g2, g1);
+ }
+};
+
+
+template <typename P1, typename P2, std::size_t DimensionCount, bool Reverse>
+struct equals<P1, P2, point_tag, point_tag, DimensionCount, Reverse>
: geometry::detail::not_
<
P1,
@@ -172,93 +197,48 @@
{};
-template <typename Box1, typename Box2, std::size_t DimensionCount>
-struct equals<box_tag, box_tag, Box1, Box2, DimensionCount>
- : detail::equals::box_box<Box1, Box2, 0, DimensionCount>
+template <typename Box1, typename Box2, std::size_t DimensionCount, bool Reverse>
+struct equals<Box1, Box2, box_tag, box_tag, DimensionCount, Reverse>
+ : detail::equals::box_box<0, DimensionCount>
{};
-template <typename Ring1, typename Ring2>
-struct equals<ring_tag, ring_tag, Ring1, Ring2, 2>
- : detail::equals::equals_by_collection
- <
- Ring1, Ring2,
- detail::equals::area_check
- >
+template <typename Ring1, typename Ring2, bool Reverse>
+struct equals<Ring1, Ring2, ring_tag, ring_tag, 2, Reverse>
+ : detail::equals::equals_by_collection<detail::equals::area_check>
{};
-template <typename Polygon1, typename Polygon2>
-struct equals<polygon_tag, polygon_tag, Polygon1, Polygon2, 2>
- : detail::equals::equals_by_collection
- <
- Polygon1, Polygon2,
- detail::equals::area_check
- >
+template <typename Polygon1, typename Polygon2, bool Reverse>
+struct equals<Polygon1, Polygon2, polygon_tag, polygon_tag, 2, Reverse>
+ : detail::equals::equals_by_collection<detail::equals::area_check>
{};
-template <typename LineString1, typename LineString2>
-struct equals<linestring_tag, linestring_tag, LineString1, LineString2, 2>
- : detail::equals::equals_by_collection
- <
- LineString1, LineString2,
- detail::equals::length_check
- >
+template <typename LineString1, typename LineString2, bool Reverse>
+struct equals<LineString1, LineString2, linestring_tag, linestring_tag, 2, Reverse>
+ : detail::equals::equals_by_collection<detail::equals::length_check>
{};
-template <typename Polygon, typename Ring>
-struct equals<polygon_tag, ring_tag, Polygon, Ring, 2>
- : detail::equals::equals_by_collection
- <
- Polygon, Ring,
- detail::equals::area_check
- >
+template <typename Polygon, typename Ring, bool Reverse>
+struct equals<Polygon, Ring, polygon_tag, ring_tag, 2, Reverse>
+ : detail::equals::equals_by_collection<detail::equals::area_check>
{};
-template <typename Ring, typename Box>
-struct equals<ring_tag, box_tag, Ring, Box, 2>
- : detail::equals::equals_by_collection
- <
- Ring, Box,
- detail::equals::area_check
- >
+template <typename Ring, typename Box, bool Reverse>
+struct equals<Ring, Box, ring_tag, box_tag, 2, Reverse>
+ : detail::equals::equals_by_collection<detail::equals::area_check>
{};
-template <typename Polygon, typename Box>
-struct equals<polygon_tag, box_tag, Polygon, Box, 2>
- : detail::equals::equals_by_collection
- <
- Polygon, Box,
- detail::equals::area_check
- >
+template <typename Polygon, typename Box, bool Reverse>
+struct equals<Polygon, Box, polygon_tag, box_tag, 2, Reverse>
+ : detail::equals::equals_by_collection<detail::equals::area_check>
{};
-template
-<
- typename Tag1, typename Tag2,
- typename Geometry1,
- typename Geometry2,
- std::size_t DimensionCount
->
-struct equals_reversed
-{
- static inline bool apply(Geometry1 const& g1, Geometry2 const& g2)
- {
- return equals
- <
- Tag2, Tag1,
- Geometry2, Geometry1,
- DimensionCount
- >::apply(g2, g1);
- }
-};
-
-
} // namespace dispatch
#endif // DOXYGEN_NO_DISPATCH
@@ -289,26 +269,7 @@
Geometry2 const
>();
- return boost::mpl::if_c
- <
- reverse_dispatch<Geometry1, Geometry2>::type::value,
- dispatch::equals_reversed
- <
- typename tag<Geometry1>::type,
- typename tag<Geometry2>::type,
- Geometry1,
- Geometry2,
- dimension<Geometry1>::type::value
- >,
- dispatch::equals
- <
- typename tag<Geometry1>::type,
- typename tag<Geometry2>::type,
- Geometry1,
- Geometry2,
- dimension<Geometry1>::type::value
- >
- >::type::apply(geometry1, geometry2);
+ return dispatch::equals<Geometry1, Geometry2>::apply(geometry1, geometry2);
}
Modified: branches/release/boost/geometry/algorithms/expand.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/expand.hpp (original)
+++ branches/release/boost/geometry/algorithms/expand.hpp 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
@@ -19,6 +19,7 @@
#include <boost/numeric/conversion/cast.hpp>
+#include <boost/geometry/algorithms/not_implemented.hpp>
#include <boost/geometry/core/coordinate_dimension.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
@@ -38,26 +39,26 @@
template
<
- typename Box, typename Point,
typename StrategyLess, typename StrategyGreater,
std::size_t Dimension, std::size_t DimensionCount
>
struct point_loop
{
- typedef typename strategy::compare::detail::select_strategy
- <
- StrategyLess, 1, Point, Dimension
- >::type less_type;
+ template <typename Box, typename Point>
+ static inline void apply(Box& box, Point const& source)
+ {
+ typedef typename strategy::compare::detail::select_strategy
+ <
+ StrategyLess, 1, Point, Dimension
+ >::type less_type;
- typedef typename strategy::compare::detail::select_strategy
- <
- StrategyGreater, -1, Point, Dimension
- >::type greater_type;
+ typedef typename strategy::compare::detail::select_strategy
+ <
+ StrategyGreater, -1, Point, Dimension
+ >::type greater_type;
- typedef typename select_coordinate_type<Point, Box>::type coordinate_type;
+ typedef typename select_coordinate_type<Point, Box>::type coordinate_type;
- static inline void apply(Box& box, Point const& source)
- {
less_type less;
greater_type greater;
@@ -75,7 +76,6 @@
point_loop
<
- Box, Point,
StrategyLess, StrategyGreater,
Dimension + 1, DimensionCount
>::apply(box, source);
@@ -85,49 +85,47 @@
template
<
- typename Box, typename Point,
typename StrategyLess, typename StrategyGreater,
std::size_t DimensionCount
>
struct point_loop
<
- Box, Point,
StrategyLess, StrategyGreater,
DimensionCount, DimensionCount
>
{
+ template <typename Box, typename Point>
static inline void apply(Box&, Point const&) {}
};
template
<
- typename Box, typename Geometry,
typename StrategyLess, typename StrategyGreater,
std::size_t Index,
std::size_t Dimension, std::size_t DimensionCount
>
struct indexed_loop
{
- typedef typename strategy::compare::detail::select_strategy
- <
- StrategyLess, 1, Box, Dimension
- >::type less_type;
-
- typedef typename strategy::compare::detail::select_strategy
- <
- StrategyGreater, -1, Box, Dimension
- >::type greater_type;
+ template <typename Box, typename Geometry>
+ static inline void apply(Box& box, Geometry const& source)
+ {
+ typedef typename strategy::compare::detail::select_strategy
+ <
+ StrategyLess, 1, Box, Dimension
+ >::type less_type;
- typedef typename select_coordinate_type
+ typedef typename strategy::compare::detail::select_strategy
<
- Box,
- Geometry
- >::type coordinate_type;
+ StrategyGreater, -1, Box, Dimension
+ >::type greater_type;
+ typedef typename select_coordinate_type
+ <
+ Box,
+ Geometry
+ >::type coordinate_type;
- static inline void apply(Box& box, Geometry const& source)
- {
less_type less;
greater_type greater;
@@ -145,7 +143,6 @@
indexed_loop
<
- Box, Geometry,
StrategyLess, StrategyGreater,
Index, Dimension + 1, DimensionCount
>::apply(box, source);
@@ -155,17 +152,16 @@
template
<
- typename Box, typename Geometry,
typename StrategyLess, typename StrategyGreater,
std::size_t Index, std::size_t DimensionCount
>
struct indexed_loop
<
- Box, Geometry,
StrategyLess, StrategyGreater,
Index, DimensionCount, DimensionCount
>
{
+ template <typename Box, typename Geometry>
static inline void apply(Box&, Geometry const&) {}
};
@@ -174,23 +170,21 @@
// Changes a box such that the other box is also contained by the box
template
<
- typename Box, typename Geometry,
typename StrategyLess, typename StrategyGreater
>
struct expand_indexed
{
+ template <typename Box, typename Geometry>
static inline void apply(Box& box, Geometry const& geometry)
{
indexed_loop
<
- Box, Geometry,
StrategyLess, StrategyGreater,
0, 0, dimension<Geometry>::type::value
>::apply(box, geometry);
indexed_loop
<
- Box, Geometry,
StrategyLess, StrategyGreater,
1, 0, dimension<Geometry>::type::value
>::apply(box, geometry);
@@ -206,11 +200,13 @@
template
<
- typename Tag,
- typename BoxOut, typename Geometry,
- typename StrategyLess, typename StrategyGreater
+ typename GeometryOut, typename Geometry,
+ typename StrategyLess = strategy::compare::default_strategy,
+ typename StrategyGreater = strategy::compare::default_strategy,
+ typename TagOut = typename tag<GeometryOut>::type,
+ typename Tag = typename tag<Geometry>::type
>
-struct expand
+struct expand: not_implemented<TagOut, Tag>
{};
@@ -220,10 +216,9 @@
typename BoxOut, typename Point,
typename StrategyLess, typename StrategyGreater
>
-struct expand<point_tag, BoxOut, Point, StrategyLess, StrategyGreater>
+struct expand<BoxOut, Point, StrategyLess, StrategyGreater, box_tag, point_tag>
: detail::expand::point_loop
<
- BoxOut, Point,
StrategyLess, StrategyGreater,
0, dimension<Point>::type::value
>
@@ -236,9 +231,8 @@
typename BoxOut, typename BoxIn,
typename StrategyLess, typename StrategyGreater
>
-struct expand<box_tag, BoxOut, BoxIn, StrategyLess, StrategyGreater>
- : detail::expand::expand_indexed
- <BoxOut, BoxIn, StrategyLess, StrategyGreater>
+struct expand<BoxOut, BoxIn, StrategyLess, StrategyGreater, box_tag, box_tag>
+ : detail::expand::expand_indexed<StrategyLess, StrategyGreater>
{};
template
@@ -246,9 +240,8 @@
typename Box, typename Segment,
typename StrategyLess, typename StrategyGreater
>
-struct expand<segment_tag, Box, Segment, StrategyLess, StrategyGreater>
- : detail::expand::expand_indexed
- <Box, Segment, StrategyLess, StrategyGreater>
+struct expand<Box, Segment, StrategyLess, StrategyGreater, box_tag, segment_tag>
+ : detail::expand::expand_indexed<StrategyLess, StrategyGreater>
{};
@@ -279,13 +272,7 @@
{
concept::check_concepts_and_equal_dimensions<Box, Geometry const>();
- dispatch::expand
- <
- typename tag<Geometry>::type,
- Box,
- Geometry,
- StrategyLess, StrategyGreater
- >::apply(box, geometry);
+ dispatch::expand<Box, Geometry>::apply(box, geometry);
}
***/
@@ -305,13 +292,7 @@
{
concept::check_concepts_and_equal_dimensions<Box, Geometry const>();
- dispatch::expand
- <
- typename tag<Geometry>::type,
- Box, Geometry,
- strategy::compare::default_strategy,
- strategy::compare::default_strategy
- >::apply(box, geometry);
+ dispatch::expand<Box, Geometry>::apply(box, geometry);
}
}} // namespace boost::geometry
Modified: branches/release/boost/geometry/algorithms/overlaps.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/overlaps.hpp (original)
+++ branches/release/boost/geometry/algorithms/overlaps.hpp 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
@@ -17,10 +17,10 @@
#include <cstddef>
-#include <boost/mpl/assert.hpp>
-
#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/algorithms/not_implemented.hpp>
+
#include <boost/geometry/geometries/concepts/check.hpp>
namespace boost { namespace geometry
@@ -32,13 +32,12 @@
template
<
- typename Box1,
- typename Box2,
std::size_t Dimension,
std::size_t DimensionCount
>
struct box_box_loop
{
+ template <typename Box1, typename Box2>
static inline void apply(Box1 const& b1, Box2 const& b2,
bool& overlaps, bool& one_in_two, bool& two_in_one)
{
@@ -84,8 +83,6 @@
box_box_loop
<
- Box1,
- Box2,
Dimension + 1,
DimensionCount
>::apply(b1, b2, overlaps, one_in_two, two_in_one);
@@ -94,24 +91,19 @@
template
<
- typename Box1,
- typename Box2,
std::size_t DimensionCount
>
-struct box_box_loop<Box1, Box2, DimensionCount, DimensionCount>
+struct box_box_loop<DimensionCount, DimensionCount>
{
+ template <typename Box1, typename Box2>
static inline void apply(Box1 const& , Box2 const&, bool&, bool&, bool&)
{
}
};
-template
-<
- typename Box1,
- typename Box2
->
struct box_box
{
+ template <typename Box1, typename Box2>
static inline bool apply(Box1 const& b1, Box2 const& b2)
{
bool overlaps = true;
@@ -119,8 +111,6 @@
bool within2 = true;
box_box_loop
<
- Box1,
- Box2,
0,
dimension<Box1>::type::value
>::apply(b1, b2, overlaps, within1, within2);
@@ -148,24 +138,18 @@
template
<
- typename Tag1,
- typename Tag2,
typename Geometry1,
- typename Geometry2
+ typename Geometry2,
+ typename Tag1 = typename tag<Geometry1>::type,
+ typename Tag2 = typename tag<Geometry2>::type
>
-struct overlaps
-{
- BOOST_MPL_ASSERT_MSG
- (
- false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
- , (types<Geometry1, Geometry2>)
- );
-};
+struct overlaps: not_implemented<Tag1, Tag2>
+{};
template <typename Box1, typename Box2>
-struct overlaps<box_tag, box_tag, Box1, Box2>
- : detail::overlaps::box_box<Box1, Box2>
+struct overlaps<Box1, Box2, box_tag, box_tag>
+ : detail::overlaps::box_box
{};
@@ -190,8 +174,6 @@
return dispatch::overlaps
<
- typename tag<Geometry1>::type,
- typename tag<Geometry2>::type,
Geometry1,
Geometry2
>::apply(geometry1, geometry2);
Modified: branches/release/boost/geometry/multi/algorithms/envelope.hpp
==============================================================================
--- branches/release/boost/geometry/multi/algorithms/envelope.hpp (original)
+++ branches/release/boost/geometry/multi/algorithms/envelope.hpp 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
@@ -34,9 +34,9 @@
{
-template<typename MultiLinestring, typename Box>
struct envelope_multi_linestring
{
+ template<typename MultiLinestring, typename Box>
static inline void apply(MultiLinestring const& mp, Box& mbr)
{
assign_inverse(mbr);
@@ -52,9 +52,9 @@
// version for multi_polygon: outer ring's of all polygons
-template<typename MultiPolygon, typename Box>
struct envelope_multi_polygon
{
+ template<typename MultiPolygon, typename Box>
static inline void apply(MultiPolygon const& mp, Box& mbr)
{
assign_inverse(mbr);
@@ -78,32 +78,20 @@
namespace dispatch
{
-template
-<
- typename Multi, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope<multi_point_tag, box_tag, Multi, Box, StrategyLess, StrategyGreater>
- : detail::envelope::envelope_range<Multi, Box>
+template <typename Multi>
+struct envelope<Multi, multi_point_tag>
+ : detail::envelope::envelope_range
{};
-template
-<
- typename Multi, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope<multi_linestring_tag, box_tag, Multi, Box, StrategyLess, StrategyGreater>
- : detail::envelope::envelope_multi_linestring<Multi, Box>
+template <typename Multi>
+struct envelope<Multi, multi_linestring_tag>
+ : detail::envelope::envelope_multi_linestring
{};
-template
-<
- typename Multi, typename Box,
- typename StrategyLess, typename StrategyGreater
->
-struct envelope<multi_polygon_tag, box_tag, Multi, Box, StrategyLess, StrategyGreater>
- : detail::envelope::envelope_multi_polygon<Multi, Box>
+template <typename Multi>
+struct envelope<Multi, multi_polygon_tag>
+ : detail::envelope::envelope_multi_polygon
{};
Modified: branches/release/boost/geometry/multi/algorithms/equals.hpp
==============================================================================
--- branches/release/boost/geometry/multi/algorithms/equals.hpp (original)
+++ branches/release/boost/geometry/multi/algorithms/equals.hpp 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
@@ -29,33 +29,27 @@
{
-template <typename MultiPolygon1, typename MultiPolygon2>
+template <typename MultiPolygon1, typename MultiPolygon2, bool Reverse>
struct equals
<
- multi_polygon_tag, multi_polygon_tag,
MultiPolygon1, MultiPolygon2,
- 2
+ multi_polygon_tag, multi_polygon_tag,
+ 2,
+ Reverse
>
- : detail::equals::equals_by_collection
- <
- MultiPolygon1, MultiPolygon2,
- detail::equals::area_check
- >
+ : detail::equals::equals_by_collection<detail::equals::area_check>
{};
-template <typename Polygon, typename MultiPolygon>
+template <typename Polygon, typename MultiPolygon, bool Reverse>
struct equals
<
- polygon_tag, multi_polygon_tag,
Polygon, MultiPolygon,
- 2
+ polygon_tag, multi_polygon_tag,
+ 2,
+ Reverse
>
- : detail::equals::equals_by_collection
- <
- Polygon, MultiPolygon,
- detail::equals::area_check
- >
+ : detail::equals::equals_by_collection<detail::equals::area_check>
{};
Modified: branches/release/libs/geometry/doc/generated/equals_status.qbk
==============================================================================
--- branches/release/libs/geometry/doc/generated/equals_status.qbk (original)
+++ branches/release/libs/geometry/doc/generated/equals_status.qbk 2012-12-16 11:08:33 EST (Sun, 16 Dec 2012)
@@ -1,10 +1,13 @@
[heading Supported geometries]
[table
-[[ ][Point][Box][Linestring][Ring][Polygon][MultiPolygon]]
-[[Point][[$img/ok.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]]]
-[[Box][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]][[$img/nyi.png]]]
-[[Linestring][[$img/nyi.png]][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]]]
-[[Ring][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]][[$img/nyi.png]]]
-[[Polygon][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]][[$img/ok.png]]]
-[[MultiPolygon][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]]]
+[[ ][Point][Segment][Box][Linestring][Ring][Polygon][MultiPoint][MultiLinestring][MultiPolygon]]
+[[Point][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]]
+[[Segment][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]]
+[[Box][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]]
+[[Linestring][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]]
+[[Ring][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]]
+[[Polygon][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ]]
+[[MultiPoint][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]]
+[[MultiLinestring][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]]
+[[MultiPolygon][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ]]
]
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