Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57383 - in sandbox/ggl/formal_review/boost/ggl: algorithms algorithms/detail policies strategies/spherical util
From: barend.gehrels_at_[hidden]
Date: 2009-11-04 16:58:01


Author: barendgehrels
Date: 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
New Revision: 57383
URL: http://svn.boost.org/trac/boost/changeset/57383

Log:
GGL Doc updates (in sources)
Text files modified:
   sandbox/ggl/formal_review/boost/ggl/algorithms/detail/point_on_border.hpp | 16 ++++++++--------
   sandbox/ggl/formal_review/boost/ggl/algorithms/equals.hpp | 9 +++++++++
   sandbox/ggl/formal_review/boost/ggl/algorithms/for_each.hpp | 8 ++++----
   sandbox/ggl/formal_review/boost/ggl/policies/compare.hpp | 36 +++++++++++++++++++++++++++---------
   sandbox/ggl/formal_review/boost/ggl/strategies/spherical/compare_circular.hpp | 2 ++
   sandbox/ggl/formal_review/boost/ggl/util/add_const_if_c.hpp | 2 +-
   sandbox/ggl/formal_review/boost/ggl/util/select_coordinate_type.hpp | 12 ++++++++++++
   7 files changed, 63 insertions(+), 22 deletions(-)

Modified: sandbox/ggl/formal_review/boost/ggl/algorithms/detail/point_on_border.hpp
==============================================================================
--- sandbox/ggl/formal_review/boost/ggl/algorithms/detail/point_on_border.hpp (original)
+++ sandbox/ggl/formal_review/boost/ggl/algorithms/detail/point_on_border.hpp 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
@@ -140,14 +140,14 @@
 
 
 /*!
- \brief Take point on a border
- \ingroup utility
- \tparam Geometry geometry type
- \param geometry geometry to take point from
- \param point
- \return TRUE if successful, else false.
- It is only false if polygon/line have no points
- \note for a polygon, it is always a point on the exterior ring
+\brief Take point on a border
+\ingroup overlay
+\tparam Geometry geometry type
+\param geometry geometry to take point from
+\param point
+\return TRUE if successful, else false.
+ It is only false if polygon/line have no points
+\note for a polygon, it is always a point on the exterior ring
  */
 template <typename Geometry>
 inline bool point_on_border(Geometry const& geometry,

Modified: sandbox/ggl/formal_review/boost/ggl/algorithms/equals.hpp
==============================================================================
--- sandbox/ggl/formal_review/boost/ggl/algorithms/equals.hpp (original)
+++ sandbox/ggl/formal_review/boost/ggl/algorithms/equals.hpp 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
@@ -11,10 +11,19 @@
 
 /*!
 \defgroup equals equals: detect if two geometries are spatially equal
+\details Equals returns true if geometries are spatially equal. Spatially equal
+means including the same point-set. A linestring can be spatially equal to
+another linestring, even if both do not have the same amount of points.
+A polygon can be spatially equal to a multi-polygon (which then has
+only one element).
+
 \par Geometries:
 - \b point + \b point
 - \b box + \b box
 
+\note There is a functor \ref compare "compare" as well, which can be used
+for std:: library compatibility.
+
 */
 
 

Modified: sandbox/ggl/formal_review/boost/ggl/algorithms/for_each.hpp
==============================================================================
--- sandbox/ggl/formal_review/boost/ggl/algorithms/for_each.hpp (original)
+++ sandbox/ggl/formal_review/boost/ggl/algorithms/for_each.hpp 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
@@ -260,7 +260,7 @@
 
 /*!
     \brief Calls functor for geometry
- \ingroup loop
+ \ingroup for_each
     \param geometry geometry to loop through
     \param f functor to use
     \details Calls the functor the specified \b const geometry
@@ -283,7 +283,7 @@
 
 /*!
     \brief Calls functor for geometry
- \ingroup loop
+ \ingroup for_each
     \param geometry geometry to loop through
     \param f functor to use
     \details Calls the functor for the specified geometry
@@ -306,7 +306,7 @@
 
 /*!
     \brief Calls functor for segments on linestrings, rings, polygons, ...
- \ingroup loop
+ \ingroup for_each
     \param geometry geometry to loop through
     \param f functor to use
     \details Calls the functor all \b const segments of the
@@ -330,7 +330,7 @@
 
 /*!
     \brief Calls functor for segments on linestrings, rings, polygons, ...
- \ingroup loop
+ \ingroup for_each
     \param geometry geometry to loop through
     \param f functor to use
     \details Calls the functor all segments of the specified geometry

Modified: sandbox/ggl/formal_review/boost/ggl/policies/compare.hpp
==============================================================================
--- sandbox/ggl/formal_review/boost/ggl/policies/compare.hpp (original)
+++ sandbox/ggl/formal_review/boost/ggl/policies/compare.hpp 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
@@ -11,13 +11,36 @@
 
 /*!
 \defgroup compare compare: define compare functors for points
-\details Useful for:
-- std::map (use ggl::less<P>)
+\details The compare policies enable to compare points in a way that they can
+be compared in many functions of the standard library.
+
+The functors do have an optional second template argument, \b dimension.
+If dimension is specified, comparison is only done on that dimension.
+
+This is useful for (a.o.):
 - std::sort (use ggl::less<P> or ggl::greater<P> or ggl::less<P, 1>)
-- std::unique_copy (use ggl::equals<P>)
+- std::map (use ggl::less<P>)
+- std::unique_copy (use ggl::equal_to<P>)
 
 \par Geometries:
 - \b point
+
+
+\par Example:
+Example showing how ggl::less can be used
+\dontinclude doxygen_3.cpp
+\skip example_less()
+\line {
+\until }
+
+
+\note There is a boolean function \ref equals "equals" as well, which returns
+true or false if a geometry is spatially equal to another geometry. That one
+is defined for OGC compatibility, while these ones are defined for
+compatibility with the std:: library. These ones are functors, operating on
+the same geometry type (currently only the point-type), the equals function is
+a free function operating on different point types or even different geometry
+types (a linestring can be spatially equal to a multi-linestring).
 */
 
 #include <ggl/strategies/compare.hpp>
@@ -99,12 +122,7 @@
 };
 
 
