Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71808 - in trunk/libs/geometry: doc test/algorithms test/iterators test/multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-05-08 07:01:15


Author: barendgehrels
Date: 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
New Revision: 71808
URL: http://svn.boost.org/trac/boost/changeset/71808

Log:
Reflects changes in moving range_type/as_range/circular_iterator
Removed:
   trunk/libs/geometry/test/iterators/circular_iterator.cpp
   trunk/libs/geometry/test/iterators/circular_iterator.vcproj
Text files modified:
   trunk/libs/geometry/doc/quickref.xml | 3 +--
   trunk/libs/geometry/test/algorithms/convex_hull.cpp | 21 ++++++++++++---------
   trunk/libs/geometry/test/iterators/Jamfile.v2 | 1 -
   trunk/libs/geometry/test/iterators/iterators.sln | 6 ------
   trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp | 2 +-
   5 files changed, 14 insertions(+), 19 deletions(-)

Modified: trunk/libs/geometry/doc/quickref.xml
==============================================================================
--- trunk/libs/geometry/doc/quickref.xml (original)
+++ trunk/libs/geometry/doc/quickref.xml 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
@@ -260,7 +260,7 @@
  </tbody>
 </tgroup>
 
-<!-- ###### ITERATORS / RANGES ##################################################### -->
+<!-- ###### ITERATORS / VIEWS ##################################################### -->
 <tgroup cols="2">
  <colspec colname="a"/>
  <colspec colname="b"/>
@@ -279,7 +279,6 @@
    <entry valign="top">
     <simplelist type="vert" columns="1">
     <member><link linkend="geometry.reference.iterators.closing_iterator">closing_iterator</link></member>
- <member><link linkend="geometry.reference.iterators.circular_iterator">circular_iterator</link></member>
     <member><link linkend="geometry.reference.iterators.ever_circling_iterator">ever_circling_iterator</link></member>
     </simplelist>
    </entry>

Modified: trunk/libs/geometry/test/algorithms/convex_hull.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/convex_hull.cpp (original)
+++ trunk/libs/geometry/test/algorithms/convex_hull.cpp 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
@@ -21,26 +21,29 @@
 
 
 template <typename P>
-void test_all(bool do_rectangular = true)
+void test_all()
 {
     // from sample linestring
-
     test_geometry<bg::model::linestring<P> >(
         "linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)", 5, 4, 3.8);
 
- if (do_rectangular)
- {
- // rectangular, with concavity
- test_geometry<bg::model::polygon<P> >(
- "polygon((1 1, 1 4, 3 4, 3 3, 4 3, 4 4, 5 4, 5 1, 1 1))",
- 9, 5, 12.0);
- }
+ // rectangular, with concavity
+ test_geometry<bg::model::polygon<P> >(
+ "polygon((1 1, 1 4, 3 4, 3 3, 4 3, 4 4, 5 4, 5 1, 1 1))",
+ 9, 5, 12.0);
 
     // from sample polygon, with concavity
     test_geometry<bg::model::polygon<P> >(
         "polygon((2.0 1.3, 2.4 1.7, 2.8 1.8, 3.4 1.2, 3.7 1.6,3.4 2.0, 4.1 3.0"
         ", 5.3 2.6, 5.4 1.2, 4.9 0.8, 2.9 0.7,2.0 1.3))",
                 12, 8, 5.245);
+
+ test_geometry<bg::model::ring<P> >(
+ "polygon((2.0 1.3, 2.4 1.7, 2.8 1.8, 3.4 1.2, 3.7 1.6,3.4 2.0, 4.1 3.0"
+ ", 5.3 2.6, 5.4 1.2, 4.9 0.8, 2.9 0.7,2.0 1.3))",
+ 12, 8, 5.245);
+
+ // Waits for next cycle test_geometry<bg::model::box<P> >("box(0 0,2 2)", 5, 5, 4);
 }
 
 int test_main(int, char* [])

Modified: trunk/libs/geometry/test/iterators/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/test/iterators/Jamfile.v2 (original)
+++ trunk/libs/geometry/test/iterators/Jamfile.v2 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
@@ -10,7 +10,6 @@
 
 test-suite boost-geometry-iterators
     :
- [ run circular_iterator.cpp ]
     [ run closing_iterator.cpp ]
     [ run ever_circling_iterator.cpp ]
     ;

