|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67417 - sandbox/geometry/libs/geometry/test/algorithms/overlay/robustness
From: barend.gehrels_at_[hidden]
Date: 2010-12-22 17:00:15
Author: barendgehrels
Date: 2010-12-22 17:00:10 EST (Wed, 22 Dec 2010)
New Revision: 67417
URL: http://svn.boost.org/trac/boost/changeset/67417
Log:
Small cleanup
Text files modified:
sandbox/geometry/libs/geometry/test/algorithms/overlay/robustness/recursive_polygons.cpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
Modified: sandbox/geometry/libs/geometry/test/algorithms/overlay/robustness/recursive_polygons.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/overlay/robustness/recursive_polygons.cpp (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/overlay/robustness/recursive_polygons.cpp 2010-12-22 17:00:10 EST (Wed, 22 Dec 2010)
@@ -111,7 +111,6 @@
>(p, q, std::back_inserter(mp));
bg::unique(mp);
- //result = mp;
bg::simplify(mp, result, 0.01);
bg::correct(mp);
return true;
@@ -119,7 +118,7 @@
template <typename T, bool Clockwise, bool Closed>
-void test_all(int seed, int count, bool svg, int level)
+void test_all(int seed, int count, int fieldsize, bool svg, int level)
{
boost::timer t;
@@ -127,14 +126,13 @@
base_generator_type generator(seed);
- boost::uniform_int<> random_coordinate(0, 9);
+ boost::uniform_int<> random_coordinate(0, fieldsize);
boost::variate_generator<base_generator_type&, boost::uniform_int<> >
coordinate_generator(generator, random_coordinate);
typedef bg::model::polygon
<
bg::model::d2::point_xy<T>, Clockwise, Closed
- //, true, false
> polygon;
typedef bg::model::multi_polygon<polygon> mp;
@@ -165,11 +163,13 @@
int level = argc > 4 && std::string(argv[4]) != std::string("#")
? boost::lexical_cast<int>(argv[4]): 3;
- //test_all<float>(seed, count, svg, 1e-3);
- test_all<double, false, false>(seed, count, svg, level);
+ int fieldsize = argc > 5 && std::string(argv[5]) != std::string("#")
+ ? boost::lexical_cast<int>(argv[5]): 9;
+
+ test_all<double, true, true>(seed, count, fieldsize, svg, level);
#if defined(HAVE_TTMATH)
- // test_recursive_boxes<ttmath_big>(selection, "t");
+ // test_all<ttmath_big, true, true>(seed, count, max, svg, level);
#endif
}
catch(std::exception const& e)
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