Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77964 - in sandbox/gtl: boost/polygon doc
From: sydorchuk.andriy_at_[hidden]
Date: 2012-04-13 18:43:58


Author: asydorchuk
Date: 2012-04-13 18:43:57 EDT (Fri, 13 Apr 2012)
New Revision: 77964
URL: http://svn.boost.org/trac/boost/changeset/77964

Log:
Updating documentation.

Text files modified:
   sandbox/gtl/boost/polygon/voronoi_utils.hpp | 12 +-
   sandbox/gtl/doc/voronoi_predicates.htm | 12 +-
   sandbox/gtl/doc/voronoi_robust_fpt.htm | 18 +--
   sandbox/gtl/doc/voronoi_utils.htm | 170 ++++++++++++++++++++++++---------------
   4 files changed, 122 insertions(+), 90 deletions(-)

Modified: sandbox/gtl/boost/polygon/voronoi_utils.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/voronoi_utils.hpp (original)
+++ sandbox/gtl/boost/polygon/voronoi_utils.hpp 2012-04-13 18:43:57 EDT (Fri, 13 Apr 2012)
@@ -89,12 +89,9 @@
   coordinate_type y_max_;
 };
 
-template <typename fpt_>
-struct voronoi_utils_traits;
-
-template<>
-struct voronoi_utils_traits<double> {
- typedef double coordinate_type;
+template <typename fpt>
+struct voronoi_utils_traits {
+ typedef fpt coordinate_type;
   typedef detail::point_2d<coordinate_type> point_type;
   typedef std::vector<point_type> point_set_type;
   typedef bounding_rectangle<coordinate_type> brect_type;
@@ -114,7 +111,6 @@
   typedef typename TRAITS::point_type point_type;
   typedef typename TRAITS::point_set_type point_set_type;
   typedef typename TRAITS::brect_type brect_type;
- typedef typename TRAITS::ctype_converter_type ctype_converter_type;
 
   // Get scaled by a factor bounding rectangle.
   template <typename CT>
@@ -234,6 +230,8 @@
   }
 
 private:
+ typedef typename TRAITS::ctype_converter_type ctype_converter_type;
+
   voronoi_utils();
 
   // There are three different types of linear primitive:

Modified: sandbox/gtl/doc/voronoi_predicates.htm
==============================================================================
--- sandbox/gtl/doc/voronoi_predicates.htm (original)
+++ sandbox/gtl/doc/voronoi_predicates.htm 2012-04-13 18:43:57 EDT (Fri, 13 Apr 2012)
@@ -1,6 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
 
+
   
   <meta http-equiv="Content-Language" content="en-us">
 
@@ -18,7 +19,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>
@@ -90,10 +91,10 @@
 In mathematical theory predicate is an operator which returns true
 or false (e.g. it may answer a question: "is it sunny today?").<br>
 
-The Voronoi predicates contain implementation of a set of the geometric
+Voronoi predicates contain implementation of a set of the geometric
 predicates used by the Voronoi builder.
 Except of those it also provides
-functors that allow to compute the coordinates of the centers of the
+functors that allow to compute coordinates of the centers of the
 inscribed
 circles (those correspond to the Voronoi vertices) within the given
 relative error precision range (64 machine epsilons). This means that
@@ -220,7 +221,7 @@
 </td>
     </tr>
     <tr>
- <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="background-color: rgb(238, 238, 238);" valign="top" nowrap="1">&nbsp;</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">
@@ -241,4 +242,5 @@
   </tbody>
 </table>
 
-</body></html>
+
+</body></html>
\ No newline at end of file

Modified: sandbox/gtl/doc/voronoi_robust_fpt.htm
==============================================================================
--- sandbox/gtl/doc/voronoi_robust_fpt.htm (original)
+++ sandbox/gtl/doc/voronoi_robust_fpt.htm 2012-04-13 18:43:57 EDT (Fri, 13 Apr 2012)
@@ -1,19 +1,16 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-
- <meta http-equiv="Content-Language" content="en-us">
 
   
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>Voronoi Robust FPT</title>
+ <meta http-equiv="Content-Language" content="en-us">
 
   
-</head><body>
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Robust FPT</title></head><body>
 <table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
 
   <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>
@@ -83,7 +80,7 @@
 robust floating-point types are the set of classes and tools that
 allow to estimate relative error of the arithmetic expressions. It is
 assumed that the other Boost libraries may find this unit functionality
-extremely useful, as it can be use d to implement robust and efficient
+extremely useful, as it can be used to implement robust and efficient
 arithmetic predicates or functors that compute values within known
 relative error.<br>
       <h2>Robust Fpt Type</h2>
@@ -123,12 +120,11 @@
 arithmetic operators are overloaded for the robust difference type: +,
 -, *, / (division operator is not overloaded for the case were both
 arguments have robust difference type).<br>
-Looking at the relative error formulas above one may notice a few facts
-about them:<br>
+Looking at the relative error formulas above one may notice a few facts:<br>
 1) all of the formulas evaluate upper bound of the relative error, the
 actual value could be a lot smaller;<br>
 2) relative error estimate for the expression depends on the order
