Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71120 - in branches/release/libs/geometry: . doc example test test/algorithms test/algorithms/detail
From: barend.gehrels_at_[hidden]
Date: 2011-04-08 11:43:59


Author: barendgehrels
Date: 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
New Revision: 71120
URL: http://svn.boost.org/trac/boost/changeset/71120

Log:
Merged 71027,71093,71117 (centroid nD plus convert to detail)
Added:
   branches/release/libs/geometry/test/algorithms/detail/convert.cpp
      - copied unchanged from r71118, /trunk/libs/geometry/test/algorithms/detail/convert.cpp
   branches/release/libs/geometry/test/algorithms/detail/convert.vcproj
      - copied unchanged from r71118, /trunk/libs/geometry/test/algorithms/detail/convert.vcproj
Removed:
   branches/release/libs/geometry/test/algorithms/convert.cpp
   branches/release/libs/geometry/test/algorithms/convert.vcproj
Properties modified:
   branches/release/libs/geometry/ (props changed)
   branches/release/libs/geometry/doc/ (props changed)
   branches/release/libs/geometry/example/ (props changed)
   branches/release/libs/geometry/index.html (props changed)
   branches/release/libs/geometry/test/ (props changed)
Text files modified:
   branches/release/libs/geometry/test/algorithms/Jamfile.v2 | 1 -
   branches/release/libs/geometry/test/algorithms/algorithms_tests.sln | 6 ------
   branches/release/libs/geometry/test/algorithms/centroid.cpp | 2 ++
   branches/release/libs/geometry/test/algorithms/detail/Jamfile.v2 | 1 +
   branches/release/libs/geometry/test/algorithms/detail/detail.sln | 6 ++++++
   5 files changed, 9 insertions(+), 7 deletions(-)

Modified: branches/release/libs/geometry/test/algorithms/Jamfile.v2
==============================================================================
--- branches/release/libs/geometry/test/algorithms/Jamfile.v2 (original)
+++ branches/release/libs/geometry/test/algorithms/Jamfile.v2 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
@@ -16,7 +16,6 @@
     [ run buffer.cpp ]
     [ run centroid.cpp ]
     [ run comparable_distance.cpp ]
- [ run convert.cpp ]
     [ run convex_hull.cpp ]
     [ run correct.cpp ]
     [ run difference.cpp ]

