|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78098 - in sandbox/gtl: boost/polygon doc
From: sydorchuk.andriy_at_[hidden]
Date: 2012-04-20 16:13:44
Author: asydorchuk
Date: 2012-04-20 16:13:43 EDT (Fri, 20 Apr 2012)
New Revision: 78098
URL: http://svn.boost.org/trac/boost/changeset/78098
Log:
Updating main voronoi header and documentation.
Text files modified:
sandbox/gtl/boost/polygon/voronoi.hpp | 118 +++++++++++++++++++++++++++++++--------
sandbox/gtl/doc/voronoi_main.htm | 21 +++---
2 files changed, 104 insertions(+), 35 deletions(-)
Modified: sandbox/gtl/boost/polygon/voronoi.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/voronoi.hpp (original)
+++ sandbox/gtl/boost/polygon/voronoi.hpp 2012-04-20 16:13:43 EDT (Fri, 20 Apr 2012)
@@ -30,58 +30,126 @@
namespace polygon {
template <typename Point, typename VB>
-static inline void insert(const Point &point, VB &vb,
- typename enable_if<typename gtl_if<typename is_point_concept<typename geometry_concept<Point>::type>::type>::type>::type * = 0) {
- vb.insert_point(x(point), y(point));
+static inline
+typename enable_if<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+void>::type
+insert(const Point &point, VB *vb) {
+ vb->insert_point(x(point), y(point));
}
+
template <typename PointIterator, typename VB>
-static inline void insert(PointIterator first, const PointIterator last, VB &vb,
- typename enable_if<typename gtl_if<typename is_point_concept<typename geometry_concept<typename std::iterator_traits<PointIterator>::value_type>::type>::type>::type>::type * = 0) {
+static inline
+typename enable_if<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<PointIterator>::value_type
+ >::type
+ >::type
+ >::type,
+void>::type
+insert(PointIterator first, const PointIterator last, VB *vb) {
for (PointIterator it = first; it != last; ++it) {
insert(*it, vb);
}
}
template <typename Segment, typename VB>
-static inline void insert(const Segment &segment, VB &vb,
- typename enable_if<typename gtl_if<typename is_directed_line_segment_concept<typename geometry_concept<Segment>::type>::type>::type>::type * = 0) {
- vb.insert_segment(x(low(segment)), y(low(segment)), x(high(segment)), y(high(segment)));
+static inline
+typename enable_if<
+ typename gtl_if<
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+void>::type
+insert(const Segment &segment, VB *vb) {
+ vb->insert_segment(x(low(segment)), y(low(segment)), x(high(segment)), y(high(segment)));
}
template <typename SegmentIterator, typename VB>
-static inline void insert(SegmentIterator first, SegmentIterator last, VB &vb,
- typename enable_if<typename gtl_if<typename is_directed_line_segment_concept<typename geometry_concept<typename std::iterator_traits<SegmentIterator>::value_type>::type>::type>::type>::type * = 0) {
+static inline
+typename enable_if<
+ typename gtl_if<
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type,
+void>::type
+insert(SegmentIterator first, SegmentIterator last, VB *vb) {
for (SegmentIterator it = first; it != last; ++it) {
insert(*it, vb);
}
}
template <typename PointIterator, typename VD>
-static inline void construct_voronoi(PointIterator first, PointIterator last, VD *output,
- typename enable_if<typename gtl_if<typename is_point_concept<typename geometry_concept<typename std::iterator_traits<PointIterator>::value_type>::type>::type>::type>::type * = 0) {
+static inline
+typename enable_if<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<PointIterator>::value_type
+ >::type
+ >::type
+ >::type,
+void>::type
+construct_voronoi(PointIterator first, PointIterator last, VD *vd) {
default_voronoi_builder builder;
- insert(first, last, builder);
- builder.construct(output);
+ insert(first, last, &builder);
+ builder.construct(vd);
}
template <typename SegmentIterator, typename VD>
-static inline void construct_voronoi(SegmentIterator first, SegmentIterator last, VD *output,
- typename enable_if<typename gtl_if<typename is_directed_line_segment_concept<typename geometry_concept<typename std::iterator_traits<SegmentIterator>::value_type>::type>::type>::type>::type * = 0) {
+static inline
+typename enable_if<
+ typename gtl_if<
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type,
+void>::type
+construct_voronoi(SegmentIterator first, SegmentIterator last, VD *vd) {
default_voronoi_builder builder;
- insert(first, last, builder);
- builder.construct(output);
+ insert(first, last, &builder);
+ builder.construct(vd);
}
template <typename PointIterator, typename SegmentIterator, typename VD>
-static inline void construct_voronoi(
- PointIterator p_first, PointIterator p_last, SegmentIterator s_first, SegmentIterator s_last, VD *output,
- typename enable_if<typename gtl_if<typename is_point_concept<typename geometry_concept<typename std::iterator_traits<PointIterator>::value_type>::type>::type>::type>::type * = 0,
- typename enable_if<typename gtl_if<typename is_directed_line_segment_concept<typename geometry_concept<typename std::iterator_traits<SegmentIterator>::value_type>::type>::type>::type>::type * = 0) {
+static inline
+typename enable_if<
+ typename gtl_and<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<PointIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ typename gtl_if<
+ typename is_directed_line_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type
+ >::type,
+void>::type
+construct_voronoi(PointIterator p_first, PointIterator p_last,
+ SegmentIterator s_first, SegmentIterator s_last, VD *vd) {
default_voronoi_builder builder;
- insert(p_first, p_last, builder);
- insert(s_first, s_last, builder);
- builder.construct(output);
+ insert(p_first, p_last, &builder);
+ insert(s_first, s_last, &builder);
+ builder.construct(vd);
}
} // polygon
} // boost
Modified: sandbox/gtl/doc/voronoi_main.htm
==============================================================================
--- sandbox/gtl/doc/voronoi_main.htm (original)
+++ sandbox/gtl/doc/voronoi_main.htm 2012-04-20 16:13:43 EDT (Fri, 20 Apr 2012)
@@ -10,6 +10,7 @@
+
<meta http-equiv="Content-Language" content="en-us">
@@ -30,7 +31,7 @@
<tbody>
<tr>
- <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <td style="background-color: rgb(238, 238, 238);" valign="top" nowrap="1">
<div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277"><a title="www.boost.org home page" tabindex="2" style="border: medium none ;" href="http://www.boost.org/"> </a></div>
<div style="margin: 5px;">
<h3 class="navbar">Contents</h3>
@@ -208,7 +209,7 @@
<tbody>
<tr>
<td style="vertical-align: top; font-family: Courier New,Courier,monospace;">template <typename Point, typename VB><br>
-void insert(const Point &point, VB &vb)<br>
+void insert(const Point &point, VB *vb)<br>
</td>
<td style="vertical-align: top;">Inserts a point into the Voronoi builder data structure.<br>
Point type should model the point concept.<br>
@@ -216,7 +217,7 @@
</tr>
<tr>
<td style="vertical-align: top; font-family: Courier New,Courier,monospace;">template <typename PointIterator, typename VB><br>
-void insert(PointIterator first, const PointIterator last, VB &vb)<br>
+void insert(PointIterator first, const PointIterator last, VB *vb)<br>
</td>
<td style="vertical-align: top;">Inserts an iterator range of points into the Voronoi builder data structure.<br>
Corresponding point type should model the point concept.<br>
@@ -224,7 +225,7 @@
</tr>
<tr>
<td style="vertical-align: top; font-family: Courier New,Courier,monospace;">template <typename Segment, typename VB><br>
-void insert(const Segment &segment, VB &vb)<br>
+void insert(const Segment &segment, VB *vb)<br>
</td>
<td style="vertical-align: top;">Inserts a segment into the Voronoi builder data structure.<br>
Segment type should model the segment concept.<br>
@@ -232,7 +233,7 @@
</tr>
<tr>
<td style="vertical-align: top; font-family: Courier New,Courier,monospace;">template <typename SegmentIterator, typename VB><br>
-void insert(SegmentIterator first, SegmentIterator last, VB &vb)<br>
+void insert(SegmentIterator first, SegmentIterator last, VB *vb)<br>
</td>
<td style="vertical-align: top;">Inserts an iterator range of segments into the Voronoi builder data structure.<br>
Corresponding segment type should model the segment concept.<br>
@@ -240,14 +241,14 @@
</tr>
<tr>
<td style="vertical-align: top; font-family: Courier New,Courier,monospace;">template <typename PointIterator, typename VD><br>
-void construct_voronoi(PointIterator first, PointIterator last, VD *output)<br>
+void construct_voronoi(PointIterator first, PointIterator last, VD *vd)<br>
</td>
<td style="vertical-align: top;">Constructs Voronoi diagram of a set of points.<br>Corresponding point type should model the point concept.<br>
</td>
</tr>
<tr>
<td style="vertical-align: top; font-family: Courier New,Courier,monospace;">template <typename SegmentIterator, typename VD><br>
-void construct_voronoi(SegmentIterator first, SegmentIterator last, VD *output)<br>
+void construct_voronoi(SegmentIterator first, SegmentIterator last, VD *vd)<br>
</td>
<td style="vertical-align: top;">Constructs Voronoi diagram of a set of segments.<br>Corresponding segment type should model the segment concept.<br>
</td>
@@ -257,7 +258,7 @@
SegmentIterator s_first, SegmentIterator s_last,<br>
-VD *output)<br>
+VD *vd)<br>
</td>
<td style="vertical-align: top;">Constructs Voronoi
diagram of a set of points and segments.<br>Corresponding point type should model the point concept.<br>
@@ -268,7 +269,7 @@
</table>
<br>This
means that it's possible to construct the Voronoi diagram with the
-following two lines of code (if corresponding input types satisfy Boost.Polygon concept model):<br>
+following two lines of code (if corresponding input types satisfy the Boost.Polygon concept model):<br>
<br>
<span style="font-family: Courier New,Courier,monospace;">voronoi_diagram<double>
vd;</span><br style="font-family: Courier New,Courier,monospace;">
@@ -372,7 +373,7 @@
</td>
</tr>
<tr>
- <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top"> </td>
+ <td style="background-color: rgb(238, 238, 238);" valign="top" nowrap="1"> </td>
<td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
<table class="docinfo" id="table2" frame="void" rules="none">
<colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup> <tbody valign="top">
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