Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73338 - in trunk/boost/polygon: . detail
From: lucanus.j.simonson_at_[hidden]
Date: 2011-07-24 19:18:13


Author: ljsimons
Date: 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
New Revision: 73338
URL: http://svn.boost.org/trac/boost/changeset/73338

Log:
syncing with internal version
Text files modified:
   trunk/boost/polygon/detail/boolean_op_45.hpp | 2 +-
   trunk/boost/polygon/detail/max_cover.hpp | 2 +-
   trunk/boost/polygon/detail/polygon_45_formation.hpp | 40 ++++++++++++++++++++--------------------
   trunk/boost/polygon/detail/polygon_45_set_view.hpp | 2 +-
   trunk/boost/polygon/detail/polygon_45_touch.hpp | 2 +-
   trunk/boost/polygon/detail/polygon_90_set_view.hpp | 2 +-
   trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp | 30 +++++++++++++++---------------
   trunk/boost/polygon/detail/polygon_sort_adaptor.hpp | 14 +++++++-------
   trunk/boost/polygon/detail/property_merge.hpp | 4 ++--
   trunk/boost/polygon/detail/property_merge_45.hpp | 2 +-
   trunk/boost/polygon/detail/scan_arbitrary.hpp | 26 +++++++++++++-------------
   trunk/boost/polygon/gmp_override.hpp | 1 -
   trunk/boost/polygon/interval_concept.hpp | 2 +-
   trunk/boost/polygon/isotropy.hpp | 9 +++++++++
   trunk/boost/polygon/polygon_45_set_data.hpp | 15 ++++++++-------
   trunk/boost/polygon/polygon_45_set_traits.hpp | 4 ++++
   trunk/boost/polygon/polygon_90_set_data.hpp | 5 +++--
   trunk/boost/polygon/polygon_90_set_traits.hpp | 5 +++++
   trunk/boost/polygon/polygon_set_data.hpp | 18 ++++++++++++++----
   trunk/boost/polygon/polygon_set_traits.hpp | 4 ++++
   20 files changed, 111 insertions(+), 78 deletions(-)

Modified: trunk/boost/polygon/detail/boolean_op_45.hpp
==============================================================================
--- trunk/boost/polygon/detail/boolean_op_45.hpp (original)
+++ trunk/boost/polygon/detail/boolean_op_45.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -445,7 +445,7 @@
     };
     template <typename S45V>
     static inline void sortScan45Vector(S45V& vec) {
- gtlsort(vec.begin(), vec.end(), lessScan45Vertex());
+ polygon_sort(vec.begin(), vec.end(), lessScan45Vertex());
     }
 
     template <typename CountType, typename output_functor>

Modified: trunk/boost/polygon/detail/max_cover.hpp
==============================================================================
--- trunk/boost/polygon/detail/max_cover.hpp (original)
+++ trunk/boost/polygon/detail/max_cover.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -213,7 +213,7 @@
         Interval rectIvl = nodep->rect.get(orient);
         leadingEdges.push_back(EdgeAssociation(std::pair<Unit, Interval>(leading, rectIvl), nodep));
       }