Modified: branches/release/libs/geometry/test/algorithms/algorithms_tests.sln
==============================================================================
--- branches/release/libs/geometry/test/algorithms/algorithms_tests.sln (original)
+++ branches/release/libs/geometry/test/algorithms/algorithms_tests.sln 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
@@ -8,8 +8,6 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expand", "expand.vcproj", "{5330DAB1-DF27-44FC-971B-3C5094F82FA3}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convert", "convert.vcproj", "{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convex_hull", "convex_hull.vcproj", "{0AFF7A85-63A7-4178-92A5-CC692B09F5B9}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "distance", "distance.vcproj", "{347D08A4-22E9-45B1-A55B-AE84AA2EAA53}"
@@ -78,10 +76,6 @@
                 {5330DAB1-DF27-44FC-971B-3C5094F82FA3}.Debug|Win32.Build.0 = Debug|Win32
                 {5330DAB1-DF27-44FC-971B-3C5094F82FA3}.Release|Win32.ActiveCfg = Release|Win32
                 {5330DAB1-DF27-44FC-971B-3C5094F82FA3}.Release|Win32.Build.0 = Release|Win32
- {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.ActiveCfg = Debug|Win32
- {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.Build.0 = Debug|Win32
- {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.ActiveCfg = Release|Win32
- {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.Build.0 = Release|Win32
                 {0AFF7A85-63A7-4178-92A5-CC692B09F5B9}.Debug|Win32.ActiveCfg = Debug|Win32
                 {0AFF7A85-63A7-4178-92A5-CC692B09F5B9}.Debug|Win32.Build.0 = Debug|Win32
                 {0AFF7A85-63A7-4178-92A5-CC692B09F5B9}.Release|Win32.ActiveCfg = Release|Win32

Modified: branches/release/libs/geometry/test/algorithms/centroid.cpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/centroid.cpp (original)
+++ branches/release/libs/geometry/test/algorithms/centroid.cpp 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
@@ -78,6 +78,7 @@
 template <typename P>
 void test_3d()
 {
+ test_centroid<bg::model::linestring<P> >("LINESTRING(1 2 3,4 5 -6,7 -8 9,-10 11 12,13 -14 -15, 16 17 18)", 5.6748865168734692, 0.31974938587214002, 1.9915270387763671);
     test_centroid<bg::model::box<P> >("POLYGON((1 2 3,5 6 7))", 3, 4, 5);
     test_centroid<P>("POINT(1 2 3)", 1, 2, 3);
 }
@@ -93,6 +94,7 @@
 
 #if defined(HAVE_TTMATH)
     test_2d<bg::model::d2::point_xy<ttmath_big> >();
+ test_3d<boost::tuple<ttmath_big, ttmath_big, ttmath_big> >();
 #endif
 
     return 0;

Deleted: branches/release/libs/geometry/test/algorithms/convert.cpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/convert.cpp 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
+++ (empty file)
@@ -1,105 +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 <geometry_test_common.hpp>
-
-
-#include <boost/geometry/algorithms/assign.hpp>
-#include <boost/geometry/algorithms/convert.hpp>
-#include <boost/geometry/algorithms/make.hpp>
-#include <boost/geometry/algorithms/num_points.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/adapted/c_array_cartesian.hpp>
-#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
-#include <test_common/test_point.hpp>
-
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::box<P> box_type;
-
- P p;
- bg::assign(p, 1, 2);
-
- box_type b;
- bg::convert(p, b);
-
- BOOST_CHECK_CLOSE((bg::get<0, 0>(b)), 1.0, 0.001);
- BOOST_CHECK_CLOSE((bg::get<0, 1>(b)), 2.0, 0.001);
- BOOST_CHECK_CLOSE((bg::get<1, 0>(b)), 1.0, 0.001);
- BOOST_CHECK_CLOSE((bg::get<1, 1>(b)), 2.0, 0.001);
-}
-
-template <typename P>
-void test_std()
-{
- test_all<P>();
-
- typedef bg::model::box<P> box_type;
- typedef bg::model::ring<P> ring_type;
- typedef bg::model::polygon<P> polygon_type;
-
- box_type b;
- bg::set<bg::min_corner, 0>(b, 1);
- bg::set<bg::min_corner, 1>(b, 2);
- bg::set<bg::max_corner, 0>(b, 3);
- bg::set<bg::max_corner, 1>(b, 4);
-
- ring_type ring;
- bg::convert(b, ring);
-
- //std::cout << bg::wkt(b) << std::endl;
- //std::cout << bg::wkt(ring) << std::endl;
-
- typename boost::range_const_iterator<ring_type>::type it = ring.begin();
- BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
- BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
- it++;
- BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
- BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
- it++;
- BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
- BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
- it++;
- BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
- BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
- it++;
- BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
- BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
-
- BOOST_CHECK_EQUAL(ring.size(), 5u);
-
-
- polygon_type polygon;
-
- bg::convert(ring, polygon);
- BOOST_CHECK_EQUAL(bg::num_points(polygon), 5u);
-
- bg::convert(polygon, ring);
- BOOST_CHECK_EQUAL(bg::num_points(ring), 5u);
-}
-
-int test_main(int, char* [])
-{
- test_std<bg::model::point<int, 2, bg::cs::cartesian> >();
- test_std<bg::model::point<float, 2, bg::cs::cartesian> >();
- test_std<bg::model::point<double, 2, bg::cs::cartesian> >();
-
-#ifdef HAVE_TTMATH
- test_std<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
-#endif
- return 0;
-}

Deleted: branches/release/libs/geometry/test/algorithms/convert.vcproj
==============================================================================
--- branches/release/libs/geometry/test/algorithms/convert.vcproj 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
+++ (empty file)
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="convert"
- ProjectGUID="{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}"
- RootNamespace="convert"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\convert"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops;..\ttmath.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"
- 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"
- />
- <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)\convert"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops;..\ttmath.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"
- />
- <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"
- />
- <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=".\convert.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>

Modified: branches/release/libs/geometry/test/algorithms/detail/Jamfile.v2
==============================================================================
--- branches/release/libs/geometry/test/algorithms/detail/Jamfile.v2 (original)
+++ branches/release/libs/geometry/test/algorithms/detail/Jamfile.v2 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
@@ -10,6 +10,7 @@
 
 test-suite boost-geometry-algorithms-detail
     :
+ [ run convert.cpp ]
     [ run partition.cpp ]
     ;
 

Modified: branches/release/libs/geometry/test/algorithms/detail/detail.sln
==============================================================================
--- branches/release/libs/geometry/test/algorithms/detail/detail.sln (original)
+++ branches/release/libs/geometry/test/algorithms/detail/detail.sln 2011-04-08 11:43:58 EDT (Fri, 08 Apr 2011)
@@ -2,6 +2,8 @@
 # Visual C++ Express 2005
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "partition", "partition.vcproj", "{5EF21715-DB87-41AB-9D0A-59ED04F316A1}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convert", "convert.vcproj", "{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -12,6 +14,10 @@
                 {5EF21715-DB87-41AB-9D0A-59ED04F316A1}.Debug|Win32.Build.0 = Debug|Win32
                 {5EF21715-DB87-41AB-9D0A-59ED04F316A1}.Release|Win32.ActiveCfg = Release|Win32
                 {5EF21715-DB87-41AB-9D0A-59ED04F316A1}.Release|Win32.Build.0 = Release|Win32
+ {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Debug|Win32.Build.0 = Debug|Win32
+ {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.ActiveCfg = Release|Win32
+ {FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE


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