|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80965 - in trunk/boost/geometry: algorithms algorithms/detail/overlay multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-10-11 18:54:50
Author: bruno.lalande
Date: 2012-10-11 18:54:47 EDT (Thu, 11 Oct 2012)
New Revision: 80965
URL: http://svn.boost.org/trac/boost/changeset/80965
Log:
Defaulted various template parameters in dispatch::intersection_insert.
Text files modified:
trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp | 179 ++++++++++++++++++---------------------
trunk/boost/geometry/algorithms/difference.hpp | 13 --
trunk/boost/geometry/algorithms/intersection.hpp | 10 --
trunk/boost/geometry/algorithms/sym_difference.hpp | 25 +----
trunk/boost/geometry/multi/algorithms/intersection.hpp | 96 ++++++++++----------
5 files changed, 141 insertions(+), 182 deletions(-)
Modified: trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp 2012-10-11 18:54:47 EDT (Thu, 11 Oct 2012)
@@ -223,16 +223,22 @@
template
<
- // tag dispatching:
- typename TagIn1, typename TagIn2, typename TagOut,
- // orientation
- // metafunction finetuning helpers:
- bool Areal1, bool Areal2, bool ArealOut,
// real types
typename Geometry1, typename Geometry2,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ // orientation
+ bool Reverse1 = detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
+ bool Reverse2 = detail::overlay::do_reverse<geometry::point_order<Geometry2>::value>::value,
+ bool ReverseOut = detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
+ // tag dispatching:
+ typename TagIn1 = typename geometry::tag<Geometry1>::type,
+ typename TagIn2 = typename geometry::tag<Geometry2>::type,
+ typename TagOut = typename geometry::tag<GeometryOut>::type,
+ // metafunction finetuning helpers:
+ bool Areal1 = geometry::is_areal<Geometry1>::value,
+ bool Areal2 = geometry::is_areal<Geometry2>::value,
+ bool ArealOut = geometry::is_areal<GeometryOut>::value
>
struct intersection_insert
{
@@ -246,20 +252,20 @@
template
<
- typename TagIn1, typename TagIn2, typename TagOut,
typename Geometry1, typename Geometry2,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut,
+ typename TagIn1, typename TagIn2, typename TagOut
>
struct intersection_insert
<
- TagIn1, TagIn2, TagOut,
- true, true, true,
Geometry1, Geometry2,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ TagIn1, TagIn2, TagOut,
+ true, true, true
> : detail::overlay::overlay
<Geometry1, Geometry2, Reverse1, Reverse2, ReverseOut, GeometryOut, OverlayType>
{};
@@ -268,20 +274,20 @@
// Any areal type with box:
template
<
- typename TagIn, typename TagOut,
typename Geometry, typename Box,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut,
+ typename TagIn, typename TagOut
>
struct intersection_insert
<
- TagIn, box_tag, TagOut,
- true, true, true,
Geometry, Box,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ TagIn, box_tag, TagOut,
+ true, true, true
> : detail::overlay::overlay
<Geometry, Box, Reverse1, Reverse2, ReverseOut, GeometryOut, OverlayType>
{};
@@ -290,18 +296,18 @@
template
<
typename Segment1, typename Segment2,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert
<
- segment_tag, segment_tag, point_tag,
- false, false, false,
Segment1, Segment2,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ segment_tag, segment_tag, point_tag,
+ false, false, false
> : detail::intersection::intersection_segment_segment_point<GeometryOut>
{};
@@ -309,18 +315,18 @@
template
<
typename Linestring1, typename Linestring2,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert
<
- linestring_tag, linestring_tag, point_tag,
- false, false, false,
Linestring1, Linestring2,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ linestring_tag, linestring_tag, point_tag,
+ false, false, false
> : detail::intersection::intersection_linestring_linestring_point<GeometryOut>
{};
@@ -328,18 +334,18 @@
template
<
typename Linestring, typename Box,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert
<
- linestring_tag, box_tag, linestring_tag,
- false, true, false,
Linestring, Box,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ linestring_tag, box_tag, linestring_tag,
+ false, true, false
>
{
template <typename OutputIterator, typename Strategy>
@@ -357,18 +363,18 @@
template
<
typename Linestring, typename Polygon,
- bool ReverseLinestring, bool ReversePolygon, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool ReverseLinestring, bool ReversePolygon, bool ReverseOut
>
struct intersection_insert
<
- linestring_tag, polygon_tag, linestring_tag,
- false, true, false,
Linestring, Polygon,
- ReverseLinestring, ReversePolygon, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ ReverseLinestring, ReversePolygon, ReverseOut,
+ linestring_tag, polygon_tag, linestring_tag,
+ false, true, false
> : detail::intersection::intersection_of_linestring_with_areal
<
ReversePolygon,
@@ -381,18 +387,18 @@
template
<
typename Linestring, typename Ring,
- bool ReverseLinestring, bool ReverseRing, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool ReverseLinestring, bool ReverseRing, bool ReverseOut
>
struct intersection_insert
<
- linestring_tag, ring_tag, linestring_tag,
- false, true, false,
Linestring, Ring,
- ReverseLinestring, ReverseRing, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ ReverseLinestring, ReverseRing, ReverseOut,
+ linestring_tag, ring_tag, linestring_tag,
+ false, true, false
> : detail::intersection::intersection_of_linestring_with_areal
<
ReverseRing,
@@ -404,18 +410,18 @@
template
<
typename Segment, typename Box,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert
<
- segment_tag, box_tag, linestring_tag,
- false, true, false,
Segment, Box,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ segment_tag, box_tag, linestring_tag,
+ false, true, false
>
{
template <typename OutputIterator, typename Strategy>
@@ -433,21 +439,21 @@
template
<
- typename Tag1, typename Tag2,
- bool Areal1, bool Areal2,
typename Geometry1, typename Geometry2,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename PointOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut,
+ typename Tag1, typename Tag2,
+ bool Areal1, bool Areal2
>
struct intersection_insert
<
- Tag1, Tag2, point_tag,
- Areal1, Areal2, false,
Geometry1, Geometry2,
- Reverse1, Reverse2, ReverseOut,
PointOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ Tag1, Tag2, point_tag,
+ Areal1, Areal2, false
>
{
template <typename OutputIterator, typename Strategy>
@@ -476,12 +482,9 @@
template
<
- typename GeometryTag1, typename GeometryTag2, typename GeometryTag3,
- bool Areal1, bool Areal2, bool ArealOut,
- typename Geometry1, typename Geometry2,
- bool Reverse1, bool Reverse2, bool ReverseOut,
- typename GeometryOut,
- overlay_type OverlayType
+ typename Geometry1, typename Geometry2, typename GeometryOut,
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert_reversed
{
@@ -492,12 +495,9 @@
{
return intersection_insert
<
- GeometryTag2, GeometryTag1, GeometryTag3,
- Areal2, Areal1, ArealOut,
- Geometry2, Geometry1,
- Reverse2, Reverse1, ReverseOut,
- GeometryOut,
- OverlayType
+ Geometry2, Geometry1, GeometryOut,
+ OverlayType,
+ Reverse2, Reverse1, ReverseOut
>::apply(g2, g1, out, strategy);
}
};
@@ -532,33 +532,20 @@
geometry::reverse_dispatch<Geometry1, Geometry2>::type::value,
geometry::dispatch::intersection_insert_reversed
<
- typename geometry::tag<Geometry1>::type,
- typename geometry::tag<Geometry2>::type,
- typename geometry::tag<GeometryOut>::type,
- geometry::is_areal<Geometry1>::value,
- geometry::is_areal<Geometry2>::value,
- geometry::is_areal<GeometryOut>::value,
Geometry1, Geometry2,
+ GeometryOut,
+ OverlayType,
overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value,
- overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
- GeometryOut,
- OverlayType
+ overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value
>,
geometry::dispatch::intersection_insert
<
- typename geometry::tag<Geometry1>::type,
- typename geometry::tag<Geometry2>::type,
- typename geometry::tag<GeometryOut>::type,
- geometry::is_areal<Geometry1>::value,
- geometry::is_areal<Geometry2>::value,
- geometry::is_areal<GeometryOut>::value,
Geometry1, Geometry2,
- geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
- geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value,
- geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
GeometryOut,
- OverlayType
+ OverlayType,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value
>
>::type::apply(geometry1, geometry2, out, strategy);
}
Modified: trunk/boost/geometry/algorithms/difference.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/difference.hpp (original)
+++ trunk/boost/geometry/algorithms/difference.hpp 2012-10-11 18:54:47 EDT (Thu, 11 Oct 2012)
@@ -56,18 +56,11 @@
return geometry::dispatch::intersection_insert
<
- typename geometry::tag<Geometry1>::type,
- typename geometry::tag<Geometry2>::type,
- typename geometry::tag<GeometryOut>::type,
- geometry::is_areal<Geometry1>::value,
- geometry::is_areal<Geometry2>::value,
- geometry::is_areal<GeometryOut>::value,
Geometry1, Geometry2,
- geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
- geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value,
- geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
GeometryOut,
- overlay_difference
+ overlay_difference,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value
>::apply(geometry1, geometry2, out, strategy);
}
Modified: trunk/boost/geometry/algorithms/intersection.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/intersection.hpp (original)
+++ trunk/boost/geometry/algorithms/intersection.hpp 2012-10-11 18:54:47 EDT (Thu, 11 Oct 2012)
@@ -98,15 +98,7 @@
intersection_insert
<
- Tag1, Tag2, typename geometry::tag<OneOut>::type,
- geometry::is_areal<Geometry1>::value,
- geometry::is_areal<Geometry2>::value,
- geometry::is_areal<OneOut>::value,
- Geometry1, Geometry2,
- detail::overlay::do_reverse<geometry::point_order<Geometry1>::value, false>::value,
- detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, false>::value,
- detail::overlay::do_reverse<geometry::point_order<OneOut>::value>::value,
- OneOut,
+ Geometry1, Geometry2, OneOut,
overlay_intersection
>::apply(geometry1, geometry2, std::back_inserter(geometry_out), strategy);
Modified: trunk/boost/geometry/algorithms/sym_difference.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/sym_difference.hpp (original)
+++ trunk/boost/geometry/algorithms/sym_difference.hpp 2012-10-11 18:54:47 EDT (Thu, 11 Oct 2012)
@@ -59,33 +59,20 @@
out = geometry::dispatch::intersection_insert
<
- typename geometry::tag<Geometry1>::type,
- typename geometry::tag<Geometry2>::type,
- typename geometry::tag<GeometryOut>::type,
- geometry::is_areal<Geometry1>::value,
- geometry::is_areal<Geometry2>::value,
- geometry::is_areal<GeometryOut>::value,
Geometry1, Geometry2,
- geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
- geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value,
- geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
GeometryOut,
- overlay_difference
+ overlay_difference,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value
>::apply(geometry1, geometry2, out, strategy);
out = geometry::dispatch::intersection_insert
<
- typename geometry::tag<Geometry2>::type,
- typename geometry::tag<Geometry1>::type,
- typename geometry::tag<GeometryOut>::type,
- geometry::is_areal<Geometry2>::value,
- geometry::is_areal<Geometry1>::value,
- geometry::is_areal<GeometryOut>::value,
Geometry2, Geometry1,
+ GeometryOut,
+ overlay_difference,
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value>::value,
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value, true>::value,
- geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
- GeometryOut,
- overlay_difference
+ geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value
>::apply(geometry2, geometry1, out, strategy);
return out;
}
Modified: trunk/boost/geometry/multi/algorithms/intersection.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/intersection.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/intersection.hpp 2012-10-11 18:54:47 EDT (Thu, 11 Oct 2012)
@@ -204,18 +204,18 @@
template
<
typename MultiLinestring1, typename MultiLinestring2,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert
<
- multi_linestring_tag, multi_linestring_tag, point_tag,
- false, false, false,
MultiLinestring1, MultiLinestring2,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ multi_linestring_tag, multi_linestring_tag, point_tag,
+ false, false, false
> : detail::intersection::intersection_multi_linestring_multi_linestring_point
<
GeometryOut
@@ -227,17 +227,17 @@
<
typename Linestring, typename MultiLinestring,
typename GeometryOut,
- bool Reverse1, bool Reverse2, bool ReverseOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert
<
- linestring_tag, multi_linestring_tag, point_tag,
- false, false, false,
Linestring, MultiLinestring,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ linestring_tag, multi_linestring_tag, point_tag,
+ false, false, false
> : detail::intersection::intersection_linestring_multi_linestring_point
<
GeometryOut
@@ -248,18 +248,18 @@
template
<
typename MultiLinestring, typename Box,
- bool Reverse1, bool Reverse2, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool Reverse1, bool Reverse2, bool ReverseOut
>
struct intersection_insert
<
- multi_linestring_tag, box_tag, linestring_tag,
- false, true, false,
MultiLinestring, Box,
- Reverse1, Reverse2, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ Reverse1, Reverse2, ReverseOut,
+ multi_linestring_tag, box_tag, linestring_tag,
+ false, true, false
> : detail::intersection::clip_multi_linestring
<
GeometryOut
@@ -270,18 +270,18 @@
template
<
typename Linestring, typename MultiPolygon,
- bool ReverseLinestring, bool ReverseMultiPolygon, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool ReverseLinestring, bool ReverseMultiPolygon, bool ReverseOut
>
struct intersection_insert
<
- linestring_tag, multi_polygon_tag, linestring_tag,
- false, true, false,
Linestring, MultiPolygon,
- ReverseLinestring, ReverseMultiPolygon, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ ReverseLinestring, ReverseMultiPolygon, ReverseOut,
+ linestring_tag, multi_polygon_tag, linestring_tag,
+ false, true, false
> : detail::intersection::intersection_of_linestring_with_areal
<
ReverseMultiPolygon,
@@ -296,18 +296,18 @@
template
<
typename Polygon, typename MultiLinestring,
- bool ReversePolygon, bool ReverseMultiLinestring, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool ReversePolygon, bool ReverseMultiLinestring, bool ReverseOut
>
struct intersection_insert
<
- polygon_tag, multi_linestring_tag, linestring_tag,
- true, false, false,
Polygon, MultiLinestring,
- ReversePolygon, ReverseMultiLinestring, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ ReversePolygon, ReverseMultiLinestring, ReverseOut,
+ polygon_tag, multi_linestring_tag, linestring_tag,
+ true, false, false
> : detail::intersection::intersection_of_areal_with_multi_linestring
<
ReversePolygon,
@@ -320,18 +320,18 @@
template
<
typename MultiLinestring, typename Ring,
- bool ReverseMultiLinestring, bool ReverseRing, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool ReverseMultiLinestring, bool ReverseRing, bool ReverseOut
>
struct intersection_insert
<
- multi_linestring_tag, ring_tag, linestring_tag,
- false, true, false,
MultiLinestring, Ring,
- ReverseMultiLinestring, ReverseRing, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ ReverseMultiLinestring, ReverseRing, ReverseOut,
+ multi_linestring_tag, ring_tag, linestring_tag,
+ false, true, false
> : detail::intersection::intersection_of_multi_linestring_with_areal
<
ReverseRing,
@@ -343,18 +343,18 @@
template
<
typename MultiLinestring, typename Polygon,
- bool ReverseMultiLinestring, bool ReverseRing, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool ReverseMultiLinestring, bool ReverseRing, bool ReverseOut
>
struct intersection_insert
<
- multi_linestring_tag, polygon_tag, linestring_tag,
- false, true, false,
MultiLinestring, Polygon,
- ReverseMultiLinestring, ReverseRing, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ ReverseMultiLinestring, ReverseRing, ReverseOut,
+ multi_linestring_tag, polygon_tag, linestring_tag,
+ false, true, false
> : detail::intersection::intersection_of_multi_linestring_with_areal
<
ReverseRing,
@@ -368,18 +368,18 @@
template
<
typename MultiLinestring, typename MultiPolygon,
- bool ReverseMultiLinestring, bool ReverseMultiPolygon, bool ReverseOut,
typename GeometryOut,
- overlay_type OverlayType
+ overlay_type OverlayType,
+ bool ReverseMultiLinestring, bool ReverseMultiPolygon, bool ReverseOut
>
struct intersection_insert
<
- multi_linestring_tag, multi_polygon_tag, linestring_tag,
- false, true, false,
MultiLinestring, MultiPolygon,
- ReverseMultiLinestring, ReverseMultiPolygon, ReverseOut,
GeometryOut,
- OverlayType
+ OverlayType,
+ ReverseMultiLinestring, ReverseMultiPolygon, ReverseOut,
+ multi_linestring_tag, multi_polygon_tag, linestring_tag,
+ false, true, false
> : detail::intersection::intersection_of_multi_linestring_with_areal
<
ReverseMultiPolygon,
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