-operations are executed;<br>
+operations are evaluated;<br>
 3) relative error of&nbsp; the difference of two positive numbers may
 be
 extremely large in case their values are close to each other (this is
@@ -187,7 +183,7 @@
       </td>
     </tr>
     <tr>
- <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="background-color: rgb(238, 238, 238);" valign="top" nowrap="1">&nbsp;</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">

Modified: sandbox/gtl/doc/voronoi_utils.htm
==============================================================================
--- sandbox/gtl/doc/voronoi_utils.htm (original)
+++ sandbox/gtl/doc/voronoi_utils.htm 2012-04-13 18:43:57 EDT (Fri, 13 Apr 2012)
@@ -1,25 +1,24 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
+
   
   <meta http-equiv="Content-Language" content="en-us">
 
   
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>Voronoi Utils</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Utils</title>
+
 
   
   
   <meta http-equiv="content-type" content="text/html; charset=utf-8">
 
   
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
-
-</head><body>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>
 <table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
 
   <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>
@@ -90,14 +89,19 @@
 especially for
 the visualization of the Voronoi diagrams or discretization of the
 parabolic
-edges. Keep in mind that there are no warranties about precision of the
-output structures produces by the utilities class. This is mostly
+edges. <br>
+ <h2>Important<br>
+ </h2>
+
+There are no warranties about precision of the
+output structures produced by the utilities class. This is mostly
 because input
-coordinate type utilities operate with
-is double. Any degeneracies may be reported, however those are of low
-priority to be fixed. The class
-declaration is following:<br>
- <br>
+coordinate type the utilities operate with
+is supposed to be double. Any degeneracies may be reported, however those are of low
+priority to be fixed. <br>
+ <h2>Declaration</h2>
+
+
       <span style="font-family: Courier New,Courier,monospace;">template
 &lt;typename T, typename TRAITS = voronoi_utils_traits&lt;T&gt; &gt;</span><br style="font-family: Courier New,Courier,monospace;">
       <span style="font-family: Courier New,Courier,monospace;">class
@@ -116,8 +120,7 @@
 &lt;typename CT&gt;</span><br style="font-family: Courier New,Courier,monospace;">
             <span style="font-family: Courier New,Courier,monospace;">static
 brect_type scale_bounding_rectangle(<br>
-&nbsp;&nbsp;&nbsp; const bounding_rectangle&lt;CT&gt; &amp;brect,<br>
-&nbsp;&nbsp;&nbsp; fpt_type factor = 1.0)</span><br>
+&nbsp; const bounding_rectangle&lt;CT&gt; &amp;brect,<br>&nbsp; fpt_type factor = 1.0)</span><br>
             </td>
             <td style="vertical-align: top;">Returns the scaled
 bounding rectangle.<br>
@@ -129,27 +132,23 @@
             <td style="vertical-align: top;"><span style="font-family: Courier New,Courier,monospace;">template
 &lt;typename CT&gt;<br>
 static void discretize_finite_edge(<br>
-&nbsp;&nbsp;&nbsp; const voronoi_edge&lt;CT&gt; &amp;edge,<br>
-&nbsp;&nbsp;&nbsp; coordinate_type max_error,<br>
-&nbsp;&nbsp;&nbsp; point_set_type &amp;discretization)</span><span style="font-family: Courier New,Courier,monospace;"></span><span style="font-family: Courier New,Courier,monospace;"></span><br>
+&nbsp; const voronoi_edge&lt;CT&gt; &amp;edge,<br>&nbsp; coordinate_type max_error,<br>&nbsp; point_set_type &amp;discretization)</span><span style="font-family: Courier New,Courier,monospace;"></span><span style="font-family: Courier New,Courier,monospace;"></span><br>
             </td>
             <td style="vertical-align: top;">Provides the point
 discretization of the input voronoi edge.<br>
-If the edge is infinite (ray, line) doesn't fill output point set.<br>
-Max error specifies the maximum absolute value of the approximation.<br>
+If the edge is infinite (ray, line) returns empty output set.<br>
+Max error specifies the maximum distance between approximation and original parabolic arc.<br>
             </td>
           </tr>
           <tr>
             <td style="vertical-align: top;"><span style="font-family: Courier New,Courier,monospace;">template
 &lt;typename CT&gt;<br>
 static void clip_linear_edge(<br>
-&nbsp;&nbsp;&nbsp; const voronoi_edge&lt;CT&gt; &amp;edge,<br>
-&nbsp;&nbsp;&nbsp; const brect_type &amp;brect,<br>
-&nbsp;&nbsp;&nbsp; point_set_type &amp;clipped_edge)</span><br>
+&nbsp; const voronoi_edge&lt;CT&gt; &amp;edge,<br>&nbsp; const brect_type &amp;brect,<br>&nbsp; point_set_type &amp;clipped_edge)</span><br>
             </td>
             <td style="vertical-align: top;">Clips the input Voronoi
 edges with the specified rectangle.<br>
