Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78170 - sandbox/gtl/boost/polygon
From: sydorchuk.andriy_at_[hidden]
Date: 2012-04-23 18:50:01


Author: asydorchuk
Date: 2012-04-23 18:50:00 EDT (Mon, 23 Apr 2012)
New Revision: 78170
URL: http://svn.boost.org/trac/boost/changeset/78170

Log:
Updating polygon concepts code.
Text files modified:
   sandbox/gtl/boost/polygon/directed_line_segment_concept.hpp | 569 +++++++++++++++++++++++++++++----------
   sandbox/gtl/boost/polygon/directed_line_segment_data.hpp | 26 +
   sandbox/gtl/boost/polygon/interval_concept.hpp | 76 ++--
   sandbox/gtl/boost/polygon/point_3d_concept.hpp | 28
   sandbox/gtl/boost/polygon/point_concept.hpp | 42 +-
   5 files changed, 506 insertions(+), 235 deletions(-)

Modified: sandbox/gtl/boost/polygon/directed_line_segment_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/directed_line_segment_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/directed_line_segment_concept.hpp 2012-04-23 18:50:00 EDT (Mon, 23 Apr 2012)
@@ -19,56 +19,88 @@
   template <typename T>
   struct is_directed_line_segment_concept { typedef gtl_no type; };
   template <>
- struct is_directed_line_segment_concept<directed_line_segment_concept> { typedef gtl_yes type; };
+ struct is_directed_line_segment_concept<directed_line_segment_concept> {
+ typedef gtl_yes type;
+ };
 
   template <typename T>
   struct is_mutable_directed_line_segment_concept { typedef gtl_no type; };
   template <>
- struct is_mutable_directed_line_segment_concept<directed_line_segment_concept> { typedef gtl_yes type; };
+ struct is_mutable_directed_line_segment_concept<directed_line_segment_concept> {
+ typedef gtl_yes type;
+ };
 
   template <typename T, typename CT>
- struct directed_line_segment_distance_type_by_concept { typedef void type; };
+ struct directed_line_segment_distance_type_by_concept {
+ typedef void type;
+ };
+
   template <typename T>
   struct directed_line_segment_distance_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename directed_line_segment_traits<T>::coordinate_type>::coordinate_distance type; };
+ typedef typename coordinate_traits<
+ typename directed_line_segment_traits<T>::coordinate_type
+ >::coordinate_distance type;
+ };
 
   template <typename T>
   struct directed_line_segment_distance_type {
- typedef typename directed_line_segment_distance_type_by_concept<
- T, typename is_directed_line_segment_concept<typename geometry_concept<T>::type>::type>::type type;
+ typedef typename directed_line_segment_distance_type_by_concept<
+ T,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type
+ >::type type;
   };
 
   template <typename T, typename CT>
   struct directed_line_segment_point_type_by_concept { typedef void type; };
   template <typename T>
   struct directed_line_segment_point_type_by_concept<T, gtl_yes> {
- typedef typename directed_line_segment_traits<T>::point_type type; };
+ typedef typename directed_line_segment_traits<T>::point_type type;
+ };
 
   template <typename T>
   struct directed_line_segment_point_type {
- typedef typename directed_line_segment_point_type_by_concept<
- T, typename is_directed_line_segment_concept<typename geometry_concept<T>::type>::type>::type type;
+ typedef typename directed_line_segment_point_type_by_concept<
+ T,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type
+ >::type type;
   };
 
   template <typename T, typename CT>
- struct directed_line_segment_coordinate_type_by_concept { typedef void type; };
+ struct directed_line_segment_coordinate_type_by_concept {
+ typedef void type;
+ };
+
   template <typename T>
   struct directed_line_segment_coordinate_type_by_concept<T, gtl_yes> {
- typedef typename directed_line_segment_traits<T>::coordinate_type type; };
+ typedef typename directed_line_segment_traits<T>::coordinate_type type;
+ };
 
   template <typename T>
   struct directed_line_segment_coordinate_type {
- typedef typename directed_line_segment_coordinate_type_by_concept<
- T, typename is_directed_line_segment_concept<typename geometry_concept<T>::type>::type>::type type;
+ typedef typename directed_line_segment_coordinate_type_by_concept<
+ T,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type
+ >::type type;
   };
 
   struct y_s_get : gtl_yes {};
 
   template <typename T>
- typename enable_if< typename gtl_and<
- y_s_get,
- typename is_directed_line_segment_concept<typename geometry_concept<T>::type>::type>::type,
- typename directed_line_segment_point_type<T>::type>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_get,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type
+ >::type,
+ typename directed_line_segment_point_type<T>::type
+ >::type
   get(const T& segment, direction_1d dir) {
     return directed_line_segment_traits<T>::get(segment, dir);
   }
@@ -76,10 +108,15 @@
   struct y_s_set : gtl_yes {};
 
   template <typename T, typename point_type>
- typename enable_if< typename gtl_and<
- y_s_set,
- typename is_mutable_directed_line_segment_concept<typename geometry_concept<T>::type>::type>::type,
- void>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_set,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type
+ >::type,
+ void
+ >::type
   set(T& segment, direction_1d dir, point_type value) {
     directed_line_segment_mutable_traits<T>::set(segment, dir, value);
   }
@@ -87,22 +124,34 @@
   struct y_s_construct : gtl_yes {};
   
   template <typename T, typename T2, typename T3>
- typename enable_if< typename gtl_and<
- y_s_construct,
- typename is_mutable_directed_line_segment_concept<typename geometry_concept<T>::type>::type>::type,
- T>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_construct,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type
+ >::type,
+ T
+ >::type
   construct(T2 low_value, T3 high_value) {
- return directed_line_segment_mutable_traits<T>::construct(low_value, high_value);
+ return directed_line_segment_mutable_traits<T>::construct(low_value, high_value);
   }
 
   struct y_s_copy_construct : gtl_yes {};
 
   template <typename T, typename T2>