-template
-<
- typename Point,
- typename Strategy,
- std::size_t Dimension
->
+template <typename Point, typename Strategy, std::size_t Dimension>
 class compare_in_one_dimension
 {
     Strategy compare;

Modified: sandbox/ggl/formal_review/boost/ggl/strategies/spherical/compare_circular.hpp
==============================================================================
--- sandbox/ggl/formal_review/boost/ggl/strategies/spherical/compare_circular.hpp (original)
+++ sandbox/ggl/formal_review/boost/ggl/strategies/spherical/compare_circular.hpp 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
@@ -22,6 +22,7 @@
 namespace strategy { namespace compare {
 
 
+#ifndef DOXYGEN_NO_DETAIL
 namespace detail {
 
 
@@ -46,6 +47,7 @@
 };
 
 } // namespace detail
+#endif
 
 /*!
     \brief Compare (in one direction) strategy for spherical coordinates

Modified: sandbox/ggl/formal_review/boost/ggl/util/add_const_if_c.hpp
==============================================================================
--- sandbox/ggl/formal_review/boost/ggl/util/add_const_if_c.hpp (original)
+++ sandbox/ggl/formal_review/boost/ggl/util/add_const_if_c.hpp 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
@@ -25,7 +25,7 @@
         const and non const references
     \note This traits class is completely independant from GGL and might be a
         separate addition to Boost
- \note Used in ggl::for_each
+ \note Used in a.o. ggl::for_each, ggl::interior_rings, ggl::exterior_ring
     \par Example
     \code
         void foo(typename add_const_if_c<IsConst, Point>::type& point)

Modified: sandbox/ggl/formal_review/boost/ggl/util/select_coordinate_type.hpp
==============================================================================
--- sandbox/ggl/formal_review/boost/ggl/util/select_coordinate_type.hpp (original)
+++ sandbox/ggl/formal_review/boost/ggl/util/select_coordinate_type.hpp 2009-11-04 16:58:00 EST (Wed, 04 Nov 2009)
@@ -16,6 +16,18 @@
 
 /*!
 \defgroup utility utility: utility meta-functions and functions
+\details The utilities, mostly in folder util, contain several headerfiles
+not fitting in one of the other folders.
+
+The following meta-functions are general and do not relate to GGL:
+- add_const_if_c
+- range_iterator_const_if_c
+- select_most_precise
+
+They might fit into boost as a separate trait or utility, or there might
+be a Boost equivalent which is yet unnoticed by the authors.
+
+
 */
 
 namespace ggl


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