-If the edge is a parabolic arc doesn't fill the output point set.<br>
+If the edge is a parabolic arc returns empty output set.<br>
             </td>
           </tr>
           <tr>
@@ -157,10 +156,7 @@
 &lt;typename PointType&gt;</span><br style="font-family: Courier New,Courier,monospace;">
             <span style="font-family: Courier New,Courier,monospace;">static
 void clip_linear_edge(<br>
-&nbsp;&nbsp;&nbsp; const PointType &amp;p1,<br>
-&nbsp;&nbsp;&nbsp; const PointType &amp;p2,<br>
-&nbsp;&nbsp;&nbsp; const brect_type &amp;brect,<br>
-&nbsp;&nbsp;&nbsp; point_set_type &amp;clipped_edge)</span><br>
+&nbsp; const PointType &amp;p1,<br>&nbsp; const PointType &amp;p2,<br>&nbsp; const brect_type &amp;brect,<br>&nbsp; point_set_type &amp;clipped_edge)</span><br>
             </td>
             <td style="vertical-align: top;">Clips the input linear
 edge with the specified rectangle.<br>
@@ -169,10 +165,37 @@
           </tr>
         </tbody>
       </table>
+
+ <h2 style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Member Types</h2>
+
+ <br>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;">coordinate_type</td>
+ <td style="vertical-align: top;">Coordinate type.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">point_type</td>
+ <td style="vertical-align: top;">2D Point</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">point_set_type</td>
+ <td style="vertical-align: top;">2D Point set.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">brect_type</td>
+ <td style="vertical-align: top;">Bounding rectangle.</td>
+ </tr>
+ </tbody>
+ </table>
       <h1>Bounding Rectangle</h1>
-The module provides implementation of a simple bounding rectangle
-structure with the following declaration:<br>
- <br style="font-family: Courier New,Courier,monospace;">
+
+The module provides implementation of a simple bounding rectangle data structure.<br>
+ <h2>Declaration</h2>
+
+
+
       <span style="font-family: Courier New,Courier,monospace;">template
 &lt;typename T&gt;</span><br style="font-family: Courier New,Courier,monospace;">
       <span style="font-family: Courier New,Courier,monospace;">class
@@ -209,7 +232,7 @@
             </td>
             <td style="vertical-align: top;">Extends the bounding
 rectangle with the specified point defined by its coordinates.<br>
-If the rectangle is not initialized, initialized it with the specifed
+If the rectangle is not initialized, initializes it with the specifed
 point.<br>
             </td>
           </tr>
@@ -274,47 +297,60 @@
           </tr>
         </tbody>
       </table>
- <h1>Voronoi Utils Traits<br>
- </h1>
-Below is shown the default Voronoi utilities traits declaration:<br>
- <br>
+
+ <h1>Voronoi Utils Traits</h1>
+Voronoi utils traits supply Voronoi utilities with appropriate input/output types and type converter structure.<br>
+ <h2>Declaration</h2>
+
+
+
       <span style="font-family: Courier New,Courier,monospace;">template
-&lt;typename fpt_&gt;</span><br style="font-family: Courier New,Courier,monospace;">
+&lt;typename fpt&gt;</span><br style="font-family: Courier New,Courier,monospace;">
       <span style="font-family: Courier New,Courier,monospace;">struct
 voronoi_utils_traits;</span><br style="font-family: Courier New,Courier,monospace;">
- <br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">template&lt;&gt;</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">struct
-voronoi_utils_traits&lt;double&gt; {</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
-typedef double fpt_type;</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
-typedef detail::point_2d&lt;fpt_type&gt; point_type;</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
-typedef std::vector&lt;point_type&gt; point_set_type;</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
-typedef bounding_rectangle&lt;fpt_type&gt; brect_type;</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
-typedef struct {</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-template &lt;typename CT&gt;</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-fpt_type operator()(const CT&amp; value) const {</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-return static_cast&lt;fpt_type&gt;(value);</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-}</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
-} ctype_converter_type;</span><br style="font-family: Courier New,Courier,monospace;">
- <span style="font-family: Courier New,Courier,monospace;">};<br>
- <br>
- </span>Most of the types define output geometries.
-ctype_converter_type is used to cast the coordinate type of the input
-primitives to the one used by the utililities internally.<br>
+
+
+ <h2 style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Member Types<br>
+ </h2>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;">coordinate_type<br>
+ </td>
+ <td style="vertical-align: top;">Coordinate type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">point_type<br>
+ </td>
+ <td style="vertical-align: top;">2D Point .<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">point_set_type<br>
+ </td>
+ <td style="vertical-align: top;">2D Point set.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">brect_type<br>
+ </td>
+ <td style="vertical-align: top;">Bounding rectangle.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">ctype_converter_type<br>
+ </td>
+ <td style="vertical-align: top;">Coordinate type converter structure.<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
       </td>
     </tr>
     <tr>
- <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="background-color: rgb(238, 238, 238);" valign="top" nowrap="1">&nbsp;</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