- gtlsort(leadingEdges.begin(), leadingEdges.end(), lessEdgeAssociation());
+ polygon_sort(leadingEdges.begin(), leadingEdges.end(), lessEdgeAssociation());
       typename std::vector<EdgeAssociation>::iterator leadingBegin = leadingEdges.begin();
       iT trailingBegin = beginNode;
       while(leadingBegin != leadingEdges.end()) {

Modified: trunk/boost/polygon/detail/polygon_45_formation.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_formation.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_formation.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -904,7 +904,7 @@
       data.push_back(Vertex45(Point(10, 0), 2, -1));
       data.push_back(Vertex45(Point(10, 10), 2, 1));
       data.push_back(Vertex45(Point(10, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -928,7 +928,7 @@
       data.push_back(Vertex45(Point(10, 10), 2, -1));
       data.push_back(Vertex45(Point(10, 20), 2, 1));
       data.push_back(Vertex45(Point(10, 20), 1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -953,7 +953,7 @@
       data.push_back(Vertex45(Point(10, 10), 0, -1));
       data.push_back(Vertex45(Point(20, 10), 1, -1));
       data.push_back(Vertex45(Point(20, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1018,7 +1018,7 @@
       data.push_back(Vertex45(Point(12, 8), 1, -1));
       // result == 12 8 -1 1
       data.push_back(Vertex45(Point(12, 8), -1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1051,7 +1051,7 @@
       stdcout << "scanning\n";
       scan45.scan(result, vertices.begin(), vertices.end());
    
- gtlsort(result.begin(), result.end());
+ polygon_sort(result.begin(), result.end());
       pf.scan(polys, result.begin(), result.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1123,7 +1123,7 @@
       data.push_back(Vertex45(Point(8, 6), -1, -1));
       data.push_back(Vertex45(Point(8, 6), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1195,7 +1195,7 @@
       data.push_back(Vertex45(Point(10, 8), -1, -1));
       data.push_back(Vertex45(Point(10, 8), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1239,7 +1239,7 @@
       data.push_back(Vertex45(Point(10, 22), 2, -1));
       data.push_back(Vertex45(Point(10, 22), 0, -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1668,7 +1668,7 @@
       data.push_back(Vertex45(Point(10, 0), 2, -1));
       data.push_back(Vertex45(Point(10, 10), 2, 1));
       data.push_back(Vertex45(Point(10, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1692,7 +1692,7 @@
       data.push_back(Vertex45(Point(10, 10), 2, -1));
       data.push_back(Vertex45(Point(10, 20), 2, 1));
       data.push_back(Vertex45(Point(10, 20), 1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1716,7 +1716,7 @@
       data.push_back(Vertex45(Point(10, 10), 0, -1));
       data.push_back(Vertex45(Point(20, 10), 1, -1));
       data.push_back(Vertex45(Point(20, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1742,7 +1742,7 @@
       data.push_back(Vertex45(Point(10, 10), 0, 1));
       data.push_back(Vertex45(Point(20, 20), 1, 1));
       data.push_back(Vertex45(Point(20, 20), 2, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1768,7 +1768,7 @@
       data.push_back(Vertex45(Point(20, 10), 0, 1));
       data.push_back(Vertex45(Point(20, -10), -1, -1));
       data.push_back(Vertex45(Point(20, -10), 2, -1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1801,7 +1801,7 @@
       data.push_back(Vertex45(Point(2, 2), 0, 1));
       data.push_back(Vertex45(Point(3, 2), 1, 1));
       data.push_back(Vertex45(Point(3, 2), 0, -1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1835,7 +1835,7 @@
       data.push_back(Vertex45(Point(2, 2), 2, -1));
       data.push_back(Vertex45(Point(2, 2), 0, -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1899,7 +1899,7 @@
       data.push_back(Vertex45(Point(12, 8), 1, -1));
       // result == 12 8 -1 1
       data.push_back(Vertex45(Point(12, 8), -1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1933,7 +1933,7 @@
       stdcout << "scanning\n";
       scan45.scan(result, vertices.begin(), vertices.end());
    
- gtlsort(result.begin(), result.end());
+ polygon_sort(result.begin(), result.end());
       pf.scan(polys, result.begin(), result.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2005,7 +2005,7 @@
       data.push_back(Vertex45(Point(8, 6), -1, -1));
       data.push_back(Vertex45(Point(8, 6), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2077,7 +2077,7 @@
       data.push_back(Vertex45(Point(10, 8), -1, -1));
       data.push_back(Vertex45(Point(10, 8), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2121,7 +2121,7 @@
       data.push_back(Vertex45(Point(10, 22), 2, -1));
       data.push_back(Vertex45(Point(10, 22), 0, -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {

Modified: trunk/boost/polygon/detail/polygon_45_set_view.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_set_view.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_set_view.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -119,7 +119,7 @@
     // orient_ = orient;
     // output_.clear();
     // output_.insert(output_.end(), input_begin, input_end);
- // gtlsort(output_.begin(), output_.end());
+ // polygon_sort(output_.begin(), output_.end());
     // }
   };
 

Modified: trunk/boost/polygon/detail/polygon_45_touch.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_touch.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_touch.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -186,7 +186,7 @@
     template <typename graph_type>
     static void performTouch(graph_type& graph, TouchSetData& tsd) {
       
- gtlsort(tsd.begin(), tsd.end(), lessVertex45Compact());
+ polygon_sort(tsd.begin(), tsd.end(), lessVertex45Compact());
       typedef std::vector<std::pair<Point, typename boolean_op_45<Unit>::template Scan45CountT<CountTouch> > > TSD;
       TSD tsd_;
       tsd_.reserve(tsd.size());

Modified: trunk/boost/polygon/detail/polygon_90_set_view.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_90_set_view.hpp (original)
+++ trunk/boost/polygon/detail/polygon_90_set_view.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -164,7 +164,7 @@
 // orient_ = orient;
 // output_.clear();
 // output_.insert(output_.end(), input_begin, input_end);
-// gtlsort(output_.begin(), output_.end());
+// polygon_sort(output_.begin(), output_.end());
 // }
     void sort() const {} //is always sorted
   };

Modified: trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp (original)
+++ trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -1219,7 +1219,7 @@
 
     static inline void sort_vertex_arbitrary_count(vertex_arbitrary_count& count, const Point& pt) {
       less_half_edge_count lfec(pt);
- gtlsort(count.begin(), count.end(), lfec);
+ polygon_sort(count.begin(), count.end(), lfec);
     }
 
     typedef std::vector<std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*> > incoming_count;
@@ -1243,7 +1243,7 @@
 
     static inline void sort_incoming_count(incoming_count& count, const Point& pt) {
       less_incoming_count lfec(pt);
- gtlsort(count.begin(), count.end(), lfec);
+ polygon_sort(count.begin(), count.end(), lfec);
     }
 
     static inline void compact_vertex_arbitrary_count(const Point& pt, vertex_arbitrary_count &count) {
@@ -1814,7 +1814,7 @@
       data.push_back(vertex_half_edge(Point(10, 0), Point(10, 10), -1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 0), 1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1838,7 +1838,7 @@
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 20), -1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(10, 10), 1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1862,7 +1862,7 @@
       data.push_back(vertex_half_edge(Point(2, -4), Point(2, 4), -1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(-2, 2), 1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(2, -4), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1908,7 +1908,7 @@
       data.push_back(vertex_half_edge(Point(10, 22), Point(10, 12), -1));
       data.push_back(vertex_half_edge(Point(10, 22), Point(2, 22), -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1955,7 +1955,7 @@
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 2), 1));
       
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1995,7 +1995,7 @@
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(4, 1), 1));
       
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2035,7 +2035,7 @@
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(4, 1), 1));
       
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2063,7 +2063,7 @@
 
       data.push_back(vertex_half_edge(Point(-1, 4), Point(0, 2), -1));
       data.push_back(vertex_half_edge(Point(0, 2), Point(-1, 4), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2769,7 +2769,7 @@
       data.push_back(vertex_half_edge(Point(10, 0), Point(10, 10), -1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 0), 1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2792,7 +2792,7 @@
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 20), -1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(10, 10), 1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2815,7 +2815,7 @@
       data.push_back(vertex_half_edge(Point(2, -4), Point(2, 4), -1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(-2, 2), 1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(2, -4), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2860,7 +2860,7 @@
       data.push_back(vertex_half_edge(Point(10, 22), Point(10, 12), -1));
       data.push_back(vertex_half_edge(Point(10, 22), Point(2, 22), -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2907,7 +2907,7 @@
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 2), 1));
       
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {

Modified: trunk/boost/polygon/detail/polygon_sort_adaptor.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_sort_adaptor.hpp (original)
+++ trunk/boost/polygon/detail/polygon_sort_adaptor.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -14,7 +14,7 @@
 
 #include <algorithm>
 
-//! @brief gtlsort_adaptor default implementation that calls std::sort
+//! @brief polygon_sort_adaptor default implementation that calls std::sort
 namespace boost {
   namespace polygon {
 
@@ -23,9 +23,9 @@
       typedef int unit_type; // default GTL unit
     };
 
- //! @brief gtlsort_adaptor default implementation that calls std::sort
+ //! @brief polygon_sort_adaptor default implementation that calls std::sort
     template<typename T>
- struct gtlsort_adaptor {
+ struct polygon_sort_adaptor {
       //! @brief wrapper that mimics std::sort() function and takes
       // the same arguments
       template<typename RandomAccessIterator_Type>
@@ -47,17 +47,17 @@
 
     //! @brief user level wrapper for sorting quantities
     template <typename iter_type>
- void gtlsort(iter_type _b_, iter_type _e_)
+ void polygon_sort(iter_type _b_, iter_type _e_)
     {
- gtlsort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_);
+ polygon_sort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_);
     }
 
     //! @brief user level wrapper for sorting quantities that takes predicate
     // as additional argument
     template <typename iter_type, typename pred_type>
- void gtlsort(iter_type _b_, iter_type _e_, const pred_type& _pred_)
+ void polygon_sort(iter_type _b_, iter_type _e_, const pred_type& _pred_)
     {
- gtlsort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_, _pred_);
+ polygon_sort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_, _pred_);
     }
 
 

Modified: trunk/boost/polygon/detail/property_merge.hpp
==============================================================================
--- trunk/boost/polygon/detail/property_merge.hpp (original)
+++ trunk/boost/polygon/detail/property_merge.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -112,7 +112,7 @@
   inline void perform_merge(result_type& result, property_merge_data& data) {
     if(data.empty()) return;
     //sort
- gtlsort(data.begin(), data.end(), less_vertex_data<vertex_property>());
+ polygon_sort(data.begin(), data.end(), less_vertex_data<vertex_property>());
     //scanline
     bool firstIteration = true;
     scanlinePosition = scanline.end();
@@ -442,7 +442,7 @@
   inline void performExtract(T& result, property_merge_data& data) {
     if(data.empty()) return;
     //sort
- gtlsort(data.begin(), data.end(), less_vertex_data<vertex_property>());
+ polygon_sort(data.begin(), data.end(), less_vertex_data<vertex_property>());
     
     //scanline
     bool firstIteration = true;

Modified: trunk/boost/polygon/detail/property_merge_45.hpp
==============================================================================
--- trunk/boost/polygon/detail/property_merge_45.hpp (original)
+++ trunk/boost/polygon/detail/property_merge_45.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -111,7 +111,7 @@
     template <typename output_type>
     static void performMerge(output_type& result, MergeSetData& tsd) {
       
- gtlsort(tsd.begin(), tsd.end(), lessVertex45Compact());
+ polygon_sort(tsd.begin(), tsd.end(), lessVertex45Compact());
       typedef std::vector<std::pair<Point, typename boolean_op_45<Unit>::template Scan45CountT<CountMerge> > > TSD;
       TSD tsd_;
       tsd_.reserve(tsd.size());

Modified: trunk/boost/polygon/detail/scan_arbitrary.hpp
==============================================================================
--- trunk/boost/polygon/detail/scan_arbitrary.hpp (original)
+++ trunk/boost/polygon/detail/scan_arbitrary.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -76,7 +76,7 @@
         ends.push_back(std::make_pair((*itr).first.first.y(), count));
         ends.push_back(std::make_pair((*itr).first.second.y(), -count));
       }
- gtlsort(ends.begin(), ends.end());
+ polygon_sort(ends.begin(), ends.end());
       histogram.reserve(ends.size());
       histogram.push_back(std::make_pair(ends.front().first, std::make_pair(0, 0)));
       for(typename std::vector<std::pair<Unit, int> >::iterator itr = ends.begin(); itr != ends.end(); ++itr) {
@@ -161,7 +161,7 @@
         }
       }
       typename scanline_base<Unit>::compute_intersection_pack pack_;
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       //find all intersection points
       for(typename std::vector<std::pair<half_edge, segment_id> >::iterator outer = data.begin();
           outer != data.end(); ++outer) {
@@ -198,7 +198,7 @@
           }
         }
       }
- gtlsort(pts.begin(), pts.end());
+ polygon_sort(pts.begin(), pts.end());
       typename std::vector<Point>::iterator newend = std::unique(pts.begin(), pts.end());
       typename std::vector<Point>::iterator lfinger = pts.begin();
       //find all segments that interact with intersection points
@@ -289,7 +289,7 @@
           std::swap(data[i].first.first, data[i].first.second);
         }
       }
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       for(typename std::vector<std::pair<half_edge, segment_id> >::iterator outer = data.begin();
           outer != data.end(); ++outer) {
         const half_edge& he1 = (*outer).first;
@@ -359,7 +359,7 @@
             tmpPts.reserve(pts.size());
             tmpPts.insert(tmpPts.end(), pts.begin(), pts.end());
             less_point_down_slope lpds;
- gtlsort(tmpPts.begin(), tmpPts.end(), lpds);
+ polygon_sort(tmpPts.begin(), tmpPts.end(), lpds);
             segment_edge(output_segments, he, id, tmpPts.begin(), tmpPts.end());
           } else {
             segment_edge(output_segments, he, id, pts.begin(), pts.end());
@@ -501,7 +501,7 @@
 // }
         
 // //merge sloping element data
-// gtlsort(sloping_ends.begin(), sloping_ends.end());
+// polygon_sort(sloping_ends.begin(), sloping_ends.end());
 // std::map<Unit, std::set<iterator> > sloping_elements;
 // std::set<iterator> merge_elements;
 // for(typename std::vector<std::pair<Unit, iterator> >::iterator slop_iter = sloping_ends.begin();
@@ -1313,7 +1313,7 @@
         output.push_back(vertex_half_edge(he.first, he.second, count));
         output.push_back(vertex_half_edge(he.second, he.first, -count));
       }
- gtlsort(output.begin(), output.end());
+ polygon_sort(output.begin(), output.end());
     }
 
     class test_functor {
@@ -1531,7 +1531,7 @@
 
     inline void sort_property_merge_data() {
       less_vertex_data<vertex_property> lvd(&evalAtXforYPack_);
- gtlsort(pmd.begin(), pmd.end(), lvd);
+ polygon_sort(pmd.begin(), pmd.end(), lvd);
     }
   public:
     inline property_merge_data& get_property_merge_data() { return pmd; }
@@ -1576,7 +1576,7 @@
         pts.push_back(lines[i].first.first);
         pts.push_back(lines[i].first.second);
       }
- gtlsort(pts.begin(), pts.end());
+ polygon_sort(pts.begin(), pts.end());
       for(std::size_t i = 0; i < pts.size(); i+=2) {
         if(pts[i] != pts[i+1]) {
           //stdcout << "Non-closed figures after line intersection!\n";
@@ -1686,7 +1686,7 @@
 
     static inline void sort_vertex_half_edges(vertex_data& vertex) {
       less_half_edge_pair lessF(vertex.first);
- gtlsort(vertex.second.begin(), vertex.second.end(), lessF);
+ polygon_sort(vertex.second.begin(), vertex.second.end(), lessF);
     }
 
     class less_half_edge_pair {
@@ -2168,7 +2168,7 @@
           outpts.push_back((*itr).first.first);
           outpts.push_back((*itr).first.second);
         }
- gtlsort(outpts.begin(), outpts.end());
+ polygon_sort(outpts.begin(), outpts.end());
         for(std::size_t i = 0; i < outpts.size(); i+=2) {
           if(outpts[i] != outpts[i+1]) {
             stdcout << "Polygon set not a closed figure\n";
@@ -2583,7 +2583,7 @@
 
     inline void sort_property_merge_data() {
       less_vertex_data<vertex_property> lvd(&evalAtXforYPack_);
- gtlsort(pmd.begin(), pmd.end(), lvd);
+ polygon_sort(pmd.begin(), pmd.end(), lvd);
     }
   public:
     inline arbitrary_boolean_op() : pmd(), evalAtXforYPack_() {}
@@ -2807,7 +2807,7 @@
 
     inline void sort_property_merge_data() {
       less_vertex_data<vertex_property> lvd(&evalAtXforYPack_);
- gtlsort(pmd.begin(), pmd.end(), lvd);
+ polygon_sort(pmd.begin(), pmd.end(), lvd);
     }
   public:
     inline arbitrary_connectivity_extraction() : pmd(), evalAtXforYPack_() {}

Modified: trunk/boost/polygon/gmp_override.hpp
==============================================================================
--- trunk/boost/polygon/gmp_override.hpp (original)
+++ trunk/boost/polygon/gmp_override.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -125,5 +125,4 @@
 
 }
 }
-//==
 #endif

Modified: trunk/boost/polygon/interval_concept.hpp
==============================================================================
--- trunk/boost/polygon/interval_concept.hpp (original)
+++ trunk/boost/polygon/interval_concept.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -471,7 +471,7 @@
     typedef typename interval_traits<interval_type>::coordinate_type Unit;
     Unit coords[4] = {low(interval), high(interval), low(b), high(b)};
     //consider implementing faster sorting of small fixed length range
- gtlsort(coords, coords+4);
+ polygon_sort(coords, coords+4);
     low(interval, coords[1]);
     high(interval, coords[2]);
     return interval;

Modified: trunk/boost/polygon/isotropy.hpp
==============================================================================
--- trunk/boost/polygon/isotropy.hpp (original)
+++ trunk/boost/polygon/isotropy.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -140,6 +140,7 @@
   template <typename T>
   struct coordinate_traits {};
 
+ //used to override long double with an infinite precision datatype
   template <typename T>
   struct high_precision_type {
     typedef long double type;
@@ -150,6 +151,14 @@
     return T(v);
   }
 
+ //used to override std::sort with an alternative (parallel) algorithm
+ template <typename iter_type>
+ void polygon_sort(iter_type _b_, iter_type _e_);
+
+ template <typename iter_type, typename pred_type>
+ void polygon_sort(iter_type _b_, iter_type _e_, const pred_type& _pred_);
+
+
   template <>
   struct coordinate_traits<int> {
     typedef int coordinate_type;

Modified: trunk/boost/polygon/polygon_45_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_45_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_45_set_data.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -212,7 +212,7 @@
 
     void sort() const{
       if(unsorted_) {
- gtlsort(data_.begin(), data_.end());
+ polygon_sort(data_.begin(), data_.end());
         unsorted_ = false;
       }
     }
@@ -220,6 +220,7 @@
     template <typename input_iterator_type>
     void set(input_iterator_type input_begin, input_iterator_type input_end) {
       data_.clear();
+ reserve(std::distance(input_begin, input_end));
       insert(input_begin, input_end);
       dirty_ = true;
       unsorted_ = true;
@@ -1262,7 +1263,7 @@
         //std::cout << "SCAN " << currentX << "\n";
         //scan event
         scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
         std::size_t ptCount = 0;
         for(std::size_t i = 0; i < eventOut.size(); ++i) {
           if(!result_data.empty() &&
@@ -1333,7 +1334,7 @@
       }
     }
     scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
 
     std::size_t ptCount = 0;
     for(std::size_t i = 0; i < eventOut.size(); ++i) {
@@ -1385,7 +1386,7 @@
         //std::cout << "SCAN " << currentX << "\n";
         //scan event
         scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
         std::size_t ptCount = 0;
         for(std::size_t i = 0; i < eventOut.size(); ++i) {
           if(!result_data.empty() &&
@@ -1422,7 +1423,7 @@
       ++iter1;
     }
     scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
 
     std::size_t ptCount = 0;
     for(std::size_t i = 0; i < eventOut.size(); ++i) {
@@ -1639,7 +1640,7 @@
               result.error_data_.push_back(ci);
             }
             Data2 new_result_data;
- gtlsort(result_data.begin(), result_data.end());
+ polygon_sort(result_data.begin(), result_data.end());
             applyUnary45OpOnVectors<Unit2, 0>(new_result_data, result_data); //OR operation
             result_data.swap(new_result_data);
           }
@@ -1749,7 +1750,7 @@
               result.error_data_.push_back(ci);
             }
             Data2 new_result_data;
- gtlsort(result_data.begin(), result_data.end());
+ polygon_sort(result_data.begin(), result_data.end());
             applyUnary45OpOnVectors<Unit2, 0>(new_result_data, result_data); //OR operation
             result_data.swap(new_result_data);
           }

Modified: trunk/boost/polygon/polygon_45_set_traits.hpp
==============================================================================
--- trunk/boost/polygon/polygon_45_set_traits.hpp (original)
+++ trunk/boost/polygon/polygon_45_set_traits.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -94,6 +94,7 @@
     static inline void set(std::list<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
       polygon_45_set_data<typename polygon_45_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(std::distance(input_begin, input_end));
       ps.insert(input_begin, input_end);
       ps.sort();
       ps.clean();
@@ -105,7 +106,10 @@
     template <typename input_iterator_type>
     static inline void set(std::vector<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
+ size_t num_ele = std::distance(input_begin, input_end);
+ polygon_set.reserve(num_ele);
       polygon_45_set_data<typename polygon_45_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(num_ele);
       ps.insert(input_begin, input_end);
       ps.sort();
       ps.clean();

Modified: trunk/boost/polygon/polygon_90_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_90_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_90_set_data.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -296,7 +296,7 @@
 
     void sort() const{
       if(unsorted_) {
- gtlsort(data_.begin(), data_.end());
+ polygon_sort(data_.begin(), data_.end());
         unsorted_ = false;
       }
     }
@@ -304,6 +304,7 @@
     template <typename input_iterator_type>
     void set(input_iterator_type input_begin, input_iterator_type input_end, orientation_2d orient) {
       data_.clear();
+ reserve(std::distance(input_begin, input_end));
       data_.insert(data_.end(), input_begin, input_end);
       orient_ = orient;
       dirty_ = true;
@@ -427,7 +428,7 @@
       point_data<coordinate_type> prev_pt = poly[0];
       point_data<coordinate_type> current_pt = poly[1];
       encompass(extents_rectangle, current_pt);
- for(int i = 2; i < poly.size(); ++i) {
+ for(std::size_t i = 2; i < poly.size(); ++i) {
         point_data<coordinate_type> next_pt = poly[i];
         encompass(extents_rectangle, next_pt);
         modify_pt(poly[i-1], prev_pt, current_pt, next_pt, west_shrinking, east_shrinking, south_shrinking, north_shrinking);

Modified: trunk/boost/polygon/polygon_90_set_traits.hpp
==============================================================================
--- trunk/boost/polygon/polygon_90_set_traits.hpp (original)
+++ trunk/boost/polygon/polygon_90_set_traits.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -278,6 +278,7 @@
     static inline void set(std::list<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end, orientation_2d orient) {
       polygon_set.clear();
       polygon_90_set_data<typename polygon_90_set_traits<std::list<T> >::coordinate_type> ps(orient);
+ ps.reserve(std::distance(input_begin, input_end));
       ps.insert(input_begin, input_end, orient);
       ps.clean();
       get_90_dispatch(polygon_set, ps, orient, concept_type());
@@ -289,7 +290,10 @@
     template <typename input_iterator_type>
     static inline void set(std::vector<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end, orientation_2d orient) {
       polygon_set.clear();
+ size_t num_ele = std::distance(input_begin, input_end);
+ polygon_set.reserve(num_ele);
       polygon_90_set_data<typename polygon_90_set_traits<std::list<T> >::coordinate_type> ps(orient);
+ ps.reserve(num_ele);
       ps.insert(input_begin, input_end, orient);
       ps.clean();
       get_90_dispatch(polygon_set, ps, orient, concept_type());
@@ -304,6 +308,7 @@
                            input_iterator_type input_begin, input_iterator_type input_end,
                            orientation_2d orient) {
       polygon_set.clear();
+ polygon_set.reserve(std::distance(input_begin, input_end));
       polygon_set.insert(input_begin, input_end, orient);
     }
 

Modified: trunk/boost/polygon/polygon_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_set_data.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -11,7 +11,6 @@
 #include "polygon_45_set_concept.hpp"
 #include "polygon_traits.hpp"
 #include "detail/polygon_arbitrary_formation.hpp"
-#include <iostream>
 
 namespace boost { namespace polygon {
 
@@ -248,7 +247,7 @@
         data.push_back(vertex_half_edge((*itr).first.first, (*itr).first.second, (*itr).second));
         data.push_back(vertex_half_edge((*itr).first.second, (*itr).first.first, -1 * (*itr).second));
       }
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(container, data.begin(), data.end());
       //std::cout << "DONE FORMING POLYGONS\n";
     }
@@ -321,7 +320,7 @@
 
     void sort() const{
       if(unsorted_) {
- gtlsort(data_.begin(), data_.end());
+ polygon_sort(data_.begin(), data_.end());
         unsorted_ = false;
       }
     }
@@ -329,6 +328,7 @@
     template <typename input_iterator_type>
     void set(input_iterator_type input_begin, input_iterator_type input_end) {
       clear();
+ reserve(std::distance(input_begin,input_end));
       insert(input_begin, input_end);
       dirty_ = true;
       unsorted_ = true;
@@ -388,8 +388,13 @@
     inline polygon_set_data&
     scale_down(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
       for(typename value_type::iterator itr = data_.begin(); itr != data_.end(); ++itr) {
+ bool vb = (*itr).first.first.x() == (*itr).first.second.x();
         ::boost::polygon::scale_down((*itr).first.first, factor);
         ::boost::polygon::scale_down((*itr).first.second, factor);
+ bool va = (*itr).first.first.x() == (*itr).first.second.x();
+ if(!vb && va) {
+ (*itr).second *= -1;
+ }
       }
       unsorted_ = true;
       dirty_ = true;
@@ -400,8 +405,13 @@
     inline polygon_set_data& scale(polygon_set_data& polygon_set,
                                    const scaling_type& scaling) {
       for(typename value_type::iterator itr = begin(); itr != end(); ++itr) {
+ bool vb = (*itr).first.first.x() == (*itr).first.second.x();
         ::boost::polygon::scale((*itr).first.first, scaling);
         ::boost::polygon::scale((*itr).first.second, scaling);
+ bool va = (*itr).first.first.x() == (*itr).first.second.x();
+ if(!vb && va) {
+ (*itr).second *= -1;
+ }
       }
       unsorted_ = true;
       dirty_ = true;
@@ -790,7 +800,7 @@
         data.push_back(vertex_half_edge((*itr).first.first, (*itr).first.second, (*itr).second));
         data.push_back(vertex_half_edge((*itr).first.second, (*itr).first.first, -1 * (*itr).second));
       }
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(container, data.begin(), data.end());
     }
   };

Modified: trunk/boost/polygon/polygon_set_traits.hpp
==============================================================================
--- trunk/boost/polygon/polygon_set_traits.hpp (original)
+++ trunk/boost/polygon/polygon_set_traits.hpp 2011-07-24 19:18:10 EDT (Sun, 24 Jul 2011)
@@ -82,6 +82,7 @@
     static inline void set(std::list<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
       polygon_set_data<typename polygon_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(std::distance(input_begin, input_end));
       ps.insert(input_begin, input_end);
       ps.get(polygon_set);
     }
@@ -91,7 +92,10 @@
     template <typename input_iterator_type>
     static inline void set(std::vector<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
+ size_t num_ele = std::distance(input_begin, input_end);
+ polygon_set.reserve(num_ele);
       polygon_set_data<typename polygon_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(num_ele);
       ps.insert(input_begin, input_end);
       ps.get(polygon_set);
     }


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