Deleted: trunk/libs/geometry/test/iterators/circular_iterator.cpp
==============================================================================
--- trunk/libs/geometry/test/iterators/circular_iterator.cpp 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,113 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, 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)
-
-#include <algorithm>
-#include <iterator>
-#include <sstream>
-#include <string>
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/iterators/circular_iterator.hpp>
-
-#include <boost/geometry/core/coordinate_type.hpp>
-#include <boost/geometry/domains/gis/io/wkt/read_wkt.hpp>
-#include <boost/geometry/geometries/geometries.hpp>
-
-
-template <typename Geometry, typename CircularIterator>
-void test_forward(Geometry const& geometry, CircularIterator end,
- int offset, std::string const& expected)
-{
- CircularIterator it(boost::begin(geometry), boost::end(geometry),
- boost::begin(geometry) + offset);
-
- std::ostringstream out;
- for (; it != end; ++it)
- {
- out << bg::get<0>(*it);
- }
- BOOST_CHECK_EQUAL(out.str(), expected);
-}
-
-
-template <typename Geometry, typename CircularIterator>
-void test_backward(Geometry const& geometry, CircularIterator end,
- int offset, std::string const& expected)
-{
- CircularIterator it(boost::begin(geometry), boost::end(geometry),
- boost::begin(geometry) + offset);
-
- std::ostringstream out;
- for (; it != end; --it)
- {
- out << bg::get<0>(*it);
- }
- BOOST_CHECK_EQUAL(out.str(), expected);
-}
-
-
-
-template <typename G>
-void test_geometry(std::string const& wkt)
-{
- G geo;
- bg::read_wkt(wkt, geo);
- typedef typename boost::range_const_iterator<G>::type normal_iterator;
- typedef bg::circular_iterator<normal_iterator> circular_iterator;
-
- circular_iterator end(boost::end(geo));
-
- // 2: start somewhere in the middle (first == test before)
- test_forward(geo, end, 0, "12345");
- test_forward(geo, end, 1, "23451");
- test_forward(geo, end, 2, "34512");
- test_forward(geo, end, 3, "45123");
- test_forward(geo, end, 4, "51234");
-
- test_backward(geo, end, 0, "15432");
- test_backward(geo, end, 1, "21543");
- test_backward(geo, end, 2, "32154");
- test_backward(geo, end, 3, "43215");
- test_backward(geo, end, 4, "54321");
-
- // 4: check copy behaviour
- G copy;
-
- normal_iterator start = boost::begin(geo) + 2;
- circular_iterator it(boost::begin(geo), boost::end(geo), start);
- std::copy<circular_iterator>(it, end, std::back_inserter(copy));
-
- std::ostringstream out;
- for (normal_iterator cit = boost::begin(copy); cit != boost::end(copy); ++cit)
- {
- out << bg::get<0>(*cit);
- }
- BOOST_CHECK_EQUAL(out.str(), "34512");
-}
-
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::linestring<P> >("linestring(1 1,2 2,3 3,4 4,5 5)");
-}
-
-
-int test_main(int, char* [])
-{
- test_all<bg::model::d2::point_xy<double> >();
-
- return 0;
-}

Deleted: trunk/libs/geometry/test/iterators/circular_iterator.vcproj
==============================================================================
--- trunk/libs/geometry/test/iterators/circular_iterator.vcproj 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="circular_iterator"
- ProjectGUID="{46571A34-B68D-4854-90C0-56D29EE63FFE}"
- RootNamespace="circular_iterator"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\circular_iterator"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- ExceptionHandling="2"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- EmbedManifest="false"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\circular_iterator"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- ExceptionHandling="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- EmbedManifest="false"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\circular_iterator.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>

Modified: trunk/libs/geometry/test/iterators/iterators.sln
==============================================================================
--- trunk/libs/geometry/test/iterators/iterators.sln (original)
+++ trunk/libs/geometry/test/iterators/iterators.sln 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
@@ -2,8 +2,6 @@
 # Visual C++ Express 2005
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ever_circling_iterator", "ever_circling_iterator.vcproj", "{73F8C969-FA1E-4D9D-81F9-35B1206F0C14}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "circular_iterator", "circular_iterator.vcproj", "{46571A34-B68D-4854-90C0-56D29EE63FFE}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "closing_iterator", "closing_iterator.vcproj", "{04C31A2D-BE88-4FDB-AFFE-EFDFFA9D9C39}"
 EndProject
 Global
@@ -16,10 +14,6 @@
                 {73F8C969-FA1E-4D9D-81F9-35B1206F0C14}.Debug|Win32.Build.0 = Debug|Win32
                 {73F8C969-FA1E-4D9D-81F9-35B1206F0C14}.Release|Win32.ActiveCfg = Release|Win32
                 {73F8C969-FA1E-4D9D-81F9-35B1206F0C14}.Release|Win32.Build.0 = Release|Win32
- {46571A34-B68D-4854-90C0-56D29EE63FFE}.Debug|Win32.ActiveCfg = Debug|Win32
- {46571A34-B68D-4854-90C0-56D29EE63FFE}.Debug|Win32.Build.0 = Debug|Win32
- {46571A34-B68D-4854-90C0-56D29EE63FFE}.Release|Win32.ActiveCfg = Release|Win32
- {46571A34-B68D-4854-90C0-56D29EE63FFE}.Release|Win32.Build.0 = Release|Win32
                 {04C31A2D-BE88-4FDB-AFFE-EFDFFA9D9C39}.Debug|Win32.ActiveCfg = Debug|Win32
                 {04C31A2D-BE88-4FDB-AFFE-EFDFFA9D9C39}.Debug|Win32.Build.0 = Debug|Win32
                 {04C31A2D-BE88-4FDB-AFFE-EFDFFA9D9C39}.Release|Win32.ActiveCfg = Release|Win32

Modified: trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp 2011-05-08 07:01:13 EDT (Sun, 08 May 2011)
@@ -25,7 +25,7 @@
 #include <boost/geometry/multi/core/point_order.hpp>
 #include <boost/geometry/multi/core/point_type.hpp>
 
-#include <boost/geometry/multi/iterators/range_type.hpp>
+#include <boost/geometry/multi/views/detail/range_type.hpp>
 
 #include <boost/geometry/multi/algorithms/num_points.hpp>
 #include <boost/geometry/multi/algorithms/detail/for_each_range.hpp>


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