- typename enable_if< typename gtl_and_3<
- y_s_copy_construct,
- typename is_mutable_directed_line_segment_concept<typename geometry_concept<T>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<T2>::type>::type>::type,
- T>::type
+ typename enable_if<
+ typename gtl_and_3<
+ y_s_copy_construct,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T2>::type
+ >::type
+ >::type,
+ T
+ >::type
   copy_construct(const T2& segment) {
     return construct<T>
       (get(segment, LOW ),
@@ -112,11 +161,18 @@
   struct y_s_assign : gtl_yes {};
 
   template <typename T1, typename T2>
- typename enable_if< typename gtl_and_3<
- y_s_assign,
- typename is_mutable_directed_line_segment_concept<typename geometry_concept<T1>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<T2>::type>::type>::type,
- T1>::type &
+ typename enable_if<
+ typename gtl_and_3<
+ y_s_assign,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<T1>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T2>::type
+ >::type
+ >::type,
+ T1
+ >::type &
   assign(T1& lvalue, const T2& rvalue) {
     lvalue = copy_construct<T1>(rvalue);
     return lvalue;
@@ -125,24 +181,41 @@
   struct y_s_equivalence : gtl_yes {};
 
   template <typename T, typename T2>
- typename enable_if< typename gtl_and_3<
- y_s_equivalence,
- typename is_directed_line_segment_concept<typename geometry_concept<T>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<T2>::type>::type>::type,
- bool>::type
+ typename enable_if<
+ typename gtl_and_3<
+ y_s_equivalence,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<T2>::type
+ >::type
+ >::type,
+ bool
+ >::type
   equivalence(const T& segment1, const T2& segment2) {
     return get(segment1, LOW) == get(segment2, LOW) &&
       get(segment1, HIGH) == get(segment2, HIGH);
   }
   
- struct y_dls_on_above_or_below : gtl_yes {};
+ struct y_s_on_above_or_below : gtl_yes {};
 
   //-1 for below, 0 for on and 1 for above
   template <typename segment_type>
- typename enable_if< typename gtl_and< y_dls_on_above_or_below, typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type >::type, bool>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_on_above_or_below,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ bool
+ >::type
   on_above_or_below(const segment_type& segment,
- typename directed_line_segment_traits<segment_type>::point_type value) {
- typedef polygon_arbitrary_formation<typename directed_line_segment_traits<segment_type>::coordinate_type> paf;
+ typename directed_line_segment_point_type<segment_type>::type value) {
+ typedef polygon_arbitrary_formation<
+ typename directed_line_segment_coordinate_type<segment_type>::type
+ > paf;
     typename paf::Point pt, l, h;
     assign(pt, value);
     assign(l, low(segment));
@@ -150,19 +223,28 @@
     return paf::on_above_or_below(pt, typename paf::half_edge(l, h));
   }
 
- struct y_dls_contains : gtl_yes {};
+ struct y_s_contains : gtl_yes {};
 
   template <typename segment_type>
- typename enable_if< typename gtl_and< y_dls_contains, typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type >::type, bool>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_contains,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ bool
+ >::type
   contains(const segment_type& segment,
- typename directed_line_segment_traits<segment_type>::point_type value,
+ typename directed_line_segment_point_type<segment_type>::type value,
            bool consider_touch = true ) {
     if(on_above_or_below(segment, value) == 0) {
- rectangle_data<typename directed_line_segment_traits<segment_type>::coordinate_type> rect;
+ rectangle_data<typename directed_line_segment_coordinate_type<segment_type>::type> rect;
       set_points(rect, low(segment), high(segment));
       if(area(rect) == 0.0) {
         if(!consider_touch) {
- return !equivalence(value, low(segment)) && !equivalence(value, high(segment));
+ return !equivalence(value, low(segment)) &&
+ !equivalence(value, high(segment));
         }
       }
       return contains(rect, value, consider_touch);
@@ -170,116 +252,190 @@
     return false;
   }
 
- struct y_s_contains : gtl_yes {};
+ struct y_s_contains2 : gtl_yes {};
 
   template <typename segment_type, typename segment_type_2>
- typename enable_if< typename gtl_and_3<
- y_s_contains,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type_2>::type>::type>::type,
- bool>::type
- contains(const segment_type& segment, const segment_type_2& value, bool consider_touch = true) {
+ typename enable_if<
+ typename gtl_and_3<
+ y_s_contains2,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type_2>::type
+ >::type
+ >::type,
+ bool
+ >::type
+ contains(const segment_type& segment,
+ const segment_type_2& value,
+ bool consider_touch = true) {
     return contains(segment, get(value, LOW), consider_touch) &&
- contains(segment, get(value, HIGH), consider_touch);
+ contains(segment, get(value, HIGH), consider_touch);
   }
 
   struct y_s_low : gtl_yes {};
   
   // get the low point
   template <typename segment_type>
- typename enable_if< typename gtl_and<
- y_s_low,
- typename gtl_if<typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type>::type,
- typename directed_line_segment_point_type<segment_type>::type>::type
- low(const segment_type& segment) { return get(segment, LOW); }
+ typename enable_if<
+ typename gtl_and<
+ y_s_low,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ typename directed_line_segment_point_type<segment_type>::type
+ >::type
+ low(const segment_type& segment) {
+ return get(segment, LOW);
+ }
 
   struct y_s_high : gtl_yes {};
 
   // get the high point
   template <typename segment_type>
- typename enable_if< typename gtl_and<
- y_s_high,
- typename gtl_if<typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type>::type,
- typename directed_line_segment_point_type<segment_type>::type>::type
- high(const segment_type& segment) { return get(segment, HIGH); }
+ typename enable_if<
+ typename gtl_and<
+ y_s_high,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ typename directed_line_segment_point_type<segment_type>::type
+ >::type
+ high(const segment_type& segment) {
+ return get(segment, HIGH);
+ }
 
   struct y_s_center : gtl_yes {};
 
   // get the center point
   template <typename segment_type>
- typename enable_if< typename gtl_and<
- y_s_center,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type,
- typename directed_line_segment_point_type<segment_type>::type>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_center,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ typename directed_line_segment_point_type<segment_type>::type
+ >::type
   center(const segment_type& segment) {
- return construct<typename directed_line_segment_traits<segment_type>::point_type>(
- (x(high(segment)) + x(low(segment)))/2, (y(high(segment)) + y(low(segment)))/2);
+ return construct<typename directed_line_segment_coordinate_type<segment_type>::type>(
+ (x(high(segment)) + x(low(segment)))/2,
+ (y(high(segment)) + y(low(segment)))/2);
   }
 
   struct y_s_low2 : gtl_yes {};
 
   // set the low point to v
   template <typename segment_type>
- typename enable_if<typename gtl_and<
- y_s_low2,
- typename gtl_if<typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type>::type,
- void>::type
- low(segment_type& segment, typename directed_line_segment_traits<segment_type>::point_type v) { set(segment, LOW, v);
+ typename enable_if<
+ typename gtl_and<
+ y_s_low2,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ void
+ >::type
+ low(segment_type& segment,
+ typename directed_line_segment_point_type<segment_type>::type v) {
+ set(segment, LOW, v);
   }
   
   struct y_s_high2 : gtl_yes {};
 
   // set the high coordinate to v
   template <typename segment_type>
- typename enable_if<typename gtl_and<
- y_s_high2,
- typename gtl_if<typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type>::type,
- void>::type
- high(segment_type& segment, typename directed_line_segment_traits<segment_type>::point_type v) { set(segment, HIGH, v);
+ typename enable_if<
+ typename gtl_and<
+ y_s_high2,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ void
+ >::type
+ high(segment_type& segment,
+ typename directed_line_segment_point_type<segment_type>::type v) {
+ set(segment, HIGH, v);
   }
 
   struct y_s_length : gtl_yes {};
 
   template <typename segment_type>
- typename enable_if< typename gtl_and<
- y_s_length,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type,
- typename directed_line_segment_point_type<segment_type>::type>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_length,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ typename directed_line_segment_point_type<segment_type>::type
+ >::type
   length(const segment_type& segment) {
     return euclidean_distance(low(segment), high(segment));
   }
 
- struct y_dls_flip : gtl_yes {};
-
- struct y_dls_scale_up : gtl_yes {};
+ struct y_s_scale_up : gtl_yes {};
 
   // scale segment by factor
   template <typename segment_type>
- typename enable_if<typename gtl_and<y_dls_scale_up, typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type, segment_type>::type &
+ typename enable_if<
+ typename gtl_and<
+ y_s_scale_up,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ segment_type
+ >::type &
   scale_up(segment_type& segment,
- typename coordinate_traits<typename directed_line_segment_traits<segment_type>::coordinate_type>::unsigned_area_type factor) {
+ typename coordinate_traits<
+ typename directed_line_segment_coordinate_type<segment_type>::type
+ >::unsigned_area_type factor) {
     typename directed_line_segment_point_type<segment_type>::type l = low(segment), h = high(segment);
     low(segment, scale_up(l, factor));
     high(segment, scale_up(h, factor));
     return segment;
   }
 
- struct y_dls_scale_down : gtl_yes {};
+ struct y_s_scale_down : gtl_yes {};
 
   template <typename segment_type>
- typename enable_if<typename gtl_and<y_dls_scale_down, typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type, segment_type>::type &
+ typename enable_if<
+ typename gtl_and<
+ y_s_scale_down,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ segment_type
+ >::type &
   scale_down(segment_type& segment,
- typename coordinate_traits<typename directed_line_segment_traits<segment_type>::coordinate_type>::unsigned_area_type factor) {
+ typename coordinate_traits<
+ typename directed_line_segment_coordinate_type<segment_type>::type
+ >::unsigned_area_type factor) {
     typename directed_line_segment_point_type<segment_type>::type l = low(segment), h = high(segment);
     low(segment, scale_down(l, factor));
     high(segment, scale_down(h, factor));
     return segment;
   }
 
- struct y_dls_scale : gtl_yes {};
+ struct y_s_scale : gtl_yes {};
 
   template <typename segment_type, typename scaling_type>
- typename enable_if<typename gtl_and<y_dls_scale, typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type, segment_type>::type &
+ typename enable_if<
+ typename gtl_and<
+ y_s_scale,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ segment_type
+ >::type &
   scale(segment_type& segment, scaling_type factor) {
     typename directed_line_segment_point_type<segment_type>::type l = low(segment), h = high(segment);
     low(segment, scale(l, factor));
@@ -288,10 +444,18 @@
   }
 
 
- struct y_dls_transform : gtl_yes {};
+ struct y_s_transform : gtl_yes {};
 
   template <typename segment_type, typename transform_type>
- typename enable_if<typename gtl_and<y_dls_transform, typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type, segment_type>::type &
+ typename enable_if<
+ typename gtl_and<
+ y_s_transform,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ segment_type
+ >::type &
   transform(segment_type& segment, const transform_type& val) {
     typename directed_line_segment_point_type<segment_type>::type l = low(segment), h = high(segment);
     low(segment, transform(l, val));
@@ -303,52 +467,80 @@
 
   // move segment by delta
   template <typename segment_type>
- typename enable_if< typename gtl_and<
- y_s_move,
- typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type,
- segment_type>::type &
+ typename enable_if<
+ typename gtl_and<
+ y_s_move,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ segment_type
+ >::type &
   move(segment_type& segment, orientation_2d orient,
- typename directed_line_segment_coordinate_type<segment_type>::type displacement) {
+ typename directed_line_segment_coordinate_type<segment_type>::type displacement) {
     typename directed_line_segment_point_type<segment_type>::type l = low(segment), h = high(segment);
     low(segment, move(l, orient, displacement));
     high(segment, move(h, orient, displacement));
     return segment;
   }
   
- struct y_dls_convolve : gtl_yes {};
+ struct y_s_convolve : gtl_yes {};
 
   // convolve this with b
   template <typename segment_type>
- typename enable_if<typename gtl_and<y_dls_convolve, typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type, segment_type>::type &
+ typename enable_if<
+ typename gtl_and<
+ y_s_convolve,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ segment_type
+ >::type &
   convolve(segment_type& segment,
- const typename directed_line_segment_traits<segment_type>::point_type& b) {
+ const typename directed_line_segment_point_type<segment_type>::type& b) {
     typename directed_line_segment_point_type<segment_type>::type l = low(segment), h = high(segment);
     low(segment, convolve(l, b));
     high(segment, convolve(h, b));
     return segment;
   }
 
- struct y_dls_deconvolve : gtl_yes {};
+ struct y_s_deconvolve : gtl_yes {};
 
   // deconvolve this with b
   template <typename segment_type>
- typename enable_if<typename gtl_and<y_dls_deconvolve, typename is_mutable_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type, segment_type>::type &
+ typename enable_if<
+ typename gtl_and<
+ y_s_deconvolve,
+ typename is_mutable_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ segment_type
+ >::type &
   deconvolve(segment_type& segment,
- const typename directed_line_segment_traits<segment_type>::point_type& b) {
+ const typename directed_line_segment_point_type<segment_type>::type& b) {
     typename directed_line_segment_point_type<segment_type>::type l = low(segment), h = high(segment);
     low(segment, deconvolve(l, b));
     high(segment, deconvolve(h, b));
     return segment;
   }
 
- struct y_dls_e_dist1 : gtl_yes {};
+ struct y_s_e_dist1 : gtl_yes {};
 
   // distance from a point to a segment
   template <typename segment_type>
- typename enable_if< typename gtl_and<y_dls_e_dist1, typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type>::type,
- typename directed_line_segment_distance_type<segment_type>::type>::type
+ typename enable_if<
+ typename gtl_and<
+ y_s_e_dist1,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type
+ >::type,
+ typename directed_line_segment_distance_type<segment_type>::type
+ >::type
   euclidean_distance(const segment_type& segment,
- typename directed_line_segment_traits<segment_type>::point_type position) {
+ typename directed_line_segment_point_type<segment_type>::type position) {
     typedef typename directed_line_segment_distance_type<segment_type>::type Unit;
     Unit x1 = x(low(segment));
     Unit y1 = y(low(segment));
@@ -376,53 +568,86 @@
     return result;
   }
 
- struct y_dls_e_dist2 : gtl_yes {};
+ struct y_s_e_dist2 : gtl_yes {};
   
   // distance between two segments
   template <typename segment_type, typename segment_type_2>
   typename enable_if<
- typename gtl_and_3<y_dls_e_dist2, typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type_2>::type>::type>::type,
- typename directed_line_segment_distance_type<segment_type>::type>::type
+ typename gtl_and_3<
+ y_s_e_dist2,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type_2>::type
+ >::type
+ >::type,
+ typename directed_line_segment_distance_type<segment_type>::type
+ >::type
   euclidean_distance(const segment_type& segment,
                      const segment_type_2& b) {
- typename directed_line_segment_distance_type<segment_type>::type result1 = euclidean_distance(segment, low(b)),
+ typename directed_line_segment_distance_type<segment_type>::type result1 =
+ euclidean_distance(segment, low(b)),
     result2 = euclidean_distance(segment, high(b));
     if(result2 < result1) result1 = result2;
     return result1;
   }
   
- struct y_dls_e_intersects : gtl_yes {};
+ struct y_s_e_intersects : gtl_yes {};
 
   // check if Interval b intersects `this` Interval
   template <typename segment_type, typename segment_type_2>
- typename enable_if< typename gtl_and_3<y_dls_e_intersects,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type_2>::type>::type
- >::type, bool> ::type
- intersects(const segment_type& segment, const segment_type_2& b, bool consider_touch = true) {
+ typename enable_if<
+ typename gtl_and_3<
+ y_s_e_intersects,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type_2>::type
+ >::type
+ >::type,
+ bool
+ >::type
+ intersects(const segment_type& segment,
+ const segment_type_2& b,
+ bool consider_touch = true) {
     if(consider_touch) {
- if(low(segment) == low(b) || low(segment) == high(b) || high(segment) == low(b) || high(segment) == high(b))
+ if(low(segment) == low(b) ||
+ low(segment) == high(b) ||
+ high(segment) == low(b) ||
+ high(segment) == high(b))
         return true;
     }
- typedef polygon_arbitrary_formation<typename directed_line_segment_traits<segment_type>::coordinate_type> paf;
+ typedef polygon_arbitrary_formation<
+ typename directed_line_segment_coordinate_type<segment_type>::type
+ > paf;
     typename paf::Point l, h, l2, h2;
     assign(l, low(segment));
     assign(h, high(segment));
     assign(l2, low(b));
     assign(h2, high(b));
- return paf::intersects(typename paf::half_edge(l, h), typename paf::half_edge(l2, h2));
+ return paf::intersects(typename paf::half_edge(l, h),
+ typename paf::half_edge(l2, h2));
   }
 
- struct y_dls_e_bintersect : gtl_yes {};
+ struct y_s_e_bintersect : gtl_yes {};
 
   // check if Interval b partially overlaps `this` Interval
   template <typename segment_type, typename segment_type_2>
   typename enable_if<
- typename gtl_and_3<y_dls_e_bintersect, typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type_2>::type>::type>::type,
- bool>::type
- boundaries_intersect(const segment_type& segment, const segment_type_2& b,
+ typename gtl_and_3<
+ y_s_e_bintersect,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type_2>::type
+ >::type
+ >::type,
+ bool
+ >::type
+ boundaries_intersect(const segment_type& segment, const segment_type_2& b,
                        bool consider_touch = true) {
     return (contains(segment, low(b), consider_touch) ||
             contains(segment, high(b), consider_touch)) &&
@@ -430,40 +655,78 @@
        contains(b, high(segment), consider_touch));
   }
 
- struct y_dls_abuts1 : gtl_yes {};
+ struct y_s_abuts1 : gtl_yes {};
 
   // check if they are end to end
   template <typename segment_type, typename segment_type_2>
- typename enable_if< typename gtl_and_3<y_dls_abuts1, typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type_2>::type>::type>::type,
- bool>::type
- abuts(const segment_type& segment, const segment_type_2& b, direction_1d dir) {
- return dir.to_int() ? equivalence(low(b) , high(segment)) : equivalence(low(segment) , high(b));
+ typename enable_if<
+ typename gtl_and_3<
+ y_s_abuts1,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type_2>::type
+ >::type
+ >::type,
+ bool
+ >::type
+ abuts(const segment_type& segment,
+ const segment_type_2& b,
+ direction_1d dir) {
+ return dir.to_int() ? equivalence(low(b) , high(segment)) :
+ equivalence(low(segment) , high(b));
   }
 
- struct y_dls_abuts2 : gtl_yes {};
+ struct y_s_abuts2 : gtl_yes {};
 
   // check if they are end to end
   template <typename segment_type, typename segment_type_2>
   typename enable_if<
- typename gtl_and_3<y_dls_abuts2, typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type_2>::type>::type>::type,
- bool>::type
+ typename gtl_and_3<
+ y_s_abuts2,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type_2>::type
+ >::type
+ >::type,
+ bool
+ >::type
   abuts(const segment_type& segment, const segment_type_2& b) {
     return abuts(segment, b, HIGH) || abuts(segment, b, LOW);
   }
 
- struct y_dls_intersect : gtl_yes {};
+ struct y_s_intersect : gtl_yes {};
 
   // set point to the intersection of segment and b
- template <typename point_type, typename segment_type, typename segment_type_2>
- typename enable_if< typename gtl_and_4<y_dls_intersect, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type>::type>::type,
- typename is_directed_line_segment_concept<typename geometry_concept<segment_type_2>::type>::type>::type,
- bool>::type
- intersection(point_type& intersection, const segment_type& segment, const segment_type_2& b,
- bool projected = false, bool round_closest = false) {
- typedef polygon_arbitrary_formation<typename directed_line_segment_traits<segment_type>::coordinate_type> paf;
+ template <typename point_type,
+ typename segment_type,
+ typename segment_type_2>
+ typename enable_if<
+ typename gtl_and_4<
+ y_s_intersect,
+ typename is_mutable_point_concept<
+ typename geometry_concept<point_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type>::type
+ >::type,
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<segment_type_2>::type
+ >::type
+ >::type,
+ bool
+ >::type
+ intersection(point_type& intersection,
+ const segment_type& segment,
+ const segment_type_2& b,
+ bool projected = false,
+ bool round_closest = false) {
+ typedef polygon_arbitrary_formation<
+ typename directed_line_segment_coordinate_type<segment_type>::type
+ > paf;
     typename paf::Point pt;
     typename paf::Point l, h, l2, h2;
     assign(l, low(segment));

Modified: sandbox/gtl/boost/polygon/directed_line_segment_data.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/directed_line_segment_data.hpp (original)
+++ sandbox/gtl/boost/polygon/directed_line_segment_data.hpp 2012-04-23 18:50:00 EDT (Mon, 23 Apr 2012)
@@ -34,8 +34,10 @@
     {
       (*this) = that;
     }
- inline directed_line_segment_data& operator=(const directed_line_segment_data& that) {
- points_[0] = that.points_[0]; points_[1] = that.points_[1]; return *this;
+ inline directed_line_segment_data& operator=(
+ const directed_line_segment_data& that) {
+ points_[0] = that.points_[0]; points_[1] = that.points_[1];
+ return *this;
     }
     template <typename T2>
     inline directed_line_segment_data& operator=(const T2& rvalue);
@@ -44,8 +46,8 @@
     }
     inline point_type low() const { return points_[0]; }
     inline point_type low(point_type low) {
- points_[0] = low;
- return *this;
+ points_[0] = low;
+ return *this;
     }
     inline point_type high() const { return points_[1]; }
     inline point_type high(point_type high) {
@@ -62,16 +64,22 @@
       if(points_[1] < that.points_[1]) return true;
       return false;
     }
- inline bool operator<=(const directed_line_segment_data& that) const { return !(that < *this); }
- inline bool operator>(const directed_line_segment_data& that) const { return that < *this; }
- inline bool operator>=(const directed_line_segment_data& that) const { return !((*this) < that); }
+ inline bool operator<=(const directed_line_segment_data& that) const {
+ return !(that < *this);
+ }
+ inline bool operator>(const directed_line_segment_data& that) const {
+ return that < *this;
+ }
+ inline bool operator>=(const directed_line_segment_data& that) const {
+ return !((*this) < that);
+ }
   inline void set(direction_1d dir, point_type value) {
     points_[dir.to_int()] = value;
   }
-private:
+
+ private:
   point_type points_[2];
 };
-
 }
 }
 #endif

Modified: sandbox/gtl/boost/polygon/interval_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/interval_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/interval_concept.hpp 2012-04-23 18:50:00 EDT (Mon, 23 Apr 2012)
@@ -127,7 +127,7 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and< y_i_contains, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type >::type, bool>::type
   contains(const interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type value,
+ typename interval_coordinate_type<interval_type>::type value,
            bool consider_touch = true ) {
     if(consider_touch) {
       return value <= high(interval) && value >= low(interval);
@@ -157,8 +157,8 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<
         y_i_low,
- typename gtl_if<typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type>::type,
- typename interval_traits<interval_type>::coordinate_type>::type
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ typename interval_coordinate_type<interval_type>::type>::type
   low(const interval_type& interval) { return get(interval, LOW); }
 
   struct y_i_high : gtl_yes {};
@@ -167,8 +167,8 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<
         y_i_high,
- typename gtl_if<typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type>::type,
- typename interval_traits<interval_type>::coordinate_type>::type
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ typename interval_coordinate_type<interval_type>::type>::type
   high(const interval_type& interval) { return get(interval, HIGH); }
 
   struct y_i_center : gtl_yes {};
@@ -178,7 +178,7 @@
   typename enable_if< typename gtl_and<
         y_i_center,
         typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
- typename interval_traits<interval_type>::coordinate_type>::type
+ typename interval_coordinate_type<interval_type>::type>::type
   center(const interval_type& interval) { return (high(interval) + low(interval))/2; }
 
 
@@ -188,10 +188,10 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<
         y_i_low2,
- typename gtl_if<typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type>::type,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
       void>::type
   low(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type v) { set(interval, LOW, v); }
+ typename interval_coordinate_type<interval_type>::type v) { set(interval, LOW, v); }
   
   struct y_i_high2 : gtl_yes {};
 
@@ -199,10 +199,10 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<
         y_i_high2,
- typename gtl_if<typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type>::type,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
       void>::type
   high(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type v) { set(interval, HIGH, v); }
+ typename interval_coordinate_type<interval_type>::type v) { set(interval, HIGH, v); }
 
   struct y_i_delta : gtl_yes {};
 
@@ -213,7 +213,7 @@
         typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
       typename interval_difference_type<interval_type>::type >::type
   delta(const interval_type& interval) {
- typedef typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::coordinate_difference diffT;
+ typedef typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::coordinate_difference diffT;
     return (diffT)high(interval) - (diffT)low(interval); }
 
   struct y_i_flip : gtl_yes {};
@@ -222,8 +222,8 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_flip, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   flip(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type axis = 0) {
- typename interval_traits<interval_type>::coordinate_type newLow, newHigh;
+ typename interval_coordinate_type<interval_type>::type axis = 0) {
+ typename interval_coordinate_type<interval_type>::type newLow, newHigh;
     newLow = 2 * axis - high(interval);
     newHigh = 2 * axis - low(interval);
     low(interval, newLow);
@@ -237,8 +237,8 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_scale_up, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   scale_up(interval_type& interval,
- typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::unsigned_area_type factor) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::unsigned_area_type factor) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newHigh = high(interval) * (Unit)factor;
     low(interval, low(interval) * (Unit)factor);
     high(interval, (newHigh));
@@ -250,8 +250,8 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_scale_down, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   scale_down(interval_type& interval,
- typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::unsigned_area_type factor) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::unsigned_area_type factor) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     typedef typename coordinate_traits<Unit>::coordinate_distance dt;
     Unit newHigh = scaling_policy<Unit>::round((dt)(high(interval)) / (dt)factor);
     low(interval, scaling_policy<Unit>::round((dt)(low(interval)) / (dt)factor));
@@ -264,7 +264,7 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_scale, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   scale(interval_type& interval, double factor) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newHigh = scaling_policy<Unit>::round((double)(high(interval)) * factor);
     low(interval, scaling_policy<Unit>::round((double)low(interval)* factor));
     high(interval, (newHigh));
@@ -280,7 +280,7 @@
         typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
       interval_type>::type &
   move(interval_type& interval, typename interval_difference_type<interval_type>::type displacement) {
- typedef typename interval_traits<interval_type>::coordinate_type ctype;
+ typedef typename interval_coordinate_type<interval_type>::type ctype;
     typedef typename coordinate_traits<ctype>::coordinate_difference Unit;
     Unit len = delta(interval);
     low(interval, static_cast<ctype>(static_cast<Unit>(low(interval)) + displacement));
@@ -294,8 +294,8 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_convolve, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   convolve(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typename interval_coordinate_type<interval_type>::type b) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) + b;
     Unit newHigh = high(interval) + b;
     low(interval, newLow);
@@ -309,8 +309,8 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_deconvolve, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   deconvolve(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typename interval_coordinate_type<interval_type>::type b) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) - b;
     Unit newHigh = high(interval) - b;
     low(interval, newLow);
@@ -329,7 +329,7 @@
     interval_type>::type &
   convolve(interval_type& interval,
            const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) + low(b);
     Unit newHigh = high(interval) + high(b);
     low(interval, newLow);
@@ -348,7 +348,7 @@
     interval_type>::type &
   deconvolve(interval_type& interval,
              const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) - low(b);
     Unit newHigh = high(interval) - high(b);
     low(interval, newLow);
@@ -367,7 +367,7 @@
     interval_type>::type &
   reflected_convolve(interval_type& interval,
                      const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) - high(b);
     Unit newHigh = high(interval) - low(b);
     low(interval, newLow);
@@ -386,7 +386,7 @@
     interval_type>::type &
   reflected_deconvolve(interval_type& interval,
                        const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) + high(b);
     Unit newHigh = high(interval) + low(b);
     low(interval, newLow);
@@ -401,8 +401,8 @@
   typename enable_if< typename gtl_and<y_i_e_dist1, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        typename interval_difference_type<interval_type>::type>::type
   euclidean_distance(const interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type position) {
- typedef typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::coordinate_difference Unit;
+ typename interval_coordinate_type<interval_type>::type position) {
+ typedef typename coordinate_traits<typename interval_difference_type<interval_type>::type>::coordinate_difference Unit;
     Unit dist[3] = {0, (Unit)low(interval) - (Unit)position, (Unit)position - (Unit)high(interval)};
     return dist[ (dist[1] > 0) + ((dist[2] > 0) << 1) ];
   }
@@ -417,7 +417,7 @@
     typename interval_difference_type<interval_type>::type>::type
   euclidean_distance(const interval_type& interval,
                      const interval_type_2& b) {
- typedef typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::coordinate_difference Unit;
+ typedef typename coordinate_traits<typename interval_difference_type<interval_type>::type>::coordinate_difference Unit;
     Unit dist[3] = {0, (Unit)low(interval) - (Unit)high(b), (Unit)low(b) - (Unit)high(interval)};
     return dist[ (dist[1] > 0) + ((dist[2] > 0) << 1) ];
   }
@@ -484,7 +484,7 @@
                                          typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
                        bool>::type
   intersect(interval_type& interval, const interval_type_2& b, bool consider_touch = true) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit lowVal = (std::max)(low(interval), low(b));
     Unit highVal = (std::min)(high(interval), high(b));
     bool valid = consider_touch ?
@@ -506,7 +506,7 @@
                       typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
     interval_type>::type &
   generalized_intersect(interval_type& interval, const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit coords[4] = {low(interval), high(interval), low(b), high(b)};
     //consider implementing faster sorting of small fixed length range
     polygon_sort(coords, coords+4);
@@ -521,7 +521,7 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_bloat, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- bloat(interval_type& interval, typename interval_traits<interval_type>::coordinate_type bloating) {
+ bloat(interval_type& interval, typename interval_coordinate_type<interval_type>::type bloating) {
     low(interval, low(interval)-bloating);
     high(interval, high(interval)+bloating);
     return interval;
@@ -533,7 +533,7 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_bloat2, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- bloat(interval_type& interval, direction_1d dir, typename interval_traits<interval_type>::coordinate_type bloating) {
+ bloat(interval_type& interval, direction_1d dir, typename interval_coordinate_type<interval_type>::type bloating) {
     set(interval, dir, get(interval, dir) + dir.get_sign() * bloating);
     return interval;
   }
@@ -544,7 +544,7 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_shrink, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- shrink(interval_type& interval, typename interval_traits<interval_type>::coordinate_type shrinking) {
+ shrink(interval_type& interval, typename interval_coordinate_type<interval_type>::type shrinking) {
     return bloat(interval, -shrinking);
   }
 
@@ -554,7 +554,7 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_shrink2, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- shrink(interval_type& interval, direction_1d dir, typename interval_traits<interval_type>::coordinate_type shrinking) {
+ shrink(interval_type& interval, direction_1d dir, typename interval_coordinate_type<interval_type>::type shrinking) {
     return bloat(interval, dir, -shrinking);
   }
 
@@ -580,7 +580,7 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_encompass2, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        bool>::type
- encompass(interval_type& interval, typename interval_traits<interval_type>::coordinate_type b) {
+ encompass(interval_type& interval, typename interval_coordinate_type<interval_type>::type b) {
     bool retval = !contains(interval, b, true);
     low(interval, (std::min)(low(interval), b));
     high(interval, (std::max)(high(interval), b));
@@ -593,7 +593,7 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_get_half, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type
   get_half(const interval_type& interval, direction_1d d1d) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit c = (get(interval, LOW) + get(interval, HIGH)) / 2;
     return construct<interval_type>((d1d == LOW) ? get(interval, LOW) : c,
                                     (d1d == LOW) ? c : get(interval, HIGH));

Modified: sandbox/gtl/boost/polygon/point_3d_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/point_3d_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/point_3d_concept.hpp 2012-04-23 18:50:00 EDT (Mon, 23 Apr 2012)
@@ -39,7 +39,7 @@
   struct point_3d_difference_type_by_concept { typedef void type; };
   template <typename T>
   struct point_3d_difference_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_3d_traits<T>::coordinate_type>::coordinate_difference type; };
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<T>::type>::coordinate_difference type; };
 
   template <typename T>
   struct point_3d_difference_type {
@@ -51,7 +51,7 @@
   struct point_3d_distance_type_by_concept { typedef void type; };
   template <typename T>
   struct point_3d_distance_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_3d_traits<T>::coordinate_type>::coordinate_distance type; };
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<T>::type>::coordinate_distance type; };
 
   template <typename T>
   struct point_3d_distance_type {
@@ -62,7 +62,7 @@
   struct y_p3d_get : gtl_yes {};
 
   template <typename T>
- typename enable_if< typename gtl_and<y_p3d_get, typename gtl_if<typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_get, typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type,
                        typename point_3d_coordinate_type<T>::type >::type
   get(const T& point, orientation_3d orient) { return point_3d_traits<T>::get(point, orient); }
   
@@ -103,7 +103,7 @@
 
   template <typename point_type>
   typename enable_if< typename gtl_and<y_p3d_z, typename is_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_3d_traits<point_type>::coordinate_type >::type
+ typename point_3d_coordinate_type<point_type>::type >::type
   z(const point_type& point) { return get(point, PROXIMAL); }
 
   struct y_p3d_x : gtl_yes {};
@@ -142,7 +142,7 @@
                                           typename is_point_3d_concept<typename geometry_concept<point_type_2>::type>::type>::type,
                        typename point_3d_difference_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2, orientation_3d orient) {
- typedef typename coordinate_traits<typename point_3d_traits<point_type_1>::coordinate_type>::coordinate_difference return_type;
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<point_type_1>::type>::coordinate_difference return_type;
     return_type return_value =
       (return_type)get(point1, orient) - (return_type)get(point2, orient);
     return return_value < 0 ? -return_value : return_value;
@@ -167,7 +167,7 @@
     typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
                        typename point_3d_distance_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2) {
- typedef typename coordinate_traits<typename point_3d_traits<point_type_1>::coordinate_type>::coordinate_distance return_value;
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<point_type_1>::type>::coordinate_distance return_value;
     return_value pdist = (return_value)euclidean_distance(point1, point2, PROXIMAL);
     pdist *= pdist;
     return sqrt((double)(distance_squared(point1, point2) + pdist));
@@ -207,10 +207,10 @@
   typename enable_if< typename gtl_and<y_p3d_scale_up, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
                        point_type>::type &
   scale_up(point_type& point,
- typename coordinate_traits<typename point_3d_traits<point_type>::coordinate_type>::unsigned_area_type factor) {
- x(point, x(point) * (typename point_3d_traits<point_type>::coordinate_type)factor);
- y(point, y(point) * (typename point_3d_traits<point_type>::coordinate_type)factor);
- z(point, z(point) * (typename point_3d_traits<point_type>::coordinate_type)factor);
+ typename coordinate_traits<typename point_3d_coordinate_type<point_type>::type>::unsigned_area_type factor) {
+ x(point, x(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
+ y(point, y(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
+ z(point, z(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
     return point;
   }
 
@@ -220,8 +220,8 @@
   typename enable_if< typename gtl_and<y_p3d_scale_down, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
                        point_type>::type &
   scale_down(point_type& point,
- typename coordinate_traits<typename point_3d_traits<point_type>::coordinate_type>::unsigned_area_type factor) {
- typedef typename point_3d_traits<point_type>::coordinate_type Unit;
+ typename coordinate_traits<typename point_3d_coordinate_type<point_type>::type>::unsigned_area_type factor) {
+ typedef typename point_3d_coordinate_type<point_type>::type Unit;
     typedef typename coordinate_traits<Unit>::coordinate_distance dt;
     x(point, scaling_policy<Unit>::round((dt)(x(point)) / (dt)factor));
     y(point, scaling_policy<Unit>::round((dt)(y(point)) / (dt)factor));
@@ -236,7 +236,7 @@
                        point_type>::type &
   scale(point_type& point,
         const scaling_type& scaling) {
- typedef typename point_3d_traits<point_type>::coordinate_type Unit;
+ typedef typename point_3d_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point)), z_(z(point));
     scaling.scale(x_, y_, z_);
     x(point, x_);
@@ -251,7 +251,7 @@
   typename enable_if< typename gtl_and<y_p3d_transform, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
                        point_type>::type &
   transform(point_type& point, const transformation_type& transformation) {
- typedef typename point_3d_traits<point_type>::coordinate_type Unit;
+ typedef typename point_3d_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point)), z_(z(point));
     transformation.transform(x_, y_, z_);
     x(point, x_);

Modified: sandbox/gtl/boost/polygon/point_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/point_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/point_concept.hpp 2012-04-23 18:50:00 EDT (Mon, 23 Apr 2012)
@@ -42,7 +42,7 @@
   struct point_difference_type_by_concept { typedef void type; };
   template <typename T>
   struct point_difference_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_traits<T>::coordinate_type>::coordinate_difference type; };
+ typedef typename coordinate_traits<typename point_coordinate_type<T>::type>::coordinate_difference type; };
 
   template <typename T>
   struct point_difference_type {
@@ -54,7 +54,7 @@
   struct point_distance_type_by_concept { typedef void type; };
   template <typename T>
   struct point_distance_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_traits<T>::coordinate_type>::coordinate_distance type; };
+ typedef typename coordinate_traits<typename point_coordinate_type<T>::type>::coordinate_distance type; };
 
   template <typename T>
   struct point_distance_type {
@@ -65,7 +65,7 @@
   struct y_pt_get : gtl_yes {};
 
   template <typename T>
- typename enable_if< typename gtl_and<y_pt_get, typename gtl_if<typename is_point_concept<typename geometry_concept<T>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_get, typename is_point_concept<typename geometry_concept<T>::type>::type>::type,
                       typename point_coordinate_type<T>::type >::type
   get(const T& point, orientation_2d orient) {
     return point_traits<T>::get(point, orient);
@@ -74,7 +74,7 @@
   struct y_pt_set : gtl_yes {};
 
   template <typename T, typename coordinate_type>
- typename enable_if< typename gtl_and<y_pt_set, typename gtl_if<typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_set, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
                       void>::type
   set(T& point, orientation_2d orient, coordinate_type value) {
     point_mutable_traits<T>::set(point, orient, value);
@@ -83,7 +83,7 @@
   struct y_pt_construct : gtl_yes {};
 
   template <typename T, typename coordinate_type1, typename coordinate_type2>
- typename enable_if< typename gtl_and<y_pt_construct, typename gtl_if<typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_construct, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
                       T>::type
   construct(coordinate_type1 x_value, coordinate_type2 y_value) {
     return point_mutable_traits<T>::construct(x_value, y_value);
@@ -107,7 +107,7 @@
 
   template <typename point_type>
   typename enable_if< typename gtl_and<y_p_x, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_traits<point_type>::coordinate_type >::type
+ typename point_coordinate_type<point_type>::type >::type
   x(const point_type& point) {
     return get(point, HORIZONTAL);
   }
@@ -116,7 +116,7 @@
 
   template <typename point_type>
   typename enable_if< typename gtl_and<y_p_y, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_traits<point_type>::coordinate_type >::type
+ typename point_coordinate_type<point_type>::type >::type
   y(const point_type& point) {
     return get(point, VERTICAL);
   }
@@ -147,10 +147,10 @@
         typename is_point_concept<typename geometry_concept<T2>::type>::type>::type,
       bool>::type
   equivalence(const T& point1, const T2& point2) {
- typename point_traits<T>::coordinate_type x1 = x(point1);
- typename point_traits<T2>::coordinate_type x2 = get(point2, HORIZONTAL);
- typename point_traits<T>::coordinate_type y1 = get(point1, VERTICAL);
- typename point_traits<T2>::coordinate_type y2 = y(point2);
+ typename point_coordinate_type<T>::type x1 = x(point1);
+ typename point_coordinate_type<T2>::type x2 = get(point2, HORIZONTAL);
+ typename point_coordinate_type<T>::type y1 = get(point1, VERTICAL);
+ typename point_coordinate_type<T2>::type y2 = y(point2);
     return x1 == x2 && y1 == y2;
   }
 
@@ -173,9 +173,9 @@
   typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
   typename point_difference_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2, orientation_2d orient) {
- typename coordinate_traits<typename point_traits<point_type_1>::coordinate_type>::coordinate_difference return_value =
+ typename coordinate_traits<typename point_coordinate_type<point_type_1>::type>::coordinate_difference return_value =
       get(point1, orient) - get(point2, orient);
- return return_value < 0 ? (typename coordinate_traits<typename point_traits<point_type_1>::coordinate_type>::coordinate_difference)-return_value : return_value;
+ return return_value < 0 ? (typename coordinate_traits<typename point_coordinate_type<point_type_1>::type>::coordinate_difference)-return_value : return_value;
   }
   
   struct y_pt_ed2 : gtl_yes {};
@@ -185,7 +185,7 @@
   typename gtl_same_type<point_concept, typename geometry_concept<point_type_2>::type>::type>::type,
   typename point_distance_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2) {
- typedef typename point_traits<point_type_1>::coordinate_type Unit;
+ typedef typename point_coordinate_type<point_type_1>::type Unit;
     return sqrt((double)(distance_squared(point1, point2)));
   }
 
@@ -198,7 +198,7 @@
         typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
       typename point_difference_type<point_type_1>::type>::type
   distance_squared(const point_type_1& point1, const point_type_2& point2) {
- typedef typename point_traits<point_type_1>::coordinate_type Unit;
+ typedef typename point_coordinate_type<point_type_1>::type Unit;
     typename coordinate_traits<Unit>::coordinate_difference dx = euclidean_distance(point1, point2, HORIZONTAL);
     typename coordinate_traits<Unit>::coordinate_difference dy = euclidean_distance(point1, point2, VERTICAL);
     dx *= dx;
@@ -240,7 +240,7 @@
   typename enable_if< typename gtl_and<y_pt_scale_up, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                       point_type>::type &
   scale_up(point_type& point, coord_type factor) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typedef typename point_coordinate_type<point_type>::type Unit;
     x(point, x(point) * (Unit)factor);
     y(point, y(point) * (Unit)factor);
     return point;
@@ -252,7 +252,7 @@
   typename enable_if< typename gtl_and<y_pt_scale_down, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                       point_type>::type &
   scale_down(point_type& point, coord_type factor) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typedef typename point_coordinate_type<point_type>::type Unit;
     typedef typename coordinate_traits<Unit>::coordinate_distance dt;
     x(point, scaling_policy<Unit>::round((dt)((dt)(x(point)) / (dt)factor)));
     y(point, scaling_policy<Unit>::round((dt)((dt)(y(point)) / (dt)factor)));
@@ -265,7 +265,7 @@
   typename enable_if< typename gtl_and<y_pt_scale, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                       point_type>::type &
   scale(point_type& point, const scaling_type& scaling) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typedef typename point_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point));
     scaling.scale(x_, y_);
     x(point, x_);
@@ -279,7 +279,7 @@
   typename enable_if< typename gtl_and<y_pt_transform, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                       point_type>::type &
   transform(point_type& point, const transformation_type& transformation) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typedef typename point_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point));
     transformation.transform(x_, y_);
     x(point, x_);
@@ -293,8 +293,8 @@
   typename enable_if< typename gtl_and<y_pt_move, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                       point_type>::type &
   move(point_type& point, orientation_2d orient,
- typename point_traits<point_type>::coordinate_type displacement) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typename point_coordinate_type<point_type>::type displacement) {
+ typedef typename point_coordinate_type<point_type>::type Unit;
     Unit v(get(point, orient));
     set(point, orient, v + displacement);
     return point;


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