Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71155 - in trunk/libs/geometry/doc: . generated other src/docutils/tools/implementation_status src/examples/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-04-09 17:24:28


Author: barendgehrels
Date: 2011-04-09 17:24:27 EDT (Sat, 09 Apr 2011)
New Revision: 71155
URL: http://svn.boost.org/trac/boost/changeset/71155

Log:
Added doc for equals
Added:
   trunk/libs/geometry/doc/generated/equals_status.qbk (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/equals.cpp (contents, props changed)
Binary files modified:
   trunk/libs/geometry/doc/other/status.xls
Text files modified:
   trunk/libs/geometry/doc/imports.qbk | 3 +++
   trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp | 1 +
   trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 | 1 +
   3 files changed, 5 insertions(+), 0 deletions(-)

Added: trunk/libs/geometry/doc/generated/equals_status.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/generated/equals_status.qbk 2011-04-09 17:24:27 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,10 @@
+[heading Supported geometries]
+[table
+[[ ][Point][Box][Linestring][Ring][Polygon][MultiPolygon]]
+[[Point][[$img/ok.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]]]
+[[Box][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]][[$img/nyi.png]]]
+[[Linestring][[$img/nyi.png]][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]]]
+[[Ring][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]][[$img/nyi.png]]]
+[[Polygon][[$img/nyi.png]][[$img/ok.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]][[$img/ok.png]]]
+[[MultiPolygon][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/nyi.png]][[$img/ok.png]][[$img/ok.png]]]
+]

Modified: trunk/libs/geometry/doc/imports.qbk
==============================================================================
--- trunk/libs/geometry/doc/imports.qbk (original)
+++ trunk/libs/geometry/doc/imports.qbk 2011-04-09 17:24:27 EDT (Sat, 09 Apr 2011)
@@ -11,6 +11,7 @@
 =============================================================================/]
 
 [import src/examples/quick_start.cpp]
+
 [import src/examples/algorithms/area.cpp]
 [import src/examples/algorithms/area_with_strategy.cpp]
 [import src/examples/algorithms/append.cpp]
@@ -28,6 +29,7 @@
 [import src/examples/algorithms/distance.cpp]
 [import src/examples/algorithms/difference.cpp]
 [import src/examples/algorithms/envelope.cpp]
+[import src/examples/algorithms/equals.cpp]
 [import src/examples/algorithms/expand.cpp]
 [import src/examples/algorithms/for_each_point.cpp]
 [import src/examples/algorithms/for_each_point_const.cpp]
@@ -54,6 +56,7 @@
 [import src/examples/algorithms/union.cpp]
 [import src/examples/algorithms/unique.cpp]
 [import src/examples/algorithms/within.cpp]
+
 [import src/examples/core/get_point.cpp]
 [import src/examples/core/get_box.cpp]
 [import src/examples/core/set_point.cpp]

Modified: trunk/libs/geometry/doc/other/status.xls
==============================================================================
Binary files. No diff available.

Modified: trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp 2011-04-09 17:24:27 EDT (Sat, 09 Apr 2011)
@@ -303,6 +303,7 @@
     algorithms.push_back(algorithm("centroid", 2));
     algorithms.push_back(algorithm("intersects", 2));
     algorithms.push_back(algorithm("within", 2));
+ algorithms.push_back(algorithm("equals", 2));
 
     typedef std::vector<cs> cs_type;
     cs_type css;

Modified: trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 (original)
+++ trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 2011-04-09 17:24:27 EDT (Sat, 09 Apr 2011)
@@ -35,6 +35,7 @@
 exe distance : distance.cpp ;
 
 exe envelope : envelope.cpp ;
+exe equals : equals.cpp ;
 exe expand : expand.cpp ;
 
 exe for_each_point : for_each_point.cpp ;

Added: trunk/libs/geometry/doc/src/examples/algorithms/equals.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/equals.cpp 2011-04-09 17:24:27 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,59 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 2011 Barend Gehrels, Amsterdam, the Netherlands.
+
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+//[equals
+//` Shows the predicate equals, which returns true if two geometries are spatially equal
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
+
+#include <boost/assign.hpp>
+
+int main()
+{
+ using boost::assign::tuple_list_of;
+
+ typedef boost::tuple<int, int> point;
+
+ boost::geometry::model::polygon<point> poly1, poly2;
+ boost::geometry::exterior_ring(poly1) = tuple_list_of(0, 0)(0, 5)(5, 5)(5, 0)(0, 0);
+ boost::geometry::exterior_ring(poly2) = tuple_list_of(5, 0)(0, 0)(0, 5)(5, 5)(5, 0);
+
+ std::cout
+ << "polygons are spatially "
+ << (boost::geometry::equals(poly1, poly2) ? "equal" : "not equal")
+ << std::endl;
+
+ boost::geometry::model::box<point> box;
+ boost::geometry::assign(box, 0, 0, 5, 5);
+
+ std::cout
+ << "polygon and box are spatially "
+ << (boost::geometry::equals(box, poly2) ? "equal" : "not equal")
+ << std::endl;
+
+
+ return 0;
+}
+
+//]
+
+
+//[equals_output
+/*`
+Output:
+[pre
+polygons are spatially equal
+polygon and box are spatially equal
+]
+*/
+//]


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