Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80546 - in branches/release: boost/polygon boost/polygon/detail libs libs/polygon/benchmark libs/polygon/benchmark/benchmark_results libs/polygon/benchmark/benchmark_results/plots libs/polygon/benchmark/input_data libs/polygon/doc libs/polygon/doc/images libs/polygon/example libs/polygon/example/input_data libs/polygon/example/input_data/polygon libs/polygon/example/input_data/primary libs/polygon/example/input_data/random libs/polygon/example/output_data libs/polygon/example/output_data/polygon libs/polygon/example/output_data/primary libs/polygon/example/output_data/random libs/polygon/test
From: sydorchuk.andriy_at_[hidden]
Date: 2012-09-16 18:48:26


Author: asydorchuk
Date: 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
New Revision: 80546
URL: http://svn.boost.org/trac/boost/changeset/80546

Log:
Polygon: merge from trunk. New functionality: Voronoi diagram, segment concept, segment utils.

Added:
   branches/release/boost/polygon/detail/voronoi_ctypes.hpp (contents, props changed)
   branches/release/boost/polygon/detail/voronoi_predicates.hpp (contents, props changed)
   branches/release/boost/polygon/detail/voronoi_robust_fpt.hpp (contents, props changed)
   branches/release/boost/polygon/detail/voronoi_structures.hpp (contents, props changed)
   branches/release/boost/polygon/segment_concept.hpp (contents, props changed)
   branches/release/boost/polygon/segment_data.hpp (contents, props changed)
   branches/release/boost/polygon/segment_traits.hpp (contents, props changed)
   branches/release/boost/polygon/segment_utils.hpp (contents, props changed)
   branches/release/boost/polygon/voronoi.hpp (contents, props changed)
   branches/release/boost/polygon/voronoi_builder.hpp (contents, props changed)
   branches/release/boost/polygon/voronoi_diagram.hpp (contents, props changed)
   branches/release/boost/polygon/voronoi_geometry_type.hpp (contents, props changed)
   branches/release/libs/polygon/benchmark/
   branches/release/libs/polygon/benchmark/Jamfile.v2 (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/
   branches/release/libs/polygon/benchmark/benchmark_results/benchmark_points.txt (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/benchmark_segments.txt (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_10.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_100.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_1000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_10000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_100000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_1000000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_all.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_memory.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_10.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_100.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_1000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_10000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_100000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_1000000.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_all.png (contents, props changed)
   branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_memory.png (contents, props changed)
   branches/release/libs/polygon/benchmark/input_data/
   branches/release/libs/polygon/benchmark/input_data/voronoi_point.txt (contents, props changed)
   branches/release/libs/polygon/benchmark/input_data/voronoi_segment.txt (contents, props changed)
   branches/release/libs/polygon/benchmark/voronoi_benchmark.cpp (contents, props changed)
   branches/release/libs/polygon/benchmark/voronoi_benchmark_points.cpp (contents, props changed)
   branches/release/libs/polygon/benchmark/voronoi_benchmark_segments.cpp (contents, props changed)
   branches/release/libs/polygon/doc/gtl_segment_concept.htm (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_10.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_100.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_1000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_10000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_100000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_1000000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_all.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_points_memory.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_10.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_100.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_1000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_10000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_100000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_1000000.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_all.png (contents, props changed)
   branches/release/libs/polygon/doc/images/benchmark_segments_memory.png (contents, props changed)
   branches/release/libs/polygon/doc/images/rover.jpg (contents, props changed)
   branches/release/libs/polygon/doc/images/vlsi.jpg (contents, props changed)
   branches/release/libs/polygon/doc/images/voronoi.png (contents, props changed)
   branches/release/libs/polygon/doc/images/voronoi2.png (contents, props changed)
   branches/release/libs/polygon/doc/images/voronoi3.png (contents, props changed)
   branches/release/libs/polygon/doc/images/voronoi4.png (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_advanced_tutorial.htm (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_basic_tutorial.htm (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_benchmark.htm (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_builder.htm (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_diagram.htm (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_main.htm (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_predicates.htm (contents, props changed)
   branches/release/libs/polygon/doc/voronoi_robust_fpt.htm (contents, props changed)
   branches/release/libs/polygon/example/
   branches/release/libs/polygon/example/Jamfile.v2 (contents, props changed)
   branches/release/libs/polygon/example/input_data/
   branches/release/libs/polygon/example/input_data/polygon/
   branches/release/libs/polygon/example/input_data/polygon/polygon_001.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_002.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_003.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_004.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_005.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_006.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_007.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_008.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_009.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_010.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_011.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/polygon/polygon_012.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/
   branches/release/libs/polygon/example/input_data/primary/primary_001.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_002.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_003.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_004.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_005.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_006.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_007.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_008.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_009.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_010.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_011.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_012.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_013.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_014.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_015.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_016.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_017.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_018.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_019.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_020.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_021.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_022.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_023.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_024.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_025.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_026.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_027.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_028.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_029.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_030.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_031.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_032.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_033.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_034.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_035.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_036.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_037.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_038.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_039.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_040.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_041.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_042.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_043.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_044.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_045.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_046.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_047.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_048.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_049.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_050.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_051.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_052.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_053.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_054.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_055.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_056.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_057.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_058.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_059.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_060.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_061.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_062.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_063.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_064.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_065.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_066.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_067.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_068.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_069.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_070.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/primary/primary_071.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/
   branches/release/libs/polygon/example/input_data/random/random_001.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_002.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_003.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_004.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_005.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_006.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_007.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_008.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_009.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_010.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_011.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_012.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_013.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_014.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_015.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_016.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_017.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_018.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_019.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_020.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_021.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_022.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_023.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_024.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_025.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_026.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_027.txt (contents, props changed)
   branches/release/libs/polygon/example/input_data/random/random_028.txt (contents, props changed)
   branches/release/libs/polygon/example/output_data/
   branches/release/libs/polygon/example/output_data/polygon/
   branches/release/libs/polygon/example/output_data/polygon/polygon_001.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_002.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_003.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_004.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_005.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_006.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_007.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_008.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_009.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_010.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_011.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/polygon/polygon_012.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/
   branches/release/libs/polygon/example/output_data/primary/primary_001.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_002.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_003.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_004.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_005.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_006.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_007.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_008.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_009.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_010.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_011.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_012.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_013.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_014.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_015.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_016.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_017.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_018.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_019.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_020.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_021.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_022.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_023.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_024.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_025.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_026.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_027.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_028.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_029.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_030.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_031.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_032.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_033.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_034.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_035.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_036.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_037.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_038.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_039.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_040.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_041.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_042.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_043.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_044.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_045.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_046.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_047.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_048.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_049.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_050.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_051.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_052.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_053.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_054.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_055.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_056.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_057.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_058.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_059.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_060.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_061.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_062.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_063.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_064.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_065.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_066.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_067.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_068.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_069.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_070.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/primary/primary_071.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/
   branches/release/libs/polygon/example/output_data/random/random_001.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_002.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_003.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_004.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_005.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_006.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_007.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_008.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_009.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_010.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_011.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_012.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_013.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_014.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_015.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_016.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_017.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_018.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_019.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_020.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_021.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_022.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_023.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_024.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_025.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_026.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_027.png (contents, props changed)
   branches/release/libs/polygon/example/output_data/random/random_028.png (contents, props changed)
   branches/release/libs/polygon/example/voronoi_advanced_tutorial.cpp (contents, props changed)
   branches/release/libs/polygon/example/voronoi_basic_tutorial.cpp (contents, props changed)
   branches/release/libs/polygon/example/voronoi_visual_utils.hpp (contents, props changed)
   branches/release/libs/polygon/example/voronoi_visualizer.cpp (contents, props changed)
   branches/release/libs/polygon/test/polygon_segment_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_builder_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_ctypes_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_diagram_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_geometry_type_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_predicates_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_robust_fpt_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_structures_test.cpp (contents, props changed)
   branches/release/libs/polygon/test/voronoi_test_helper.hpp (contents, props changed)
Text files modified:
   branches/release/boost/polygon/detail/boolean_op.hpp | 68 +++---
   branches/release/boost/polygon/detail/boolean_op_45.hpp | 132 +++++-----
   branches/release/boost/polygon/detail/iterator_compact_to_points.hpp | 5
   branches/release/boost/polygon/detail/iterator_geometry_to_set.hpp | 43 +-
   branches/release/boost/polygon/detail/max_cover.hpp | 12
   branches/release/boost/polygon/detail/minkowski.hpp | 14
   branches/release/boost/polygon/detail/polygon_45_formation.hpp | 250 +++++++++++-----------
   branches/release/boost/polygon/detail/polygon_45_set_view.hpp | 85 +++---
   branches/release/boost/polygon/detail/polygon_45_touch.hpp | 30 +-
   branches/release/boost/polygon/detail/polygon_90_set_view.hpp | 121 +++++-----
   branches/release/boost/polygon/detail/polygon_90_touch.hpp | 38 +-
   branches/release/boost/polygon/detail/polygon_arbitrary_formation.hpp | 328 ++++++++++++++--------------
   branches/release/boost/polygon/detail/polygon_formation.hpp | 247 +++++++++++-----------
   branches/release/boost/polygon/detail/polygon_set_view.hpp | 96 ++++---
   branches/release/boost/polygon/detail/polygon_simplify.hpp | 28 +-
   branches/release/boost/polygon/detail/polygon_sort_adaptor.hpp | 30 +-
   branches/release/boost/polygon/detail/property_merge.hpp | 24 +-
   branches/release/boost/polygon/detail/property_merge_45.hpp | 18
   branches/release/boost/polygon/detail/rectangle_formation.hpp | 59 ++--
   branches/release/boost/polygon/detail/scan_arbitrary.hpp | 333 ++++++++++++++--------------
   branches/release/boost/polygon/detail/transform_detail.hpp | 177 +++++++--------
   branches/release/boost/polygon/gmp_override.hpp | 13
   branches/release/boost/polygon/gtl.hpp | 2
   branches/release/boost/polygon/interval_concept.hpp | 356 +++++++++++++++++--------------
   branches/release/boost/polygon/interval_data.hpp | 34 +-
   branches/release/boost/polygon/interval_traits.hpp | 11
   branches/release/boost/polygon/isotropy.hpp | 40 ++-
   branches/release/boost/polygon/point_3d_concept.hpp | 92 ++++----
   branches/release/boost/polygon/point_3d_data.hpp | 10
   branches/release/boost/polygon/point_3d_traits.hpp | 3
   branches/release/boost/polygon/point_concept.hpp | 232 +++++++++++---------
   branches/release/boost/polygon/point_data.hpp | 27 +-
   branches/release/boost/polygon/point_traits.hpp | 11
   branches/release/boost/polygon/polygon.hpp | 9
   branches/release/boost/polygon/polygon_45_data.hpp | 7
   branches/release/boost/polygon/polygon_45_set_concept.hpp | 34 +-
   branches/release/boost/polygon/polygon_45_set_data.hpp | 191 ++++++++--------
   branches/release/boost/polygon/polygon_45_set_traits.hpp | 19
   branches/release/boost/polygon/polygon_45_with_holes_data.hpp | 13
   branches/release/boost/polygon/polygon_90_data.hpp | 11
   branches/release/boost/polygon/polygon_90_set_concept.hpp | 65 +++--
   branches/release/boost/polygon/polygon_90_set_data.hpp | 103 ++++----
   branches/release/boost/polygon/polygon_90_set_traits.hpp | 52 ++--
   branches/release/boost/polygon/polygon_90_with_holes_data.hpp | 13
   branches/release/boost/polygon/polygon_data.hpp | 7
   branches/release/boost/polygon/polygon_set_concept.hpp | 90 ++++----
   branches/release/boost/polygon/polygon_set_data.hpp | 129 ++++++-----
   branches/release/boost/polygon/polygon_set_traits.hpp | 21 +
   branches/release/boost/polygon/polygon_traits.hpp | 265 +++++++++++------------
   branches/release/boost/polygon/polygon_with_holes_data.hpp | 15
   branches/release/boost/polygon/rectangle_concept.hpp | 446 +++++++++++++++++++--------------------
   branches/release/boost/polygon/rectangle_data.hpp | 7
   branches/release/boost/polygon/rectangle_traits.hpp | 3
   branches/release/boost/polygon/transform.hpp | 323 ++++++++++++++--------------
   branches/release/libs/libraries.htm | 5
   branches/release/libs/maintainers.txt | 2
   branches/release/libs/polygon/doc/analysis.htm | 126 ++++++----
   branches/release/libs/polygon/doc/gtl_connectivity_extraction.htm | 85 ++++--
   branches/release/libs/polygon/doc/gtl_connectivity_extraction_45.htm | 85 ++++--
   branches/release/libs/polygon/doc/gtl_connectivity_extraction_90.htm | 85 ++++--
   branches/release/libs/polygon/doc/gtl_coordinate_concept.htm | 114 ++++++----
   branches/release/libs/polygon/doc/gtl_design_overview.htm | 56 +++-
   branches/release/libs/polygon/doc/gtl_interval_concept.htm | 255 ++++++++++++----------
   branches/release/libs/polygon/doc/gtl_isotropy.htm | 127 ++++++----
   branches/release/libs/polygon/doc/gtl_minkowski_tutorial.htm | 5
   branches/release/libs/polygon/doc/gtl_point_concept.htm | 207 ++++++++++--------
   branches/release/libs/polygon/doc/gtl_polygon_45_concept.htm | 202 +++++++++--------
   branches/release/libs/polygon/doc/gtl_polygon_45_set_concept.htm | 237 +++++++++++---------
   branches/release/libs/polygon/doc/gtl_polygon_45_with_holes_concept.htm | 190 +++++++++-------
   branches/release/libs/polygon/doc/gtl_polygon_90_concept.htm | 188 +++++++++-------
   branches/release/libs/polygon/doc/gtl_polygon_90_set_concept.htm | 350 ++++++++++++++++--------------
   branches/release/libs/polygon/doc/gtl_polygon_90_with_holes_concept.htm | 194 +++++++++-------
   branches/release/libs/polygon/doc/gtl_polygon_concept.htm | 204 +++++++++--------
   branches/release/libs/polygon/doc/gtl_polygon_set_concept.htm | 243 +++++++++++----------
   branches/release/libs/polygon/doc/gtl_polygon_with_holes_concept.htm | 194 +++++++++-------
   branches/release/libs/polygon/doc/gtl_property_merge.htm | 87 ++++---
   branches/release/libs/polygon/doc/gtl_property_merge_45.htm | 87 ++++---
   branches/release/libs/polygon/doc/gtl_property_merge_90.htm | 87 ++++---
   branches/release/libs/polygon/doc/gtl_rectangle_concept.htm | 401 +++++++++++++++++++----------------
   branches/release/libs/polygon/doc/index.htm | 203 +++++++++++------
   branches/release/libs/polygon/test/Jamfile.v2 | 16 +
   branches/release/libs/polygon/test/gtl_boost_unit_test.cpp | 261 +++++++++++++++--------
   82 files changed, 4871 insertions(+), 4217 deletions(-)

Modified: branches/release/boost/polygon/detail/boolean_op.hpp
==============================================================================
--- branches/release/boost/polygon/detail/boolean_op.hpp (original)
+++ branches/release/boost/polygon/detail/boolean_op.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -30,8 +30,8 @@
     inline BooleanOp (T nullT) : scanData_(), nextItr_(), nullT_(nullT) { nextItr_ = scanData_.end(); }
     inline BooleanOp (const BooleanOp& that) : scanData_(that.scanData_), nextItr_(),
                                                nullT_(that.nullT_) { nextItr_ = scanData_.begin(); }
- inline BooleanOp& operator=(const BooleanOp& that);
-
+ inline BooleanOp& operator=(const BooleanOp& that);
+
     //moves scanline forward
     inline void advanceScan() { nextItr_ = scanData_.begin(); }
 
@@ -39,7 +39,7 @@
     //appends output edges to cT
     template <class cT>
     inline void processInterval(cT& outputContainer, interval_data<Unit> ivl, T deltaCount);
-
+
   private:
     inline typename ScanData::iterator lookup_(Unit pos){
       if(nextItr_ != scanData_.end() && nextItr_->first >= pos) {
@@ -47,9 +47,9 @@
       }
       return nextItr_ = scanData_.lower_bound(pos);
     }
- inline typename ScanData::iterator insert_(Unit pos, T count){
- return nextItr_ = scanData_.insert(nextItr_, ElementType(pos, count));
- }
+ inline typename ScanData::iterator insert_(Unit pos, T count){
+ return nextItr_ = scanData_.insert(nextItr_, ElementType(pos, count));
+ }
     template <class cT>
     inline void evaluateInterval_(cT& outputContainer, interval_data<Unit> ivl, T beforeCount, T afterCount);
   };
@@ -78,29 +78,29 @@
   //BinaryCount is an array of two deltaCounts coming from two different layers
   //of scan event data. It is the merged count of the two suitable for consumption
   //as the template argument of the BooleanOp algorithm because BinaryCount casts to int.
- //T is a binary functor object that evaluates the array of counts and returns a logical
+ //T is a binary functor object that evaluates the array of counts and returns a logical
   //result of some operation on those values.
   //BinaryCount supports many of the operators that work with int, particularly the
   //binary operators, but cannot support less than or increment.
   template <class T>
   class BinaryCount {
   public:
- inline BinaryCount()
-#ifndef BOOST_POLYGON_MSVC
- : counts_()
+ inline BinaryCount()
+#ifndef BOOST_POLYGON_MSVC
+ : counts_()
 #endif
     { counts_[0] = counts_[1] = 0; }
     // constructs from two integers
- inline BinaryCount(int countL, int countR)
-#ifndef BOOST_POLYGON_MSVC
- : counts_()
+ inline BinaryCount(int countL, int countR)
+#ifndef BOOST_POLYGON_MSVC
+ : counts_()
 #endif
     { counts_[0] = countL, counts_[1] = countR; }
     inline BinaryCount& operator=(int count) { counts_[0] = count, counts_[1] = count; return *this; }
- inline BinaryCount& operator=(const BinaryCount& that);
+ inline BinaryCount& operator=(const BinaryCount& that);
     inline BinaryCount(const BinaryCount& that)
 #ifndef BOOST_POLYGON_MSVC
- : counts_()
+ : counts_()
 #endif
     { *this = that; }
     inline bool operator==(const BinaryCount& that) const;
@@ -141,13 +141,13 @@
   };
 
   template <class T, typename Unit>
- inline BooleanOp<T, Unit>& BooleanOp<T, Unit>::operator=(const BooleanOp& that) {
- scanData_ = that.scanData_;
+ inline BooleanOp<T, Unit>& BooleanOp<T, Unit>::operator=(const BooleanOp& that) {
+ scanData_ = that.scanData_;
     nextItr_ = scanData_.begin();
     nullT_ = that.nullT_;
     return *this;
   }
-
+
   //appends output edges to cT
   template <class T, typename Unit>
   template <class cT>
@@ -214,7 +214,7 @@
 
   template <class T, typename Unit>
   template <class cT>
- inline void BooleanOp<T, Unit>::evaluateInterval_(cT& outputContainer, interval_data<Unit> ivl,
+ inline void BooleanOp<T, Unit>::evaluateInterval_(cT& outputContainer, interval_data<Unit> ivl,
                                               T beforeCount, T afterCount) {
     bool before = (int)beforeCount > 0;
     bool after = (int)afterCount > 0;
@@ -225,13 +225,13 @@
   }
 
   template <class T>
- inline BinaryCount<T>& BinaryCount<T>::operator=(const BinaryCount<T>& that) {
+ inline BinaryCount<T>& BinaryCount<T>::operator=(const BinaryCount<T>& that) {
     counts_[0] = that.counts_[0];
     counts_[1] = that.counts_[1];
     return *this;
   }
   template <class T>
- inline bool BinaryCount<T>::operator==(const BinaryCount<T>& that) const {
+ inline bool BinaryCount<T>::operator==(const BinaryCount<T>& that) const {
     return counts_[0] == that.counts_[0] &&
       counts_[1] == that.counts_[1];
   }
@@ -290,7 +290,7 @@
       count[0] += (*itr1).second.second;
     }
     if(itr2 != itr2_end) {
- if((*itr2).first < prevCoord ||
+ if((*itr2).first < prevCoord ||
          ((*itr2).first == prevCoord && (*itr2).second.first < prevPosition)) {
         prevCoord = (*itr2).first;
         prevPosition = (*itr2).second.first;
@@ -307,7 +307,7 @@
     } else {
       if(itr1 != itr1_end) ++itr1;
     }
-
+
     while(itr1 != itr1_end || itr2 != itr2_end) {
       Unit curCoord = UnitMax;
       Unit curPosition = UnitMax;
@@ -318,7 +318,7 @@
         curCount[0] += (*itr1).second.second;
       }
       if(itr2 != itr2_end) {
- if((*itr2).first < curCoord ||
+ if((*itr2).first < curCoord ||
            ((*itr2).first == curCoord && (*itr2).second.first < curPosition)) {
           curCoord = (*itr2).first;
           curPosition = (*itr2).second.first;
@@ -349,15 +349,15 @@
         boolean.processInterval(container, ivl, count);
         for(std::size_t i = 0; i < container.size(); ++i) {
           std::pair<interval_data<Unit>, int>& element = container[i];
- if(!output.empty() && output.back().first == prevCoord &&
+ if(!output.empty() && output.back().first == prevCoord &&
              output.back().second.first == element.first.low() &&
              output.back().second.second == element.second * -1) {
             output.pop_back();
           } else {
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.low(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.low(),
                                                                                                     element.second)));
           }
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.high(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.high(),
                                                                                                   element.second * -1)));
         }
       }
@@ -379,11 +379,11 @@
     }
     inputOutput.insert(inputOutput.end(), output.begin(), output.end());
   }
-
+
   template <typename Unit>
   inline void applyUnaryXOr(std::vector<std::pair<Unit, std::pair<Unit, int> > >& input) {
     BooleanOp<UnaryCount, Unit> booleanXOr;
-
+
   }
 
   template <typename count_type = int>
@@ -416,15 +416,15 @@
           booleanOr.processInterval(container, ivl, count_type(count));
           for(std::size_t i = 0; i < container.size(); ++i) {
             std::pair<interval_data<Unit>, int>& element = container[i];
- if(!output.empty() && output.back().first == prevPos &&
+ if(!output.empty() && output.back().first == prevPos &&
                output.back().second.first == element.first.low() &&
                output.back().second.second == element.second * -1) {
               output.pop_back();
             } else {
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.low(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.low(),
                                                                                                     element.second)));
             }
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.high(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.high(),
                                                                                                   element.second * -1)));
           }
         }
@@ -435,7 +435,7 @@
         input = std::vector<std::pair<Unit, std::pair<Unit, int> > >();
       } else {
       input.clear();
- }
+ }
       input.insert(input.end(), output.begin(), output.end());
     }
   };

Modified: branches/release/boost/polygon/detail/boolean_op_45.hpp
==============================================================================
--- branches/release/boost/polygon/detail/boolean_op_45.hpp (original)
+++ branches/release/boost/polygon/detail/boolean_op_45.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -16,20 +16,20 @@
 
     class Count2 {
     public:
- inline Count2()
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Count2()
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
 #endif
       { counts[0] = counts[1] = 0; }
       //inline Count2(int count) { counts[0] = counts[1] = count; }
- inline Count2(int count1, int count2)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Count2(int count1, int count2)
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
 #endif
       { counts[0] = count1; counts[1] = count2; }
- inline Count2(const Count2& count)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Count2(const Count2& count)
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
 #endif
       { counts[0] = count.counts[0]; counts[1] = count.counts[1]; }
       inline bool operator==(const Count2& count) const { return counts[0] == count.counts[0] && counts[1] == count.counts[1]; }
@@ -108,7 +108,7 @@
       inline Scan45ElementT(const Scan45ElementT& that) :
         x(that.x), y(that.y), rise(that.rise), count(that.count) {}
       inline Scan45ElementT& operator=(const Scan45ElementT& that) {
- x = that.x; y = that.y; rise = that.rise; count = that.count;
+ x = that.x; y = that.y; rise = that.rise; count = that.count;
         return *this;
       }
       inline Unit evalAtX(Unit xIn) const {
@@ -142,7 +142,7 @@
         return true;
       }
     };
-
+
     typedef Scan45ElementT<Count2> Scan45Element;
 
     // inline std::ostream& operator<< (std::ostream& o, const Scan45Element& c) {
@@ -168,7 +168,7 @@
       inline lessScan45Element(Unit *x, int *justBefore) : x_(x), justBefore_(justBefore) {}
       inline lessScan45Element(const lessScan45Element& that) : x_(that.x_), justBefore_(that.justBefore_) {}
       inline lessScan45Element& operator=(const lessScan45Element& that) { x_ = that.x_; justBefore_ = that.justBefore_; return *this; }
- inline bool operator () (const Scan45ElementT<CountType>& elm1,
+ inline bool operator () (const Scan45ElementT<CountType>& elm1,
                                const Scan45ElementT<CountType>& elm2) const {
         Unit y1 = elm1.evalAtX(*x_);
         Unit y2 = elm2.evalAtX(*x_);
@@ -190,42 +190,42 @@
     public:
       inline Scan45CountT() : counts() {} //counts[0] = counts[1] = counts[2] = counts[3] = 0; }
       inline Scan45CountT(CountType count) : counts() { counts[0] = counts[1] = counts[2] = counts[3] = count; }
- inline Scan45CountT(const CountType& count1, const CountType& count2, const CountType& count3,
- const CountType& count4) : counts() {
- counts[0] = count1;
- counts[1] = count2;
+ inline Scan45CountT(const CountType& count1, const CountType& count2, const CountType& count3,
+ const CountType& count4) : counts() {
+ counts[0] = count1;
+ counts[1] = count2;
         counts[2] = count3;
- counts[3] = count4;
+ counts[3] = count4;
       }
- inline Scan45CountT(const Scan45CountT& count) : counts() {
+ inline Scan45CountT(const Scan45CountT& count) : counts() {
         (*this) = count;
       }
- inline bool operator==(const Scan45CountT& count) const {
+ inline bool operator==(const Scan45CountT& count) const {
         for(unsigned int i = 0; i < 4; ++i) {
- if(counts[i] != count.counts[i]) return false;
+ if(counts[i] != count.counts[i]) return false;
         }
         return true;
       }
       inline bool operator!=(const Scan45CountT& count) const { return !((*this) == count); }
- inline Scan45CountT& operator=(CountType count) {
+ inline Scan45CountT& operator=(CountType count) {
         counts[0] = counts[1] = counts[2] = counts[3] = count; return *this; }
       inline Scan45CountT& operator=(const Scan45CountT& count) {
         for(unsigned int i = 0; i < 4; ++i) {
- counts[i] = count.counts[i];
+ counts[i] = count.counts[i];
         }
- return *this;
+ return *this;
       }
       inline CountType& operator[](int index) { return counts[index]; }
       inline CountType operator[](int index) const {return counts[index]; }
       inline Scan45CountT& operator+=(const Scan45CountT& count){
         for(unsigned int i = 0; i < 4; ++i) {
- counts[i] += count.counts[i];
+ counts[i] += count.counts[i];
         }
         return *this;
       }
       inline Scan45CountT& operator-=(const Scan45CountT& count){
         for(unsigned int i = 0; i < 4; ++i) {
- counts[i] -= count.counts[i];
+ counts[i] -= count.counts[i];
         }
         return *this;
       }
@@ -270,7 +270,7 @@
       inline Vertex45T() : pt(), rise(), count() {}
       inline Vertex45T(const Point& point, int riseIn, ct countIn) : pt(point), rise(riseIn), count(countIn) {}
       inline Vertex45T(const Vertex45T& vertex) : pt(vertex.pt), rise(vertex.rise), count(vertex.count) {}
- inline Vertex45T& operator=(const Vertex45T& vertex){
+ inline Vertex45T& operator=(const Vertex45T& vertex){
         pt = vertex.pt; rise = vertex.rise; count = vertex.count; return *this; }
       inline Vertex45T(const std::pair<Point, Point>& vertex) : pt(), rise(), count() {}
       inline Vertex45T& operator=(const std::pair<Point, Point>& vertex){ return *this; }
@@ -307,13 +307,13 @@
       int *justBefore_;
     public:
       inline lessVertex45() : x_(0), justBefore_() {}
-
+
       inline lessVertex45(Unit *x, int *justBefore) : x_(x), justBefore_(justBefore) {}
-
+
       inline lessVertex45(const lessVertex45& that) : x_(that.x_), justBefore_(that.justBefore_) {}
-
+
       inline lessVertex45& operator=(const lessVertex45& that) { x_ = that.x_; justBefore_ = that.justBefore_; return *this; }
-
+
       template <typename ct>
       inline bool operator () (const Vertex45T<ct>& elm1, const Vertex45T<ct>& elm2) const {
         Unit y1 = elm1.evalAtX(*x_);
@@ -390,7 +390,7 @@
     template <int op>
     struct boolean_op_45_output_functor {
       template <typename cT>
- void operator()(cT& output, const Count2& count1, const Count2& count2,
+ void operator()(cT& output, const Count2& count1, const Count2& count2,
                       const Point& pt, int rise, direction_1d end) {
         int edgeType = applyLogic<op>(count1, count2);
         if(edgeType) {
@@ -423,7 +423,7 @@
     template <int op>
     struct unary_op_45_output_functor {
       template <typename cT>
- void operator()(cT& output, const Count1& count1, const Count1& count2,
+ void operator()(cT& output, const Count1& count1, const Count1& count2,
                       const Point& pt, int rise, direction_1d end) {
         int edgeType = applyLogic<op>(count1, count2);
         if(edgeType) {
@@ -445,7 +445,7 @@
     };
     template <typename S45V>
     static inline void sortScan45Vector(S45V& vec) {
- gtlsort(vec.begin(), vec.end(), lessScan45Vertex());
+ polygon_sort(vec.begin(), vec.end(), lessScan45Vertex());
     }
 
     template <typename CountType, typename output_functor>
@@ -453,12 +453,12 @@
     public:
       typedef Scan45CountT<CountType> Scan45Count;
       typedef std::pair<Point, Scan45Count> Scan45Vertex;
-
+
       //index is the index into the vertex
       static inline Scan45Element getElement(const Scan45Vertex& vertex, int index) {
         return Scan45Element(vertex.first.x(), vertex.first.y(), index - 1, vertex.second[index]);
       }
-
+
       class lessScan45Point : public std::binary_function<Point, Point, bool> {
       public:
         inline lessScan45Point() {} //default constructor is only constructor
@@ -466,7 +466,7 @@
           return (v1.x() < v2.x()) || (v1.x() == v2.x() && v1.y() < v2.y());
         }
       };
-
+
       typedef std::vector<Scan45Vertex> Scan45Vector;
 
       //definitions
@@ -474,7 +474,7 @@
       typedef typename Scan45Data::iterator iterator;
       typedef typename Scan45Data::const_iterator const_iterator;
       typedef std::set<Point, lessScan45Point> CrossQueue;
-
+
       //data
       Scan45Data scanData_;
       CrossQueue crossQueue_;
@@ -482,19 +482,19 @@
       Unit x_;
       int justBefore_;
     public:
- inline Scan45() : scanData_(), crossQueue_(), crossVector_(),
+ inline Scan45() : scanData_(), crossQueue_(), crossVector_(),
                         x_((std::numeric_limits<Unit>::min)()), justBefore_(false) {
         lessScan45Element<CountType> lessElm(&x_, &justBefore_);
         scanData_ = std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >(lessElm);
       }
- inline Scan45(const Scan45& that) : scanData_(), crossQueue_(), crossVector_(),
+ inline Scan45(const Scan45& that) : scanData_(), crossQueue_(), crossVector_(),
                                           x_((std::numeric_limits<Unit>::min)()), justBefore_(false) {
         (*this) = that; }
       inline Scan45& operator=(const Scan45& that) {
         x_ = that.x_;
         justBefore_ = that.justBefore_;
- crossQueue_ = that.crossQueue_;
- crossVector_ = that.crossVector_;
+ crossQueue_ = that.crossQueue_;
+ crossVector_ = that.crossVector_;
         lessScan45Element<CountType> lessElm(&x_, &justBefore_);
         scanData_ = std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >(lessElm);
         for(const_iterator itr = that.scanData_.begin(); itr != that.scanData_.end(); ++itr){
@@ -502,7 +502,7 @@
         }
         return *this;
       }
-
+
       //cT is an output container of Vertex45
       //iT is an iterator over Scan45Vertex elements
       template <class cT, class iT>
@@ -623,7 +623,7 @@
           for(std::size_t i = 0; i < numEdges; ++i) {
             eraseVec.push_back(eraseItrs[i]);
           }
-
+
           //take the derivative wrt theta of the count at the crossing point
           vertex.second[2] = count[2] - countBelow;
           vertex.second[1] = count[1] - count[2];
@@ -650,7 +650,7 @@
           findCross_(searchVec[i]);
         }
       }
-
+
       template <class iT>
       inline iT mergeCross_(iT inputBegin, iT inputEnd) {
         Scan45Vector vec;
@@ -677,7 +677,7 @@
         }
         return inputBegin;
       }
-
+
       template <class cT, class iT>
       inline iT processEvent_(cT& output, iT inputBegin, iT inputEnd) {
         //std::cout << "processEvent_\n";
@@ -695,12 +695,12 @@
                                               prevIter->evalAtX(x_) < vertex.first.y())) {
             //std::cout << "faking null event\n";
             vertex = Scan45Vertex(Point(x_, prevIter->evalAtX(x_)), Scan45Count());
- } else {
- ++inputBegin;
+ } else {
+ ++inputBegin;
             //std::cout << "after increment\n";
             //accumulate overlapping changes in Scan45Count
             while(inputBegin != inputEnd &&
- (*inputBegin).first.x() == x_ &&
+ (*inputBegin).first.x() == x_ &&
                   (*inputBegin).first.y() == vertex.first.y()) {
               //std::cout << "accumulate\n";
               vertex.second += (*inputBegin).second;
@@ -715,7 +715,7 @@
           }
           //std::cout << vertex.second << std::endl;
           //vertex represents the change in state at this point
-
+
           //get counts at current vertex
           CountType countBelow;
           iterator lowIter = lookUp_(vertex.first.y());
@@ -764,15 +764,15 @@
           //std::cout << "ADD\n";
           vertex.second += countAt;
           //std::cout << vertex.second << std::endl;
-
+
           //add elements to the scanline
           for(int i = 0; i < 3; ++i) {
             if(vertex.second[i] != countBelow) {
               //std::cout << "insert: " << vertex.first.x() << " " << vertex.first.y() << " " << i-1 <<
               // " " << vertex.second[i][0] << " " << vertex.second[i][1] << std::endl;
- iterator insertIter = scanData_.insert(scanData_.end(),
- Scan45ElementT<CountType>(vertex.first.x(),
- vertex.first.y(),
+ iterator insertIter = scanData_.insert(scanData_.end(),
+ Scan45ElementT<CountType>(vertex.first.x(),
+ vertex.first.y(),
                                                                                i - 1, vertex.second[i]));
               findCross_(insertIter);
               output_functor f;
@@ -784,7 +784,7 @@
         //std::cout << "end processEvent\n";
         return inputBegin;
       }
-
+
       //iter1 is horizontal
       inline void scheduleCross0_(iterator iter1, iterator iter2) {
         //std::cout << "0, ";
@@ -815,7 +815,7 @@
             throw(msg);
           } else {
             //note that result of this subtraction is always positive because itr1 is above itr2 in scanline
- LongUnit halfDelta2 = (LongUnit)((((LongUnit)y1) - y2)/2);
+ LongUnit halfDelta2 = (LongUnit)((((LongUnit)y1) - y2)/2);
             //note that halfDelta2 has been truncated
             if(halfDelta2 + x_ <= UnitMax && halfDelta2 + y2 <= UnitMax) {
               crossQueue_.insert(crossQueue_.end(), Point(x_+static_cast<Unit>(halfDelta2), y2+static_cast<Unit>(halfDelta2)));
@@ -823,13 +823,13 @@
             }
           }
         } else {
- LongUnit halfDelta = (LongUnit)((((LongUnit)y1) - y2)/2);
+ LongUnit halfDelta = (LongUnit)((((LongUnit)y1) - y2)/2);
           if(halfDelta + x_ <= UnitMax && halfDelta + y2 <= UnitMax)
             crossQueue_.insert(crossQueue_.end(), Point(x_+static_cast<Unit>(halfDelta), y2+static_cast<Unit>(halfDelta)));
           //std::cout << Point(x_+halfDelta, y2+halfDelta);
         }
       }
-
+
       inline void findCross_(iterator iter) {
         //std::cout << "find cross ";
         iterator iteratorBelow = iter;
@@ -839,7 +839,7 @@
           if(iter->rise == 0){
             if(iteratorBelow->rise == 1) {
               scheduleCross0_(iter, iteratorBelow);
- }
+ }
           } else {
             //iter->rise == -1
             if(iteratorBelow->rise == 1) {
@@ -863,10 +863,10 @@
               scheduleCross0_(iteratorAbove, iter);
             }
           }
- }
- //std::cout << std::endl;
- }
-
+ }
+ //std::cout << std::endl;
+ }
+
       inline iterator lookUp_(Unit y){
         //if just before then we need to look from 1 not -1
         return scanData_.lower_bound(Scan45ElementT<CountType>(x_, y, -1+2*justBefore_));
@@ -874,7 +874,7 @@
     };
 
     //template <typename CountType>
- //static inline void print45Data(const std::set<Scan45ElementT<CountType>,
+ //static inline void print45Data(const std::set<Scan45ElementT<CountType>,
     // lessScan45Element<CountType> >& data) {
     // typename std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >::const_iterator iter;
     // for(iter = data.begin(); iter != data.end(); ++iter) {
@@ -920,7 +920,7 @@
       stdcout << "done testing Scan45Data\n";
       return true;
     }
-
+
     template <typename stream_type>
     static inline bool testScan45Rect(stream_type& stdcout) {
       stdcout << "testing Scan45Rect\n";
@@ -1306,7 +1306,7 @@
       return true;
     }
 
-
+
     template <typename stream_type>
     static inline bool testScan45Star4(stream_type& stdcout) {
       stdcout << "testing Scan45Star4\n";

Modified: branches/release/boost/polygon/detail/iterator_compact_to_points.hpp
==============================================================================
--- branches/release/boost/polygon/detail/iterator_compact_to_points.hpp (original)
+++ branches/release/boost/polygon/detail/iterator_compact_to_points.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -24,7 +24,7 @@
   typedef const point_type& reference; //immutable
 
   inline iterator_compact_to_points() : iter_(), iter_end_(), pt_(), firstX_(), orient_() {}
- inline iterator_compact_to_points(iterator_type iter, iterator_type iter_end) :
+ inline iterator_compact_to_points(iterator_type iter, iterator_type iter_end) :
     iter_(iter), iter_end_(iter_end), pt_(), firstX_(), orient_(HORIZONTAL) {
     if(iter_ != iter_end_) {
       firstX_ = *iter_;
@@ -66,4 +66,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/iterator_geometry_to_set.hpp
==============================================================================
--- branches/release/boost/polygon/detail/iterator_geometry_to_set.hpp (original)
+++ branches/release/boost/polygon/detail/iterator_geometry_to_set.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -28,8 +28,8 @@
   bool is_hole_;
 public:
   iterator_geometry_to_set() : rectangle_(), vertex_(), corner_(4), orient_(), is_hole_() {}
- iterator_geometry_to_set(const rectangle_type& rectangle, direction_1d dir,
- orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) :
+ iterator_geometry_to_set(const rectangle_type& rectangle, direction_1d dir,
+ orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) :
     rectangle_(), vertex_(), corner_(0), orient_(orient), is_hole_(is_hole) {
     assign(rectangle_, rectangle);
     if(dir == HIGH) corner_ = 4;
@@ -67,7 +67,7 @@
       vertex_.second.second = 1;
       if(is_hole_) vertex_.second.second *= -1;
     }
- return vertex_;
+ return vertex_;
   }
 };
 
@@ -93,9 +93,9 @@
   int polygon_index;
 public:
   iterator_geometry_to_set() : vertex_(), itrb(), itre(), last_vertex_(), is_hole_(), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(), orient_(), polygon_index(-1) {}
- iterator_geometry_to_set(const polygon_type& polygon, direction_1d dir, orientation_2d orient = HORIZONTAL, bool is_hole = false, bool winding_override = false, direction_1d w = CLOCKWISE) :
- vertex_(), itrb(), itre(), last_vertex_(),
- is_hole_(is_hole), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(),
+ iterator_geometry_to_set(const polygon_type& polygon, direction_1d dir, orientation_2d orient = HORIZONTAL, bool is_hole = false, bool winding_override = false, direction_1d w = CLOCKWISE) :
+ vertex_(), itrb(), itre(), last_vertex_(),
+ is_hole_(is_hole), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(),
     orient_(orient), polygon_index(0) {
     itrb = begin_points(polygon);
     itre = end_points(polygon);
@@ -116,7 +116,7 @@
       evaluate_();
     }
   }
- iterator_geometry_to_set(const iterator_geometry_to_set& that) :
+ iterator_geometry_to_set(const iterator_geometry_to_set& that) :
     vertex_(), itrb(), itre(), last_vertex_(), is_hole_(), multiplier_(), first_pt(),
     second_pt(), pts(), use_wrap(), orient_(), polygon_index(-1) {
     vertex_ = that.vertex_;
@@ -176,7 +176,7 @@
     return !(*this == that);
   }
   inline reference operator*() const {
- return vertex_;
+ return vertex_;
   }
 
   inline void evaluate_() {
@@ -185,7 +185,7 @@
     if(pts[1] == pts[2]) {
       vertex_.second.second = 0;
     } else if(pts[0].get(HORIZONTAL) != pts[1].get(HORIZONTAL)) {
- vertex_.second.second = -1;
+ vertex_.second.second = -1;
     } else if(pts[0].get(VERTICAL) != pts[1].get(VERTICAL)) {
       vertex_.second.second = 1;
     } else {
@@ -213,8 +213,8 @@
   bool started_holes;
 public:
   iterator_geometry_to_set() : itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(), is_hole_(), started_holes() {}
- iterator_geometry_to_set(const polygon_with_holes_type& polygon, direction_1d dir,
- orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) :
+ iterator_geometry_to_set(const polygon_with_holes_type& polygon, direction_1d dir,
+ orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) :
     itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(orient), is_hole_(is_hole), started_holes() {
     itre = iterator_geometry_to_set<polygon_90_concept, polygon_with_holes_type>(polygon, HIGH, orient, is_hole_);
     itrhe = end_holes(polygon);
@@ -228,7 +228,7 @@
       started_holes = false;
     }
   }
- iterator_geometry_to_set(const iterator_geometry_to_set& that) :
+ iterator_geometry_to_set(const iterator_geometry_to_set& that) :
     itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(), is_hole_(), started_holes() {
     itrb = that.itrb;
     itre = that.itre;
@@ -247,9 +247,9 @@
     if(itrb == itre) {
       if(itrhib == itrhie) {
         if(itrhb != itrhe) {
- itrhib = iterator_geometry_to_set<polygon_90_concept,
+ itrhib = iterator_geometry_to_set<polygon_90_concept,
             typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, LOW, orient_, !is_hole_);
- itrhie = iterator_geometry_to_set<polygon_90_concept,
+ itrhie = iterator_geometry_to_set<polygon_90_concept,
             typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, HIGH, orient_, !is_hole_);
           ++itrhb;
         } else {
@@ -258,21 +258,21 @@
           //both point to end of the previous hole processed
           //no need to explicitly reset them, and it causes an stl debug assertion to use
           //the default constructed iterator this way
- //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
+ //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
           // typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>();
         }
       } else {
         ++itrhib;
         if(itrhib == itrhie) {
           if(itrhb != itrhe) {
- itrhib = iterator_geometry_to_set<polygon_90_concept,
+ itrhib = iterator_geometry_to_set<polygon_90_concept,
               typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, LOW, orient_, !is_hole_);
- itrhie = iterator_geometry_to_set<polygon_90_concept,
+ itrhie = iterator_geometry_to_set<polygon_90_concept,
               typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, HIGH, orient_, !is_hole_);
             ++itrhb;
           } else {
             //this is the same case as above
- //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
+ //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
             // typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>();
           }
         }
@@ -281,9 +281,9 @@
       ++itrb;
       if(itrb == itre) {
         if(itrhb != itrhe) {
- itrhib = iterator_geometry_to_set<polygon_90_concept,
+ itrhib = iterator_geometry_to_set<polygon_90_concept,
             typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, LOW, orient_, !is_hole_);
- itrhie = iterator_geometry_to_set<polygon_90_concept,
+ itrhie = iterator_geometry_to_set<polygon_90_concept,
             typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, HIGH, orient_, !is_hole_);
           ++itrhb;
         }
@@ -312,4 +312,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/max_cover.hpp
==============================================================================
--- branches/release/boost/polygon/detail/max_cover.hpp (original)
+++ branches/release/boost/polygon/detail/max_cover.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -35,7 +35,7 @@
     };
 
     typedef std::pair<std::pair<Unit, Interval>, Node* > EdgeAssociation;
-
+
     class lessEdgeAssociation : public std::binary_function<const EdgeAssociation&, const EdgeAssociation&, bool> {
     public:
       inline lessEdgeAssociation() {}
@@ -83,7 +83,7 @@
     };
 
     template <class cT>
- static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
+ static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
                                    Rectangle rect) {
       //std::cout << "New Root\n";
       std::vector<stack_element> stack;
@@ -170,7 +170,7 @@
         Because the code is so much simpler than the loop algorithm I retain it for clarity
 
     template <class cT>
- static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
+ static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
                                    const Rectangle& rect) {
       Interval rectIvl = rect.get(orient);
       Interval nodeIvl = node->rect.get(orient);
@@ -205,7 +205,7 @@
     template <class iT>
     static inline void computeDag(iT beginNode, iT endNode, orientation_2d orient,
                                   std::size_t size) {
- std::vector<EdgeAssociation> leadingEdges;
+ std::vector<EdgeAssociation> leadingEdges;
       leadingEdges.reserve(size);
       for(iT iter = beginNode; iter != endNode; ++iter) {
         Node* nodep = &(*iter);
@@ -213,7 +213,7 @@
         Interval rectIvl = nodep->rect.get(orient);
         leadingEdges.push_back(EdgeAssociation(std::pair<Unit, Interval>(leading, rectIvl), nodep));
       }
- gtlsort(leadingEdges.begin(), leadingEdges.end(), lessEdgeAssociation());
+ polygon_sort(leadingEdges.begin(), leadingEdges.end(), lessEdgeAssociation());
       typename std::vector<EdgeAssociation>::iterator leadingBegin = leadingEdges.begin();
       iT trailingBegin = beginNode;
       while(leadingBegin != leadingEdges.end()) {

Modified: branches/release/boost/polygon/detail/minkowski.hpp
==============================================================================
--- branches/release/boost/polygon/detail/minkowski.hpp (original)
+++ branches/release/boost/polygon/detail/minkowski.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,4 +1,10 @@
+/*
+ Copyright 2008 Intel Corporation
 
+ Use, modification and distribution are 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).
+*/
 namespace boost { namespace polygon { namespace detail {
 
 template <typename coordinate_type>
@@ -62,11 +68,11 @@
     a.get(a_polygons);
     b.get(b_polygons);
     for(std::size_t ai = 0; ai < a_polygons.size(); ++ai) {
- convolve_point_sequence_with_polygons(result, begin_points(a_polygons[ai]),
+ convolve_point_sequence_with_polygons(result, begin_points(a_polygons[ai]),
                                             end_points(a_polygons[ai]), b_polygons);
       for(typename polygon_with_holes_traits<polygon>::iterator_holes_type itrh = begin_holes(a_polygons[ai]);
           itrh != end_holes(a_polygons[ai]); ++itrh) {
- convolve_point_sequence_with_polygons(result, begin_points(*itrh),
+ convolve_point_sequence_with_polygons(result, begin_points(*itrh),
                                               end_points(*itrh), b_polygons);
       }
       for(std::size_t bi = 0; bi < b_polygons.size(); ++bi) {
@@ -100,9 +106,9 @@
       ::boost::polygon::bloat(rect, 10);
       (*this) = rect - (*this); //invert
     }
- //make_arc(std::vector<point_data< T> >& return_points,
+ //make_arc(std::vector<point_data< T> >& return_points,
     //point_data< double> start, point_data< double> end,
- //point_data< double> center, double r, unsigned int num_circle_segments)
+ //point_data< double> center, double r, unsigned int num_circle_segments)
     std::vector<point_data<coordinate_type> > circle;
     point_data<double> center(0.0, 0.0), start(0.0, (double)resizing);
     make_arc(circle, start, start, center, std::abs((double)resizing),

Modified: branches/release/boost/polygon/detail/polygon_45_formation.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_45_formation.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_45_formation.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
     Copyright 2008 Intel Corporation
-
+
     Use, modification and distribution are 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).
@@ -30,7 +30,7 @@
     typedef std::pair<Point, Scan45Count> Scan45Vertex;
     typedef typename boolean_op_45<Unit>::template
     Scan45<Count2, typename boolean_op_45<Unit>::template boolean_op_45_output_functor<0> > Scan45;
-
+
     class PolyLine45 {
     public:
       typedef typename std::list<Point>::const_iterator iterator;
@@ -52,7 +52,7 @@
 
       // copy constructor (since we have dynamic memory)
       inline PolyLine45(const PolyLine45& that) : points(that.points) {}
-
+
       // assignment operator (since we have dynamic memory do a deep copy)
       inline PolyLine45& operator=(const PolyLine45& that) {
         points = that.points;
@@ -68,31 +68,31 @@
       inline std::size_t size() const { return points.size(); }
 
       //public data member
- std::list<Point> points;
+ std::list<Point> points;
     };
 
     class ActiveTail45 {
     private:
       //data
- PolyLine45* tailp_;
+ PolyLine45* tailp_;
       ActiveTail45 *otherTailp_;
       std::list<ActiveTail45*> holesList_;
       bool head_;
     public:
-
+
       /**
        * @brief iterator over coordinates of the figure
        */
       typedef typename PolyLine45::iterator iterator;
-
+
       /**
        * @brief iterator over holes contained within the figure
        */
       typedef typename std::list<ActiveTail45*>::const_iterator iteratorHoles;
-
+
       //default constructor
       inline ActiveTail45() : tailp_(0), otherTailp_(0), holesList_(), head_(0) {}
-
+
       //constructor
       inline ActiveTail45(const Vertex45& vertex, ActiveTail45* otherTailp = 0) :
         tailp_(0), otherTailp_(0), holesList_(), head_(0) {
@@ -110,7 +110,7 @@
         tailp_->points.push_back(point);
         head_ = head;
         otherTailp_ = otherTailp;
-
+
       }
       inline ActiveTail45(ActiveTail45* otherTailp) :
         tailp_(0), otherTailp_(0), holesList_(), head_(0) {
@@ -155,7 +155,7 @@
        * @brief get the pointer to the activetail at the other end of the chain
        */
       inline ActiveTail45* getOtherActiveTail() const { return otherTailp_; }
-
+
       /**
        * @brief test if another active tail is the other end of the chain
        */
@@ -298,7 +298,7 @@
        */
 
       template <class cT>
- static inline ActiveTail45* joinChains(Point point, ActiveTail45* at1, ActiveTail45* at2, bool solid,
+ static inline ActiveTail45* joinChains(Point point, ActiveTail45* at1, ActiveTail45* at2, bool solid,
                                              cT& output) {
         if(at1->otherTailp_ == at2) {
           //if(at2->otherTailp_ != at1) std::cout << "half closed error\n";
@@ -370,7 +370,7 @@
 // std::cout << this << " " << tailp_ << " " << otherTailp_ << " " << holesList_.size() << " " << head_ << std::endl;
 // }
 
- static inline std::pair<ActiveTail45*, ActiveTail45*> createActiveTail45sAsPair(Point point, bool solid,
+ static inline std::pair<ActiveTail45*, ActiveTail45*> createActiveTail45sAsPair(Point point, bool solid,
                                                                                       ActiveTail45* phole, bool fractureHoles) {
         ActiveTail45* at1 = 0;
         ActiveTail45* at2 = 0;
@@ -386,7 +386,7 @@
           at2 = new ActiveTail45(at1);
           at1->otherTailp_ = at2;
           at2->head_ = !solid;
- if(phole)
+ if(phole)
             at2->addHole(phole); //assert fractureHoles == false
         }
         return std::pair<ActiveTail45*, ActiveTail45*>(at1, at2);
@@ -398,64 +398,64 @@
     class Vertex45CountT {
     public:
       typedef ct count_type;
- inline Vertex45CountT()
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Vertex45CountT()
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
 #endif
       { counts[0] = counts[1] = counts[2] = counts[3] = 0; }
       //inline Vertex45CountT(ct count) { counts[0] = counts[1] = counts[2] = counts[3] = count; }
- inline Vertex45CountT(const ct& count1, const ct& count2, const ct& count3,
+ inline Vertex45CountT(const ct& count1, const ct& count2, const ct& count3,
                            const ct& count4)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
-#endif
- {
- counts[0] = count1;
- counts[1] = count2;
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
+#endif
+ {
+ counts[0] = count1;
+ counts[1] = count2;
         counts[2] = count3;
- counts[3] = count4;
+ counts[3] = count4;
       }
       inline Vertex45CountT(const Vertex45& vertex)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
-#endif
- {
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
+#endif
+ {
         counts[0] = counts[1] = counts[2] = counts[3] = 0;
         (*this) += vertex;
       }
       inline Vertex45CountT(const Vertex45CountT& count)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
-#endif
- {
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
+#endif
+ {
         (*this) = count;
       }
- inline bool operator==(const Vertex45CountT& count) const {
+ inline bool operator==(const Vertex45CountT& count) const {
         for(unsigned int i = 0; i < 4; ++i) {
- if(counts[i] != count.counts[i]) return false;
+ if(counts[i] != count.counts[i]) return false;
         }
         return true;
       }
       inline bool operator!=(const Vertex45CountT& count) const { return !((*this) == count); }
- inline Vertex45CountT& operator=(ct count) {
+ inline Vertex45CountT& operator=(ct count) {
         counts[0] = counts[1] = counts[2] = counts[3] = count; return *this; }
       inline Vertex45CountT& operator=(const Vertex45CountT& count) {
         for(unsigned int i = 0; i < 4; ++i) {
- counts[i] = count.counts[i];
+ counts[i] = count.counts[i];
         }
- return *this;
+ return *this;
       }
       inline ct& operator[](int index) { return counts[index]; }
       inline ct operator[](int index) const {return counts[index]; }
       inline Vertex45CountT& operator+=(const Vertex45CountT& count){
         for(unsigned int i = 0; i < 4; ++i) {
- counts[i] += count.counts[i];
+ counts[i] += count.counts[i];
         }
         return *this;
       }
       inline Vertex45CountT& operator-=(const Vertex45CountT& count){
         for(unsigned int i = 0; i < 4; ++i) {
- counts[i] -= count.counts[i];
+ counts[i] -= count.counts[i];
         }
         return *this;
       }
@@ -501,7 +501,7 @@
         count[vertex.rise+1] = vertex.count;
       }
       inline Vertex45CompactT(const Vertex45CompactT& vertex) : pt(vertex.pt), count(vertex.count) {}
- inline Vertex45CompactT& operator=(const Vertex45CompactT& vertex){
+ inline Vertex45CompactT& operator=(const Vertex45CompactT& vertex){
         pt = vertex.pt; count = vertex.count; return *this; }
       inline bool operator==(const Vertex45CompactT& vertex) const {
         return pt == vertex.pt && count == vertex.count; }
@@ -536,12 +536,12 @@
       typedef std::map<Vertex45, ActiveTail45*, lessVertex45> Polygon45FormationData;
       typedef typename Polygon45FormationData::iterator iterator;
       typedef typename Polygon45FormationData::const_iterator const_iterator;
-
+
       //data
       Polygon45FormationData scanData_;
       Unit x_;
       int justBefore_;
- int fractureHoles_;
+ int fractureHoles_;
     public:
       inline Polygon45Formation() : scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) {
         lessVertex45 lessElm(&x_, &justBefore_);
@@ -564,7 +564,7 @@
         }
         return *this;
       }
-
+
       //cT is an output container of Polygon45 or Polygon45WithHoles
       //iT is an iterator over Vertex45 elements
       //inputBegin - inputEnd is a range of sorted iT that represents
@@ -585,8 +585,8 @@
     private:
       //functions
       template <class cT, class cT2>
- inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements, Point point,
- Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
+ inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements, Point point,
+ Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
         //std::cout << point << std::endl;
         //std::cout << counts[0] << " ";
         //std::cout << counts[1] << " ";
@@ -609,7 +609,7 @@
                 if(counts[j] == 1) {
                   //std::cout << "case1: " << i << " " << j << std::endl;
                   //if a figure is closed it will be written out by this function to output
- ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
+ ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
                   counts[i] = 0;
                   counts[j] = 0;
                   tails[i] = 0;
@@ -632,7 +632,7 @@
                 if(incoming[j] == -1) {
                   //std::cout << "case2: " << i << " " << j << std::endl;
                   //std::cout << "creating active tail pair\n";
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
                     ActiveTail45::createActiveTail45sAsPair(point, true, 0, fractureHoles_ != 0);
                   //tailPair.first->print();
                   //tailPair.second->print();
@@ -740,7 +740,7 @@
             }
             break;
           }
- }
+ }
         //find beginning of a hole
         for(int i = 0; i < 3; ++i) {
           if(incoming[i] != 0) {
@@ -750,7 +750,7 @@
                 //we are beginning a empty space
                 ActiveTail45* holep = 0;
                 if(counts[3] == 0) holep = tails[3];
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
                   ActiveTail45::createActiveTail45sAsPair(point, false, holep, fractureHoles_ != 0);
                 if(j == 3) {
                   returnValue = tailPair.first;
@@ -839,7 +839,7 @@
             //we got a hole out of the point we just processed
             //iter is still at the next y element above the current y value in the tree
             //std::cout << "checking whether ot handle hole\n";
- if(currentIter == inputEnd ||
+ if(currentIter == inputEnd ||
                currentIter->pt.x() != x_ ||
                currentIter->pt.y() >= iter->first.evalAtX(x_)) {
               //std::cout << "handle hole here\n";
@@ -882,12 +882,12 @@
         //std::cout << "end processEvent\n";
         return currentIter;
       }
-
+
       inline iterator lookUp_(Unit y){
         //if just before then we need to look from 1 not -1
         return scanData_.lower_bound(Vertex45(Point(x_, y), -1+2*justBefore_, 0));
       }
-
+
     };
 
     template <typename stream_type>
@@ -904,7 +904,7 @@
       data.push_back(Vertex45(Point(10, 0), 2, -1));
       data.push_back(Vertex45(Point(10, 10), 2, 1));
       data.push_back(Vertex45(Point(10, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -928,14 +928,14 @@
       data.push_back(Vertex45(Point(10, 10), 2, -1));
       data.push_back(Vertex45(Point(10, 20), 2, 1));
       data.push_back(Vertex45(Point(10, 20), 1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon formation\n";
- return true;
+ return true;
     }
     //polygon45set class
 
@@ -952,15 +952,15 @@
       data.push_back(Vertex45(Point(10, 10), 1, 1));
       data.push_back(Vertex45(Point(10, 10), 0, -1));
       data.push_back(Vertex45(Point(20, 10), 1, -1));
- data.push_back(Vertex45(Point(20, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ data.push_back(Vertex45(Point(20, 10), 0, 1));
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon formation\n";
- return true;
+ return true;
     }
     //polygon45set class
 
@@ -1018,14 +1018,14 @@
       data.push_back(Vertex45(Point(12, 8), 1, -1));
       // result == 12 8 -1 1
       data.push_back(Vertex45(Point(12, 8), -1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon formation\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1050,15 +1050,15 @@
       sortScan45Vector(vertices);
       stdcout << "scanning\n";
       scan45.scan(result, vertices.begin(), vertices.end());
-
- gtlsort(result.begin(), result.end());
+
+ polygon_sort(result.begin(), result.end());
       pf.scan(polys, result.begin(), result.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon formation\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1123,14 +1123,14 @@
       data.push_back(Vertex45(Point(8, 6), -1, -1));
       data.push_back(Vertex45(Point(8, 6), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon formation\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1195,14 +1195,14 @@
       data.push_back(Vertex45(Point(10, 8), -1, -1));
       data.push_back(Vertex45(Point(10, 8), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon formation\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1211,7 +1211,7 @@
       Polygon45Formation pf(false);
       std::vector<Polygon45WithHoles> polys;
       std::vector<Vertex45> data;
-
+
       data.push_back(Vertex45(Point(0, 0), 0, 1));
       data.push_back(Vertex45(Point(0, 0), 2, 1));
       data.push_back(Vertex45(Point(0, 100), 2, -1));
@@ -1239,14 +1239,14 @@
       data.push_back(Vertex45(Point(10, 22), 2, -1));
       data.push_back(Vertex45(Point(10, 22), 0, -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon formation\n";
- return true;
+ return true;
     }
 
 
@@ -1256,7 +1256,7 @@
       typedef std::map<Vertex45, ActiveTail45*, lessVertex45> Polygon45FormationData;
       typedef typename Polygon45FormationData::iterator iterator;
       typedef typename Polygon45FormationData::const_iterator const_iterator;
-
+
       //data
       Polygon45FormationData scanData_;
       Unit x_;
@@ -1266,7 +1266,7 @@
         lessVertex45 lessElm(&x_, &justBefore_);
         scanData_ = Polygon45FormationData(lessElm);
       }
- inline Polygon45Tiling(const Polygon45Tiling& that) :
+ inline Polygon45Tiling(const Polygon45Tiling& that) :
         scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false) { (*this) = that; }
       inline Polygon45Tiling& operator=(const Polygon45Tiling& that) {
         x_ = that.x_;
@@ -1278,7 +1278,7 @@
         }
         return *this;
       }
-
+
       //cT is an output container of Polygon45 or Polygon45WithHoles
       //iT is an iterator over Vertex45 elements
       //inputBegin - inputEnd is a range of sorted iT that represents
@@ -1298,13 +1298,13 @@
 
     private:
       //functions
-
- inline void getVerticalPair_(std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
+
+ inline void getVerticalPair_(std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
                                    iterator previter) {
         ActiveTail45* iterTail = (*previter).second;
         Point prevPoint(x_, previter->first.evalAtX(x_));
         iterTail->pushPoint(prevPoint);
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
           ActiveTail45::createActiveTail45sAsPair(prevPoint, true, 0, false);
         verticalPair.first = iterTail;
         verticalPair.second = tailPair.first;
@@ -1312,10 +1312,10 @@
       }
 
       template <class cT, class cT2>
- inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements,
- std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
- iterator previter, Point point,
- Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
+ inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements,
+ std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
+ iterator previter, Point point,
+ Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
         //std::cout << point << std::endl;
         //std::cout << counts[0] << " ";
         //std::cout << counts[1] << " ";
@@ -1341,7 +1341,7 @@
                 if(counts[j] == 1) {
                   //std::cout << "case1: " << i << " " << j << std::endl;
                   //if a figure is closed it will be written out by this function to output
- ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
+ ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
                   counts[i] = 0;
                   counts[j] = 0;
                   tails[i] = 0;
@@ -1364,7 +1364,7 @@
                 if(incoming[j] == -1) {
                   //std::cout << "case2: " << i << " " << j << std::endl;
                   //std::cout << "creating active tail pair\n";
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
                     ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
                   //tailPair.first->print();
                   //tailPair.second->print();
@@ -1412,10 +1412,10 @@
                       returnCount = -1;
                     } else {
                       verticalPairOut.first = tails[i];
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
                         ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
                       verticalPairOut.second = tailPair.first;
- elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
+ elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
                                                                             tailPair.second));
                     }
                     tails[i] = 0;
@@ -1452,16 +1452,16 @@
                       if(verticalPair.first == 0) {
                         getVerticalPair_(verticalPair, previter);
                       }
- ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
+ ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
                       returnValue = verticalPair.second;
                       returnCount = 1;
                     } else {
                       if(verticalPair.first == 0) {
                         getVerticalPair_(verticalPair, previter);
                       }
- ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
+ ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
                       verticalPair.second->pushPoint(point);
- elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
+ elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
                                                                             verticalPair.second));
                     }
                     tails[i] = 0;
@@ -1493,7 +1493,7 @@
                   if(verticalPair.first == 0) {
                     getVerticalPair_(verticalPair, previter);
                   }
- ActiveTail45::joinChains(point, tails[j], verticalPair.first, true, output);
+ ActiveTail45::joinChains(point, tails[j], verticalPair.first, true, output);
                   verticalPairOut.second = verticalPair.second;
                 }
                 tails[i] = 0;
@@ -1505,7 +1505,7 @@
             }
             break;
           }
- }
+ }
         //find beginning of a hole
         for(int i = 0; i < 3; ++i) {
           if(incoming[i] != 0) {
@@ -1521,7 +1521,7 @@
                   returnValue = verticalPair.first;
                   returnCount = -1;
                 } else {
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
                     ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
                   //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
                   elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]), tailPair.second));
@@ -1646,12 +1646,12 @@
         //std::cout << "end processEvent\n";
         return currentIter;
       }
-
+
       inline iterator lookUp_(Unit y){
         //if just before then we need to look from 1 not -1
         return scanData_.lower_bound(Vertex45(Point(x_, y), -1+2*justBefore_, 0));
       }
-
+
     };
 
     template <typename stream_type>
@@ -1668,7 +1668,7 @@
       data.push_back(Vertex45(Point(10, 0), 2, -1));
       data.push_back(Vertex45(Point(10, 10), 2, 1));
       data.push_back(Vertex45(Point(10, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1692,14 +1692,14 @@
       data.push_back(Vertex45(Point(10, 10), 2, -1));
       data.push_back(Vertex45(Point(10, 20), 2, 1));
       data.push_back(Vertex45(Point(10, 20), 1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1715,15 +1715,15 @@
       data.push_back(Vertex45(Point(10, 10), 1, 1));
       data.push_back(Vertex45(Point(10, 10), 0, -1));
       data.push_back(Vertex45(Point(20, 10), 1, -1));
- data.push_back(Vertex45(Point(20, 10), 0, 1));
- gtlsort(data.begin(), data.end());
+ data.push_back(Vertex45(Point(20, 10), 0, 1));
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1742,14 +1742,14 @@
       data.push_back(Vertex45(Point(10, 10), 0, 1));
       data.push_back(Vertex45(Point(20, 20), 1, 1));
       data.push_back(Vertex45(Point(20, 20), 2, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1768,14 +1768,14 @@
       data.push_back(Vertex45(Point(20, 10), 0, 1));
       data.push_back(Vertex45(Point(20, -10), -1, -1));
       data.push_back(Vertex45(Point(20, -10), 2, -1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1800,8 +1800,8 @@
       data.push_back(Vertex45(Point(2, 2), 1, -1));
       data.push_back(Vertex45(Point(2, 2), 0, 1));
       data.push_back(Vertex45(Point(3, 2), 1, 1));
- data.push_back(Vertex45(Point(3, 2), 0, -1));
- gtlsort(data.begin(), data.end());
+ data.push_back(Vertex45(Point(3, 2), 0, -1));
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1835,7 +1835,7 @@
       data.push_back(Vertex45(Point(2, 2), 2, -1));
       data.push_back(Vertex45(Point(2, 2), 0, -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1899,14 +1899,14 @@
       data.push_back(Vertex45(Point(12, 8), 1, -1));
       // result == 12 8 -1 1
       data.push_back(Vertex45(Point(12, 8), -1, 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -1932,15 +1932,15 @@
       sortScan45Vector(vertices);
       stdcout << "scanning\n";
       scan45.scan(result, vertices.begin(), vertices.end());
-
- gtlsort(result.begin(), result.end());
+
+ polygon_sort(result.begin(), result.end());
       pf.scan(polys, result.begin(), result.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -2005,14 +2005,14 @@
       data.push_back(Vertex45(Point(8, 6), -1, -1));
       data.push_back(Vertex45(Point(8, 6), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -2077,14 +2077,14 @@
       data.push_back(Vertex45(Point(10, 8), -1, -1));
       data.push_back(Vertex45(Point(10, 8), 1, 1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
 
     template <typename stream_type>
@@ -2093,7 +2093,7 @@
       Polygon45Tiling pf;
       std::vector<Polygon45WithHoles> polys;
       std::vector<Vertex45> data;
-
+
       data.push_back(Vertex45(Point(0, 0), 0, 1));
       data.push_back(Vertex45(Point(0, 0), 2, 1));
       data.push_back(Vertex45(Point(0, 100), 2, -1));
@@ -2121,14 +2121,14 @@
       data.push_back(Vertex45(Point(10, 22), 2, -1));
       data.push_back(Vertex45(Point(10, 22), 0, -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
         stdcout << polys[i] << std::endl;
       }
       stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
     }
   };
 
@@ -2137,7 +2137,7 @@
   public:
     typedef typename polygon_45_formation<Unit>::ActiveTail45 ActiveTail45;
     typedef typename ActiveTail45::iterator iterator;
-
+
     typedef polygon_45_concept geometry_type;
     typedef Unit coordinate_type;
     typedef point_data<Unit> Point;
@@ -2145,7 +2145,7 @@
     // typedef iterator_points_to_compact<iterator, Point> compact_iterator_type;
     typedef iterator iterator_type;
     typedef typename coordinate_traits<Unit>::area_type area_type;
-
+
     inline PolyLine45HoleData() : p_(0) {}
     inline PolyLine45HoleData(ActiveTail45* p) : p_(p) {}
     //use default copy and assign
@@ -2166,7 +2166,7 @@
     typedef typename polygon_45_formation<Unit>::ActiveTail45 ActiveTail45;
     typedef typename ActiveTail45::iterator iterator;
     typedef PolyLine45HoleData<Unit> holeType;
-
+
     typedef polygon_45_with_holes_concept geometry_type;
     typedef Unit coordinate_type;
     typedef point_data<Unit> Point;
@@ -2187,7 +2187,7 @@
       typedef const value_type& reference; //immutable
       inline iteratorHoles() : itr_() {}
       inline iteratorHoles(typename ActiveTail45::iteratorHoles itr) : itr_(itr) {}
- inline iteratorHoles(const iteratorHoles& that) : itr_(that.itr_) {}
+ inline iteratorHoles(const iteratorHoles& that) : itr_(that.itr_) {}
       inline iteratorHoles& operator=(const iteratorHoles& that) {
         itr_ = that.itr_;
         return *this;
@@ -2208,8 +2208,8 @@
       }
     };
     typedef iteratorHoles iterator_holes_type;
-
-
+
+
     inline PolyLine45PolygonData() : p_(0) {}
     inline PolyLine45PolygonData(ActiveTail45* p) : p_(p) {}
     //use default copy and assign
@@ -2225,7 +2225,7 @@
     inline PolyLine45PolygonData& set(iT inputBegin, iT inputEnd) {
       return *this;
     }
-
+
     // initialize a polygon from x,y values, it is assumed that the first is an x
     // and that the input is a well behaved polygon
     template<class iT>

Modified: branches/release/boost/polygon/detail/polygon_45_set_view.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_45_set_view.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_45_set_view.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -18,11 +18,11 @@
     typedef typename polygon_45_set_view<ltype, rtype, op_type>::iterator_type iterator_type;
     typedef typename polygon_45_set_view<ltype, rtype, op_type>::operator_arg_type operator_arg_type;
 
- static inline iterator_type begin(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
+ static inline iterator_type begin(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
     static inline iterator_type end(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
 
     template <typename input_iterator_type>
- static inline void set(polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set,
+ static inline void set(polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set,
                            input_iterator_type input_begin, input_iterator_type input_end);
 
     static inline bool clean(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
@@ -114,12 +114,12 @@
     bool sorted() const { return value().sorted(); } //result of a boolean is sorted
 
     // template <typename input_iterator_type>
- // void set(input_iterator_type input_begin, input_iterator_type input_end,
+ // void set(input_iterator_type input_begin, input_iterator_type input_end,
     // orientation_2d orient) const {
     // orient_ = orient;
     // output_.clear();
     // output_.insert(output_.end(), input_begin, input_end);
- // gtlsort(output_.begin(), output_.end());
+ // polygon_sort(output_.begin(), output_.end());
     // }
   };
 
@@ -137,7 +137,7 @@
   }
   template <typename ltype, typename rtype, int op_type>
   bool polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::
- clean(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
+ clean(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
     return polygon_45_set.value().clean(); }
 
   template <typename geometry_type_1, typename geometry_type_2, int op_type>
@@ -194,32 +194,32 @@
     typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
     typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
     typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
   operator|(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_45_set_view<geometry_type_1, geometry_type_2, 0>
       (lvalue, rvalue);
   }
-
+
   struct y_ps45_p : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
   typename enable_if< typename gtl_and_4< y_ps45_p,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
- typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
   operator+(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_45_set_view<geometry_type_1, geometry_type_2, 0>
       (lvalue, rvalue);
   }
-
+
   struct y_ps45_s : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
   typename enable_if< typename gtl_and_4< y_ps45_s, typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
                                            typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
                                            typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
   operator*(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_45_set_view<geometry_type_1, geometry_type_2, 1>
       (lvalue, rvalue);
@@ -231,7 +231,7 @@
   typename enable_if< typename gtl_and_4< y_ps45_a, typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
                                            typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
                                            typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
   operator&(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_45_set_view<geometry_type_1, geometry_type_2, 1>
       (lvalue, rvalue);
@@ -243,30 +243,30 @@
   typename enable_if< typename gtl_and_4< y_ps45_x, typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
                                            typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
                                            typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 2> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 2> >::type
   operator^(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_45_set_view<geometry_type_1, geometry_type_2, 2>
       (lvalue, rvalue);
   }
-
+
   struct y_ps45_m : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
   typename enable_if< typename gtl_and_4< y_ps45_m,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
- typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 3> >::type
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 3> >::type
   operator-(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_45_set_view<geometry_type_1, geometry_type_2, 3>
       (lvalue, rvalue);
   }
-
+
   struct y_ps45_pe : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
   typename enable_if< typename gtl_and_4<y_ps45_pe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type, gtl_yes,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator+=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -275,8 +275,8 @@
   struct y_ps45_be : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps45_be, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_be, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator|=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -286,8 +286,8 @@
 
   template <typename geometry_type_1, typename geometry_type_2>
   typename enable_if< typename gtl_and_3< y_ps45_se,
- typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator*=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -296,8 +296,8 @@
   struct y_ps45_ae : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps45_ae, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_ae, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator&=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -306,9 +306,9 @@
   struct y_ps45_xe : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if<
- typename gtl_and_3<y_ps45_xe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if<
+ typename gtl_and_3<y_ps45_xe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
     geometry_type_1>::type &
   operator^=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 2>(lvalue, rvalue);
@@ -317,8 +317,8 @@
   struct y_ps45_me : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps45_me, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_me, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator-=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 3>(lvalue, rvalue);
@@ -327,8 +327,8 @@
   struct y_ps45_rpe : gtl_yes {};
 
   template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3< y_ps45_rpe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3< y_ps45_rpe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
                                                                 coordinate_concept>::type>::type,
                        geometry_type_1>::type &
   operator+=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -338,8 +338,8 @@
   struct y_ps45_rme : gtl_yes {};
 
   template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3<y_ps45_rme, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_rme, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
                                                                 coordinate_concept>::type>::type,
                        geometry_type_1>::type &
   operator-=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -349,8 +349,8 @@
   struct y_ps45_rp : gtl_yes {};
 
   template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3<y_ps45_rp, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_rp, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
                                                                coordinate_concept>::type>
   ::type, geometry_type_1>::type
   operator+(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -362,8 +362,8 @@
   struct y_ps45_rm : gtl_yes {};
 
   template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3<y_ps45_rm, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_rm, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
                                                                coordinate_concept>::type>
   ::type, geometry_type_1>::type
   operator-(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -375,4 +375,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/polygon_45_touch.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_45_touch.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_45_touch.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -32,7 +32,7 @@
         } else {
           int count = mp[i].second;
           if(subtract) count -= mp2[j].second;
- else count += mp2[j].second;
+ else count += mp2[j].second;
           if(count) {
             newmp.push_back(mp[i]);
             newmp.back().second = count;
@@ -63,7 +63,7 @@
       inline bool operator!=(const CountTouch& count) const { return !((*this) == count); }
       //inline CountTouch& operator=(int count) { counts[0] = counts[1] = count; return *this; }
       inline CountTouch& operator=(const CountTouch& count) { counts = count.counts; return *this; }
- inline int& operator[](int index) {
+ inline int& operator[](int index) {
         std::vector<std::pair<int, int> >::iterator itr = lower_bound(counts.begin(), counts.end(), std::make_pair(index, int(0)));
         if(itr != counts.end() && itr->first == index) {
             return itr->second;
@@ -102,8 +102,8 @@
       std::vector<std::pair<int, int> > counts;
     };
 
- typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::map<int, std::set<int> > > map_graph_o;
- typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::vector<std::set<int> > > vector_graph_o;
+ typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::map<int, std::set<int> > > map_graph_o;
+ typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::vector<std::set<int> > > vector_graph_o;
 
     template <typename cT>
     static void process_previous_x(cT& output) {
@@ -124,10 +124,10 @@
       }
       y_prop_map.clear();
     }
-
+
     struct touch_45_output_functor {
       template <typename cT>
- void operator()(cT& output, const CountTouch& count1, const CountTouch& count2,
+ void operator()(cT& output, const CountTouch& count1, const CountTouch& count2,
                       const Point& pt, int , direction_1d ) {
         Unit& x = output.first.first;
         std::map<Unit, std::set<int> >& y_prop_map = output.first.second;
@@ -138,7 +138,7 @@
             itr1 != count1.counts.end(); ++itr1) {
           if(itr1->second > 0) {
             output_set.insert(output_set.end(), itr1->first);
- }
+ }
         }
         for(std::vector<std::pair<int, int> >::const_iterator itr2 = count2.counts.begin();
             itr2 != count2.counts.end(); ++itr2) {
@@ -148,16 +148,16 @@
         }
       }
     };
- typedef typename std::pair<Point,
+ typedef typename std::pair<Point,
                                typename boolean_op_45<Unit>::template Scan45CountT<CountTouch> > Vertex45Compact;
     typedef std::vector<Vertex45Compact> TouchSetData;
-
+
     struct lessVertex45Compact {
       bool operator()(const Vertex45Compact& l, const Vertex45Compact& r) {
         return l.first < r.first;
       }
     };
-
+
 // template <typename TSD>
 // static void print_tsd(TSD& tsd) {
 // for(std::size_t i = 0; i < tsd.size(); ++i) {
@@ -185,8 +185,8 @@
 
     template <typename graph_type>
     static void performTouch(graph_type& graph, TouchSetData& tsd) {
-
- gtlsort(tsd.begin(), tsd.end(), lessVertex45Compact());
+
+ polygon_sort(tsd.begin(), tsd.end(), lessVertex45Compact());
       typedef std::vector<std::pair<Point, typename boolean_op_45<Unit>::template Scan45CountT<CountTouch> > > TSD;
       TSD tsd_;
       tsd_.reserve(tsd.size());
@@ -227,10 +227,10 @@
         }
       }
     }
-
+
   };
 
 
 }
 }
-#endif
+#endif

Modified: branches/release/boost/polygon/detail/polygon_90_set_view.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_90_set_view.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_90_set_view.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -23,7 +23,7 @@
     typedef typename polygon_90_set_view<ltype, rtype, op_type>::iterator_type iterator_type;
     typedef typename polygon_90_set_view<ltype, rtype, op_type>::operator_arg_type operator_arg_type;
 
- static inline iterator_type begin(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
+ static inline iterator_type begin(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
     static inline iterator_type end(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
 
     static inline orientation_2d orient(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
@@ -46,7 +46,7 @@
         insert_into_view_arg(linput_, lvalue_, orient_l);
         insert_into_view_arg(rinput_, rvalue_, orient_r);
         output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
       }
     };
 
@@ -65,23 +65,23 @@
           lvalue_.sort();
           rvalue_.sort();
           output_.applyBooleanBinaryOp(lvalue_.begin(), lvalue_.end(),
- rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
+ rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
         }else if((orient_ != orient_l) && (orient_!= orient_r)){ // both the orientations are not equal to input
           // easier way is to ignore the input orientation and use the input data's orientation, but not done so
           insert_into_view_arg(linput_, lvalue_, orient_l);
           insert_into_view_arg(rinput_, rvalue_, orient_r);
           output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
         }else if(orient_ != orient_l){ // left hand side orientation is different
           insert_into_view_arg(linput_, lvalue_, orient_l);
           rvalue_.sort();
           output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
+ rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
         } else if(orient_ != orient_r){ // right hand side orientation is different
           insert_into_view_arg(rinput_, rvalue_, orient_r);
           lvalue_.sort();
           output_.applyBooleanBinaryOp(lvalue_.begin(), lvalue_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
         }
       }
     };
@@ -98,7 +98,7 @@
          // << "," << orient_.to_int() << std::endl;
          insert_into_view_arg(rinput_, rvalue_, orient_r);
          output_.applyBooleanBinaryOp(lvalue_.begin(), lvalue_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
       }
     };
 
@@ -115,7 +115,7 @@
         // << "," << orient_.to_int() << std::endl;
 
         output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
+ rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
       }
     };
 
@@ -159,12 +159,12 @@
     bool sorted() const { return true; } //result of a boolean is sorted
 
 // template <typename input_iterator_type>
-// void set(input_iterator_type input_begin, input_iterator_type input_end,
+// void set(input_iterator_type input_begin, input_iterator_type input_end,
 // orientation_2d orient) const {
 // orient_ = orient;
 // output_.clear();
 // output_.insert(output_.end(), input_begin, input_end);
-// gtlsort(output_.begin(), output_.end());
+// polygon_sort(output_.begin(), output_.end());
 // }
     void sort() const {} //is always sorted
   };
@@ -189,22 +189,22 @@
 // template <typename ltype, typename rtype, typename op_type>
 // template <typename input_iterator_type>
 // void polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
-// set(polygon_90_set_view<ltype, rtype, op_type>& polygon_set,
+// set(polygon_90_set_view<ltype, rtype, op_type>& polygon_set,
 // input_iterator_type input_begin, input_iterator_type input_end,
 // orientation_2d orient) {
 // polygon_set.set(input_begin, input_end, orient);
 // }
   template <typename ltype, typename rtype, typename op_type>
   orientation_2d polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
- orient(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
+ orient(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
     return polygon_set.orient(); }
   template <typename ltype, typename rtype, typename op_type>
   bool polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
- clean(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
+ clean(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
     return true; }
   template <typename ltype, typename rtype, typename op_type>
   bool polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
- sorted(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
+ sorted(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
     return true; }
 
   template <typename value_type, typename arg_type>
@@ -216,7 +216,7 @@
     dest.insert(itr1, itr2, orient);
     dest.sort();
   }
-
+
   template <typename T>
   template <typename ltype, typename rtype, typename op_type>
   inline polygon_90_set_data<T>& polygon_90_set_data<T>::operator=(const polygon_90_set_view<ltype, rtype, op_type>& that) {
@@ -225,22 +225,22 @@
     unsorted_ = false;
     return *this;
   }
-
+
   template <typename T>
   template <typename ltype, typename rtype, typename op_type>
   inline polygon_90_set_data<T>::polygon_90_set_data(const polygon_90_set_view<ltype, rtype, op_type>& that) :
     orient_(that.orient()), data_(that.begin(), that.end()), dirty_(false), unsorted_(false) {}
-
+
   template <typename geometry_type_1, typename geometry_type_2>
   struct self_assign_operator_lvalue {
     typedef geometry_type_1& type;
   };
-
+
   template <typename type_1, typename type_2>
   struct by_value_binary_operator {
     typedef type_1 type;
   };
-
+
     template <typename geometry_type_1, typename geometry_type_2, typename op_type>
     geometry_type_1& self_assignment_boolean_op(geometry_type_1& lvalue_, const geometry_type_2& rvalue_) {
       typedef geometry_type_1 ltype;
@@ -257,7 +257,7 @@
       // to be same as linput
       value_type rinput_(orient_);
       //BM: The output dataset's scanline orient is set as equal to first input dataset's (lvalue_) orientation
- value_type output_(orient_);
+ value_type output_(orient_);
       insert_into_view_arg(linput_, lvalue_, orient_);
       // BM: The last argument orient_r is the user initialized scanline orientation for rvalue_ data set.
       // But since rinput (see above) is initialized to scanline orientation consistent with the lvalue_
@@ -265,11 +265,11 @@
       insert_into_view_arg(rinput_, rvalue_, orient_r);
       // BM: boolean operation and output uses lvalue_ dataset's scanline orientation.
       output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
       polygon_90_set_mutable_traits<geometry_type_1>::set(lvalue_, output_.begin(), output_.end(), orient_);
       return lvalue_;
     }
-
+
   namespace operators {
   struct y_ps90_b : gtl_yes {};
 
@@ -279,27 +279,27 @@
     typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr> >::type
   operator|(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
+ (lvalue, rvalue,
        polygon_90_set_traits<geometry_type_1>::orient(lvalue),
        boolean_op::BinaryOr());
   }
-
+
   struct y_ps90_p : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3< y_ps90_p,
       typename gtl_if<typename is_polygon_90_set_type<geometry_type_1>::type>::type,
       typename gtl_if<typename is_polygon_90_set_type<geometry_type_2>::type>::type>::type,
     polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr> >::type
   operator+(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
+ (lvalue, rvalue,
        polygon_90_set_traits<geometry_type_1>::orient(lvalue),
        boolean_op::BinaryOr());
   }
-
+
   struct y_ps90_s : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
@@ -308,12 +308,12 @@
     typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd> >::type
   operator*(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
+ (lvalue, rvalue,
        polygon_90_set_traits<geometry_type_1>::orient(lvalue),
        boolean_op::BinaryAnd());
   }
-
+
   struct y_ps90_a : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
@@ -322,8 +322,8 @@
     typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd> >::type
   operator&(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
+ (lvalue, rvalue,
        polygon_90_set_traits<geometry_type_1>::orient(lvalue),
        boolean_op::BinaryAnd());
   }
@@ -336,12 +336,12 @@
     typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryXor> >::type
   operator^(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryXor>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryXor>
+ (lvalue, rvalue,
        polygon_90_set_traits<geometry_type_1>::orient(lvalue),
        boolean_op::BinaryXor());
   }
-
+
   struct y_ps90_m : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
@@ -350,12 +350,12 @@
     typename gtl_if<typename is_polygon_90_set_type<geometry_type_2>::type>::type>::type,
                        polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryNot> >::type
   operator-(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryNot>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryNot>
+ (lvalue, rvalue,
        polygon_90_set_traits<geometry_type_1>::orient(lvalue),
        boolean_op::BinaryNot());
   }
-
+
   struct y_ps90_pe : gtl_yes {};
 
   template <typename coordinate_type_1, typename geometry_type_2>
@@ -366,11 +366,11 @@
                   polygon_90_set_traits<geometry_type_2>::orient(rvalue));
     return lvalue;
   }
-
+
   struct y_ps90_be : gtl_yes {};
   //
   template <typename coordinate_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and< y_ps90_be, typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and< y_ps90_be, typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        polygon_90_set_data<coordinate_type_1> >::type &
   operator|=(polygon_90_set_data<coordinate_type_1>& lvalue, const geometry_type_2& rvalue) {
     return lvalue += rvalue;
@@ -380,8 +380,8 @@
 
   //normal self assignment boolean operations
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< y_ps90_pe2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< y_ps90_pe2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator+=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>(lvalue, rvalue);
@@ -390,8 +390,8 @@
   struct y_ps90_be2 : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_be2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_be2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator|=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>(lvalue, rvalue);
@@ -400,18 +400,18 @@
   struct y_ps90_se : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_se, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_se, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator*=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>(lvalue, rvalue);
   }
-
+
   struct y_ps90_ae : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_ae, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_ae, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator&=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>(lvalue, rvalue);
@@ -420,8 +420,8 @@
   struct y_ps90_xe : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_xe, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_xe, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator^=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryXor>(lvalue, rvalue);
@@ -430,8 +430,8 @@
   struct y_ps90_me : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< y_ps90_me, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< y_ps90_me, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator-=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryNot>(lvalue, rvalue);
@@ -441,7 +441,7 @@
 
   template <typename geometry_type_1, typename coordinate_type_1>
   typename enable_if< typename gtl_and_3<y_ps90_rpe,
- typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
     typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
                        geometry_type_1>::type &
   operator+=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -452,7 +452,7 @@
 
   template <typename geometry_type_1, typename coordinate_type_1>
   typename enable_if< typename gtl_and_3<y_ps90_rme,
- typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
     typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
                        geometry_type_1>::type &
   operator-=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -463,7 +463,7 @@
 
   template <typename geometry_type_1, typename coordinate_type_1>
   typename enable_if< typename gtl_and_3<y_ps90_rp,
- typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
     typename gtl_if<typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type>::type,
   geometry_type_1>::type
   operator+(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -476,7 +476,7 @@
 
   template <typename geometry_type_1, typename coordinate_type_1>
   typename enable_if< typename gtl_and_3<y_ps90_rm,
- typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
     typename gtl_if<typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type>::type,
   geometry_type_1>::type
   operator-(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -488,4 +488,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/polygon_90_touch.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_90_touch.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_90_touch.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -30,7 +30,7 @@
         bool incremented_;
       public:
         inline iterator() : itr_(), ivlIds_(), incremented_(false) {}
- inline iterator(typename EventData::const_iterator itr,
+ inline iterator(typename EventData::const_iterator itr,
                         Unit prevPos, Unit curPos, const std::set<int>& ivlIds) : itr_(itr), ivlIds_(), incremented_(false) {
           ivlIds_.second = ivlIds;
           ivlIds_.first = Interval(prevPos, curPos);
@@ -61,7 +61,7 @@
             } else {
               ivlIds_.second.insert(*itr);
             }
- }
+ }
           //std::cout << std::endl;
           //std::cout << "new state\n";
           //for(std::set<int>::iterator itr = ivlIds_.second.begin(); itr != ivlIds_.second.end(); ++itr) {
@@ -77,7 +77,7 @@
           ++(*this);
           return tmpItr;
         }
- inline std::pair<Interval, std::set<int> >& operator*() {
+ inline std::pair<Interval, std::set<int> >& operator*() {
           if(incremented_) ivlIds_.first = Interval(ivlIds_.first.get(HIGH), itr_->first);
           incremented_ = false;
           if(ivlIds_.second.empty())(++(*this));
@@ -98,13 +98,13 @@
         eventData_ = that.eventData_;
         return *this;
       }
-
+
       //Insert an interval polygon id into the EventData
       inline void insert(const std::pair<Interval, int>& intervalId){
         insert(intervalId.first.low(), intervalId.second);
         insert(intervalId.first.high(), intervalId.second);
       }
-
+
       //Insert an position and polygon id into EventData
       inline void insert(Unit pos, int id) {
         typename EventData::iterator lb = eventData_.lower_bound(pos);
@@ -121,7 +121,7 @@
           (*lb).second.insert(id);
         }
       }
-
+
       //merge this scan event with that by inserting its data
       inline void insert(const TouchScanEvent& that){
         typename EventData::const_iterator itr;
@@ -129,9 +129,9 @@
           eventData_[(*itr).first].insert(itr->second.begin(), itr->second.end());
         }
       }
-
+
       //Get the begin iterator over event data
- inline iterator begin() const {
+ inline iterator begin() const {
         //std::cout << "begin\n";
         if(eventData_.empty()) return end();
         typename EventData::const_iterator itr = eventData_.begin();
@@ -140,18 +140,18 @@
         ++itr;
         return iterator(itr, pos, itr->first, idr);
       }
-
+
       //Get the end iterator over event data
       inline iterator end() const { return iterator(eventData_.end(), 0, 0, std::set<int>()); }
-
+
       inline void clear() { eventData_.clear(); }
-
- inline Interval extents() const {
+
+ inline Interval extents() const {
         if(eventData_.empty()) return Interval();
         return Interval((*(eventData_.begin())).first, (*(eventData_.rbegin())).first);
       }
     };
-
+
     //declaration of a map of scan events by coordinate value used to store all the
     //polygon data for a single layer input into the scanline algorithm
     typedef std::pair<std::map<Unit, TouchScanEvent>, std::map<Unit, TouchScanEvent> > TouchSetData;
@@ -166,8 +166,8 @@
     public:
       inline TouchOp () : scanData_(), nextItr_() { nextItr_ = scanData_.end(); }
       inline TouchOp (const TouchOp& that) : scanData_(that.scanData_), nextItr_() { nextItr_ = scanData_.begin(); }
- inline TouchOp& operator=(const TouchOp& that);
-
+ inline TouchOp& operator=(const TouchOp& that);
+
       //moves scanline forward
       inline void advanceScan() { nextItr_ = scanData_.begin(); }
 
@@ -252,7 +252,7 @@
             //std::cout << "case7" << std::endl;
             scanData_.erase(lowItr);
           }
- }
+ }
         //merge the top interval with the one above if they have the same count
         if(highItr != scanData_.begin()) {
           //std::cout << "case8" << std::endl;
@@ -279,7 +279,7 @@
 // std::cout << std::endl;
 // }
 // }
-
+
     private:
       inline typename ScanData::iterator lookup_(Unit pos){
         if(nextItr_ != scanData_.end() && nextItr_->first >= pos) {
@@ -294,7 +294,7 @@
       }
 
       template <typename graphT>
- inline void evaluateInterval_(graphT& outputContainer, std::set<int>& ids,
+ inline void evaluateInterval_(graphT& outputContainer, std::set<int>& ids,
                                     const std::set<int>& changingIds, bool leadingEdge) {
         for(std::set<int>::const_iterator ciditr = changingIds.begin(); ciditr != changingIds.end(); ++ciditr){
           //std::cout << "evaluateInterval " << (*ciditr) << std::endl;

Modified: branches/release/boost/polygon/detail/polygon_arbitrary_formation.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_arbitrary_formation.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_arbitrary_formation.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
     Copyright 2008 Intel Corporation
-
+
     Use, modification and distribution are 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).
@@ -40,7 +40,7 @@
         return lp(pt, pt2) && lp(pt1, pt);
       return lp(pt, pt1) && lp(pt2, pt);
     }
-
+
     template <typename area_type>
     static inline Unit compute_intercept(const area_type& dy2,
                                          const area_type& dx1,
@@ -96,7 +96,7 @@
         dy2 *= -1;
         dx2 *= -1;
       } else if(dx2 == 0) {
- //if the second slope is vertical the first is always less unless it is also vertical, in which case they are equal
+ //if the second slope is vertical the first is always less unless it is also vertical, in which case they are equal
         return dx1 != 0;
       }
       typedef typename coordinate_traits<Unit>::unsigned_area_type unsigned_product_type;
@@ -173,9 +173,9 @@
       return false;
     }
 
- static inline Unit evalAtXforYlazy(Unit xIn, Point pt, Point other_pt) {
+ static inline Unit evalAtXforYlazy(Unit xIn, Point pt, Point other_pt) {
       long double
- evalAtXforYret, evalAtXforYxIn, evalAtXforYx1, evalAtXforYy1, evalAtXforYdx1, evalAtXforYdx,
+ evalAtXforYret, evalAtXforYxIn, evalAtXforYx1, evalAtXforYy1, evalAtXforYdx1, evalAtXforYdx,
         evalAtXforYdy, evalAtXforYx2, evalAtXforYy2, evalAtXforY0;
       //y = (x - x1)dy/dx + y1
       //y = (xIn - pt.x)*(other_pt.y-pt.y)/(other_pt.x-pt.x) + pt.y
@@ -190,16 +190,16 @@
       if(evalAtXforYdx1 == evalAtXforY0) return (Unit)evalAtXforYy1;
       evalAtXforYx2 = other_pt.get(HORIZONTAL);
       evalAtXforYy2 = other_pt.get(VERTICAL);
-
+
       evalAtXforYdx = evalAtXforYx2 - evalAtXforYx1;
       evalAtXforYdy = evalAtXforYy2 - evalAtXforYy1;
       evalAtXforYret = ((evalAtXforYdx1) * evalAtXforYdy / evalAtXforYdx + evalAtXforYy1);
       return (Unit)evalAtXforYret;
     }
 
- static inline typename high_precision_type<Unit>::type evalAtXforY(Unit xIn, Point pt, Point other_pt) {
+ static inline typename high_precision_type<Unit>::type evalAtXforY(Unit xIn, Point pt, Point other_pt) {
       typename high_precision_type<Unit>::type
- evalAtXforYret, evalAtXforYxIn, evalAtXforYx1, evalAtXforYy1, evalAtXforYdx1, evalAtXforYdx,
+ evalAtXforYret, evalAtXforYxIn, evalAtXforYx1, evalAtXforYy1, evalAtXforYdx1, evalAtXforYdx,
         evalAtXforYdy, evalAtXforYx2, evalAtXforYy2, evalAtXforY0;
       //y = (x - x1)dy/dx + y1
       //y = (xIn - pt.x)*(other_pt.y-pt.y)/(other_pt.x-pt.x) + pt.y
@@ -215,18 +215,18 @@
       if(evalAtXforYdx1 == evalAtXforY0) return evalAtXforYret = evalAtXforYy1;
       evalAtXforYx2 = (high_precision)other_pt.get(HORIZONTAL);
       evalAtXforYy2 = (high_precision)other_pt.get(VERTICAL);
-
+
       evalAtXforYdx = evalAtXforYx2 - evalAtXforYx1;
       evalAtXforYdy = evalAtXforYy2 - evalAtXforYy1;
       evalAtXforYret = ((evalAtXforYdx1) * evalAtXforYdy / evalAtXforYdx + evalAtXforYy1);
       return evalAtXforYret;
     }
-
+
     struct evalAtXforYPack {
     typename high_precision_type<Unit>::type
- evalAtXforYret, evalAtXforYxIn, evalAtXforYx1, evalAtXforYy1, evalAtXforYdx1, evalAtXforYdx,
+ evalAtXforYret, evalAtXforYxIn, evalAtXforYx1, evalAtXforYy1, evalAtXforYdx1, evalAtXforYdx,
                            evalAtXforYdy, evalAtXforYx2, evalAtXforYy2, evalAtXforY0;
- inline const typename high_precision_type<Unit>::type& evalAtXforY(Unit xIn, Point pt, Point other_pt) {
+ inline const typename high_precision_type<Unit>::type& evalAtXforY(Unit xIn, Point pt, Point other_pt) {
         //y = (x - x1)dy/dx + y1
         //y = (xIn - pt.x)*(other_pt.y-pt.y)/(other_pt.x-pt.x) + pt.y
         //assert pt.x != other_pt.x
@@ -243,7 +243,7 @@
         if(evalAtXforYdx1 == evalAtXforY0) return evalAtXforYret = evalAtXforYy1;
         evalAtXforYx2 = (high_precision)other_pt.get(HORIZONTAL);
         evalAtXforYy2 = (high_precision)other_pt.get(VERTICAL);
-
+
         evalAtXforYdx = evalAtXforYx2 - evalAtXforYx1;
         evalAtXforYdy = evalAtXforYy2 - evalAtXforYy1;
         evalAtXforYret = ((evalAtXforYdx1) * evalAtXforYdy / evalAtXforYdx + evalAtXforYy1);
@@ -254,7 +254,7 @@
     static inline bool is_vertical(const half_edge& he) {
       return he.first.get(HORIZONTAL) == he.second.get(HORIZONTAL);
     }
-
+
     static inline bool is_horizontal(const half_edge& he) {
       return he.first.get(VERTICAL) == he.second.get(VERTICAL);
     }
@@ -274,10 +274,10 @@
       inline less_half_edge(Unit *x, int *justBefore, evalAtXforYPack * packIn) : x_(x), justBefore_(justBefore), pack_(packIn) {}
       inline less_half_edge(const less_half_edge& that) : x_(that.x_), justBefore_(that.justBefore_),
                                                           pack_(that.pack_){}
- inline less_half_edge& operator=(const less_half_edge& that) {
- x_ = that.x_;
- justBefore_ = that.justBefore_;
- pack_ = that.pack_;
+ inline less_half_edge& operator=(const less_half_edge& that) {
+ x_ = that.x_;
+ justBefore_ = that.justBefore_;
+ pack_ = that.pack_;
         return *this; }
       inline bool operator () (const half_edge& elm1, const half_edge& elm2) const {
         if((std::max)(elm1.first.y(), elm1.second.y()) < (std::min)(elm2.first.y(), elm2.second.y()))
@@ -346,8 +346,8 @@
     template <typename unsigned_product_type>
     static inline void unsigned_add(unsigned_product_type& result, int& result_sign, unsigned_product_type a, int a_sign, unsigned_product_type b, int b_sign) {
       int switcher = 0;
- if(a_sign < 0) switcher += 1;
- if(b_sign < 0) switcher += 2;
+ if(a_sign < 0) switcher += 1;
+ if(b_sign < 0) switcher += 2;
       if(a < b) switcher += 4;
       switch (switcher) {
       case 0: //both positive
@@ -388,7 +388,7 @@
     struct compute_intersection_pack {
       typedef typename high_precision_type<Unit>::type high_precision;
       high_precision y_high, dx1, dy1, dx2, dy2, x11, x21, y11, y21, x_num, y_num, x_den, y_den, x, y;
- static inline bool compute_lazy_intersection(Point& intersection, const half_edge& he1, const half_edge& he2,
+ static inline bool compute_lazy_intersection(Point& intersection, const half_edge& he1, const half_edge& he2,
                                                    bool projected = false, bool round_closest = false) {
         long double y_high, dx1, dy1, dx2, dy2, x11, x21, y11, y21, x_num, y_num, x_den, y_den, x, y;
         typedef rectangle_data<Unit> Rectangle;
@@ -419,13 +419,13 @@
           }
         }
         //the bounding boxes of the two line segments intersect, so we check closer to find the intersection point
- dy2 = (he2.second.get(VERTICAL)) -
+ dy2 = (he2.second.get(VERTICAL)) -
           (he2.first.get(VERTICAL));
- dy1 = (he1.second.get(VERTICAL)) -
+ dy1 = (he1.second.get(VERTICAL)) -
           (he1.first.get(VERTICAL));
- dx2 = (he2.second.get(HORIZONTAL)) -
+ dx2 = (he2.second.get(HORIZONTAL)) -
           (he2.first.get(HORIZONTAL));
- dx1 = (he1.second.get(HORIZONTAL)) -
+ dx1 = (he1.second.get(HORIZONTAL)) -
           (he1.first.get(HORIZONTAL));
         if(equal_slope_hp(dx1, dy1, dx2, dy2)) return false;
         //the line segments have different slopes
@@ -436,7 +436,7 @@
         y21 = (he2.first.get(VERTICAL));
         //Unit exp_x = ((at)x11 * (at)dy1 * (at)dx2 - (at)x21 * (at)dy2 * (at)dx1 + (at)y21 * (at)dx1 * (at)dx2 - (at)y11 * (at)dx1 * (at)dx2) / ((at)dy1 * (at)dx2 - (at)dy2 * (at)dx1);
         //Unit exp_y = ((at)y11 * (at)dx1 * (at)dy2 - (at)y21 * (at)dx2 * (at)dy1 + (at)x21 * (at)dy1 * (at)dy2 - (at)x11 * (at)dy1 * (at)dy2) / ((at)dx1 * (at)dy2 - (at)dx2 * (at)dy1);
- x_num = (x11 * dy1 * dx2 - x21 * dy2 * dx1 + y21 * dx1 * dx2 - y11 * dx1 * dx2);
+ x_num = (x11 * dy1 * dx2 - x21 * dy2 * dx1 + y21 * dx1 * dx2 - y11 * dx1 * dx2);
         x_den = (dy1 * dx2 - dy2 * dx1);
         y_num = (y11 * dx1 * dy2 - y21 * dx2 * dy1 + x21 * dy1 * dy2 - x11 * dy1 * dy2);
         y_den = (dx1 * dy2 - dx2 * dy1);
@@ -468,9 +468,9 @@
         if(!projected && !contains(rect1, result, true)) return false;
         if(!projected && !contains(rect2, result, true)) return false;
         if(projected) {
- rectangle_data<long double> inf_rect(-(long double)(std::numeric_limits<Unit>::max)(),
- -(long double) (std::numeric_limits<Unit>::max)(),
- (long double)(std::numeric_limits<Unit>::max)(),
+ rectangle_data<long double> inf_rect(-(long double)(std::numeric_limits<Unit>::max)(),
+ -(long double) (std::numeric_limits<Unit>::max)(),
+ (long double)(std::numeric_limits<Unit>::max)(),
                                                (long double) (std::numeric_limits<Unit>::max)() );
           if(contains(inf_rect, point_data<long double>(x, y), true)) {
             intersection = result;
@@ -482,11 +482,11 @@
         return true;
       }
 
- inline bool compute_intersection(Point& intersection, const half_edge& he1, const half_edge& he2,
+ inline bool compute_intersection(Point& intersection, const half_edge& he1, const half_edge& he2,
                                        bool projected = false, bool round_closest = false) {
         if(!projected && !intersects(he1, he2))
            return false;
- bool lazy_success = compute_lazy_intersection(intersection, he1, he2, projected);
+ bool lazy_success = compute_lazy_intersection(intersection, he1, he2, projected);
         if(!projected) {
           if(lazy_success) {
             if(intersects_grid(intersection, he1) &&
@@ -499,7 +499,7 @@
         return compute_exact_intersection(intersection, he1, he2, projected, round_closest);
       }
 
- inline bool compute_exact_intersection(Point& intersection, const half_edge& he1, const half_edge& he2,
+ inline bool compute_exact_intersection(Point& intersection, const half_edge& he1, const half_edge& he2,
                                              bool projected = false, bool round_closest = false) {
         if(!projected && !intersects(he1, he2))
            return false;
@@ -531,13 +531,13 @@
           }
         }
         //the bounding boxes of the two line segments intersect, so we check closer to find the intersection point
- dy2 = (high_precision)(he2.second.get(VERTICAL)) -
+ dy2 = (high_precision)(he2.second.get(VERTICAL)) -
           (high_precision)(he2.first.get(VERTICAL));
- dy1 = (high_precision)(he1.second.get(VERTICAL)) -
+ dy1 = (high_precision)(he1.second.get(VERTICAL)) -
           (high_precision)(he1.first.get(VERTICAL));
- dx2 = (high_precision)(he2.second.get(HORIZONTAL)) -
+ dx2 = (high_precision)(he2.second.get(HORIZONTAL)) -
           (high_precision)(he2.first.get(HORIZONTAL));
- dx1 = (high_precision)(he1.second.get(HORIZONTAL)) -
+ dx1 = (high_precision)(he1.second.get(HORIZONTAL)) -
           (high_precision)(he1.first.get(HORIZONTAL));
         if(equal_slope_hp(dx1, dy1, dx2, dy2)) return false;
         //the line segments have different slopes
@@ -548,13 +548,13 @@
         y21 = (high_precision)(he2.first.get(VERTICAL));
         //Unit exp_x = ((at)x11 * (at)dy1 * (at)dx2 - (at)x21 * (at)dy2 * (at)dx1 + (at)y21 * (at)dx1 * (at)dx2 - (at)y11 * (at)dx1 * (at)dx2) / ((at)dy1 * (at)dx2 - (at)dy2 * (at)dx1);
         //Unit exp_y = ((at)y11 * (at)dx1 * (at)dy2 - (at)y21 * (at)dx2 * (at)dy1 + (at)x21 * (at)dy1 * (at)dy2 - (at)x11 * (at)dy1 * (at)dy2) / ((at)dx1 * (at)dy2 - (at)dx2 * (at)dy1);
- x_num = (x11 * dy1 * dx2 - x21 * dy2 * dx1 + y21 * dx1 * dx2 - y11 * dx1 * dx2);
+ x_num = (x11 * dy1 * dx2 - x21 * dy2 * dx1 + y21 * dx1 * dx2 - y11 * dx1 * dx2);
         x_den = (dy1 * dx2 - dy2 * dx1);
         y_num = (y11 * dx1 * dy2 - y21 * dx2 * dy1 + x21 * dy1 * dy2 - x11 * dy1 * dy2);
         y_den = (dx1 * dy2 - dx2 * dy1);
         x = x_num / x_den;
         y = y_num / y_den;
- //std::cout << x << " " << y << std::endl;
+ //std::cout << x << " " << y << std::endl;
         //std::cout << "cross1 " << dy1 << " " << dx2 << " " << dy1 * dx2 << std::endl;
         //std::cout << "cross2 " << dy2 << " " << dx1 << " " << dy2 * dx1 << std::endl;
         //Unit exp_x = compute_x_intercept<at>(x11, x21, y11, y21, dy1, dy2, dx1, dx2);
@@ -621,13 +621,13 @@
         }
       }
       //the bounding boxes of the two line segments intersect, so we check closer to find the intersection point
- high_precision dy2 = (high_precision)(he2.second.get(VERTICAL)) -
+ high_precision dy2 = (high_precision)(he2.second.get(VERTICAL)) -
         (high_precision)(he2.first.get(VERTICAL));
- high_precision dy1 = (high_precision)(he1.second.get(VERTICAL)) -
+ high_precision dy1 = (high_precision)(he1.second.get(VERTICAL)) -
         (high_precision)(he1.first.get(VERTICAL));
- high_precision dx2 = (high_precision)(he2.second.get(HORIZONTAL)) -
+ high_precision dx2 = (high_precision)(he2.second.get(HORIZONTAL)) -
         (high_precision)(he2.first.get(HORIZONTAL));
- high_precision dx1 = (high_precision)(he1.second.get(HORIZONTAL)) -
+ high_precision dx1 = (high_precision)(he1.second.get(HORIZONTAL)) -
         (high_precision)(he1.first.get(HORIZONTAL));
       if(equal_slope_hp(dx1, dy1, dx2, dy2)) return false;
       //the line segments have different slopes
@@ -638,7 +638,7 @@
       high_precision y21 = (high_precision)(he2.first.get(VERTICAL));
       //Unit exp_x = ((at)x11 * (at)dy1 * (at)dx2 - (at)x21 * (at)dy2 * (at)dx1 + (at)y21 * (at)dx1 * (at)dx2 - (at)y11 * (at)dx1 * (at)dx2) / ((at)dy1 * (at)dx2 - (at)dy2 * (at)dx1);
       //Unit exp_y = ((at)y11 * (at)dx1 * (at)dy2 - (at)y21 * (at)dx2 * (at)dy1 + (at)x21 * (at)dy1 * (at)dy2 - (at)x11 * (at)dy1 * (at)dy2) / ((at)dx1 * (at)dy2 - (at)dx2 * (at)dy1);
- high_precision x_num = (x11 * dy1 * dx2 - x21 * dy2 * dx1 + y21 * dx1 * dx2 - y11 * dx1 * dx2);
+ high_precision x_num = (x11 * dy1 * dx2 - x21 * dy2 * dx1 + y21 * dx1 * dx2 - y11 * dx1 * dx2);
       high_precision x_den = (dy1 * dx2 - dy2 * dx1);
       high_precision y_num = (y11 * dx1 * dy2 - y21 * dx2 * dy1 + x21 * dy1 * dy2 - x11 * dy1 * dy2);
       high_precision y_den = (dx1 * dy2 - dx2 * dy1);
@@ -708,14 +708,14 @@
           }
         }
         int oab1 = on_above_or_below(he1.first, he2);
- if(oab1 == 0 && between(he1.first, he2.first, he2.second)) return true;
+ if(oab1 == 0 && between(he1.first, he2.first, he2.second)) return true;
         int oab2 = on_above_or_below(he1.second, he2);
- if(oab2 == 0 && between(he1.second, he2.first, he2.second)) return true;
+ if(oab2 == 0 && between(he1.second, he2.first, he2.second)) return true;
         if(oab1 == oab2 && oab1 != 0) return false; //both points of he1 are on same side of he2
         int oab3 = on_above_or_below(he2.first, he1);
- if(oab3 == 0 && between(he2.first, he1.first, he1.second)) return true;
+ if(oab3 == 0 && between(he2.first, he1.first, he1.second)) return true;
         int oab4 = on_above_or_below(he2.second, he1);
- if(oab4 == 0 && between(he2.second, he1.first, he1.second)) return true;
+ if(oab4 == 0 && between(he2.second, he1.first, he1.second)) return true;
         if(oab3 == oab4) return false; //both points of he2 are on same side of he1
         return true; //they must cross
       }
@@ -737,7 +737,7 @@
       inline vertex_half_edge() : pt(), other_pt(), count() {}
       inline vertex_half_edge(const Point& point, const Point& other_point, int countIn) : pt(point), other_pt(other_point), count(countIn) {}
       inline vertex_half_edge(const vertex_half_edge& vertex) : pt(vertex.pt), other_pt(vertex.other_pt), count(vertex.count) {}
- inline vertex_half_edge& operator=(const vertex_half_edge& vertex){
+ inline vertex_half_edge& operator=(const vertex_half_edge& vertex){
         pt = vertex.pt; other_pt = vertex.other_pt; count = vertex.count; return *this; }
       inline vertex_half_edge(const std::pair<Point, Point>& vertex) : pt(), other_pt(), count() {}
       inline vertex_half_edge& operator=(const std::pair<Point, Point>& vertex){ return *this; }
@@ -846,7 +846,7 @@
     typedef typename scanline_base<Unit>::half_edge half_edge;
     typedef typename scanline_base<Unit>::vertex_half_edge vertex_half_edge;
     typedef typename scanline_base<Unit>::less_vertex_half_edge less_vertex_half_edge;
-
+
     class poly_line_arbitrary {
     public:
       typedef typename std::list<Point>::const_iterator iterator;
@@ -868,7 +868,7 @@
 
       // copy constructor (since we have dynamic memory)
       inline poly_line_arbitrary(const poly_line_arbitrary& that) : points(that.points) {}
-
+
       // assignment operator (since we have dynamic memory do a deep copy)
       inline poly_line_arbitrary& operator=(const poly_line_arbitrary& that) {
         points = that.points;
@@ -884,31 +884,31 @@
       inline std::size_t size() const { return points.size(); }
 
       //public data member
- std::list<Point> points;
+ std::list<Point> points;
     };
 
     class active_tail_arbitrary {
     protected:
       //data
- poly_line_arbitrary* tailp_;
+ poly_line_arbitrary* tailp_;
       active_tail_arbitrary *otherTailp_;
       std::list<active_tail_arbitrary*> holesList_;
       bool head_;
     public:
-
+
       /**
        * @brief iterator over coordinates of the figure
        */
       typedef typename poly_line_arbitrary::iterator iterator;
-
+
       /**
        * @brief iterator over holes contained within the figure
        */
       typedef typename std::list<active_tail_arbitrary*>::const_iterator iteratorHoles;
-
+
       //default constructor
       inline active_tail_arbitrary() : tailp_(), otherTailp_(), holesList_(), head_() {}
-
+
       //constructor
       inline active_tail_arbitrary(const vertex_half_edge& vertex, active_tail_arbitrary* otherTailp = 0) : tailp_(), otherTailp_(), holesList_(), head_() {
         tailp_ = new poly_line_arbitrary;
@@ -925,7 +925,7 @@
         tailp_->points.push_back(point);
         head_ = head;
         otherTailp_ = otherTailp;
-
+
       }
       inline active_tail_arbitrary(active_tail_arbitrary* otherTailp) :
         tailp_(), otherTailp_(), holesList_(), head_() {
@@ -970,7 +970,7 @@
        * @brief get the pointer to the activetail at the other end of the chain
        */
       inline active_tail_arbitrary* getOtherActiveTail() const { return otherTailp_; }
-
+
       /**
        * @brief test if another active tail is the other end of the chain
        */
@@ -1107,7 +1107,7 @@
        * returns a handle to a hole if one is closed
        */
       template <class cT>
- static inline active_tail_arbitrary* joinChains(Point point, active_tail_arbitrary* at1, active_tail_arbitrary* at2, bool solid,
+ static inline active_tail_arbitrary* joinChains(Point point, active_tail_arbitrary* at1, active_tail_arbitrary* at2, bool solid,
                                                       cT& output) {
         if(at1->otherTailp_ == at2) {
           //if(at2->otherTailp_ != at1) std::cout << "half closed error\n";
@@ -1179,7 +1179,7 @@
         //std::cout << this << " " << tailp_ << " " << otherTailp_ << " " << holesList_.size() << " " << head_ << std::endl;
       }
 
- static inline std::pair<active_tail_arbitrary*, active_tail_arbitrary*> createActiveTailsAsPair(Point point, bool solid,
+ static inline std::pair<active_tail_arbitrary*, active_tail_arbitrary*> createActiveTailsAsPair(Point point, bool solid,
                                                                                                       active_tail_arbitrary* phole, bool fractureHoles) {
         active_tail_arbitrary* at1 = 0;
         active_tail_arbitrary* at2 = 0;
@@ -1195,7 +1195,7 @@
           at2 = new active_tail_arbitrary(at1);
           at1->otherTailp_ = at2;
           at2->head_ = !solid;
- if(phole)
+ if(phole)
             at2->addHole(phole); //assert fractureHoles == false
         }
         return std::pair<active_tail_arbitrary*, active_tail_arbitrary*>(at1, at2);
@@ -1219,19 +1219,19 @@
 
     static inline void sort_vertex_arbitrary_count(vertex_arbitrary_count& count, const Point& pt) {
       less_half_edge_count lfec(pt);
- gtlsort(count.begin(), count.end(), lfec);
+ polygon_sort(count.begin(), count.end(), lfec);
     }
 
     typedef std::vector<std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*> > incoming_count;
 
- class less_incoming_count : public std::binary_function<std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>,
+ class less_incoming_count : public std::binary_function<std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>,
                                                             std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>, bool> {
     private:
       Point pt_;
     public:
       inline less_incoming_count() : pt_() {}
       inline less_incoming_count(Point point) : pt_(point) {}
- inline bool operator () (const std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>& elm1,
+ inline bool operator () (const std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>& elm1,
                                const std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>& elm2) const {
         Unit dx1 = elm1.first.first.first.get(HORIZONTAL) - elm1.first.first.second.get(HORIZONTAL);
         Unit dx2 = elm2.first.first.first.get(HORIZONTAL) - elm2.first.first.second.get(HORIZONTAL);
@@ -1243,7 +1243,7 @@
 
     static inline void sort_incoming_count(incoming_count& count, const Point& pt) {
       less_incoming_count lfec(pt);
- gtlsort(count.begin(), count.end(), lfec);
+ polygon_sort(count.begin(), count.end(), lfec);
     }
 
     static inline void compact_vertex_arbitrary_count(const Point& pt, vertex_arbitrary_count &count) {
@@ -1282,7 +1282,7 @@
         count.push_back(std::pair<Point, int>(vertex.other_pt, vertex.count));
       }
       inline vertex_arbitrary_compact(const vertex_arbitrary_compact& vertex) : pt(vertex.pt), count(vertex.count) {}
- inline vertex_arbitrary_compact& operator=(const vertex_arbitrary_compact& vertex){
+ inline vertex_arbitrary_compact& operator=(const vertex_arbitrary_compact& vertex){
         pt = vertex.pt; count = vertex.count; return *this; }
       //inline vertex_arbitrary_compact(const std::pair<Point, Point>& vertex) {}
       inline vertex_arbitrary_compact& operator=(const std::pair<Point, Point>& vertex){ return *this; }
@@ -1315,24 +1315,24 @@
     typedef std::map<vertex_half_edge, active_tail_arbitrary*, less_vertex_half_edge> scanline_data;
     typedef typename scanline_data::iterator iterator;
     typedef typename scanline_data::const_iterator const_iterator;
-
+
     //data
     scanline_data scanData_;
     Unit x_;
     int justBefore_;
- int fractureHoles_;
+ int fractureHoles_;
   public:
- inline polygon_arbitrary_formation() :
+ inline polygon_arbitrary_formation() :
       scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) {
       less_vertex_half_edge lessElm(&x_, &justBefore_);
       scanData_ = scanline_data(lessElm);
     }
- inline polygon_arbitrary_formation(bool fractureHoles) :
+ inline polygon_arbitrary_formation(bool fractureHoles) :
       scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(fractureHoles) {
       less_vertex_half_edge lessElm(&x_, &justBefore_);
       scanData_ = scanline_data(lessElm);
     }
- inline polygon_arbitrary_formation(const polygon_arbitrary_formation& that) :
+ inline polygon_arbitrary_formation(const polygon_arbitrary_formation& that) :
       scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) { (*this) = that; }
     inline polygon_arbitrary_formation& operator=(const polygon_arbitrary_formation& that) {
       x_ = that.x_;
@@ -1345,7 +1345,7 @@
       }
       return *this;
     }
-
+
     //cT is an output container of Polygon45 or Polygon45WithHoles
     //iT is an iterator over vertex_half_edge elements
     //inputBegin - inputEnd is a range of sorted iT that represents
@@ -1367,8 +1367,8 @@
   protected:
     //functions
     template <class cT, class cT2>
- inline std::pair<std::pair<Point, int>, active_tail_arbitrary*> processPoint_(cT& output, cT2& elements, Point point,
- incoming_count& counts_from_scanline, vertex_arbitrary_count& incoming_count) {
+ inline std::pair<std::pair<Point, int>, active_tail_arbitrary*> processPoint_(cT& output, cT2& elements, Point point,
+ incoming_count& counts_from_scanline, vertex_arbitrary_count& incoming_count) {
       //std::cout << "\nAT POINT: " << point << std::endl;
       //join any closing solid corners
       std::vector<int> counts;
@@ -1387,7 +1387,7 @@
           incoming.back() = 0;
         }
       }
-
+
       active_tail_arbitrary* returnValue = 0;
       std::pair<Point, int> returnCount(Point(0, 0), 0);
       int i_size_less_1 = (int)(incoming.size()) -1;
@@ -1421,7 +1421,7 @@
                 if(counts[j] == 1) {
                   //std::cout << "case1: " << i << " " << j << std::endl;
                   //if a figure is closed it will be written out by this function to output
- active_tail_arbitrary::joinChains(point, tails[i], tails[j], true, output);
+ active_tail_arbitrary::joinChains(point, tails[i], tails[j], true, output);
                   counts[i] = 0;
                   counts[j] = 0;
                   tails[i] = 0;
@@ -1447,7 +1447,7 @@
                 if(incoming[j] == -1) {
                   //std::cout << "case2: " << i << " " << j << std::endl;
                   //std::cout << "creating active tail pair\n";
- std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
+ std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
                     active_tail_arbitrary::createActiveTailsAsPair(point, true, 0, fractureHoles_ != 0);
                   //tailPair.first->print();
                   //tailPair.second->print();
@@ -1459,13 +1459,13 @@
                   } else {
                     //std::cout << "new element " << j-1 << " " << -1 << std::endl;
                     //std::cout << point << " " << incoming_count[j].first << std::endl;
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                        active_tail_arbitrary*>(vertex_half_edge(point,
                                                                                 incoming_count[j].first, -1), tailPair.first));
                   }
                   //std::cout << "new element " << i-1 << " " << 1 << std::endl;
                   //std::cout << point << " " << incoming_count[i].first << std::endl;
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                      active_tail_arbitrary*>(vertex_half_edge(point,
                                                                               incoming_count[i].first, 1), tailPair.second));
                   incoming[i] = 0;
@@ -1501,8 +1501,8 @@
                       returnCount.first = point;
                       returnCount.second = -1;
                     } else {
- elements.push_back(std::pair<vertex_half_edge,
- active_tail_arbitrary*>(vertex_half_edge(point,
+ elements.push_back(std::pair<vertex_half_edge,
+ active_tail_arbitrary*>(vertex_half_edge(point,
                                                                                   incoming_count[j].first, incoming[j]), tails[i]));
                     }
                     tails[i] = 0;
@@ -1575,7 +1575,7 @@
             }
             break;
           }
- }
+ }
       }
       //find beginning of a hole
       {
@@ -1586,14 +1586,14 @@
                 //std::cout << "case6: " << i << " " << j << std::endl;
                 //we are beginning a empty space
                 active_tail_arbitrary* holep = 0;
- //if(c_size && counts[c_size_less_1] == 0 &&
- // counts_from_scanline[c_size_less_1].first.first.first.get(HORIZONTAL) == point.get(HORIZONTAL))
+ //if(c_size && counts[c_size_less_1] == 0 &&
+ // counts_from_scanline[c_size_less_1].first.first.first.get(HORIZONTAL) == point.get(HORIZONTAL))
                 if(have_vertical_tail_from_below) {
                   holep = tails[c_size_less_1];
                   tails[c_size_less_1] = 0;
                   have_vertical_tail_from_below = false;
                 }
- std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
+ std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
                   active_tail_arbitrary::createActiveTailsAsPair(point, false, holep, fractureHoles_ != 0);
                 if(j == i_size_less_1 && incoming_count[j].first.get(HORIZONTAL) == point.get(HORIZONTAL)) {
                   //std::cout << "vertical element " << point << std::endl;
@@ -1604,13 +1604,13 @@
                 } else {
                   //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
                   //std::cout << point << " " << incoming_count[j].first << std::endl;
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                      active_tail_arbitrary*>(vertex_half_edge(point,
                                                                               incoming_count[j].first, incoming[j]), tailPair.first));
                 }
                 //std::cout << "new element " << i-1 << " " << incoming[i] << std::endl;
                 //std::cout << point << " " << incoming_count[i].first << std::endl;
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                    active_tail_arbitrary*>(vertex_half_edge(point,
                                                                             incoming_count[i].first, incoming[i]), tailPair.second));
                 incoming[i] = 0;
@@ -1682,7 +1682,7 @@
           elementIters.push_back(iter);
           counts_from_scanline.push_back(std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>
                                          (std::pair<std::pair<Point, Point>, int>(std::pair<Point, Point>(iter->first.pt,
- iter->first.other_pt),
+ iter->first.other_pt),
                                                                                   iter->first.count),
                                           iter->second));
           ++iter;
@@ -1722,8 +1722,8 @@
           //std::cout << "adding vertical tail to counts from scanline\n";
           //std::cout << -verticalCount.second << std::endl;
           counts_from_scanline.push_back(std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>
- (std::pair<std::pair<Point, Point>, int>(std::pair<Point, Point>(verticalCount.first,
- currentPoint),
+ (std::pair<std::pair<Point, Point>, int>(std::pair<Point, Point>(verticalCount.first,
+ currentPoint),
                                                                                   -verticalCount.second),
                                           verticalTail));
         }
@@ -1743,7 +1743,7 @@
           //we got a hole out of the point we just processed
           //iter is still at the next y element above the current y value in the tree
           //std::cout << "checking whether ot handle hole\n";
- if(currentIter == inputEnd ||
+ if(currentIter == inputEnd ||
              currentIter->pt.get(HORIZONTAL) != x_ ||
              scanline_base<Unit>::on_above_or_below(currentIter->pt, half_edge(iter->first.pt, iter->first.other_pt)) != -1) {
             //(high_precision)(currentIter->pt.get(VERTICAL)) >= iter->first.evalAtX(x_)) {
@@ -1791,15 +1791,15 @@
       //std::cout << "end processEvent\n";
       return currentIter;
     }
-
+
     inline iterator lookUp_(Unit y){
       //if just before then we need to look from 1 not -1
       //std::cout << "just before " << justBefore_ << std::endl;
       return scanData_.lower_bound(vertex_half_edge(Point(x_, y), Point(x_, y+1), 0));
     }
-
+
   public: //test functions
-
+
     template <typename stream_type>
     static inline bool testPolygonArbitraryFormationRect(stream_type& stdcout) {
       stdcout << "testing polygon formation\n";
@@ -1814,7 +1814,7 @@
       data.push_back(vertex_half_edge(Point(10, 0), Point(10, 10), -1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 0), 1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1838,7 +1838,7 @@
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 20), -1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(10, 10), 1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1862,7 +1862,7 @@
       data.push_back(vertex_half_edge(Point(2, -4), Point(2, 4), -1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(-2, 2), 1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(2, -4), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1908,7 +1908,7 @@
       data.push_back(vertex_half_edge(Point(10, 22), Point(10, 12), -1));
       data.push_back(vertex_half_edge(Point(10, 22), Point(2, 22), -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1943,19 +1943,19 @@
 
       data.push_back(vertex_half_edge(Point(5, 10), Point(5, 5), 1));
       data.push_back(vertex_half_edge(Point(5, 10), Point(0, 10), 1));
-
+
       data.push_back(vertex_half_edge(Point(5, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(5, 2), Point(7, 2), -1));
-
+
       data.push_back(vertex_half_edge(Point(5, 5), Point(5, 10), -1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(5, 2), 1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(10, 5), -1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(7, 2), 1));
-
+
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 2), 1));
-
- gtlsort(data.begin(), data.end());
+
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -1985,17 +1985,17 @@
 
       data.push_back(vertex_half_edge(Point(5, 10), Point(4, 1), -1));
       data.push_back(vertex_half_edge(Point(5, 10), Point(0, 10), 1));
-
+
       data.push_back(vertex_half_edge(Point(4, 1), Point(5, 10), 1));
       data.push_back(vertex_half_edge(Point(4, 1), Point(7, 2), -1));
-
+
       data.push_back(vertex_half_edge(Point(5, 5), Point(10, 5), -1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(7, 2), 1));
-
+
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(4, 1), 1));
-
- gtlsort(data.begin(), data.end());
+
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2025,17 +2025,17 @@
 
       data.push_back(vertex_half_edge(Point(6, 10), Point(4, 1), -1));
       data.push_back(vertex_half_edge(Point(6, 10), Point(0, 10), 1));
-
+
       data.push_back(vertex_half_edge(Point(4, 1), Point(6, 10), 1));
       data.push_back(vertex_half_edge(Point(4, 1), Point(7, 2), -1));
-
+
       data.push_back(vertex_half_edge(Point(5, 5), Point(10, 5), -1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(7, 2), 1));
-
+
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(4, 1), 1));
-
- gtlsort(data.begin(), data.end());
+
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2063,7 +2063,7 @@
 
       data.push_back(vertex_half_edge(Point(-1, 4), Point(0, 2), -1));
       data.push_back(vertex_half_edge(Point(0, 2), Point(-1, 4), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2120,7 +2120,7 @@
 
       return b;
     }
-
+
   };
 
   template <typename Unit>
@@ -2134,7 +2134,7 @@
     typedef Unit coordinate_type;
     typedef typename active_tail_arbitrary::iterator iterator_type;
     //typedef iterator_points_to_compact<iterator_type, Point> compact_iterator_type;
-
+
     typedef iterator_type iterator;
     inline poly_line_arbitrary_hole_data() : p_(0) {}
     inline poly_line_arbitrary_hole_data(active_tail_arbitrary* p) : p_(p) {}
@@ -2174,7 +2174,7 @@
       typedef poly_line_arbitrary_hole_data<Unit> holeType;
       mutable holeType hole_;
       typename active_tail_arbitrary::iteratorHoles itr_;
-
+
     public:
       typedef std::forward_iterator_tag iterator_category;
       typedef holeType value_type;
@@ -2183,7 +2183,7 @@
       typedef const holeType& reference; //immutable
       inline iterator_holes_type() : hole_(), itr_() {}
       inline iterator_holes_type(typename active_tail_arbitrary::iteratorHoles itr) : hole_(), itr_(itr) {}
- inline iterator_holes_type(const iterator_holes_type& that) : hole_(that.hole_), itr_(that.itr_) {}
+ inline iterator_holes_type(const iterator_holes_type& that) : hole_(that.hole_), itr_(that.itr_) {}
       inline iterator_holes_type& operator=(const iterator_holes_type& that) {
         itr_ = that.itr_;
         return *this;
@@ -2241,7 +2241,7 @@
     typedef typename scanline_base<Unit>::half_edge half_edge;
     typedef typename scanline_base<Unit>::vertex_half_edge vertex_half_edge;
     typedef typename scanline_base<Unit>::less_vertex_half_edge less_vertex_half_edge;
-
+
     typedef typename polygon_arbitrary_formation<Unit>::poly_line_arbitrary poly_line_arbitrary;
 
     typedef typename polygon_arbitrary_formation<Unit>::active_tail_arbitrary active_tail_arbitrary;
@@ -2261,7 +2261,7 @@
     typedef std::map<vertex_half_edge, active_tail_arbitrary*, less_vertex_half_edge> scanline_data;
     typedef typename scanline_data::iterator iterator;
     typedef typename scanline_data::const_iterator const_iterator;
-
+
     //data
   public:
     inline trapezoid_arbitrary_formation() : polygon_arbitrary_formation<Unit>() {}
@@ -2270,7 +2270,7 @@
       * static_cast<polygon_arbitrary_formation<Unit>*>(this) = * static_cast<polygon_arbitrary_formation<Unit>*>(&that);
       return *this;
     }
-
+
     //cT is an output container of Polygon45 or Polygon45WithHoles
     //iT is an iterator over vertex_half_edge elements
     //inputBegin - inputEnd is a range of sorted iT that represents
@@ -2291,14 +2291,14 @@
 
   private:
     //functions
- inline void getVerticalPair_(std::pair<active_tail_arbitrary*,
- active_tail_arbitrary*>& verticalPair,
+ inline void getVerticalPair_(std::pair<active_tail_arbitrary*,
+ active_tail_arbitrary*>& verticalPair,
                                  iterator previter) {
       active_tail_arbitrary* iterTail = (*previter).second;
- Point prevPoint(polygon_arbitrary_formation<Unit>::x_,
+ Point prevPoint(polygon_arbitrary_formation<Unit>::x_,
                       convert_high_precision_type<Unit>(previter->first.evalAtX(polygon_arbitrary_formation<Unit>::x_)));
       iterTail->pushPoint(prevPoint);
- std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
+ std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
         active_tail_arbitrary::createActiveTailsAsPair(prevPoint, true, 0, false);
       verticalPair.first = iterTail;
       verticalPair.second = tailPair.first;
@@ -2306,11 +2306,11 @@
     }
 
     template <class cT, class cT2>
- inline std::pair<std::pair<Point, int>, active_tail_arbitrary*>
- processPoint_(cT& output, cT2& elements,
+ inline std::pair<std::pair<Point, int>, active_tail_arbitrary*>
+ processPoint_(cT& output, cT2& elements,
                   std::pair<active_tail_arbitrary*, active_tail_arbitrary*>& verticalPair,
- iterator previter, Point point, incoming_count& counts_from_scanline,
- vertex_arbitrary_count& incoming_count) {
+ iterator previter, Point point, incoming_count& counts_from_scanline,
+ vertex_arbitrary_count& incoming_count) {
       //std::cout << "\nAT POINT: " << point << std::endl;
       //join any closing solid corners
       std::vector<int> counts;
@@ -2329,7 +2329,7 @@
           incoming.back() = 0;
         }
       }
-
+
       active_tail_arbitrary* returnValue = 0;
       std::pair<active_tail_arbitrary*, active_tail_arbitrary*> verticalPairOut;
       verticalPairOut.first = 0;
@@ -2366,7 +2366,7 @@
                 if(counts[j] == 1) {
                   //std::cout << "case1: " << i << " " << j << std::endl;
                   //if a figure is closed it will be written out by this function to output
- active_tail_arbitrary::joinChains(point, tails[i], tails[j], true, output);
+ active_tail_arbitrary::joinChains(point, tails[i], tails[j], true, output);
                   counts[i] = 0;
                   counts[j] = 0;
                   tails[i] = 0;
@@ -2392,7 +2392,7 @@
                 if(incoming[j] == -1) {
                   //std::cout << "case2: " << i << " " << j << std::endl;
                   //std::cout << "creating active tail pair\n";
- std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
+ std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
                     active_tail_arbitrary::createActiveTailsAsPair(point, true, 0, polygon_arbitrary_formation<Unit>::fractureHoles_ != 0);
                   //tailPair.first->print();
                   //tailPair.second->print();
@@ -2404,13 +2404,13 @@
                   } else {
                     //std::cout << "new element " << j-1 << " " << -1 << std::endl;
                     //std::cout << point << " " << incoming_count[j].first << std::endl;
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                        active_tail_arbitrary*>(vertex_half_edge(point,
                                                                                 incoming_count[j].first, -1), tailPair.first));
                   }
                   //std::cout << "new element " << i-1 << " " << 1 << std::endl;
                   //std::cout << point << " " << incoming_count[i].first << std::endl;
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                      active_tail_arbitrary*>(vertex_half_edge(point,
                                                                               incoming_count[i].first, 1), tailPair.second));
                   incoming[i] = 0;
@@ -2446,12 +2446,12 @@
                       returnCount.first = point;
                       returnCount.second = -1;
                     } else {
- std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
+ std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
                         active_tail_arbitrary::createActiveTailsAsPair(point, true, 0, false);
                       verticalPairOut.first = tails[i];
                       verticalPairOut.second = tailPair.first;
- elements.push_back(std::pair<vertex_half_edge,
- active_tail_arbitrary*>(vertex_half_edge(point,
+ elements.push_back(std::pair<vertex_half_edge,
+ active_tail_arbitrary*>(vertex_half_edge(point,
                                                                                   incoming_count[j].first, incoming[j]), tailPair.second));
                     }
                     tails[i] = 0;
@@ -2478,13 +2478,13 @@
                   if(incoming[j] == -1) {
                     //std::cout << "case4: " << i << " " << j << std::endl;
                     //pass through solid on bottom
-
+
                     //if count from scanline is vertical
- if(i == c_size_less_1 &&
- counts_from_scanline[i].first.first.first.get(HORIZONTAL) ==
+ if(i == c_size_less_1 &&
+ counts_from_scanline[i].first.first.first.get(HORIZONTAL) ==
                        point.get(HORIZONTAL)) {
                        //if incoming count is vertical
- if(j == i_size_less_1 &&
+ if(j == i_size_less_1 &&
                           incoming_count[j].first.get(HORIZONTAL) == point.get(HORIZONTAL)) {
                          returnValue = tails[i];
                          returnCount.first = point;
@@ -2495,13 +2495,13 @@
                                          active_tail_arbitrary*>(vertex_half_edge(point,
                                                                                   incoming_count[j].first, incoming[j]), tails[i]));
                        }
- } else if(j == i_size_less_1 &&
- incoming_count[j].first.get(HORIZONTAL) ==
+ } else if(j == i_size_less_1 &&
+ incoming_count[j].first.get(HORIZONTAL) ==
                               point.get(HORIZONTAL)) {
                       if(verticalPair.first == 0) {
                         getVerticalPair_(verticalPair, previter);
                       }
- active_tail_arbitrary::joinChains(point, tails[i], verticalPair.first, true, output);
+ active_tail_arbitrary::joinChains(point, tails[i], verticalPair.first, true, output);
                       returnValue = verticalPair.second;
                       returnCount.first = point;
                       returnCount.second = 1;
@@ -2510,7 +2510,7 @@
                       if(verticalPair.first == 0) {
                         getVerticalPair_(verticalPair, previter);
                       }
- active_tail_arbitrary::joinChains(point, tails[i], verticalPair.first, true, output);
+ active_tail_arbitrary::joinChains(point, tails[i], verticalPair.first, true, output);
                       verticalPair.second->pushPoint(point);
                       elements.push_back(std::pair<vertex_half_edge,
                                          active_tail_arbitrary*>(vertex_half_edge(point,
@@ -2541,8 +2541,8 @@
                 tails[i]->pushPoint(point);
                 verticalPairOut.first = tails[i];
                 if(j == c_size_less_1 &&
- counts_from_scanline[j].first.first.first.get(HORIZONTAL) ==
- point.get(HORIZONTAL)) {
+ counts_from_scanline[j].first.first.first.get(HORIZONTAL) ==
+ point.get(HORIZONTAL)) {
                   verticalPairOut.second = tails[j];
                 } else {
                   //need to close a trapezoid below
@@ -2561,7 +2561,7 @@
             }
             break;
           }
- }
+ }
       }
       //find beginning of a hole
       {
@@ -2581,15 +2581,15 @@
                   returnCount.first = point;
                   returnCount.second = -1;
                 } else {
- std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
+ std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
                   active_tail_arbitrary::createActiveTailsAsPair(point, false, 0, false);
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                      active_tail_arbitrary*>(vertex_half_edge(point,
                                                                               incoming_count[j].first, incoming[j]), tailPair.second));
                   verticalPairOut.second = tailPair.first;
                   verticalPairOut.first = verticalPair.first;
                 }
- elements.push_back(std::pair<vertex_half_edge,
+ elements.push_back(std::pair<vertex_half_edge,
                                    active_tail_arbitrary*>(vertex_half_edge(point,
                                                                             incoming_count[i].first, incoming[i]), verticalPair.second));
                 incoming[i] = 0;
@@ -2668,7 +2668,7 @@
           elementIters.push_back(iter);
           counts_from_scanline.push_back(std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>
                                          (std::pair<std::pair<Point, Point>, int>(std::pair<Point, Point>(iter->first.pt,
- iter->first.other_pt),
+ iter->first.other_pt),
                                                                                   iter->first.count),
                                           iter->second));
           ++iter;
@@ -2708,8 +2708,8 @@
           //std::cout << "adding vertical tail to counts from scanline\n";
           //std::cout << -verticalCount.second << std::endl;
           counts_from_scanline.push_back(std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>
- (std::pair<std::pair<Point, Point>, int>(std::pair<Point, Point>(verticalCount.first,
- currentPoint),
+ (std::pair<std::pair<Point, Point>, int>(std::pair<Point, Point>(verticalCount.first,
+ currentPoint),
                                                                                   -verticalCount.second),
                                           verticalTail));
         }
@@ -2769,7 +2769,7 @@
       data.push_back(vertex_half_edge(Point(10, 0), Point(10, 10), -1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 0), 1));
       data.push_back(vertex_half_edge(Point(10, 10), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2792,7 +2792,7 @@
       data.push_back(vertex_half_edge(Point(10, 10), Point(10, 20), -1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(10, 10), 1));
       data.push_back(vertex_half_edge(Point(10, 20), Point(0, 10), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2815,7 +2815,7 @@
       data.push_back(vertex_half_edge(Point(2, -4), Point(2, 4), -1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(-2, 2), 1));
       data.push_back(vertex_half_edge(Point(2, 4), Point(2, -4), 1));
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2860,7 +2860,7 @@
       data.push_back(vertex_half_edge(Point(10, 22), Point(10, 12), -1));
       data.push_back(vertex_half_edge(Point(10, 22), Point(2, 22), -1));
 
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2895,19 +2895,19 @@
 
       data.push_back(vertex_half_edge(Point(5, 10), Point(5, 5), 1));
       data.push_back(vertex_half_edge(Point(5, 10), Point(0, 10), 1));
-
+
       data.push_back(vertex_half_edge(Point(5, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(5, 2), Point(7, 2), -1));
-
+
       data.push_back(vertex_half_edge(Point(5, 5), Point(5, 10), -1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(5, 2), 1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(10, 5), -1));
       data.push_back(vertex_half_edge(Point(5, 5), Point(7, 2), 1));
-
+
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 5), -1));
       data.push_back(vertex_half_edge(Point(7, 2), Point(5, 2), 1));
-
- gtlsort(data.begin(), data.end());
+
+ polygon_sort(data.begin(), data.end());
       pf.scan(polys, data.begin(), data.end());
       stdcout << "result size: " << polys.size() << std::endl;
       for(std::size_t i = 0; i < polys.size(); ++i) {
@@ -2917,7 +2917,7 @@
       return true;
     }
   };
-
+
   template <typename T>
   struct PolyLineArbitraryByConcept<T, polygon_with_holes_concept> { typedef poly_line_arbitrary_polygon_data<T> type; };
   template <typename T>

Modified: branches/release/boost/polygon/detail/polygon_formation.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_formation.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_formation.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
     Copyright 2008 Intel Corporation
-
+
     Use, modification and distribution are 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).
@@ -25,24 +25,24 @@
    * TAIL End is represented by true because TAIL comes after head and 1 after 0
    */
   const End TAIL = true;
-
+
   /*
    * 2D turning direction, left and right sides (is a boolean value since it has two states.)
    */
   typedef bool Side;
-
+
   /*
    * LEFT Side is 0 because we inuitively think left to right; left < right
    */
   const Side LEFT = false;
-
+
   /*
    * RIGHT Side is 1 so that right > left
    */
   const Side RIGHT = true;
 
   /*
- * The PolyLine class is data storage and services for building and representing partial polygons.
+ * The PolyLine class is data storage and services for building and representing partial polygons.
    * As the polyline is added to it extends its storage to accomodate the data.
    * PolyLines can be joined head-to-head/head-to-tail when it is determined that two polylines are
    * part of the same polygon.
@@ -59,20 +59,20 @@
   class PolyLine {
   private:
     //data
-
+
     /*
      * ptdata_ a vector of coordiantes
      * if VERTICAL_HEAD, first coordiante is an X
      * else first coordinate is a Y
      */
     std::vector<Unit> ptdata_;
-
+
     /*
      * head and tail points to other polylines before and after this in a chain
      */
     PolyLine* headp_;
     PolyLine* tailp_;
-
+
     /*
      * state bitmask
      * bit zero is orientation, 0 H, 1 V
@@ -81,24 +81,24 @@
      * bit 3 is solid to left of PolyLine when 1, right when 0
      */
     int state_;
-
+
   public:
     /*
      * default constructor (for preallocation)
      */
     PolyLine();
-
+
     /*
      * constructor that takes the orientation, coordiante and side to which there is solid
      */
     PolyLine(orientation_2d orient, Unit coord, Side side);
-
+
     //copy constructor
     PolyLine(const PolyLine& pline);
-
+
     //destructor
     ~PolyLine();
-
+
     //assignment operator
     PolyLine& operator=(const PolyLine& that);
 
@@ -118,18 +118,18 @@
     /*
      * returns true if first coordinate is an X value (first segment is vertical)
      */
- bool verticalHead() const;
+ bool verticalHead() const;
 
     /*
      * returns the orientation_2d fo the tail
      */
     orientation_2d tailOrient() const;
-
+
     /*
      * returns true if last coordinate is an X value (last segment is vertical)
      */
     bool verticalTail() const;
-
+
     /*
      * retrun true if PolyLine has odd number of coordiantes
      */
@@ -157,7 +157,7 @@
      * retrun true if the tail of this polyline is connect to the head of a polyline
      */
     bool tailToHead() const;
-
+
     /*
      * retrun the side on which there is solid for this polyline
      */
@@ -177,12 +177,12 @@
      * adds a coordinate value to the end of the polyline changing the tail orientation
      */
     PolyLine& pushCoordinate(Unit coord);
-
+
     /*
      * removes a coordinate value at the end of the polyline changing the tail orientation
      */
     PolyLine& popCoordinate();
-
+
     /*
      * extends the tail of the polyline to include the point, changing orientation if needed
      */
@@ -299,7 +299,7 @@
    * that edge is supposed to be solid or space. Any incomplete polygon will have two active tails. Active tails
    * may be joined together to merge two incomplete polygons into a larger incomplete polygon. If two active tails
    * that are to be merged are the oppositve ends of the same incomplete polygon that indicates that the polygon
- * has been closed and is complete. The active tail keeps a pointer to the other active tail of its incomplete
+ * has been closed and is complete. The active tail keeps a pointer to the other active tail of its incomplete
    * polygon so that it is easy to check this condition. These pointers are updated when active tails are joined.
    * The active tail also keeps a list of pointers to active tail objects that serve as handles to closed holes. In
    * this way a hole can be associated to another incomplete polygon, which will eventually be its enclosing shell,
@@ -314,7 +314,7 @@
   class ActiveTail {
   private:
     //data
- PolyLine<Unit>* tailp_;
+ PolyLine<Unit>* tailp_;
     ActiveTail *otherTailp_;
     std::list<ActiveTail*> holesList_;
   public:
@@ -331,7 +331,7 @@
       End startEnd_;
     public:
       inline iterator() : pLine_(), pLineEnd_(), index_(), indexEnd_(), startEnd_() {}
- inline iterator(const ActiveTail* at, bool isHole, orientation_2d orient) :
+ inline iterator(const ActiveTail* at, bool isHole, orientation_2d orient) :
         pLine_(), pLineEnd_(), index_(), indexEnd_(), startEnd_() {
         //if it is a hole and orientation is vertical or it is not a hole and orientation is horizontal
         //we want to use this active tail, otherwise we want to use the other active tail
@@ -560,7 +560,7 @@
   /* deallocate an activetail object */
   template <typename Unit>
   void destroyActiveTail(ActiveTail<Unit>* aTail);
-
+
   template<bool orientT, typename Unit>
   class PolyLineHoleData {
   private:
@@ -586,7 +586,7 @@
     inline PolyLineHoleData& set_compact(iT inputBegin, iT inputEnd) {
       return *this;
     }
-
+
   };
 
   template<bool orientT, typename Unit>
@@ -646,7 +646,7 @@
     inline PolyLinePolygonWithHolesData& set_compact(iT inputBegin, iT inputEnd) {
       return *this;
     }
-
+
     // initialize a polygon from x,y values, it is assumed that the first is an x
     // and that the input is a well behaved polygon
     template<class iT>
@@ -679,18 +679,18 @@
     std::vector<PolyLinePolygonData> outputPolygons_;
     bool fractureHoles_;
   public:
- typedef typename std::vector<PolyLinePolygonData>::iterator iterator;
+ typedef typename std::vector<PolyLinePolygonData>::iterator iterator;
     inline ScanLineToPolygonItrs() : tailMap_(), outputPolygons_(), fractureHoles_(false) {}
     /* construct a scanline with the proper offsets, protocol and options */
     inline ScanLineToPolygonItrs(bool fractureHoles) : tailMap_(), outputPolygons_(), fractureHoles_(fractureHoles) {}
-
+
     ~ScanLineToPolygonItrs() { clearOutput_(); }
-
+
     /* process all vertical edges, left and right, at a unique x coordinate, edges must be sorted low to high */
- void processEdges(iterator& beginOutput, iterator& endOutput,
- Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
+ void processEdges(iterator& beginOutput, iterator& endOutput,
+ Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
                       std::vector<interval_data<Unit> >& rightEdges);
-
+
   private:
     void clearOutput_();
   };
@@ -706,9 +706,9 @@
 // inline ScanLineToPolygons() : scanline_() {}
 // /* construct a scanline with the proper offsets, protocol and options */
 // inline ScanLineToPolygons(bool fractureHoles) : scanline_(fractureHoles) {}
-
+
 // /* process all vertical edges, left and right, at a unique x coordinate, edges must be sorted low to high */
-// inline void processEdges(std::vector<Unit>& outBufferTmp, Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
+// inline void processEdges(std::vector<Unit>& outBufferTmp, Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
 // std::vector<interval_data<Unit> >& rightEdges) {
 // typename ScanLineToPolygonItrs<true, Unit>::iterator itr, endItr;
 // scanline_.processEdges(itr, endItr, currentX, leftEdges, rightEdges);
@@ -754,7 +754,7 @@
 
   //constructor
   template <typename Unit>
- inline PolyLine<Unit>::PolyLine(orientation_2d orient, Unit coord, Side side) :
+ inline PolyLine<Unit>::PolyLine(orientation_2d orient, Unit coord, Side side) :
     ptdata_(1, coord),
     headp_(0),
     tailp_(0),
@@ -796,7 +796,7 @@
 
   //valid PolyLine
   template <typename Unit>
- inline bool PolyLine<Unit>::isValid() const {
+ inline bool PolyLine<Unit>::isValid() const {
     return state_ > -1; }
 
   //first coordinate is an X value
@@ -818,7 +818,7 @@
   inline bool PolyLine<Unit>::verticalTail() const {
     return to_bool(verticalHead() ^ oddLength());
   }
-
+
   template <typename Unit>
   inline orientation_2d PolyLine<Unit>::tailOrient() const {
     return (verticalTail() ? VERTICAL : HORIZONTAL);
@@ -850,16 +850,16 @@
   inline bool PolyLine<Unit>::tailToHead() const {
     return to_bool(!tailToTail());
   }
-
+
   template <typename Unit>
   inline bool PolyLine<Unit>::tailToTail() const {
     return to_bool(state_ & TAIL_TO_TAIL);
   }
 
   template <typename Unit>
- inline Side PolyLine<Unit>::solidSide() const {
+ inline Side PolyLine<Unit>::solidSide() const {
     return solidToRight(); }
-
+
   template <typename Unit>
   inline bool PolyLine<Unit>::solidToRight() const {
     return to_bool(state_ & SOLID_TO_RIGHT) != 0;
@@ -1010,14 +1010,14 @@
   inline ActiveTail<Unit>::ActiveTail() : tailp_(0), otherTailp_(0), holesList_() {}
 
   template <typename Unit>
- inline ActiveTail<Unit>::ActiveTail(orientation_2d orient, Unit coord, Side solidToRight, ActiveTail* otherTailp) :
+ inline ActiveTail<Unit>::ActiveTail(orientation_2d orient, Unit coord, Side solidToRight, ActiveTail* otherTailp) :
     tailp_(0), otherTailp_(0), holesList_() {
     tailp_ = createPolyLine(orient, coord, solidToRight);
     otherTailp_ = otherTailp;
   }
 
   template <typename Unit>
- inline ActiveTail<Unit>::ActiveTail(PolyLine<Unit>* active, ActiveTail<Unit>* otherTailp) :
+ inline ActiveTail<Unit>::ActiveTail(PolyLine<Unit>* active, ActiveTail<Unit>* otherTailp) :
     tailp_(active), otherTailp_(otherTailp), holesList_() {}
 
   //copy constructor
@@ -1026,9 +1026,9 @@
 
   //destructor
   template <typename Unit>
- inline ActiveTail<Unit>::~ActiveTail() {
+ inline ActiveTail<Unit>::~ActiveTail() {
     //clear them in case the memory is read later
- tailp_ = 0; otherTailp_ = 0;
+ tailp_ = 0; otherTailp_ = 0;
   }
 
   template <typename Unit>
@@ -1050,33 +1050,33 @@
   }
 
   template <typename Unit>
- inline bool ActiveTail<Unit>::operator<=(const ActiveTail<Unit>& b) const {
+ inline bool ActiveTail<Unit>::operator<=(const ActiveTail<Unit>& b) const {
     return !(*this > b); }
-
+
   template <typename Unit>
- inline bool ActiveTail<Unit>::operator>(const ActiveTail<Unit>& b) const {
+ inline bool ActiveTail<Unit>::operator>(const ActiveTail<Unit>& b) const {
     return b < (*this); }
-
+
   template <typename Unit>
- inline bool ActiveTail<Unit>::operator>=(const ActiveTail<Unit>& b) const {
+ inline bool ActiveTail<Unit>::operator>=(const ActiveTail<Unit>& b) const {
     return !(*this < b); }
 
   template <typename Unit>
- inline PolyLine<Unit>* ActiveTail<Unit>::getTail() const {
+ inline PolyLine<Unit>* ActiveTail<Unit>::getTail() const {
     return tailp_; }
 
   template <typename Unit>
- inline PolyLine<Unit>* ActiveTail<Unit>::getOtherTail() const {
+ inline PolyLine<Unit>* ActiveTail<Unit>::getOtherTail() const {
     return otherTailp_->tailp_; }
 
   template <typename Unit>
- inline ActiveTail<Unit>* ActiveTail<Unit>::getOtherActiveTail() const {
+ inline ActiveTail<Unit>* ActiveTail<Unit>::getOtherActiveTail() const {
     return otherTailp_; }
 
   template <typename Unit>
   inline bool ActiveTail<Unit>::isOtherTail(const ActiveTail<Unit>& b) {
     // assert( (tailp_ == b.getOtherTail() && getOtherTail() == b.tailp_) ||
- // (tailp_ != b.getOtherTail() && getOtherTail() != b.tailp_))
+ // (tailp_ != b.getOtherTail() && getOtherTail() != b.tailp_))
     // ("ActiveTail: Active tails out of sync");
     return otherTailp_ == &b;
   }
@@ -1100,7 +1100,7 @@
     if(other->getOrient() == VERTICAL) {
       //assert that hole.getOrient() == HORIZONTAL
       //this case should never happen
- h = hole;
+ h = hole;
       v = other;
     } else {
       //assert that hole.getOrient() == VERTICAL
@@ -1128,23 +1128,23 @@
   }
 
   template <typename Unit>
- inline bool ActiveTail<Unit>::solidToRight() const {
+ inline bool ActiveTail<Unit>::solidToRight() const {
     return getTail()->solidToRight(); }
 
   template <typename Unit>
- inline Unit ActiveTail<Unit>::getCoord() const {
+ inline Unit ActiveTail<Unit>::getCoord() const {
     return getTail()->getEndCoord(); }
-
+
   template <typename Unit>
- inline Unit ActiveTail<Unit>::getCoordinate() const {
- return getCoord(); }
+ inline Unit ActiveTail<Unit>::getCoordinate() const {
+ return getCoord(); }
 
   template <typename Unit>
- inline orientation_2d ActiveTail<Unit>::getOrient() const {
+ inline orientation_2d ActiveTail<Unit>::getOrient() const {
     return getTail()->tailOrient(); }
 
   template <typename Unit>
- inline void ActiveTail<Unit>::pushCoordinate(Unit coord) {
+ inline void ActiveTail<Unit>::pushCoordinate(Unit coord) {
     //appropriately handle any co-linear polyline segments by calling push point internally
     point_data<Unit> p;
     p.set(HORIZONTAL, coord);
@@ -1241,16 +1241,16 @@
     if((getOrient() == HORIZONTAL) ^ !isHole) {
       //our first coordinate is a y value, so we need to rotate it to the end
       typename std::vector<Unit>::iterator tmpItr = outVec.begin();
- tmpItr += size;
+ tmpItr += size;
       outVec.erase(++tmpItr); //erase the 2nd element
     }
     End startEnd = tailp_->endConnectivity(HEAD);
     if(isHole) startEnd = otherTailp_->tailp_->endConnectivity(HEAD);
     while(nextPolyLinep) {
       bool nextStartEnd = nextPolyLinep->endConnectivity(!startEnd);
- nextPolyLinep = nextPolyLinep->writeOut(outVec, startEnd);
+ nextPolyLinep = nextPolyLinep->writeOut(outVec, startEnd);
       startEnd = nextStartEnd;
- }
+ }
     if((getOrient() == HORIZONTAL) ^ !isHole) {
       //we want to push the y value onto the end since we ought to have ended with an x
       outVec.push_back(firsty); //should never be executed because we want first value to be an x
@@ -1284,7 +1284,7 @@
 
   //solid indicates if it was joined by a solit or a space
   template <typename Unit>
- inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid, std::vector<Unit>& outBufferTmp)
+ inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid, std::vector<Unit>& outBufferTmp)
   {
     //checks to see if we closed a figure
     if(at1->isOtherTail(*at2)){
@@ -1298,7 +1298,7 @@
         //because otherwise it would have to have another vertex to the right of this one
         //and would not be closed at this point
         return at1;
- } else {
+ } else {
         //assert pG != 0
         //the figure that was closed is a shell
         at1->writeOutFigure(outBufferTmp);
@@ -1334,7 +1334,7 @@
   //solid indicates if it was joined by a solit or a space
   template <typename Unit>
   template <typename PolygonT>
- inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid,
+ inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid,
                                                         std::vector<PolygonT>& outBufferTmp) {
     //checks to see if we closed a figure
     if(at1->isOtherTail(*at2)){
@@ -1348,7 +1348,7 @@
         //because otherwise it would have to have another vertex to the right of this one
         //and would not be closed at this point
         return at1;
- } else {
+ } else {
         //assert pG != 0
         //the figure that was closed is a shell
         outBufferTmp.push_back(at1);
@@ -1367,8 +1367,8 @@
     return 0;
   }
 
- template <class TKey, class T> inline typename std::map<TKey, T>::iterator findAtNext(std::map<TKey, T>& theMap,
- typename std::map<TKey, T>::iterator pos, const TKey& key)
+ template <class TKey, class T> inline typename std::map<TKey, T>::iterator findAtNext(std::map<TKey, T>& theMap,
+ typename std::map<TKey, T>::iterator pos, const TKey& key)
   {
     if(pos == theMap.end()) return theMap.find(key);
     //if they match the mapItr is pointing to the correct position
@@ -1377,22 +1377,22 @@
     }
     if(pos->first > key) {
       return theMap.end();
- }
+ }
     //else they are equal and no need to do anything to the iterator
     return pos;
   }
 
   // createActiveTailsAsPair is called in these two end cases of geometry
   // 1. lower left concave corner
- // ###|
   // ###|
- // ###|###
+ // ###|
+ // ###|###
   // ###|###
   // 2. lower left convex corner
- // |###
- // |###
- // |
- // |
+ // |###
+ // |###
+ // |
+ // |
   // In case 1 there may be a hole propigated up from the bottom. If the fracture option is enabled
   // the two active tails that form the filament fracture line edges can become the new active tail pair
   // by pushing x and y onto them. Otherwise the hole simply needs to be associated to one of the new active tails
@@ -1408,7 +1408,7 @@
       (*at2) = ActiveTail<Unit>(HORIZONTAL, y, !solid, at1);
       //provide a function through activeTail class to provide this
       at1->getTail()->joinHeadToHead(*(at2->getTail()));
- if(phole)
+ if(phole)
         at1->addHole(phole, fractureHoles); //assert fractureHoles == false
       return std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*>(at1, at2);
     }
@@ -1427,105 +1427,105 @@
     at2->pushCoordinate(y);
     return std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*>(at1, at2);
   }
-
+
   //Process edges connects vertical input edges (right or left edges of figures) to horizontal edges stored as member
   //data of the scanline object. It also creates now horizontal edges as needed to construct figures from edge data.
   //
- //There are only 12 geometric end cases where the scanline intersects a horizontal edge and even fewer unique
+ //There are only 12 geometric end cases where the scanline intersects a horizontal edge and even fewer unique
   //actions to take:
   // 1. Solid on both sides of the vertical partition after the current position and space on both sides before
- // ###|###
- // ###|###
- // |
- // |
+ // ###|###
+ // ###|###
+ // |
+ // |
   // This case does not need to be handled because there is no vertical edge at the current x coordinate.
   //
   // 2. Solid on both sides of the vertical partition before the current position and space on both sides after
- // |
- // |
- // ###|###
- // ###|###
+ // |
+ // |
+ // ###|###
+ // ###|###
   // This case does not need to be handled because there is no vertical edge at the current x coordinate.
   //
   // 3. Solid on the left of the vertical partition after the current position and space elsewhere
- // ###|
- // ###|
- // |
- // |
+ // ###|
+ // ###|
+ // |
+ // |
   // The horizontal edge from the left is found and turns upward because of the vertical right edge to become
   // the currently active vertical edge.
   //
   // 4. Solid on the left of the vertical partion before the current position and space elsewhere
- // |
- // |
- // ###|
+ // |
+ // |
+ // ###|
   // ###|
   // The horizontal edge from the left is found and joined to the currently active vertical edge.
   //
   // 5. Solid to the right above and below and solid to the left above current position.
- // ###|###
- // ###|###
- // |###
- // |###
+ // ###|###
+ // ###|###
+ // |###
+ // |###
   // The horizontal edge from the left is found and joined to the currently active vertical edge,
   // potentially closing a hole.
   //
   // 6. Solid on the left of the vertical partion before the current position and solid to the right above and below
   // |###
- // |###
- // ###|###
+ // |###
+ // ###|###
   // ###|###
   // The horizontal edge from the left is found and turns upward because of the vertical right edge to become
   // the currently active vertical edge.
   //
   // 7. Solid on the right of the vertical partition after the current position and space elsewhere
- // |###
- // |###
- // |
- // |
+ // |###
+ // |###
+ // |
+ // |
   // Create two new ActiveTails, one is added to the horizontal edges and the other becomes the vertical currentTail
   //
   // 8. Solid on the right of the vertical partion before the current position and space elsewhere
- // |
- // |
- // |###
+ // |
+ // |
+ // |###
   // |###
   // The currentTail vertical edge turns right and is added to the horizontal edges data
   //
   // 9. Solid to the right above and solid to the left above and below current position.
- // ###|###
- // ###|###
- // ###|
+ // ###|###
+ // ###|###
+ // ###|
   // ###|
   // The currentTail vertical edge turns right and is added to the horizontal edges data
   //
   // 10. Solid on the left of the vertical partion above and below the current position and solid to the right below
- // ###|
   // ###|
- // ###|###
+ // ###|
+ // ###|###
   // ###|###
   // Create two new ActiveTails, one is added to the horizontal edges data and the other becomes the vertical currentTail
   //
   // 11. Solid to the right above and solid to the left below current position.
- // |###
   // |###
- // ###|
+ // |###
+ // ###|
   // ###|
   // The currentTail vertical edge joins the horizontal edge from the left (may close a polygon)
   // Create two new ActiveTails, one is added to the horizontal edges data and the other becomes the vertical currentTail
   //
   // 12. Solid on the left of the vertical partion above the current position and solid to the right below
- // ###|
   // ###|
- // |###
+ // ###|
+ // |###
   // |###
   // The currentTail vertical edge turns right and is added to the horizontal edges data.
   // The horizontal edge from the left turns upward and becomes the currentTail vertical edge
   //
   template <bool orientT, typename Unit, typename polygon_concept_type>
   inline void ScanLineToPolygonItrs<orientT, Unit, polygon_concept_type>::
- processEdges(iterator& beginOutput, iterator& endOutput,
- Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
+ processEdges(iterator& beginOutput, iterator& endOutput,
+ Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
                std::vector<interval_data<Unit> >& rightEdges) {
     clearOutput_();
     typename std::map<Unit, ActiveTail<Unit>*>::iterator nextMapItr = tailMap_.begin();
@@ -1551,7 +1551,7 @@
       interval_data<Unit> & nextEdge = edges[!trailingEdge];
       //process this edge
       if(!bottomAlreadyProcessed) {
- //assert currentTail = 0
+ //assert currentTail = 0
 
         //process the bottom end of this edge
         typename std::map<Unit, ActiveTail<Unit>*>::iterator thisMapItr = findAtNext(tailMap_, nextMapItr, edge.get(LOW));
@@ -1578,7 +1578,7 @@
           //we need to create one and another one to be the current vertical tail
           //if this is a trailing edge then there is space to the right of the vertical edge
           //so pass the inverse of trailingEdge to indicate solid to the right
- std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
+ std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
             createActiveTailsAsPair(currentX, edge.get(LOW), !trailingEdge, currentTail, fractureHoles_);
           currentTail = tailPair.first;
           tailMap_.insert(nextMapItr, std::pair<Unit, ActiveTail<Unit>*>(edge.get(LOW), tailPair.second));
@@ -1606,7 +1606,7 @@
           //two new tails are created, the vertical becomes current tail, the horizontal becomes thisMapItr tail
           //pass true becuase they are created at the lower left corner of some solid
           //pass null because there is no hole pointer possible
- std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
+ std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
             createActiveTailsAsPair<Unit>(currentX, edge.get(HIGH), true, 0, fractureHoles_);
           currentTail = tailPair.first;
           thisMapItr->second = tailPair.second;
@@ -1662,7 +1662,7 @@
               //set current tail to null
               currentTail = 0;
             }
- }
+ }
           //delete thisMapItr from the map
           tailMap_.erase(thisMapItr);
         } else {
@@ -1675,7 +1675,7 @@
           //leave nextMapItr unchanged, it is still next
         }
       }
-
+
       //increment index
       leftIndex += !trailingEdge;
       rightIndex += trailingEdge;
@@ -1804,4 +1804,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/polygon_set_view.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_set_view.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_set_view.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -8,8 +8,8 @@
 #ifndef BOOST_POLYGON_POLYGON_SET_VIEW_HPP
 #define BOOST_POLYGON_POLYGON_SET_VIEW_HPP
 namespace boost { namespace polygon{
-
-
+
+
   template <typename coordinate_type>
   inline void polygon_set_data<coordinate_type>::clean() const {
     if(dirty_) {
@@ -20,24 +20,24 @@
       //that vertices be "linearly consistent"
       //therefore it doesn't work to fall back on 45-degree
       //booleans for arbitrary angle polygons
- if(0) { //downcast(tmp) ) {
- tmp.clean();
- data_.clear();
- is_45_ = true;
- polygon_set_data<coordinate_type> tmp2;
- tmp2.insert(tmp);
- data_.swap(tmp2.data_);
- dirty_ = false;
- sort();
- } else {
- sort();
- arbitrary_boolean_op<coordinate_type> abo;
- polygon_set_data<coordinate_type> tmp2;
- abo.execute(tmp2, begin(), end(), end(), end(), 0);
- data_.swap(tmp2.data_);
- is_45_ = tmp2.is_45_;
- dirty_ = false;
- }
+ //if(0) { //downcast(tmp) ) {
+ // tmp.clean();
+ // data_.clear();
+ // is_45_ = true;
+ // polygon_set_data<coordinate_type> tmp2;
+ // tmp2.insert(tmp);
+ // data_.swap(tmp2.data_);
+ // dirty_ = false;
+ // sort();
+ //} else {
+ sort();
+ arbitrary_boolean_op<coordinate_type> abo;
+ polygon_set_data<coordinate_type> tmp2;
+ abo.execute(tmp2, begin(), end(), end(), end(), 0);
+ data_.swap(tmp2.data_);
+ is_45_ = tmp2.is_45_;
+ dirty_ = false;
+ //}
     }
   }
 
@@ -66,7 +66,7 @@
     typedef typename polygon_set_view<ltype, rtype, op_type>::iterator_type iterator_type;
     typedef typename polygon_set_view<ltype, rtype, op_type>::operator_arg_type operator_arg_type;
 
- static inline iterator_type begin(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
+ static inline iterator_type begin(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
     static inline iterator_type end(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
 
     static inline bool clean(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
@@ -99,26 +99,26 @@
     insert_into_view_arg(linput_, lvalue_);
     insert_into_view_arg(rinput_, rvalue_);
     polygon_45_set_data<coordinate_type> l45, r45, o45;
- if(linput_.downcast(l45) && rinput_.downcast(r45)) {
- //the op codes are screwed up between 45 and arbitrary
-#ifdef BOOST_POLYGON_MSVC
-#pragma warning (disable: 4127)
-#endif
- if(op_type < 2)
- l45.template applyAdaptiveBoolean_<op_type>(o45, r45);
- else if(op_type == 2)
- l45.template applyAdaptiveBoolean_<3>(o45, r45);
- else
- l45.template applyAdaptiveBoolean_<2>(o45, r45);
-#ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
-#endif
- output_.insert(o45);
- } else {
+// if(linput_.downcast(l45) && rinput_.downcast(r45)) {
+// //the op codes are screwed up between 45 and arbitrary
+//#ifdef BOOST_POLYGON_MSVC
+//#pragma warning (disable: 4127)
+//#endif
+// if(op_type < 2)
+// l45.template applyAdaptiveBoolean_<op_type>(o45, r45);
+// else if(op_type == 2)
+// l45.template applyAdaptiveBoolean_<3>(o45, r45);
+// else
+// l45.template applyAdaptiveBoolean_<2>(o45, r45);
+//#ifdef BOOST_POLYGON_MSVC
+//#pragma warning (default: 4127)
+//#endif
+// output_.insert(o45);
+// } else {
       arbitrary_boolean_op<coordinate_type> abo;
       abo.execute(output_, linput_.begin(), linput_.end(),
                   rinput_.begin(), rinput_.end(), op_type);
- }
+// }
   }
 
   template <typename ltype, typename rtype, int op_type>
@@ -172,11 +172,11 @@
   }
   template <typename ltype, typename rtype, int op_type>
   bool polygon_set_traits<polygon_set_view<ltype, rtype, op_type> >::
- clean(const polygon_set_view<ltype, rtype, op_type>& ) {
+ clean(const polygon_set_view<ltype, rtype, op_type>& ) {
     return true; }
   template <typename ltype, typename rtype, int op_type>
   bool polygon_set_traits<polygon_set_view<ltype, rtype, op_type> >::
- sort(const polygon_set_view<ltype, rtype, op_type>& ) {
+ sort(const polygon_set_view<ltype, rtype, op_type>& ) {
     return true; }
 
   template <typename value_type, typename arg_type>
@@ -187,7 +187,7 @@
     itr2 = polygon_set_traits<arg_type>::end(arg);
     dest.insert(itr1, itr2);
   }
-
+
   template <typename geometry_type_1, typename geometry_type_2, int op_type>
   geometry_type_1& self_assignment_boolean_op(geometry_type_1& lvalue_, const geometry_type_2& rvalue_) {
     typedef geometry_type_1 ltype;
@@ -201,13 +201,21 @@
 
   // copy constructor
   template <typename coordinate_type>
- template <typename ltype, typename rtype, int op_type>
+ template <typename ltype, typename rtype, int op_type>
   polygon_set_data<coordinate_type>::polygon_set_data(const polygon_set_view<ltype, rtype, op_type>& that) :
     data_(that.value().data_), dirty_(that.value().dirty_), unsorted_(that.value().unsorted_), is_45_(that.value().is_45_) {}
 
+ // equivalence operator
+ template <typename coordinate_type>
+ inline bool polygon_set_data<coordinate_type>::operator==(const polygon_set_data<coordinate_type>& p) const {
+ typedef polygon_set_data<coordinate_type> value_type;
+ value_type output_;
+ execute_boolean_op<value_type, value_type, value_type, 2>(output_, (*this), p);
+ return output_.data_.empty();
+ }
+
   template <typename ltype, typename rtype, int op_type>
   struct geometry_concept<polygon_set_view<ltype, rtype, op_type> > { typedef polygon_set_concept type; };
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/polygon_simplify.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_simplify.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_simplify.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -8,19 +8,19 @@
 #include <vector>
 
 namespace boost { namespace polygon { namespace detail { namespace simplify_detail {
-
+
   // Does a simplification/optimization pass on the polygon. If a given
   // vertex lies within "len" of the line segment joining its neighbor
   // vertices, it is removed.
   template <typename T> //T is a model of point concept
- std::size_t simplify(std::vector<T>& dst, const std::vector<T>& src,
+ std::size_t simplify(std::vector<T>& dst, const std::vector<T>& src,
                        typename coordinate_traits<
                        typename point_traits<T>::coordinate_type
>::coordinate_distance len)
   {
     using namespace boost::polygon;
     typedef typename point_traits<T>::coordinate_type coordinate_type;
- typedef typename coordinate_traits<coordinate_type>::area_type ftype;
+ typedef typename coordinate_traits<coordinate_type>::area_type ftype;
     typedef typename std::vector<T>::const_iterator iter;
 
     std::vector<T> out;
@@ -33,7 +33,7 @@
     bool closed = equivalence(src.front(), src.back());
 
     //we need to keep smoothing until we don't find points to remove
- //because removing points in the first iteration through the
+ //because removing points in the first iteration through the
     //polygon may leave it in a state where more removal is possible
     bool not_done = true;
     while(not_done) {
@@ -41,7 +41,7 @@
         dst.clear();
         return orig_size;
       }
-
+
       // Start with the second, test for the last point
       // explicitly, and exit after looping back around to the first.
       ftype len2 = ftype(len) * ftype(len);
@@ -49,47 +49,47 @@
         next = i+1;
         if(next == dst.end())
           next = dst.begin();
-
+
         // points A, B, C
         ftype ax = x(*prev), ay = y(*prev);
         ftype bx = x(*i), by = y(*i);
         ftype cx = x(*next), cy = y(*next);
-
+
         // vectors AB, BC and AC:
         ftype abx = bx-ax, aby = by-ay;
         ftype bcx = cx-bx, bcy = cy-by;
         ftype acx = cx-ax, acy = cy-ay;
-
+
         // dot products
         ftype ab_ab = abx*abx + aby*aby;
         ftype bc_bc = bcx*bcx + bcy*bcy;
         ftype ac_ac = acx*acx + acy*acy;
         ftype ab_ac = abx*acx + aby*acy;
-
+
         // projection of AB along AC
         ftype projf = ab_ac / ac_ac;
         ftype projx = acx * projf, projy = acy * projf;
-
+
         // perpendicular vector from the line AC to point B (i.e. AB - proj)
         ftype perpx = abx - projx, perpy = aby - projy;
-
+
         // Squared fractional distance of projection. FIXME: can
         // remove this division, the decisions below can be made with
         // just the sign of the quotient and a check to see if
         // abs(numerator) is greater than abs(divisor).
         ftype f2 = (projx*acx + projy*acx) / ac_ac;
-
+
         // Square of the relevant distance from point B:
         ftype dist2;
         if (f2 < 0) dist2 = ab_ab;
         else if(f2 > 1) dist2 = bc_bc;
         else dist2 = perpx*perpx + perpy*perpy;
-
+
         if(dist2 > len2) {
           prev = i; // bump prev, we didn't remove the segment
           out.push_back(*i);
         }
-
+
         if(i == dst.begin())
           break;
       }

Modified: branches/release/boost/polygon/detail/polygon_sort_adaptor.hpp
==============================================================================
--- branches/release/boost/polygon/detail/polygon_sort_adaptor.hpp (original)
+++ branches/release/boost/polygon/detail/polygon_sort_adaptor.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -14,22 +14,22 @@
 
 #include <algorithm>
 
-//! @brief gtlsort_adaptor default implementation that calls std::sort
+//! @brief polygon_sort_adaptor default implementation that calls std::sort
 namespace boost {
   namespace polygon {
 
     template<typename iterator_type>
     struct dummy_to_delay_instantiation{
- typedef int unit_type; // default GTL unit
+ typedef int unit_type; // default GTL unit
     };
 
- //! @brief gtlsort_adaptor default implementation that calls std::sort
+ //! @brief polygon_sort_adaptor default implementation that calls std::sort
     template<typename T>
- struct gtlsort_adaptor {
+ struct polygon_sort_adaptor {
       //! @brief wrapper that mimics std::sort() function and takes
       // the same arguments
       template<typename RandomAccessIterator_Type>
- static void sort(RandomAccessIterator_Type _First,
+ static void sort(RandomAccessIterator_Type _First,
                        RandomAccessIterator_Type _Last)
       {
          std::sort(_First, _Last);
@@ -37,31 +37,31 @@
       //! @brief wrapper that mimics std::sort() function overload and takes
       // the same arguments
       template<typename RandomAccessIterator_Type, typename Pred_Type>
- static void sort(RandomAccessIterator_Type _First,
- RandomAccessIterator_Type _Last,
+ static void sort(RandomAccessIterator_Type _First,
+ RandomAccessIterator_Type _Last,
                        const Pred_Type& _Comp)
       {
          std::sort(_First, _Last, _Comp);
       }
     };
 
- //! @brief user level wrapper for sorting quantities
+ //! @brief user level wrapper for sorting quantities
     template <typename iter_type>
- void gtlsort(iter_type _b_, iter_type _e_)
+ void polygon_sort(iter_type _b_, iter_type _e_)
     {
- gtlsort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_);
+ polygon_sort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_);
     }
 
     //! @brief user level wrapper for sorting quantities that takes predicate
     // as additional argument
     template <typename iter_type, typename pred_type>
- void gtlsort(iter_type _b_, iter_type _e_, const pred_type& _pred_)
+ void polygon_sort(iter_type _b_, iter_type _e_, const pred_type& _pred_)
     {
- gtlsort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_, _pred_);
+ polygon_sort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_, _pred_);
     }
 
 
-
+
   } // namespace polygon
-} // namespace boost
+} // namespace boost
 #endif

Modified: branches/release/boost/polygon/detail/property_merge.hpp
==============================================================================
--- branches/release/boost/polygon/detail/property_merge.hpp (original)
+++ branches/release/boost/polygon/detail/property_merge.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -70,8 +70,8 @@
   //static public member functions
 
   template <typename iT, typename orientation_2d_type>
- static inline void
- populate_property_merge_data(property_merge_data& pmd, iT input_begin, iT input_end,
+ static inline void
+ populate_property_merge_data(property_merge_data& pmd, iT input_begin, iT input_end,
                                const property_type& property, orientation_2d_type orient) {
     for( ; input_begin != input_end; ++input_begin) {
       std::pair<property_merge_point<coordinate_type>, std::pair<property_type, int> > element;
@@ -112,7 +112,7 @@
   inline void perform_merge(result_type& result, property_merge_data& data) {
     if(data.empty()) return;
     //sort
- gtlsort(data.begin(), data.end(), less_vertex_data<vertex_property>());
+ polygon_sort(data.begin(), data.end(), less_vertex_data<vertex_property>());
     //scanline
     bool firstIteration = true;
     scanlinePosition = scanline.end();
@@ -175,7 +175,7 @@
   //private static member functions
 
   static inline void mergeProperty(property_map& lvalue, std::pair<property_type, int>& rvalue) {
- typename property_map::iterator itr = std::lower_bound(lvalue.begin(), lvalue.end(), rvalue,
+ typename property_map::iterator itr = std::lower_bound(lvalue.begin(), lvalue.end(), rvalue,
                                                           lessPropertyCount<std::pair<property_type, int> >());
     if(itr == lvalue.end() ||
        (*itr).first != rvalue.first) {
@@ -286,7 +286,7 @@
   inline void processVertex(edge_property_vector& output) {
     if(!countFromBelow.empty()) {
       //we are processing an interval of change in scanline state between
- //previous vertex position and current vertex position where
+ //previous vertex position and current vertex position where
       //count from below represents the change on the interval
       //foreach scanline element from previous to current we
       //write the interval on the scanline that is changing
@@ -333,7 +333,7 @@
             if((*tmpitr).second == (*previousScanlinePosition).second)
               scanline.erase(previousScanlinePosition);
           }
-
+
         } else if(currentY < currentInterval.high()){
           //elementY > currentInterval.high()
           //split the interval between previous and current scanline elements
@@ -354,7 +354,7 @@
           std::pair<coordinate_type, property_map> elementScan;
           elementScan.first = currentInterval.high();
           scanlinePosition = scanline.insert(scanline.end(), elementScan);
- }
+ }
       }
       if(scanlinePosition == scanline.end() &&
          currentY < currentInterval.high()) {
@@ -423,7 +423,7 @@
   template <typename T>
   inline int assertRedundant(T& t) {
     if(t.empty()) return 0;
- int count = 0;
+ int count = 0;
     typename T::iterator itr = t.begin();
     if((*itr).second.empty())
       ++count;
@@ -442,8 +442,8 @@
   inline void performExtract(T& result, property_merge_data& data) {
     if(data.empty()) return;
     //sort
- gtlsort(data.begin(), data.end(), less_vertex_data<vertex_property>());
-
+ polygon_sort(data.begin(), data.end(), less_vertex_data<vertex_property>());
+
     //scanline
     bool firstIteration = true;
     scanlinePosition = scanline.end();
@@ -528,7 +528,7 @@
         insertEdges(graph, edge.second.second, previousEdge.second.first);
       } else {
         if(!firstIteration){
- //look up regions above previous edge
+ //look up regions above previous edge
           propertySetAbove(previousEdge.first.high(), ps, scanline);
           insertEdges(graph, ps, previousEdge.second.first);
           insertEdges(graph, ps, previousEdge.second.second);

Modified: branches/release/boost/polygon/detail/property_merge_45.hpp
==============================================================================
--- branches/release/boost/polygon/detail/property_merge_45.hpp (original)
+++ branches/release/boost/polygon/detail/property_merge_45.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -30,7 +30,7 @@
       inline bool operator!=(const CountMerge& count) const { return !((*this) == count); }
       //inline CountMerge& operator=(int count) { counts[0] = counts[1] = count; return *this; }
       inline CountMerge& operator=(const CountMerge& count) { counts = count.counts; return *this; }
- inline int& operator[](property_type index) {
+ inline int& operator[](property_type index) {
         std::vector<std::pair<int, int> >::iterator itr = lower_bound(counts.begin(), counts.end(), std::make_pair(index, int(0)));
         if(itr != counts.end() && itr->first == index) {
             return itr->second;
@@ -72,7 +72,7 @@
     //output is a std::map<std::set<property_type>, polygon_45_set_data<Unit> >
     struct merge_45_output_functor {
       template <typename cT>
- void operator()(cT& output, const CountMerge& count1, const CountMerge& count2,
+ void operator()(cT& output, const CountMerge& count1, const CountMerge& count2,
                       const Point& pt, int rise, direction_1d end) {
         typedef typename cT::key_type keytype;
         keytype left;
@@ -98,20 +98,20 @@
       }
     };
 
- typedef typename std::pair<Point,
+ typedef typename std::pair<Point,
                                typename boolean_op_45<Unit>::template Scan45CountT<CountMerge> > Vertex45Compact;
     typedef std::vector<Vertex45Compact> MergeSetData;
-
+
     struct lessVertex45Compact {
       bool operator()(const Vertex45Compact& l, const Vertex45Compact& r) {
         return l.first < r.first;
       }
     };
-
+
     template <typename output_type>
     static void performMerge(output_type& result, MergeSetData& tsd) {
-
- gtlsort(tsd.begin(), tsd.end(), lessVertex45Compact());
+
+ polygon_sort(tsd.begin(), tsd.end(), lessVertex45Compact());
       typedef std::vector<std::pair<Point, typename boolean_op_45<Unit>::template Scan45CountT<CountMerge> > > TSD;
       TSD tsd_;
       tsd_.reserve(tsd.size());
@@ -149,7 +149,7 @@
         }
       }
     }
-
+
   };
 
 

Modified: branches/release/boost/polygon/detail/rectangle_formation.hpp
==============================================================================
--- branches/release/boost/polygon/detail/rectangle_formation.hpp (original)
+++ branches/release/boost/polygon/detail/rectangle_formation.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
     Copyright 2008 Intel Corporation
-
+
     Use, modification and distribution are 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).
@@ -10,14 +10,14 @@
 namespace boost { namespace polygon{
 
 namespace rectangle_formation {
- template <class T>
+ template <class T>
   class ScanLineToRects {
   public:
     typedef T rectangle_type;
     typedef typename rectangle_traits<T>::coordinate_type coordinate_type;
     typedef rectangle_data<coordinate_type> scan_rect_type;
   private:
-
+
     typedef std::set<scan_rect_type, less_rectangle_concept<scan_rect_type, scan_rect_type> > ScanData;
     ScanData scanData_;
     bool haveCurrentRect_;
@@ -26,17 +26,17 @@
     typename rectangle_traits<T>::coordinate_type currentCoordinate_;
   public:
     inline ScanLineToRects() : scanData_(), haveCurrentRect_(), currentRect_(), orient_(), currentCoordinate_() {}
-
+
     inline ScanLineToRects(orientation_2d orient, rectangle_type model) :
       scanData_(orientation_2d(orient.to_int() ? VERTICAL : HORIZONTAL)),
       haveCurrentRect_(false), currentRect_(), orient_(orient), currentCoordinate_() {
       assign(currentRect_, model);
       currentCoordinate_ = (std::numeric_limits<coordinate_type>::max)();
     }
-
+
     template <typename CT>
     inline ScanLineToRects& processEdge(CT& rectangles, const interval_data<coordinate_type>& edge);
-
+
     inline ScanLineToRects& nextMajorCoordinate(coordinate_type currentCoordinate) {
       if(haveCurrentRect_) {
         scanData_.insert(scanData_.end(), currentRect_);
@@ -45,12 +45,12 @@
       currentCoordinate_ = currentCoordinate;
       return *this;
     }
-
+
   };
 
- template <class CT, class ST, class rectangle_type, typename interval_type, typename coordinate_type> inline CT&
- processEdge_(CT& rectangles, ST& scanData, const interval_type& edge,
- bool& haveCurrentRect, rectangle_type& currentRect, coordinate_type currentCoordinate, orientation_2d orient)
+ template <class CT, class ST, class rectangle_type, typename interval_type, typename coordinate_type> inline CT&
+ processEdge_(CT& rectangles, ST& scanData, const interval_type& edge,
+ bool& haveCurrentRect, rectangle_type& currentRect, coordinate_type currentCoordinate, orientation_2d orient)
   {
     typedef typename CT::value_type result_type;
     bool edgeProcessed = false;
@@ -59,15 +59,15 @@
       //process all rectangles in the scanData that touch the edge
       typename ST::iterator dataIter = scanData.lower_bound(rectangle_type(edge, edge));
       //decrement beginIter until its low is less than edge's low
- while((dataIter == scanData.end() || (*dataIter).get(orient).get(LOW) > edge.get(LOW)) &&
+ while((dataIter == scanData.end() || (*dataIter).get(orient).get(LOW) > edge.get(LOW)) &&
             dataIter != scanData.begin())
         {
           --dataIter;
         }
- //process each rectangle until the low end of the rectangle
+ //process each rectangle until the low end of the rectangle
       //is greater than the high end of the edge
       while(dataIter != scanData.end() &&
- (*dataIter).get(orient).get(LOW) <= edge.get(HIGH))
+ (*dataIter).get(orient).get(LOW) <= edge.get(HIGH))
         {
           const rectangle_type& rect = *dataIter;
           //if the rectangle data intersects the edge at all
@@ -111,7 +111,7 @@
                 scanData.insert(nextIter, highRect);
               }
               //we are done with this edge
- edgeProcessed = true;
+ edgeProcessed = true;
               break;
             } else {
               //it must be an opening edge
@@ -145,8 +145,8 @@
                     }
                   } else {
                     //extend the top of current rect
- currentRect.set(orient.get_direction(HIGH),
- (std::max)(edge.get(HIGH),
+ currentRect.set(orient.get_direction(HIGH),
+ (std::max)(edge.get(HIGH),
                                                tmpRect.get(orient.get_direction(HIGH))));
                   }
                 } else {
@@ -155,7 +155,7 @@
                   //create a new current rect
                   currentRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
                                                                       currentCoordinate));
- currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
+ currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
                                                        edge.get(LOW)),
                                                                          (std::max)(tmpRect.get(orient).get(HIGH),
                                                        edge.get(HIGH))));
@@ -164,7 +164,7 @@
                 haveCurrentRect = true;
                 currentRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
                                                                     currentCoordinate));
- currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
+ currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
                                                      edge.get(LOW)),
                                                                        (std::max)(tmpRect.get(orient).get(HIGH),
                                                      edge.get(HIGH))));
@@ -176,22 +176,22 @@
             //edgeProcessed = true;
           }
           ++dataIter;
- } //end while edge intersects rectangle data
+ } //end while edge intersects rectangle data
 
     }
     if(!edgeProcessed) {
       if(haveCurrentRect) {
- if(currentRect.get(orient.get_perpendicular().get_direction(HIGH))
+ if(currentRect.get(orient.get_perpendicular().get_direction(HIGH))
            == currentCoordinate &&
- currentRect.get(orient.get_direction(HIGH)) >= edge.get(LOW))
+ currentRect.get(orient.get_direction(HIGH)) >= edge.get(LOW))
           {
             if(currentRect.get(orient.get_direction(HIGH)) > edge.get(LOW)){
               rectangle_type tmpRect(currentRect);
               tmpRect.set(orient.get_direction(HIGH), edge.get(LOW));
               scanData.insert(scanData.end(), tmpRect);
               if(currentRect.get(orient.get_direction(HIGH)) > edge.get(HIGH)) {
- currentRect.set(orient,
- interval_data<coordinate_type>(edge.get(HIGH),
+ currentRect.set(orient,
+ interval_data<coordinate_type>(edge.get(HIGH),
                                          currentRect.get(orient.get_direction(HIGH))));
                 return rectangles;
               } else {
@@ -205,7 +205,7 @@
           }
         scanData.insert(scanData.end(), currentRect);
         haveCurrentRect = false;
- }
+ }
       rectangle_type tmpRect(currentRect);
       tmpRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
                                                       currentCoordinate));
@@ -214,13 +214,13 @@
       return rectangles;
     }
     return rectangles;
-
+
   }
 
- template <class T>
- template <class CT>
- inline
- ScanLineToRects<T>& ScanLineToRects<T>::processEdge(CT& rectangles, const interval_data<coordinate_type>& edge)
+ template <class T>
+ template <class CT>
+ inline
+ ScanLineToRects<T>& ScanLineToRects<T>::processEdge(CT& rectangles, const interval_data<coordinate_type>& edge)
   {
     processEdge_(rectangles, scanData_, edge, haveCurrentRect_, currentRect_, currentCoordinate_, orient_);
     return *this;
@@ -264,4 +264,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/scan_arbitrary.hpp
==============================================================================
--- branches/release/boost/polygon/detail/scan_arbitrary.hpp (original)
+++ branches/release/boost/polygon/detail/scan_arbitrary.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -17,11 +17,11 @@
   class line_intersection : public scanline_base<Unit> {
   private:
     typedef typename scanline_base<Unit>::Point Point;
-
+
     //the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
     //typedef std::pair<Point, Point> half_edge;
     typedef typename scanline_base<Unit>::half_edge half_edge;
-
+
     //scanline comparator functor
     typedef typename scanline_base<Unit>::less_half_edge less_half_edge;
     typedef typename scanline_base<Unit>::less_point less_point;
@@ -51,7 +51,7 @@
 // x_ = that.x_;
 // just_before_ = that.just_before_;
 // segment_id_ = that.segment_id_;
-
+
 // //I cannot simply copy that.edge_scanline_ to this edge_scanline_ becuase the functor store pointers to other members!
 // less_half_edge lessElm(&x_, &just_before_);
 // edge_scanline_ = edge_scanline(lessElm);
@@ -76,7 +76,7 @@
         ends.push_back(std::make_pair((*itr).first.first.y(), count));
         ends.push_back(std::make_pair((*itr).first.second.y(), -count));
       }
- gtlsort(ends.begin(), ends.end());
+ polygon_sort(ends.begin(), ends.end());
       histogram.reserve(ends.size());
       histogram.push_back(std::make_pair(ends.front().first, std::make_pair(0, 0)));
       for(typename std::vector<std::pair<Unit, int> >::iterator itr = ends.begin(); itr != ends.end(); ++itr) {
@@ -128,11 +128,11 @@
         bins[*itr] = std::vector<std::pair<half_edge, segment_id> >();
       }
       for(iT itr = begin; itr != end; ++itr) {
- typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator lb =
+ typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator lb =
           bins.lower_bound((std::min)((*itr).first.first.y(), (*itr).first.second.y()));
         if(lb != bins.begin())
           --lb;
- typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator ub =
+ typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator ub =
           bins.upper_bound((std::max)((*itr).first.first.y(), (*itr).first.second.y()));
         for( ; lb != ub; ++lb) {
           (*lb).second.push_back(*itr);
@@ -161,7 +161,7 @@
         }
       }
       typename scanline_base<Unit>::compute_intersection_pack pack_;
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       //find all intersection points
       for(typename std::vector<std::pair<half_edge, segment_id> >::iterator outer = data.begin();
           outer != data.end(); ++outer) {
@@ -182,7 +182,7 @@
             //at least one segment has a low y value within the range
             if(he1 == he2) continue;
             if((std::min)(he2. first.get(HORIZONTAL),
- he2.second.get(HORIZONTAL)) >=
+ he2.second.get(HORIZONTAL)) >=
                (std::max)(he1.second.get(HORIZONTAL),
                           he1.first.get(HORIZONTAL)))
               break;
@@ -194,11 +194,11 @@
               pts.push_back(intersection);
               intersection_points[(*inner).second].insert(intersection);
               intersection_points[(*outer).second].insert(intersection);
- }
+ }
           }
         }
       }
- gtlsort(pts.begin(), pts.end());
+ polygon_sort(pts.begin(), pts.end());
       typename std::vector<Point>::iterator newend = std::unique(pts.begin(), pts.end());
       typename std::vector<Point>::iterator lfinger = pts.begin();
       //find all segments that interact with intersection points
@@ -217,7 +217,7 @@
         //while(itr2 != newend && (*itr2).get(HORIZONTAL) <= (std::max)(he1.first.get(HORIZONTAL), he1.second.get(HORIZONTAL))) ++itr2;
         //itr = pts.begin();
         //itr2 = pts.end();
- while(lfinger != newend && (*lfinger).x() < startpt.x()) ++lfinger;
+ while(lfinger != newend && (*lfinger).x() < startpt.x()) ++lfinger;
         for(typename std::vector<Point>::iterator itr = lfinger ; itr != newend && (*itr).x() <= stoppt.x(); ++itr) {
           if(scanline_base<Unit>::intersects_grid(*itr, he1))
             intersection_points[id1].insert(*itr);
@@ -289,7 +289,7 @@
           std::swap(data[i].first.first, data[i].first.second);
         }
       }
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       for(typename std::vector<std::pair<half_edge, segment_id> >::iterator outer = data.begin();
           outer != data.end(); ++outer) {
         const half_edge& he1 = (*outer).first;
@@ -299,7 +299,7 @@
           const half_edge& he2 = (*inner).first;
           if(he1 == he2) continue;
           if((std::min)(he2. first.get(HORIZONTAL),
- he2.second.get(HORIZONTAL)) >
+ he2.second.get(HORIZONTAL)) >
              (std::max)(he1.second.get(HORIZONTAL),
                         he1.first.get(HORIZONTAL)))
             break;
@@ -359,7 +359,7 @@
             tmpPts.reserve(pts.size());
             tmpPts.insert(tmpPts.end(), pts.begin(), pts.end());
             less_point_down_slope lpds;
- gtlsort(tmpPts.begin(), tmpPts.end(), lpds);
+ polygon_sort(tmpPts.begin(), tmpPts.end(), lpds);
             segment_edge(output_segments, he, id, tmpPts.begin(), tmpPts.end());
           } else {
             segment_edge(output_segments, he, id, pts.begin(), pts.end());
@@ -432,7 +432,7 @@
 // edge_scanline_.erase(remove_iter);
 // }
 
-// static inline void update_segments(std::map<segment_id, std::set<Point> >& intersection_points,
+// static inline void update_segments(std::map<segment_id, std::set<Point> >& intersection_points,
 // const std::set<segment_id>& segments, Point pt) {
 // for(std::set<segment_id>::const_iterator itr = segments.begin(); itr != segments.end(); ++itr) {
 // intersection_points[*itr].insert(pt);
@@ -479,7 +479,7 @@
 // std::vector<scanline_element> insertion_edges;
 // insertion_edges.reserve(intersecting_elements.size());
 // std::vector<std::pair<Unit, iterator> > sloping_ends;
-// //do all the work of updating the output of all intersecting
+// //do all the work of updating the output of all intersecting
 // for(typename std::set<iterator>::iterator inter_iter = intersecting_elements.begin();
 // inter_iter != intersecting_elements.end(); ++inter_iter) {
 // //if it is horizontal update it now and continue
@@ -491,7 +491,7 @@
 // //insert its end points into the vector of sloping ends
 // const half_edge& he = (*inter_iter).first;
 // Unit y = evalAtXforY(x_, he.first, he.second);
-// Unit y2 = evalAtXforY(x_+1, he.first, he.second);
+// Unit y2 = evalAtXforY(x_+1, he.first, he.second);
 // if(y2 >= y) y2 +=1; //we round up, in exact case we don't worry about overbite of one
 // else y += 1; //downward sloping round up
 // sloping_ends.push_back(std::make_pair(y, inter_iter));
@@ -499,9 +499,9 @@
 // }
 // }
 // }
-
+
 // //merge sloping element data
-// gtlsort(sloping_ends.begin(), sloping_ends.end());
+// polygon_sort(sloping_ends.begin(), sloping_ends.end());
 // std::map<Unit, std::set<iterator> > sloping_elements;
 // std::set<iterator> merge_elements;
 // for(typename std::vector<std::pair<Unit, iterator> >::iterator slop_iter = sloping_ends.begin();
@@ -574,7 +574,7 @@
 // inline void process_scan_event(std::map<segment_id, std::set<Point> >& intersection_points) {
 // just_before_ = true;
 
-// //process end events by removing those segments from the scanline
+// //process end events by removing those segments from the scanline
 // //and insert vertices of all events into intersection queue
 // Point prev_point((std::numeric_limits<Unit>::min)(), (std::numeric_limits<Unit>::min)());
 // less_point lp;
@@ -591,7 +591,7 @@
 // lookup_and_remove(he, id);
 // } else {
 // //half edge is begin event
-// insert_into_scanline(he, id);
+// insert_into_scanline(he, id);
 // //note that they will be immediately removed and reinserted after
 // //handling their intersection (vertex)
 // //an optimization would allow them to be processed specially to avoid the redundant
@@ -787,7 +787,7 @@
         print(edges);
         return false;
       }
- //3 3 2 2: 0; 4 2 0 6: 1; 0 3 6 3: 2; 4 1 5 5: 3;
+ //3 3 2 2: 0; 4 2 0 6: 1; 0 3 6 3: 2; 4 1 5 5: 3;
       input.clear();
       edges.clear();
       input.push_back(std::make_pair(half_edge(Point(3, 3), Point(2, 2)), 0));
@@ -801,7 +801,7 @@
         print(edges);
         return false;
       }
- //5 7 1 3: 0; 4 5 2 1: 1; 2 5 2 1: 2; 4 1 5 3: 3;
+ //5 7 1 3: 0; 4 5 2 1: 1; 2 5 2 1: 2; 4 1 5 3: 3;
       input.clear();
       edges.clear();
       input.push_back(std::make_pair(half_edge(Point(5, 7), Point(1, 3)), 0));
@@ -815,7 +815,7 @@
         print(edges);
         return false;
       }
- //1 0 -4 -1: 0; 0 0 2 -1: 1;
+ //1 0 -4 -1: 0; 0 0 2 -1: 1;
       input.clear();
       edges.clear();
       input.push_back(std::make_pair(half_edge(Point(1, 0), Point(-4, -1)), 0));
@@ -875,7 +875,7 @@
     static void print(const std::vector<std::pair<half_edge, segment_id> >& vec) {
       for(std::size_t i = 0; i < vec.size(); ++ i) {
       // print(vec[i]);
- }
+ }
       //std::cout << std::endl;
     }
 
@@ -940,14 +940,14 @@
   };
 
   //scanline consumes the "flattened" fully intersected line segments produced by
- //a pass of line_intersection along with property and count information and performs a
+ //a pass of line_intersection along with property and count information and performs a
   //useful operation like booleans or property merge or connectivity extraction
   template <typename Unit, typename property_type, typename keytype = std::set<property_type> >
   class scanline : public scanline_base<Unit> {
   public:
     //definitions
     typedef typename scanline_base<Unit>::Point Point;
-
+
     //the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
     //typedef std::pair<Point, Point> half_edge;
     typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -970,7 +970,7 @@
 
     //this is the output data type that is created by the scanline before it is post processed based on content of property sets
     typedef std::pair<half_edge, std::pair<property_set, property_set> > half_edge_property;
-
+
     //this is the scanline data structure
     typedef std::map<half_edge, property_map, less_half_edge> scanline_type;
     typedef std::pair<half_edge, property_map> scanline_element;
@@ -987,12 +987,12 @@
     int just_before_;
     typename scanline_base<Unit>::evalAtXforYPack evalAtXforYPack_;
   public:
- inline scanline() : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
+ inline scanline() : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
                         x_((std::numeric_limits<Unit>::max)()), y_((std::numeric_limits<Unit>::max)()), just_before_(false), evalAtXforYPack_() {
       less_half_edge lessElm(&x_, &just_before_, &evalAtXforYPack_);
       scan_data_ = scanline_type(lessElm);
     }
- inline scanline(const scanline& that) : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
+ inline scanline(const scanline& that) : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
                                             x_((std::numeric_limits<Unit>::max)()), y_((std::numeric_limits<Unit>::max)()), just_before_(false), evalAtXforYPack_() {
       (*this) = that; }
     inline scanline& operator=(const scanline& that) {
@@ -1037,11 +1037,11 @@
       Unit y = (std::numeric_limits<Unit>::min)();
       bool first_iteration = true;
       //we want to return from inside the loop when we hit end or new x
-#ifdef BOOST_POLYGON_MSVC
+#ifdef BOOST_POLYGON_MSVC
 #pragma warning( disable: 4127 )
 #endif
       while(true) {
- if(begin == end || (!first_iteration && ((*begin).first.first.get(VERTICAL) != y ||
+ if(begin == end || (!first_iteration && ((*begin).first.first.get(VERTICAL) != y ||
                                                  (*begin).first.first.get(HORIZONTAL) != x_))) {
           //lookup iterator range in scanline for elements coming in from the left
           //that end at this y
@@ -1062,7 +1062,7 @@
             }
             if(current_iter != scan_data_.end()) {
               //get the bottom iterator for elements at this point
- //while(evalAtXforY(x_, (*current_iter).first.first, (*current_iter).first.second) >= (high_precision)y &&
+ //while(evalAtXforY(x_, (*current_iter).first.first, (*current_iter).first.second) >= (high_precision)y &&
               while(scanline_base<Unit>::on_above_or_below(Point(x_, y), (*current_iter).first) != 1 &&
                     current_iter != scan_data_.begin()) {
                 --current_iter;
@@ -1145,7 +1145,7 @@
           ++begin;
         }
       }
-#ifdef BOOST_POLYGON_MSVC
+#ifdef BOOST_POLYGON_MSVC
 #pragma warning( default: 4127 )
 #endif
 
@@ -1247,7 +1247,7 @@
           ++j;
         } else {
           int count = mp[i].second;
- count += mp2[j].second;
+ count += mp2[j].second;
           if(count) {
             newmp.push_back(mp[i]);
             newmp.back().second = count;
@@ -1313,7 +1313,7 @@
         output.push_back(vertex_half_edge(he.first, he.second, count));
         output.push_back(vertex_half_edge(he.second, he.first, -count));
       }
- gtlsort(output.begin(), output.end());
+ polygon_sort(output.begin(), output.end());
     }
 
     class test_functor {
@@ -1484,12 +1484,12 @@
     }
   };
 
- template <typename Unit, typename property_type, typename key_type = std::set<property_type>,
+ template <typename Unit, typename property_type, typename key_type = std::set<property_type>,
             typename output_functor_type = merge_output_functor<Unit> >
   class property_merge : public scanline_base<Unit> {
   protected:
     typedef typename scanline_base<Unit>::Point Point;
-
+
     //the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
     //typedef std::pair<Point, Point> half_edge;
     typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -1531,7 +1531,7 @@
 
     inline void sort_property_merge_data() {
       less_vertex_data<vertex_property> lvd(&evalAtXforYPack_);
- gtlsort(pmd.begin(), pmd.end(), lvd);
+ polygon_sort(pmd.begin(), pmd.end(), lvd);
     }
   public:
     inline property_merge_data& get_property_merge_data() { return pmd; }
@@ -1576,7 +1576,7 @@
         pts.push_back(lines[i].first.first);
         pts.push_back(lines[i].first.second);
       }
- gtlsort(pts.begin(), pts.end());
+ polygon_sort(pts.begin(), pts.end());
       for(std::size_t i = 0; i < pts.size(); i+=2) {
         if(pts[i] != pts[i+1]) {
           //stdcout << "Non-closed figures after line intersection!\n";
@@ -1590,7 +1590,7 @@
 
   protected:
     template <typename polygon_type>
- void insert(const polygon_type& polygon_object, const property_type& property_value, bool is_hole,
+ void insert(const polygon_type& polygon_object, const property_type& property_value, bool is_hole,
                 polygon_concept ) {
       bool first_iteration = true;
       bool second_iteration = true;
@@ -1638,10 +1638,10 @@
     }
 
     template <typename polygon_with_holes_type>
- void insert(const polygon_with_holes_type& polygon_with_holes_object, const property_type& property_value, bool is_hole,
+ void insert(const polygon_with_holes_type& polygon_with_holes_object, const property_type& property_value, bool is_hole,
                 polygon_with_holes_concept tag) {
       insert(polygon_with_holes_object, property_value, is_hole, polygon_concept());
- for(typename polygon_with_holes_traits<polygon_with_holes_type>::iterator_holes_type itr =
+ for(typename polygon_with_holes_traits<polygon_with_holes_type>::iterator_holes_type itr =
             begin_holes(polygon_with_holes_object);
           itr != end_holes(polygon_with_holes_object); ++itr) {
         insert(*itr, property_value, !is_hole, polygon_concept());
@@ -1649,7 +1649,7 @@
     }
 
     template <typename rectangle_type>
- void insert(const rectangle_type& rectangle_object, const property_type& property_value, bool is_hole,
+ void insert(const rectangle_type& rectangle_object, const property_type& property_value, bool is_hole,
                 rectangle_concept ) {
       polygon_90_data<Unit> poly;
       assign(poly, rectangle_object);
@@ -1658,9 +1658,9 @@
 
   public: //change to private when done testing
 
- static inline void create_vertex(property_merge_data& pmd,
- const Point& current_point,
- const Point& next_point,
+ static inline void create_vertex(property_merge_data& pmd,
+ const Point& current_point,
+ const Point& next_point,
                                      direction_1d winding,
                                      bool is_hole, const property_type& property) {
       if(current_point == next_point) return;
@@ -1669,7 +1669,7 @@
       current_vertex.first.second = next_point;
       current_vertex.second.first = property;
       int multiplier = 1;
- if(winding == CLOCKWISE)
+ if(winding == CLOCKWISE)
         multiplier = -1;
       if(is_hole)
         multiplier *= -1;
@@ -1686,7 +1686,7 @@
 
     static inline void sort_vertex_half_edges(vertex_data& vertex) {
       less_half_edge_pair lessF(vertex.first);
- gtlsort(vertex.second.begin(), vertex.second.end(), lessF);
+ polygon_sort(vertex.second.begin(), vertex.second.end(), lessF);
     }
 
     class less_half_edge_pair {
@@ -1697,12 +1697,12 @@
       bool operator()(const half_edge& e1, const half_edge& e2) {
         const Point& pt1 = e1.first;
         const Point& pt2 = e2.first;
- if(get(pt1, HORIZONTAL) ==
+ if(get(pt1, HORIZONTAL) ==
            get(pt_, HORIZONTAL)) {
           //vertical edge is always largest
           return false;
         }
- if(get(pt2, HORIZONTAL) ==
+ if(get(pt2, HORIZONTAL) ==
            get(pt_, HORIZONTAL)) {
           //if half edge 1 is not vertical its slope is less than that of half edge 2
           return get(pt1, HORIZONTAL) != get(pt2, HORIZONTAL);
@@ -1791,7 +1791,7 @@
 
       si.insert(rect, 333);
       print(stdcout, si.pmd) << std::endl;
-
+
       Point pts[4] = {Point(0, 0), Point(10,-3), Point(13, 8), Point(0, 0) };
       polygon_data<Unit> poly;
       property_merge si2;
@@ -1817,7 +1817,7 @@
       si5.insert(poly, 444);
       si5.sort_property_merge_data();
       stdcout << (si2.pmd == si5.pmd) << std::endl;
-
+
       return true;
     }
 
@@ -1867,8 +1867,8 @@
         stdcout << "fail merge 2\n";
         return false;
       }
- //Polygon { -4 -1, 3 3, -2 3 }
- //Polygon { 0 -4, -4 -2, -2 1 }
+ //Polygon { -4 -1, 3 3, -2 3 }
+ //Polygon { 0 -4, -4 -2, -2 1 }
       si.clear();
       pts.clear();
       pts.push_back(Point(-4, -1));
@@ -2069,89 +2069,89 @@
       //pts.push_back(Point(5624841,9125000));
       //pts.push_back(Point(17616200,9125000));
       //pts.push_back(Point(17616200,75000));
-pts.push_back(Point(12262940, 6652520 )); pts.push_back(Point(12125750, 6652520 )); pts.push_back(Point(12121272, 6652961 )); pts.push_back(Point(12112981, 6656396 )); pts.push_back(Point(12106636, 6662741 )); pts.push_back(Point(12103201, 6671032 )); pts.push_back(Point(12103201, 6680007 )); pts.push_back(Point(12106636, 6688298 ));
-pts.push_back(Point(12109500, 6691780 )); pts.push_back(Point(12748600, 7330890 )); pts.push_back(Point(15762600, 7330890 )); pts.push_back(Point(15904620, 7472900 )); pts.push_back(Point(15909200, 7473030 )); pts.push_back(Point(15935830, 7476006 )); pts.push_back(Point(15992796, 7499602 )); pts.push_back(Point(16036397, 7543203 ));
-pts.push_back(Point(16059993, 7600169 )); pts.push_back(Point(16059993, 7661830 )); pts.push_back(Point(16036397, 7718796 )); pts.push_back(Point(15992796, 7762397 )); pts.push_back(Point(15935830, 7785993 )); pts.push_back(Point(15874169, 7785993 )); pts.push_back(Point(15817203, 7762397 )); pts.push_back(Point(15773602, 7718796 ));
-pts.push_back(Point(15750006, 7661830 )); pts.push_back(Point(15747030, 7635200 )); pts.push_back(Point(15746900, 7630620 )); pts.push_back(Point(15670220, 7553930 )); pts.push_back(Point(14872950, 7553930 )); pts.push_back(Point(14872950, 7626170 ));
-pts.push_back(Point(14869973, 7661280 )); pts.push_back(Point(14846377, 7718246 )); pts.push_back(Point(14802776, 7761847 )); pts.push_back(Point(14745810, 7785443 )); pts.push_back(Point(14684149, 7785443 )); pts.push_back(Point(14627183, 7761847 )); pts.push_back(Point(14583582, 7718246 ));
-pts.push_back(Point(14559986, 7661280 )); pts.push_back(Point(14557070, 7636660 )); pts.push_back(Point(14556670, 7625570 )); pts.push_back(Point(13703330, 7625570 )); pts.push_back(Point(13702930, 7636660 )); pts.push_back(Point(13699993, 7661830 )); pts.push_back(Point(13676397, 7718796 ));
-pts.push_back(Point(13632796, 7762397 )); pts.push_back(Point(13575830, 7785993 )); pts.push_back(Point(13514169, 7785993 )); pts.push_back(Point(13457203, 7762397 )); pts.push_back(Point(13436270, 7745670 )); pts.push_back(Point(13432940, 7742520 )); pts.push_back(Point(12963760, 7742520 ));
-pts.push_back(Point(12959272, 7742961 )); pts.push_back(Point(12950981, 7746396 )); pts.push_back(Point(12944636, 7752741 )); pts.push_back(Point(12941201, 7761032 )); pts.push_back(Point(12941201, 7770007 )); pts.push_back(Point(12944636, 7778298 )); pts.push_back(Point(12947490, 7781780 ));
-pts.push_back(Point(13425330, 8259620 )); pts.push_back(Point(15601330, 8259620 )); pts.push_back(Point(15904620, 8562900 )); pts.push_back(Point(15909200, 8563030 )); pts.push_back(Point(15935830, 8566006 )); pts.push_back(Point(15992796, 8589602 )); pts.push_back(Point(16036397, 8633203 ));
-pts.push_back(Point(16059993, 8690169 )); pts.push_back(Point(16059993, 8751830 )); pts.push_back(Point(16036397, 8808796 )); pts.push_back(Point(15992796, 8852397 )); pts.push_back(Point(15935830, 8875993 )); pts.push_back(Point(15874169, 8875993 )); pts.push_back(Point(15817203, 8852397 )); pts.push_back(Point(15773602, 8808796 ));
-pts.push_back(Point(15750006, 8751830 )); pts.push_back(Point(15747030, 8725200 )); pts.push_back(Point(15746900, 8720620 )); pts.push_back(Point(15508950, 8482660 )); pts.push_back(Point(14689890, 8482660 )); pts.push_back(Point(14685412, 8483101 )); pts.push_back(Point(14677121, 8486536 ));
-pts.push_back(Point(14670776, 8492881 )); pts.push_back(Point(14667341, 8501172 )); pts.push_back(Point(14667341, 8510147 )); pts.push_back(Point(14670776, 8518438 )); pts.push_back(Point(14673630, 8521920 )); pts.push_back(Point(14714620, 8562900 )); pts.push_back(Point(14719200, 8563030 )); pts.push_back(Point(14745830, 8566006 ));
-pts.push_back(Point(14802796, 8589602 )); pts.push_back(Point(14846397, 8633203 )); pts.push_back(Point(14869993, 8690169 )); pts.push_back(Point(14869993, 8751830 )); pts.push_back(Point(14846397, 8808796 )); pts.push_back(Point(14802796, 8852397 )); pts.push_back(Point(14745830, 8875993 )); pts.push_back(Point(14684169, 8875993 ));
-pts.push_back(Point(14627203, 8852397 )); pts.push_back(Point(14583602, 8808796 )); pts.push_back(Point(14560006, 8751830 )); pts.push_back(Point(14557030, 8725200 )); pts.push_back(Point(14556900, 8720620 )); pts.push_back(Point(14408270, 8571980 )); pts.push_back(Point(13696320, 8571980 )); pts.push_back(Point(13696320, 8675520 ));
-pts.push_back(Point(13699963, 8690161 )); pts.push_back(Point(13699963, 8751818 )); pts.push_back(Point(13676368, 8808781 )); pts.push_back(Point(13632771, 8852378 )); pts.push_back(Point(13575808, 8875973 )); pts.push_back(Point(13514151, 8875973 )); pts.push_back(Point(13457188, 8852378 )); pts.push_back(Point(13436270, 8835670 )); pts.push_back(Point(13432940, 8832520 ));
-pts.push_back(Point(13281760, 8832520 )); pts.push_back(Point(13277272, 8832961 )); pts.push_back(Point(13268981, 8836396 )); pts.push_back(Point(13262636, 8842741 )); pts.push_back(Point(13259201, 8851032 )); pts.push_back(Point(13259201, 8860007 )); pts.push_back(Point(13262636, 8868298 )); pts.push_back(Point(13265500, 8871780 ));
-pts.push_back(Point(13518710, 9125000 )); pts.push_back(Point(16270720, 9125000 )); pts.push_back(Point(16270720, 8939590 )); pts.push_back(Point(17120780, 8939590 )); pts.push_back(Point(17120780, 9125000 )); pts.push_back(Point(17616200, 9125000 )); pts.push_back(Point(17616200, 75000 )); pts.push_back(Point(16024790, 75000 ));
-pts.push_back(Point(16021460, 80700 )); pts.push_back(Point(16016397, 88796 )); pts.push_back(Point(15972796, 132397 )); pts.push_back(Point(15915830, 155993 )); pts.push_back(Point(15908730, 157240 )); pts.push_back(Point(15905000, 157800 )); pts.push_back(Point(15516800, 546000 )); pts.push_back(Point(15905000, 934200 ));
-pts.push_back(Point(15908730, 934760 )); pts.push_back(Point(15915830, 936006 )); pts.push_back(Point(15972796, 959602 )); pts.push_back(Point(16016397, 1003203 )); pts.push_back(Point(16039993, 1060169 )); pts.push_back(Point(16039993, 1121830 )); pts.push_back(Point(16016397, 1178796 )); pts.push_back(Point(15972796, 1222397 ));
-pts.push_back(Point(15915830, 1245993 )); pts.push_back(Point(15854169, 1245993 )); pts.push_back(Point(15797203, 1222397 )); pts.push_back(Point(15753602, 1178796 )); pts.push_back(Point(15730006, 1121830 )); pts.push_back(Point(15728760, 1114730 )); pts.push_back(Point(15728200, 1111000 )); pts.push_back(Point(15363500, 746300 ));
-pts.push_back(Point(14602620, 746300 )); pts.push_back(Point(14598142, 746741 )); pts.push_back(Point(14589851, 750176 )); pts.push_back(Point(14583506, 756521 )); pts.push_back(Point(14580071, 764812 )); pts.push_back(Point(14580071, 773787 )); pts.push_back(Point(14583506, 782078 )); pts.push_back(Point(14586360, 785560 ));
-pts.push_back(Point(14586370, 785560 )); pts.push_back(Point(14735000, 934200 )); pts.push_back(Point(14738730, 934760 )); pts.push_back(Point(14745830, 936006 )); pts.push_back(Point(14802796, 959602 )); pts.push_back(Point(14846397, 1003203 )); pts.push_back(Point(14869993, 1060169 ));
-pts.push_back(Point(14870450, 1062550 )); pts.push_back(Point(14872170, 1071980 )); pts.push_back(Point(14972780, 1071980 )); pts.push_back(Point(15925000, 2024200 )); pts.push_back(Point(15928730, 2024760 )); pts.push_back(Point(15935830, 2026006 )); pts.push_back(Point(15992796, 2049602 ));
-pts.push_back(Point(16036397, 2093203 )); pts.push_back(Point(16059993, 2150169 )); pts.push_back(Point(16059993, 2211830 )); pts.push_back(Point(16036397, 2268796 )); pts.push_back(Point(15992796, 2312397 )); pts.push_back(Point(15935830, 2335993 )); pts.push_back(Point(15874169, 2335993 ));
-pts.push_back(Point(15817203, 2312397 )); pts.push_back(Point(15773602, 2268796 )); pts.push_back(Point(15750006, 2211830 )); pts.push_back(Point(15748760, 2204730 )); pts.push_back(Point(15748200, 2201000 )); pts.push_back(Point(14869220, 1322020 )); pts.push_back(Point(14088350, 1322020 ));
-pts.push_back(Point(14083862, 1322461 )); pts.push_back(Point(14075571, 1325896 )); pts.push_back(Point(14069226, 1332241 )); pts.push_back(Point(14065791, 1340532 )); pts.push_back(Point(14065791, 1349507 )); pts.push_back(Point(14069226, 1357798 )); pts.push_back(Point(14072080, 1361280 ));
-pts.push_back(Point(14072090, 1361280 )); pts.push_back(Point(14735000, 2024200 )); pts.push_back(Point(14738730, 2024760 )); pts.push_back(Point(14745830, 2026006 )); pts.push_back(Point(14802796, 2049602 )); pts.push_back(Point(14846397, 2093203 )); pts.push_back(Point(14869993, 2150169 ));
-pts.push_back(Point(14869993, 2211830 )); pts.push_back(Point(14846397, 2268796 )); pts.push_back(Point(14802796, 2312397 )); pts.push_back(Point(14745830, 2335993 )); pts.push_back(Point(14684169, 2335993 )); pts.push_back(Point(14627203, 2312397 )); pts.push_back(Point(14583602, 2268796 )); pts.push_back(Point(14560006, 2211830 ));
-pts.push_back(Point(14558760, 2204730 )); pts.push_back(Point(14558200, 2201000 )); pts.push_back(Point(13752220, 1395020 )); pts.push_back(Point(12991340, 1395020 )); pts.push_back(Point(12986862, 1395461 )); pts.push_back(Point(12978571, 1398896 )); pts.push_back(Point(12972226, 1405241 ));
-pts.push_back(Point(12968791, 1413532 )); pts.push_back(Point(12968791, 1422507 )); pts.push_back(Point(12972226, 1430798 )); pts.push_back(Point(12975080, 1434280 )); pts.push_back(Point(12975090, 1434280 )); pts.push_back(Point(13565000, 2024200 )); pts.push_back(Point(13568730, 2024760 )); pts.push_back(Point(13575830, 2026006 ));
-pts.push_back(Point(13632796, 2049602 )); pts.push_back(Point(13676397, 2093203 )); pts.push_back(Point(13699993, 2150169 )); pts.push_back(Point(13699993, 2211830 )); pts.push_back(Point(13676397, 2268796 )); pts.push_back(Point(13632796, 2312397 )); pts.push_back(Point(13575830, 2335993 ));
-pts.push_back(Point(13514169, 2335993 )); pts.push_back(Point(13457203, 2312397 )); pts.push_back(Point(13413602, 2268796 )); pts.push_back(Point(13390006, 2211830 )); pts.push_back(Point(13388760, 2204730 )); pts.push_back(Point(13388200, 2201000 )); pts.push_back(Point(12655220, 1468020 ));
-pts.push_back(Point(11894340, 1468020 )); pts.push_back(Point(11889862, 1468461 )); pts.push_back(Point(11881571, 1471896 )); pts.push_back(Point(11875226, 1478241 )); pts.push_back(Point(11871791, 1486532 )); pts.push_back(Point(11871791, 1495507 ));
-pts.push_back(Point(11875226, 1503798 )); pts.push_back(Point(11878090, 1507280 )); pts.push_back(Point(12395000, 2024200 )); pts.push_back(Point(12398730, 2024760 )); pts.push_back(Point(12405830, 2026006 )); pts.push_back(Point(12462796, 2049602 )); pts.push_back(Point(12506397, 2093203 ));
-pts.push_back(Point(12529993, 2150169 )); pts.push_back(Point(12529993, 2211830 )); pts.push_back(Point(12506397, 2268796 )); pts.push_back(Point(12462796, 2312397 )); pts.push_back(Point(12405830, 2335993 )); pts.push_back(Point(12344169, 2335993 ));
-pts.push_back(Point(12287203, 2312397 )); pts.push_back(Point(12243602, 2268796 )); pts.push_back(Point(12220006, 2211830 )); pts.push_back(Point(12218760, 2204730 )); pts.push_back(Point(12218200, 2201000 )); pts.push_back(Point(11558220, 1541020 ));
-pts.push_back(Point(10797340, 1541020 )); pts.push_back(Point(10792862, 1541461 )); pts.push_back(Point(10784571, 1544896 )); pts.push_back(Point(10778226, 1551241 )); pts.push_back(Point(10774791, 1559532 )); pts.push_back(Point(10774791, 1568507 )); pts.push_back(Point(10778226, 1576798 )); pts.push_back(Point(10781080, 1580280 ));
-pts.push_back(Point(10781090, 1580280 )); pts.push_back(Point(11225000, 2024200 )); pts.push_back(Point(11228730, 2024760 )); pts.push_back(Point(11235830, 2026006 )); pts.push_back(Point(11292796, 2049602 )); pts.push_back(Point(11336397, 2093203 )); pts.push_back(Point(11359993, 2150169 ));
-pts.push_back(Point(11359993, 2211830 )); pts.push_back(Point(11336397, 2268796 )); pts.push_back(Point(11292796, 2312397 )); pts.push_back(Point(11235830, 2335993 )); pts.push_back(Point(11174169, 2335993 )); pts.push_back(Point(11117203, 2312397 )); pts.push_back(Point(11073602, 2268796 )); pts.push_back(Point(11050006, 2211830 ));
-pts.push_back(Point(11048760, 2204730 )); pts.push_back(Point(11048200, 2201000 )); pts.push_back(Point(10461220, 1614020 )); pts.push_back(Point( 5647400, 1614020 )); pts.push_back(Point( 5642912, 1614461 ));
-pts.push_back(Point( 5634621, 1617896 )); pts.push_back(Point( 5628276, 1624241 )); pts.push_back(Point( 5624841, 1632532 )); pts.push_back(Point( 5624841, 1641507 )); pts.push_back(Point( 5628276, 1649798 )); pts.push_back(Point( 5631130, 1653280 ));
-pts.push_back(Point( 5688490, 1710640 )); pts.push_back(Point( 9722350, 1710640 )); pts.push_back(Point(10034620, 2022900 )); pts.push_back(Point(10039200, 2023030 )); pts.push_back(Point(10065830, 2026006 )); pts.push_back(Point(10122796, 2049602 ));
-pts.push_back(Point(10166397, 2093203 )); pts.push_back(Point(10189993, 2150169 )); pts.push_back(Point(10189993, 2211830 )); pts.push_back(Point(10166397, 2268796 )); pts.push_back(Point(10158620, 2279450 )); pts.push_back(Point(10158620, 2404900 )); pts.push_back(Point(10548950, 2795240 ));
-pts.push_back(Point(15586950, 2795240 )); pts.push_back(Point(15904620, 3112900 )); pts.push_back(Point(15909200, 3113030 )); pts.push_back(Point(15935830, 3116006 )); pts.push_back(Point(15992796, 3139602 )); pts.push_back(Point(16036397, 3183203 )); pts.push_back(Point(16059993, 3240169 )); pts.push_back(Point(16059993, 3301830 ));
-pts.push_back(Point(16036397, 3358796 )); pts.push_back(Point(15992796, 3402397 )); pts.push_back(Point(15935830, 3425993 )); pts.push_back(Point(15874169, 3425993 )); pts.push_back(Point(15817203, 3402397 )); pts.push_back(Point(15773602, 3358796 )); pts.push_back(Point(15750006, 3301830 )); pts.push_back(Point(15747030, 3275200 ));
-pts.push_back(Point(15746900, 3270620 )); pts.push_back(Point(15494570, 3018280 )); pts.push_back(Point(14675510, 3018280 )); pts.push_back(Point(14671032, 3018721 )); pts.push_back(Point(14662741, 3022156 )); pts.push_back(Point(14656396, 3028501 )); pts.push_back(Point(14652961, 3036792 ));
-pts.push_back(Point(14652961, 3045767 )); pts.push_back(Point(14656396, 3054058 )); pts.push_back(Point(14659260, 3057540 )); pts.push_back(Point(14714620, 3112900 )); pts.push_back(Point(14719200, 3113030 )); pts.push_back(Point(14745830, 3116006 )); pts.push_back(Point(14802796, 3139602 ));
-pts.push_back(Point(14846397, 3183203 )); pts.push_back(Point(14869993, 3240169 )); pts.push_back(Point(14869993, 3301830 )); pts.push_back(Point(14846397, 3358796 )); pts.push_back(Point(14802796, 3402397 )); pts.push_back(Point(14745830, 3425993 )); pts.push_back(Point(14684169, 3425993 )); pts.push_back(Point(14627203, 3402397 ));
-pts.push_back(Point(14583602, 3358796 )); pts.push_back(Point(14560006, 3301830 )); pts.push_back(Point(14557030, 3275200 )); pts.push_back(Point(14556900, 3270620 )); pts.push_back(Point(14370700, 3084410 )); pts.push_back(Point(13702830, 3084410 )); pts.push_back(Point(13702830, 3263160 ));
-pts.push_back(Point(13700003, 3302210 )); pts.push_back(Point(13676407, 3359176 )); pts.push_back(Point(13632806, 3402777 )); pts.push_back(Point(13575840, 3426373 )); pts.push_back(Point(13514179, 3426373 )); pts.push_back(Point(13457213, 3402777 )); pts.push_back(Point(13413612, 3359176 ));
-pts.push_back(Point(13390016, 3302210 )); pts.push_back(Point(13387030, 3275200 )); pts.push_back(Point(13386900, 3270620 )); pts.push_back(Point(13266840, 3150550 )); pts.push_back(Point(12532920, 3150550 )); pts.push_back(Point(12532920, 3264990 )); pts.push_back(Point(12529993, 3301820 ));
-pts.push_back(Point(12506397, 3358786 )); pts.push_back(Point(12462796, 3402387 )); pts.push_back(Point(12405830, 3425983 )); pts.push_back(Point(12344169, 3425983 )); pts.push_back(Point(12287203, 3402387 )); pts.push_back(Point(12243602, 3358786 )); pts.push_back(Point(12220006, 3301820 )); pts.push_back(Point(12217030, 3275200 ));
-pts.push_back(Point(12216900, 3270620 )); pts.push_back(Point(12157460, 3211170 )); pts.push_back(Point(11362030, 3211170 )); pts.push_back(Point(11360250, 3220520 )); pts.push_back(Point(11359993, 3221830 )); pts.push_back(Point(11336397, 3278796 ));
-pts.push_back(Point(11292796, 3322397 )); pts.push_back(Point(11235830, 3345993 )); pts.push_back(Point(11174169, 3345993 )); pts.push_back(Point(11117203, 3322397 )); pts.push_back(Point(11096270, 3305670 )); pts.push_back(Point(11092940, 3302520 )); pts.push_back(Point(10680760, 3302520 ));
-pts.push_back(Point(10676272, 3302961 )); pts.push_back(Point(10667981, 3306396 )); pts.push_back(Point(10661636, 3312741 )); pts.push_back(Point(10658201, 3321032 )); pts.push_back(Point(10658201, 3330007 )); pts.push_back(Point(10661636, 3338298 )); pts.push_back(Point(10664500, 3341780 ));
-pts.push_back(Point(11264260, 3941550 )); pts.push_back(Point(15643260, 3941550 )); pts.push_back(Point(15904620, 4202900 )); pts.push_back(Point(15909200, 4203030 )); pts.push_back(Point(15935830, 4206006 )); pts.push_back(Point(15992796, 4229602 ));
-pts.push_back(Point(16036397, 4273203 )); pts.push_back(Point(16059993, 4330169 )); pts.push_back(Point(16059993, 4391830 )); pts.push_back(Point(16036397, 4448796 )); pts.push_back(Point(15992796, 4492397 ));
-pts.push_back(Point(15935830, 4515993 )); pts.push_back(Point(15874169, 4515993 )); pts.push_back(Point(15817203, 4492397 )); pts.push_back(Point(15773602, 4448796 )); pts.push_back(Point(15750006, 4391830 )); pts.push_back(Point(15747030, 4365200 )); pts.push_back(Point(15746900, 4360620 ));
-pts.push_back(Point(15550880, 4164590 )); pts.push_back(Point(14825070, 4164590 )); pts.push_back(Point(14825070, 4247610 )); pts.push_back(Point(14846397, 4273213 )); pts.push_back(Point(14869993, 4330179 )); pts.push_back(Point(14869993, 4391840 )); pts.push_back(Point(14846397, 4448806 ));
-pts.push_back(Point(14802796, 4492407 )); pts.push_back(Point(14745830, 4516003 )); pts.push_back(Point(14684169, 4516003 )); pts.push_back(Point(14627203, 4492407 )); pts.push_back(Point(14583602, 4448806 )); pts.push_back(Point(14560006, 4391840 )); pts.push_back(Point(14557030, 4365200 ));
-pts.push_back(Point(14556900, 4360620 )); pts.push_back(Point(14432520, 4236230 )); pts.push_back(Point(13702830, 4236230 )); pts.push_back(Point(13702830, 4352930 )); pts.push_back(Point(13699993, 4391750 )); pts.push_back(Point(13676397, 4448716 ));
-pts.push_back(Point(13632796, 4492317 )); pts.push_back(Point(13575830, 4515913 )); pts.push_back(Point(13514169, 4515913 )); pts.push_back(Point(13457203, 4492317 )); pts.push_back(Point(13413602, 4448716 )); pts.push_back(Point(13390006, 4391750 )); pts.push_back(Point(13387030, 4365200 ));
-pts.push_back(Point(13386900, 4360620 )); pts.push_back(Point(13334170, 4307880 )); pts.push_back(Point(12532990, 4307880 )); pts.push_back(Point(12532990, 4357550 )); pts.push_back(Point(12529993, 4391760 )); pts.push_back(Point(12506397, 4448726 )); pts.push_back(Point(12462796, 4492327 ));
-pts.push_back(Point(12405830, 4515923 )); pts.push_back(Point(12344169, 4515923 )); pts.push_back(Point(12287203, 4492327 )); pts.push_back(Point(12243602, 4448726 )); pts.push_back(Point(12220006, 4391760 )); pts.push_back(Point(12217970, 4378710 )); pts.push_back(Point(12216810, 4368500 ));
-pts.push_back(Point(11363190, 4368500 )); pts.push_back(Point(11362030, 4378710 )); pts.push_back(Point(11359983, 4391828 )); pts.push_back(Point(11336388, 4448791 )); pts.push_back(Point(11292791, 4492388 )); pts.push_back(Point(11235828, 4515983 )); pts.push_back(Point(11174171, 4515983 )); pts.push_back(Point(11117208, 4492388 ));
-pts.push_back(Point(11096270, 4475670 )); pts.push_back(Point(11092940, 4472520 )); pts.push_back(Point(11057750, 4472520 )); pts.push_back(Point(11053272, 4472961 )); pts.push_back(Point(11044981, 4476396 )); pts.push_back(Point(11038636, 4482741 )); pts.push_back(Point(11035201, 4491032 ));
-pts.push_back(Point(11035201, 4500007 )); pts.push_back(Point(11038636, 4508298 )); pts.push_back(Point(11041490, 4511780 )); pts.push_back(Point(11573490, 5043780 )); pts.push_back(Point(15655490, 5043780 )); pts.push_back(Point(15904620, 5292900 ));
-pts.push_back(Point(15909200, 5293030 )); pts.push_back(Point(15935830, 5296006 )); pts.push_back(Point(15992796, 5319602 )); pts.push_back(Point(16036397, 5363203 )); pts.push_back(Point(16059993, 5420169 )); pts.push_back(Point(16059993, 5481830 )); pts.push_back(Point(16036397, 5538796 ));
-pts.push_back(Point(15992796, 5582397 )); pts.push_back(Point(15935830, 5605993 )); pts.push_back(Point(15874169, 5605993 )); pts.push_back(Point(15817203, 5582397 )); pts.push_back(Point(15773602, 5538796 )); pts.push_back(Point(15750006, 5481830 )); pts.push_back(Point(15747030, 5455200 ));
-pts.push_back(Point(15746900, 5450620 )); pts.push_back(Point(15563110, 5266820 )); pts.push_back(Point(14857380, 5266820 )); pts.push_back(Point(14857380, 5382430 )); pts.push_back(Point(14869993, 5420179 )); pts.push_back(Point(14869993, 5481840 )); pts.push_back(Point(14846397, 5538806 )); pts.push_back(Point(14802796, 5582407 ));
-pts.push_back(Point(14745830, 5606003 )); pts.push_back(Point(14684169, 5606003 )); pts.push_back(Point(14627203, 5582407 )); pts.push_back(Point(14583602, 5538806 )); pts.push_back(Point(14560006, 5481840 )); pts.push_back(Point(14557030, 5455200 )); pts.push_back(Point(14556900, 5450620 )); pts.push_back(Point(14444750, 5338460 ));
-pts.push_back(Point(13702890, 5338460 )); pts.push_back(Point(13702890, 5364400 )); pts.push_back(Point(13699993, 5401800 )); pts.push_back(Point(13676397, 5458766 )); pts.push_back(Point(13632796, 5502367 )); pts.push_back(Point(13575830, 5525963 )); pts.push_back(Point(13514169, 5525963 )); pts.push_back(Point(13457203, 5502367 ));
-pts.push_back(Point(13413602, 5458766 )); pts.push_back(Point(13390006, 5401800 )); pts.push_back(Point(13389230, 5397620 )); pts.push_back(Point(13387590, 5388060 )); pts.push_back(Point(12532960, 5388060 )); pts.push_back(Point(12532960, 5446220 )); pts.push_back(Point(12529993, 5481820 ));
-pts.push_back(Point(12506397, 5538786 )); pts.push_back(Point(12462796, 5582387 )); pts.push_back(Point(12405830, 5605983 )); pts.push_back(Point(12344169, 5605983 )); pts.push_back(Point(12287203, 5582387 )); pts.push_back(Point(12266270, 5565670 )); pts.push_back(Point(12262940, 5562520 )); pts.push_back(Point(11737750, 5562520 ));
-pts.push_back(Point(11733272, 5562961 )); pts.push_back(Point(11724981, 5566396 )); pts.push_back(Point(11718636, 5572741 )); pts.push_back(Point(11715201, 5581032 )); pts.push_back(Point(11715201, 5590007 )); pts.push_back(Point(11718636, 5598298 )); pts.push_back(Point(11721500, 5601780 ));
-pts.push_back(Point(12287760, 6168050 )); pts.push_back(Point(15689760, 6168050 )); pts.push_back(Point(15904620, 6382900 )); pts.push_back(Point(15909200, 6383030 )); pts.push_back(Point(15935830, 6386006 )); pts.push_back(Point(15992796, 6409602 ));
-pts.push_back(Point(16036397, 6453203 )); pts.push_back(Point(16059993, 6510169 )); pts.push_back(Point(16059993, 6571830 )); pts.push_back(Point(16036397, 6628796 )); pts.push_back(Point(15992796, 6672397 )); pts.push_back(Point(15935830, 6695993 )); pts.push_back(Point(15874169, 6695993 ));
-pts.push_back(Point(15817203, 6672397 )); pts.push_back(Point(15773602, 6628796 )); pts.push_back(Point(15750006, 6571830 )); pts.push_back(Point(15747030, 6545200 )); pts.push_back(Point(15746900, 6540620 )); pts.push_back(Point(15597380, 6391090 )); pts.push_back(Point(14858060, 6391090 ));
-pts.push_back(Point(14858060, 6473860 )); pts.push_back(Point(14869993, 6510179 )); pts.push_back(Point(14869993, 6571840 )); pts.push_back(Point(14846397, 6628806 )); pts.push_back(Point(14802796, 6672407 )); pts.push_back(Point(14745830, 6696003 )); pts.push_back(Point(14684169, 6696003 ));
-pts.push_back(Point(14627203, 6672407 )); pts.push_back(Point(14583602, 6628806 )); pts.push_back(Point(14560006, 6571840 )); pts.push_back(Point(14557030, 6545200 )); pts.push_back(Point(14556900, 6540620 )); pts.push_back(Point(14479020, 6462730 ));
-pts.push_back(Point(13702990, 6462730 )); pts.push_back(Point(13702990, 6537170 )); pts.push_back(Point(13700003, 6571840 )); pts.push_back(Point(13676407, 6628806 )); pts.push_back(Point(13632806, 6672407 )); pts.push_back(Point(13575840, 6696003 ));
-pts.push_back(Point(13514179, 6696003 )); pts.push_back(Point(13457213, 6672407 )); pts.push_back(Point(13413612, 6628806 )); pts.push_back(Point(13390016, 6571840 )); pts.push_back(Point(13387040, 6545550 )); pts.push_back(Point(13386710, 6534380 ));
-pts.push_back(Point(12533290, 6534380 )); pts.push_back(Point(12532960, 6545550 )); pts.push_back(Point(12529983, 6571828 )); pts.push_back(Point(12506388, 6628791 )); pts.push_back(Point(12462791, 6672388 )); pts.push_back(Point(12405828, 6695983 ));
+pts.push_back(Point(12262940, 6652520 )); pts.push_back(Point(12125750, 6652520 )); pts.push_back(Point(12121272, 6652961 )); pts.push_back(Point(12112981, 6656396 )); pts.push_back(Point(12106636, 6662741 )); pts.push_back(Point(12103201, 6671032 )); pts.push_back(Point(12103201, 6680007 )); pts.push_back(Point(12106636, 6688298 ));
+pts.push_back(Point(12109500, 6691780 )); pts.push_back(Point(12748600, 7330890 )); pts.push_back(Point(15762600, 7330890 )); pts.push_back(Point(15904620, 7472900 )); pts.push_back(Point(15909200, 7473030 )); pts.push_back(Point(15935830, 7476006 )); pts.push_back(Point(15992796, 7499602 )); pts.push_back(Point(16036397, 7543203 ));
+pts.push_back(Point(16059993, 7600169 )); pts.push_back(Point(16059993, 7661830 )); pts.push_back(Point(16036397, 7718796 )); pts.push_back(Point(15992796, 7762397 )); pts.push_back(Point(15935830, 7785993 )); pts.push_back(Point(15874169, 7785993 )); pts.push_back(Point(15817203, 7762397 )); pts.push_back(Point(15773602, 7718796 ));
+pts.push_back(Point(15750006, 7661830 )); pts.push_back(Point(15747030, 7635200 )); pts.push_back(Point(15746900, 7630620 )); pts.push_back(Point(15670220, 7553930 )); pts.push_back(Point(14872950, 7553930 )); pts.push_back(Point(14872950, 7626170 ));
+pts.push_back(Point(14869973, 7661280 )); pts.push_back(Point(14846377, 7718246 )); pts.push_back(Point(14802776, 7761847 )); pts.push_back(Point(14745810, 7785443 )); pts.push_back(Point(14684149, 7785443 )); pts.push_back(Point(14627183, 7761847 )); pts.push_back(Point(14583582, 7718246 ));
+pts.push_back(Point(14559986, 7661280 )); pts.push_back(Point(14557070, 7636660 )); pts.push_back(Point(14556670, 7625570 )); pts.push_back(Point(13703330, 7625570 )); pts.push_back(Point(13702930, 7636660 )); pts.push_back(Point(13699993, 7661830 )); pts.push_back(Point(13676397, 7718796 ));
+pts.push_back(Point(13632796, 7762397 )); pts.push_back(Point(13575830, 7785993 )); pts.push_back(Point(13514169, 7785993 )); pts.push_back(Point(13457203, 7762397 )); pts.push_back(Point(13436270, 7745670 )); pts.push_back(Point(13432940, 7742520 )); pts.push_back(Point(12963760, 7742520 ));
+pts.push_back(Point(12959272, 7742961 )); pts.push_back(Point(12950981, 7746396 )); pts.push_back(Point(12944636, 7752741 )); pts.push_back(Point(12941201, 7761032 )); pts.push_back(Point(12941201, 7770007 )); pts.push_back(Point(12944636, 7778298 )); pts.push_back(Point(12947490, 7781780 ));
+pts.push_back(Point(13425330, 8259620 )); pts.push_back(Point(15601330, 8259620 )); pts.push_back(Point(15904620, 8562900 )); pts.push_back(Point(15909200, 8563030 )); pts.push_back(Point(15935830, 8566006 )); pts.push_back(Point(15992796, 8589602 )); pts.push_back(Point(16036397, 8633203 ));
+pts.push_back(Point(16059993, 8690169 )); pts.push_back(Point(16059993, 8751830 )); pts.push_back(Point(16036397, 8808796 )); pts.push_back(Point(15992796, 8852397 )); pts.push_back(Point(15935830, 8875993 )); pts.push_back(Point(15874169, 8875993 )); pts.push_back(Point(15817203, 8852397 )); pts.push_back(Point(15773602, 8808796 ));
+pts.push_back(Point(15750006, 8751830 )); pts.push_back(Point(15747030, 8725200 )); pts.push_back(Point(15746900, 8720620 )); pts.push_back(Point(15508950, 8482660 )); pts.push_back(Point(14689890, 8482660 )); pts.push_back(Point(14685412, 8483101 )); pts.push_back(Point(14677121, 8486536 ));
+pts.push_back(Point(14670776, 8492881 )); pts.push_back(Point(14667341, 8501172 )); pts.push_back(Point(14667341, 8510147 )); pts.push_back(Point(14670776, 8518438 )); pts.push_back(Point(14673630, 8521920 )); pts.push_back(Point(14714620, 8562900 )); pts.push_back(Point(14719200, 8563030 )); pts.push_back(Point(14745830, 8566006 ));
+pts.push_back(Point(14802796, 8589602 )); pts.push_back(Point(14846397, 8633203 )); pts.push_back(Point(14869993, 8690169 )); pts.push_back(Point(14869993, 8751830 )); pts.push_back(Point(14846397, 8808796 )); pts.push_back(Point(14802796, 8852397 )); pts.push_back(Point(14745830, 8875993 )); pts.push_back(Point(14684169, 8875993 ));
+pts.push_back(Point(14627203, 8852397 )); pts.push_back(Point(14583602, 8808796 )); pts.push_back(Point(14560006, 8751830 )); pts.push_back(Point(14557030, 8725200 )); pts.push_back(Point(14556900, 8720620 )); pts.push_back(Point(14408270, 8571980 )); pts.push_back(Point(13696320, 8571980 )); pts.push_back(Point(13696320, 8675520 ));
+pts.push_back(Point(13699963, 8690161 )); pts.push_back(Point(13699963, 8751818 )); pts.push_back(Point(13676368, 8808781 )); pts.push_back(Point(13632771, 8852378 )); pts.push_back(Point(13575808, 8875973 )); pts.push_back(Point(13514151, 8875973 )); pts.push_back(Point(13457188, 8852378 )); pts.push_back(Point(13436270, 8835670 )); pts.push_back(Point(13432940, 8832520 ));
+pts.push_back(Point(13281760, 8832520 )); pts.push_back(Point(13277272, 8832961 )); pts.push_back(Point(13268981, 8836396 )); pts.push_back(Point(13262636, 8842741 )); pts.push_back(Point(13259201, 8851032 )); pts.push_back(Point(13259201, 8860007 )); pts.push_back(Point(13262636, 8868298 )); pts.push_back(Point(13265500, 8871780 ));
+pts.push_back(Point(13518710, 9125000 )); pts.push_back(Point(16270720, 9125000 )); pts.push_back(Point(16270720, 8939590 )); pts.push_back(Point(17120780, 8939590 )); pts.push_back(Point(17120780, 9125000 )); pts.push_back(Point(17616200, 9125000 )); pts.push_back(Point(17616200, 75000 )); pts.push_back(Point(16024790, 75000 ));
+pts.push_back(Point(16021460, 80700 )); pts.push_back(Point(16016397, 88796 )); pts.push_back(Point(15972796, 132397 )); pts.push_back(Point(15915830, 155993 )); pts.push_back(Point(15908730, 157240 )); pts.push_back(Point(15905000, 157800 )); pts.push_back(Point(15516800, 546000 )); pts.push_back(Point(15905000, 934200 ));
+pts.push_back(Point(15908730, 934760 )); pts.push_back(Point(15915830, 936006 )); pts.push_back(Point(15972796, 959602 )); pts.push_back(Point(16016397, 1003203 )); pts.push_back(Point(16039993, 1060169 )); pts.push_back(Point(16039993, 1121830 )); pts.push_back(Point(16016397, 1178796 )); pts.push_back(Point(15972796, 1222397 ));
+pts.push_back(Point(15915830, 1245993 )); pts.push_back(Point(15854169, 1245993 )); pts.push_back(Point(15797203, 1222397 )); pts.push_back(Point(15753602, 1178796 )); pts.push_back(Point(15730006, 1121830 )); pts.push_back(Point(15728760, 1114730 )); pts.push_back(Point(15728200, 1111000 )); pts.push_back(Point(15363500, 746300 ));
+pts.push_back(Point(14602620, 746300 )); pts.push_back(Point(14598142, 746741 )); pts.push_back(Point(14589851, 750176 )); pts.push_back(Point(14583506, 756521 )); pts.push_back(Point(14580071, 764812 )); pts.push_back(Point(14580071, 773787 )); pts.push_back(Point(14583506, 782078 )); pts.push_back(Point(14586360, 785560 ));
+pts.push_back(Point(14586370, 785560 )); pts.push_back(Point(14735000, 934200 )); pts.push_back(Point(14738730, 934760 )); pts.push_back(Point(14745830, 936006 )); pts.push_back(Point(14802796, 959602 )); pts.push_back(Point(14846397, 1003203 )); pts.push_back(Point(14869993, 1060169 ));
+pts.push_back(Point(14870450, 1062550 )); pts.push_back(Point(14872170, 1071980 )); pts.push_back(Point(14972780, 1071980 )); pts.push_back(Point(15925000, 2024200 )); pts.push_back(Point(15928730, 2024760 )); pts.push_back(Point(15935830, 2026006 )); pts.push_back(Point(15992796, 2049602 ));
+pts.push_back(Point(16036397, 2093203 )); pts.push_back(Point(16059993, 2150169 )); pts.push_back(Point(16059993, 2211830 )); pts.push_back(Point(16036397, 2268796 )); pts.push_back(Point(15992796, 2312397 )); pts.push_back(Point(15935830, 2335993 )); pts.push_back(Point(15874169, 2335993 ));
+pts.push_back(Point(15817203, 2312397 )); pts.push_back(Point(15773602, 2268796 )); pts.push_back(Point(15750006, 2211830 )); pts.push_back(Point(15748760, 2204730 )); pts.push_back(Point(15748200, 2201000 )); pts.push_back(Point(14869220, 1322020 )); pts.push_back(Point(14088350, 1322020 ));
+pts.push_back(Point(14083862, 1322461 )); pts.push_back(Point(14075571, 1325896 )); pts.push_back(Point(14069226, 1332241 )); pts.push_back(Point(14065791, 1340532 )); pts.push_back(Point(14065791, 1349507 )); pts.push_back(Point(14069226, 1357798 )); pts.push_back(Point(14072080, 1361280 ));
+pts.push_back(Point(14072090, 1361280 )); pts.push_back(Point(14735000, 2024200 )); pts.push_back(Point(14738730, 2024760 )); pts.push_back(Point(14745830, 2026006 )); pts.push_back(Point(14802796, 2049602 )); pts.push_back(Point(14846397, 2093203 )); pts.push_back(Point(14869993, 2150169 ));
+pts.push_back(Point(14869993, 2211830 )); pts.push_back(Point(14846397, 2268796 )); pts.push_back(Point(14802796, 2312397 )); pts.push_back(Point(14745830, 2335993 )); pts.push_back(Point(14684169, 2335993 )); pts.push_back(Point(14627203, 2312397 )); pts.push_back(Point(14583602, 2268796 )); pts.push_back(Point(14560006, 2211830 ));
+pts.push_back(Point(14558760, 2204730 )); pts.push_back(Point(14558200, 2201000 )); pts.push_back(Point(13752220, 1395020 )); pts.push_back(Point(12991340, 1395020 )); pts.push_back(Point(12986862, 1395461 )); pts.push_back(Point(12978571, 1398896 )); pts.push_back(Point(12972226, 1405241 ));
+pts.push_back(Point(12968791, 1413532 )); pts.push_back(Point(12968791, 1422507 )); pts.push_back(Point(12972226, 1430798 )); pts.push_back(Point(12975080, 1434280 )); pts.push_back(Point(12975090, 1434280 )); pts.push_back(Point(13565000, 2024200 )); pts.push_back(Point(13568730, 2024760 )); pts.push_back(Point(13575830, 2026006 ));
+pts.push_back(Point(13632796, 2049602 )); pts.push_back(Point(13676397, 2093203 )); pts.push_back(Point(13699993, 2150169 )); pts.push_back(Point(13699993, 2211830 )); pts.push_back(Point(13676397, 2268796 )); pts.push_back(Point(13632796, 2312397 )); pts.push_back(Point(13575830, 2335993 ));
+pts.push_back(Point(13514169, 2335993 )); pts.push_back(Point(13457203, 2312397 )); pts.push_back(Point(13413602, 2268796 )); pts.push_back(Point(13390006, 2211830 )); pts.push_back(Point(13388760, 2204730 )); pts.push_back(Point(13388200, 2201000 )); pts.push_back(Point(12655220, 1468020 ));
+pts.push_back(Point(11894340, 1468020 )); pts.push_back(Point(11889862, 1468461 )); pts.push_back(Point(11881571, 1471896 )); pts.push_back(Point(11875226, 1478241 )); pts.push_back(Point(11871791, 1486532 )); pts.push_back(Point(11871791, 1495507 ));
+pts.push_back(Point(11875226, 1503798 )); pts.push_back(Point(11878090, 1507280 )); pts.push_back(Point(12395000, 2024200 )); pts.push_back(Point(12398730, 2024760 )); pts.push_back(Point(12405830, 2026006 )); pts.push_back(Point(12462796, 2049602 )); pts.push_back(Point(12506397, 2093203 ));
+pts.push_back(Point(12529993, 2150169 )); pts.push_back(Point(12529993, 2211830 )); pts.push_back(Point(12506397, 2268796 )); pts.push_back(Point(12462796, 2312397 )); pts.push_back(Point(12405830, 2335993 )); pts.push_back(Point(12344169, 2335993 ));
+pts.push_back(Point(12287203, 2312397 )); pts.push_back(Point(12243602, 2268796 )); pts.push_back(Point(12220006, 2211830 )); pts.push_back(Point(12218760, 2204730 )); pts.push_back(Point(12218200, 2201000 )); pts.push_back(Point(11558220, 1541020 ));
+pts.push_back(Point(10797340, 1541020 )); pts.push_back(Point(10792862, 1541461 )); pts.push_back(Point(10784571, 1544896 )); pts.push_back(Point(10778226, 1551241 )); pts.push_back(Point(10774791, 1559532 )); pts.push_back(Point(10774791, 1568507 )); pts.push_back(Point(10778226, 1576798 )); pts.push_back(Point(10781080, 1580280 ));
+pts.push_back(Point(10781090, 1580280 )); pts.push_back(Point(11225000, 2024200 )); pts.push_back(Point(11228730, 2024760 )); pts.push_back(Point(11235830, 2026006 )); pts.push_back(Point(11292796, 2049602 )); pts.push_back(Point(11336397, 2093203 )); pts.push_back(Point(11359993, 2150169 ));
+pts.push_back(Point(11359993, 2211830 )); pts.push_back(Point(11336397, 2268796 )); pts.push_back(Point(11292796, 2312397 )); pts.push_back(Point(11235830, 2335993 )); pts.push_back(Point(11174169, 2335993 )); pts.push_back(Point(11117203, 2312397 )); pts.push_back(Point(11073602, 2268796 )); pts.push_back(Point(11050006, 2211830 ));
+pts.push_back(Point(11048760, 2204730 )); pts.push_back(Point(11048200, 2201000 )); pts.push_back(Point(10461220, 1614020 )); pts.push_back(Point( 5647400, 1614020 )); pts.push_back(Point( 5642912, 1614461 ));
+pts.push_back(Point( 5634621, 1617896 )); pts.push_back(Point( 5628276, 1624241 )); pts.push_back(Point( 5624841, 1632532 )); pts.push_back(Point( 5624841, 1641507 )); pts.push_back(Point( 5628276, 1649798 )); pts.push_back(Point( 5631130, 1653280 ));
+pts.push_back(Point( 5688490, 1710640 )); pts.push_back(Point( 9722350, 1710640 )); pts.push_back(Point(10034620, 2022900 )); pts.push_back(Point(10039200, 2023030 )); pts.push_back(Point(10065830, 2026006 )); pts.push_back(Point(10122796, 2049602 ));
+pts.push_back(Point(10166397, 2093203 )); pts.push_back(Point(10189993, 2150169 )); pts.push_back(Point(10189993, 2211830 )); pts.push_back(Point(10166397, 2268796 )); pts.push_back(Point(10158620, 2279450 )); pts.push_back(Point(10158620, 2404900 )); pts.push_back(Point(10548950, 2795240 ));
+pts.push_back(Point(15586950, 2795240 )); pts.push_back(Point(15904620, 3112900 )); pts.push_back(Point(15909200, 3113030 )); pts.push_back(Point(15935830, 3116006 )); pts.push_back(Point(15992796, 3139602 )); pts.push_back(Point(16036397, 3183203 )); pts.push_back(Point(16059993, 3240169 )); pts.push_back(Point(16059993, 3301830 ));
+pts.push_back(Point(16036397, 3358796 )); pts.push_back(Point(15992796, 3402397 )); pts.push_back(Point(15935830, 3425993 )); pts.push_back(Point(15874169, 3425993 )); pts.push_back(Point(15817203, 3402397 )); pts.push_back(Point(15773602, 3358796 )); pts.push_back(Point(15750006, 3301830 )); pts.push_back(Point(15747030, 3275200 ));
+pts.push_back(Point(15746900, 3270620 )); pts.push_back(Point(15494570, 3018280 )); pts.push_back(Point(14675510, 3018280 )); pts.push_back(Point(14671032, 3018721 )); pts.push_back(Point(14662741, 3022156 )); pts.push_back(Point(14656396, 3028501 )); pts.push_back(Point(14652961, 3036792 ));
+pts.push_back(Point(14652961, 3045767 )); pts.push_back(Point(14656396, 3054058 )); pts.push_back(Point(14659260, 3057540 )); pts.push_back(Point(14714620, 3112900 )); pts.push_back(Point(14719200, 3113030 )); pts.push_back(Point(14745830, 3116006 )); pts.push_back(Point(14802796, 3139602 ));
+pts.push_back(Point(14846397, 3183203 )); pts.push_back(Point(14869993, 3240169 )); pts.push_back(Point(14869993, 3301830 )); pts.push_back(Point(14846397, 3358796 )); pts.push_back(Point(14802796, 3402397 )); pts.push_back(Point(14745830, 3425993 )); pts.push_back(Point(14684169, 3425993 )); pts.push_back(Point(14627203, 3402397 ));
+pts.push_back(Point(14583602, 3358796 )); pts.push_back(Point(14560006, 3301830 )); pts.push_back(Point(14557030, 3275200 )); pts.push_back(Point(14556900, 3270620 )); pts.push_back(Point(14370700, 3084410 )); pts.push_back(Point(13702830, 3084410 )); pts.push_back(Point(13702830, 3263160 ));
+pts.push_back(Point(13700003, 3302210 )); pts.push_back(Point(13676407, 3359176 )); pts.push_back(Point(13632806, 3402777 )); pts.push_back(Point(13575840, 3426373 )); pts.push_back(Point(13514179, 3426373 )); pts.push_back(Point(13457213, 3402777 )); pts.push_back(Point(13413612, 3359176 ));
+pts.push_back(Point(13390016, 3302210 )); pts.push_back(Point(13387030, 3275200 )); pts.push_back(Point(13386900, 3270620 )); pts.push_back(Point(13266840, 3150550 )); pts.push_back(Point(12532920, 3150550 )); pts.push_back(Point(12532920, 3264990 )); pts.push_back(Point(12529993, 3301820 ));
+pts.push_back(Point(12506397, 3358786 )); pts.push_back(Point(12462796, 3402387 )); pts.push_back(Point(12405830, 3425983 )); pts.push_back(Point(12344169, 3425983 )); pts.push_back(Point(12287203, 3402387 )); pts.push_back(Point(12243602, 3358786 )); pts.push_back(Point(12220006, 3301820 )); pts.push_back(Point(12217030, 3275200 ));
+pts.push_back(Point(12216900, 3270620 )); pts.push_back(Point(12157460, 3211170 )); pts.push_back(Point(11362030, 3211170 )); pts.push_back(Point(11360250, 3220520 )); pts.push_back(Point(11359993, 3221830 )); pts.push_back(Point(11336397, 3278796 ));
+pts.push_back(Point(11292796, 3322397 )); pts.push_back(Point(11235830, 3345993 )); pts.push_back(Point(11174169, 3345993 )); pts.push_back(Point(11117203, 3322397 )); pts.push_back(Point(11096270, 3305670 )); pts.push_back(Point(11092940, 3302520 )); pts.push_back(Point(10680760, 3302520 ));
+pts.push_back(Point(10676272, 3302961 )); pts.push_back(Point(10667981, 3306396 )); pts.push_back(Point(10661636, 3312741 )); pts.push_back(Point(10658201, 3321032 )); pts.push_back(Point(10658201, 3330007 )); pts.push_back(Point(10661636, 3338298 )); pts.push_back(Point(10664500, 3341780 ));
+pts.push_back(Point(11264260, 3941550 )); pts.push_back(Point(15643260, 3941550 )); pts.push_back(Point(15904620, 4202900 )); pts.push_back(Point(15909200, 4203030 )); pts.push_back(Point(15935830, 4206006 )); pts.push_back(Point(15992796, 4229602 ));
+pts.push_back(Point(16036397, 4273203 )); pts.push_back(Point(16059993, 4330169 )); pts.push_back(Point(16059993, 4391830 )); pts.push_back(Point(16036397, 4448796 )); pts.push_back(Point(15992796, 4492397 ));
+pts.push_back(Point(15935830, 4515993 )); pts.push_back(Point(15874169, 4515993 )); pts.push_back(Point(15817203, 4492397 )); pts.push_back(Point(15773602, 4448796 )); pts.push_back(Point(15750006, 4391830 )); pts.push_back(Point(15747030, 4365200 )); pts.push_back(Point(15746900, 4360620 ));
+pts.push_back(Point(15550880, 4164590 )); pts.push_back(Point(14825070, 4164590 )); pts.push_back(Point(14825070, 4247610 )); pts.push_back(Point(14846397, 4273213 )); pts.push_back(Point(14869993, 4330179 )); pts.push_back(Point(14869993, 4391840 )); pts.push_back(Point(14846397, 4448806 ));
+pts.push_back(Point(14802796, 4492407 )); pts.push_back(Point(14745830, 4516003 )); pts.push_back(Point(14684169, 4516003 )); pts.push_back(Point(14627203, 4492407 )); pts.push_back(Point(14583602, 4448806 )); pts.push_back(Point(14560006, 4391840 )); pts.push_back(Point(14557030, 4365200 ));
+pts.push_back(Point(14556900, 4360620 )); pts.push_back(Point(14432520, 4236230 )); pts.push_back(Point(13702830, 4236230 )); pts.push_back(Point(13702830, 4352930 )); pts.push_back(Point(13699993, 4391750 )); pts.push_back(Point(13676397, 4448716 ));
+pts.push_back(Point(13632796, 4492317 )); pts.push_back(Point(13575830, 4515913 )); pts.push_back(Point(13514169, 4515913 )); pts.push_back(Point(13457203, 4492317 )); pts.push_back(Point(13413602, 4448716 )); pts.push_back(Point(13390006, 4391750 )); pts.push_back(Point(13387030, 4365200 ));
+pts.push_back(Point(13386900, 4360620 )); pts.push_back(Point(13334170, 4307880 )); pts.push_back(Point(12532990, 4307880 )); pts.push_back(Point(12532990, 4357550 )); pts.push_back(Point(12529993, 4391760 )); pts.push_back(Point(12506397, 4448726 )); pts.push_back(Point(12462796, 4492327 ));
+pts.push_back(Point(12405830, 4515923 )); pts.push_back(Point(12344169, 4515923 )); pts.push_back(Point(12287203, 4492327 )); pts.push_back(Point(12243602, 4448726 )); pts.push_back(Point(12220006, 4391760 )); pts.push_back(Point(12217970, 4378710 )); pts.push_back(Point(12216810, 4368500 ));
+pts.push_back(Point(11363190, 4368500 )); pts.push_back(Point(11362030, 4378710 )); pts.push_back(Point(11359983, 4391828 )); pts.push_back(Point(11336388, 4448791 )); pts.push_back(Point(11292791, 4492388 )); pts.push_back(Point(11235828, 4515983 )); pts.push_back(Point(11174171, 4515983 )); pts.push_back(Point(11117208, 4492388 ));
+pts.push_back(Point(11096270, 4475670 )); pts.push_back(Point(11092940, 4472520 )); pts.push_back(Point(11057750, 4472520 )); pts.push_back(Point(11053272, 4472961 )); pts.push_back(Point(11044981, 4476396 )); pts.push_back(Point(11038636, 4482741 )); pts.push_back(Point(11035201, 4491032 ));
+pts.push_back(Point(11035201, 4500007 )); pts.push_back(Point(11038636, 4508298 )); pts.push_back(Point(11041490, 4511780 )); pts.push_back(Point(11573490, 5043780 )); pts.push_back(Point(15655490, 5043780 )); pts.push_back(Point(15904620, 5292900 ));
+pts.push_back(Point(15909200, 5293030 )); pts.push_back(Point(15935830, 5296006 )); pts.push_back(Point(15992796, 5319602 )); pts.push_back(Point(16036397, 5363203 )); pts.push_back(Point(16059993, 5420169 )); pts.push_back(Point(16059993, 5481830 )); pts.push_back(Point(16036397, 5538796 ));
+pts.push_back(Point(15992796, 5582397 )); pts.push_back(Point(15935830, 5605993 )); pts.push_back(Point(15874169, 5605993 )); pts.push_back(Point(15817203, 5582397 )); pts.push_back(Point(15773602, 5538796 )); pts.push_back(Point(15750006, 5481830 )); pts.push_back(Point(15747030, 5455200 ));
+pts.push_back(Point(15746900, 5450620 )); pts.push_back(Point(15563110, 5266820 )); pts.push_back(Point(14857380, 5266820 )); pts.push_back(Point(14857380, 5382430 )); pts.push_back(Point(14869993, 5420179 )); pts.push_back(Point(14869993, 5481840 )); pts.push_back(Point(14846397, 5538806 )); pts.push_back(Point(14802796, 5582407 ));
+pts.push_back(Point(14745830, 5606003 )); pts.push_back(Point(14684169, 5606003 )); pts.push_back(Point(14627203, 5582407 )); pts.push_back(Point(14583602, 5538806 )); pts.push_back(Point(14560006, 5481840 )); pts.push_back(Point(14557030, 5455200 )); pts.push_back(Point(14556900, 5450620 )); pts.push_back(Point(14444750, 5338460 ));
+pts.push_back(Point(13702890, 5338460 )); pts.push_back(Point(13702890, 5364400 )); pts.push_back(Point(13699993, 5401800 )); pts.push_back(Point(13676397, 5458766 )); pts.push_back(Point(13632796, 5502367 )); pts.push_back(Point(13575830, 5525963 )); pts.push_back(Point(13514169, 5525963 )); pts.push_back(Point(13457203, 5502367 ));
+pts.push_back(Point(13413602, 5458766 )); pts.push_back(Point(13390006, 5401800 )); pts.push_back(Point(13389230, 5397620 )); pts.push_back(Point(13387590, 5388060 )); pts.push_back(Point(12532960, 5388060 )); pts.push_back(Point(12532960, 5446220 )); pts.push_back(Point(12529993, 5481820 ));
+pts.push_back(Point(12506397, 5538786 )); pts.push_back(Point(12462796, 5582387 )); pts.push_back(Point(12405830, 5605983 )); pts.push_back(Point(12344169, 5605983 )); pts.push_back(Point(12287203, 5582387 )); pts.push_back(Point(12266270, 5565670 )); pts.push_back(Point(12262940, 5562520 )); pts.push_back(Point(11737750, 5562520 ));
+pts.push_back(Point(11733272, 5562961 )); pts.push_back(Point(11724981, 5566396 )); pts.push_back(Point(11718636, 5572741 )); pts.push_back(Point(11715201, 5581032 )); pts.push_back(Point(11715201, 5590007 )); pts.push_back(Point(11718636, 5598298 )); pts.push_back(Point(11721500, 5601780 ));
+pts.push_back(Point(12287760, 6168050 )); pts.push_back(Point(15689760, 6168050 )); pts.push_back(Point(15904620, 6382900 )); pts.push_back(Point(15909200, 6383030 )); pts.push_back(Point(15935830, 6386006 )); pts.push_back(Point(15992796, 6409602 ));
+pts.push_back(Point(16036397, 6453203 )); pts.push_back(Point(16059993, 6510169 )); pts.push_back(Point(16059993, 6571830 )); pts.push_back(Point(16036397, 6628796 )); pts.push_back(Point(15992796, 6672397 )); pts.push_back(Point(15935830, 6695993 )); pts.push_back(Point(15874169, 6695993 ));
+pts.push_back(Point(15817203, 6672397 )); pts.push_back(Point(15773602, 6628796 )); pts.push_back(Point(15750006, 6571830 )); pts.push_back(Point(15747030, 6545200 )); pts.push_back(Point(15746900, 6540620 )); pts.push_back(Point(15597380, 6391090 )); pts.push_back(Point(14858060, 6391090 ));
+pts.push_back(Point(14858060, 6473860 )); pts.push_back(Point(14869993, 6510179 )); pts.push_back(Point(14869993, 6571840 )); pts.push_back(Point(14846397, 6628806 )); pts.push_back(Point(14802796, 6672407 )); pts.push_back(Point(14745830, 6696003 )); pts.push_back(Point(14684169, 6696003 ));
+pts.push_back(Point(14627203, 6672407 )); pts.push_back(Point(14583602, 6628806 )); pts.push_back(Point(14560006, 6571840 )); pts.push_back(Point(14557030, 6545200 )); pts.push_back(Point(14556900, 6540620 )); pts.push_back(Point(14479020, 6462730 ));
+pts.push_back(Point(13702990, 6462730 )); pts.push_back(Point(13702990, 6537170 )); pts.push_back(Point(13700003, 6571840 )); pts.push_back(Point(13676407, 6628806 )); pts.push_back(Point(13632806, 6672407 )); pts.push_back(Point(13575840, 6696003 ));
+pts.push_back(Point(13514179, 6696003 )); pts.push_back(Point(13457213, 6672407 )); pts.push_back(Point(13413612, 6628806 )); pts.push_back(Point(13390016, 6571840 )); pts.push_back(Point(13387040, 6545550 )); pts.push_back(Point(13386710, 6534380 ));
+pts.push_back(Point(12533290, 6534380 )); pts.push_back(Point(12532960, 6545550 )); pts.push_back(Point(12529983, 6571828 )); pts.push_back(Point(12506388, 6628791 )); pts.push_back(Point(12462791, 6672388 )); pts.push_back(Point(12405828, 6695983 ));
 pts.push_back(Point(12344171, 6695983 )); pts.push_back(Point(12287208, 6672388 )); pts.push_back(Point(12266270, 6655670 ));
       poly.set(pts.begin(), pts.end());
       si.insert(poly, 444);
@@ -2168,7 +2168,7 @@
           outpts.push_back((*itr).first.first);
           outpts.push_back((*itr).first.second);
         }
- gtlsort(outpts.begin(), outpts.end());
+ polygon_sort(outpts.begin(), outpts.end());
         for(std::size_t i = 0; i < outpts.size(); i+=2) {
           if(outpts[i] != outpts[i+1]) {
             stdcout << "Polygon set not a closed figure\n";
@@ -2486,10 +2486,10 @@
   template <typename Unit>
   class arbitrary_boolean_op : public scanline_base<Unit> {
   private:
-
+
     typedef int property_type;
     typedef typename scanline_base<Unit>::Point Point;
-
+
     //the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
     //typedef std::pair<Point, Point> half_edge;
     typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -2567,7 +2567,7 @@
             if((*(left.begin())) == 0) {
               result.insert_clean(elem);
             }
- }
+ }
 #ifdef BOOST_POLYGON_MSVC
 #pragma warning (default: 4127)
 #endif
@@ -2583,7 +2583,7 @@
 
     inline void sort_property_merge_data() {
       less_vertex_data<vertex_property> lvd(&evalAtXforYPack_);
- gtlsort(pmd.begin(), pmd.end(), lvd);
+ polygon_sort(pmd.begin(), pmd.end(), lvd);
     }
   public:
     inline arbitrary_boolean_op() : pmd(), evalAtXforYPack_() {}
@@ -2593,7 +2593,7 @@
     enum BOOLEAN_OP_TYPE {
       BOOLEAN_OR = 0,
       BOOLEAN_AND = 1,
- BOOLEAN_XOR = 2,
+ BOOLEAN_XOR = 2,
       BOOLEAN_NOT = 3
     };
     template <typename result_type, typename iT1, typename iT2>
@@ -2627,17 +2627,17 @@
       } else if(op == BOOLEAN_NOT) {
         boolean_output_functor<result_type, std::vector<property_type>, 3> bof;
         sl.scan(result, bof, pmd.begin(), pmd.end());
- }
+ }
     }
-
+
     inline void clear() {*this = arbitrary_boolean_op();}
 
   private:
     template <typename iT>
     void insert(iT b, iT e, int id) {
- for(;
+ for(;
           b != e; ++b) {
- pmd.push_back(vertex_property(half_edge((*b).first.first, (*b).first.second),
+ pmd.push_back(vertex_property(half_edge((*b).first.first, (*b).first.second),
                                       std::pair<property_type, int>(id, (*b).second)));
       }
     }
@@ -2705,9 +2705,9 @@
   template <typename Unit, typename property_type>
   class arbitrary_connectivity_extraction : public scanline_base<Unit> {
   private:
-
+
     typedef typename scanline_base<Unit>::Point Point;
-
+
     //the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
     //typedef std::pair<Point, Point> half_edge;
     typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -2752,7 +2752,7 @@
       std::map<point_data<Unit>, std::set<property_type> >& y_prop_map = output.first.second;
       if(y_prop_map.empty()) return;
       Unit x = output.first.first;
- for(typename std::map<point_data<Unit>, std::set<property_type> >::iterator itr =
+ for(typename std::map<point_data<Unit>, std::set<property_type> >::iterator itr =
             y_prop_map.begin(); itr != y_prop_map.end(); ++itr) {
         if((*itr).first.x() < x) {
           y_prop_map.erase(y_prop_map.begin(), itr);
@@ -2771,7 +2771,7 @@
         }
       }
     }
-
+
     template <typename result_type, typename key_type>
     class connectivity_extraction_output_functor {
     public:
@@ -2784,21 +2784,21 @@
         x = pt.x();
         std::set<property_type>& output_set = y_prop_map[pt];
         {
- for(typename key_type::const_iterator itr1 =
+ for(typename key_type::const_iterator itr1 =
                 left.begin(); itr1 != left.end(); ++itr1) {
             output_set.insert(output_set.end(), *itr1);
           }
- for(typename key_type::const_iterator itr2 =
+ for(typename key_type::const_iterator itr2 =
                 right.begin(); itr2 != right.end(); ++itr2) {
             output_set.insert(output_set.end(), *itr2);
           }
         }
         std::set<property_type>& output_set2 = y_prop_map[edge.second];
- for(typename key_type::const_iterator itr1 =
+ for(typename key_type::const_iterator itr1 =
               left.begin(); itr1 != left.end(); ++itr1) {
           output_set2.insert(output_set2.end(), *itr1);
         }
- for(typename key_type::const_iterator itr2 =
+ for(typename key_type::const_iterator itr2 =
               right.begin(); itr2 != right.end(); ++itr2) {
           output_set2.insert(output_set2.end(), *itr2);
         }
@@ -2807,7 +2807,7 @@
 
     inline void sort_property_merge_data() {
       less_vertex_data<vertex_property> lvd(&evalAtXforYPack_);
- gtlsort(pmd.begin(), pmd.end(), lvd);
+ polygon_sort(pmd.begin(), pmd.end(), lvd);
     }
   public:
     inline arbitrary_connectivity_extraction() : pmd(), evalAtXforYPack_() {}
@@ -2824,13 +2824,13 @@
       pmd.swap(tmp_pmd);
       sort_property_merge_data();
       scanline<Unit, property_type, std::vector<property_type> > sl;
- std::pair<std::pair<Unit, std::map<point_data<Unit>, std::set<property_type> > >,
+ std::pair<std::pair<Unit, std::map<point_data<Unit>, std::set<property_type> > >,
         result_type*> output
- (std::make_pair(std::make_pair((std::numeric_limits<Unit>::max)(),
- std::map<point_data<Unit>,
+ (std::make_pair(std::make_pair((std::numeric_limits<Unit>::max)(),
+ std::map<point_data<Unit>,
                                        std::set<property_type> >()), &result));
- connectivity_extraction_output_functor<std::pair<std::pair<Unit,
- std::map<point_data<Unit>, std::set<property_type> > >, result_type*>,
+ connectivity_extraction_output_functor<std::pair<std::pair<Unit,
+ std::map<point_data<Unit>, std::set<property_type> > >, result_type*>,
         std::vector<property_type> > ceof;
       sl.scan(output, ceof, pmd.begin(), pmd.end());
       process_previous_x(output);
@@ -2839,17 +2839,16 @@
     inline void clear() {*this = arbitrary_connectivity_extraction();}
 
     template <typename iT>
- void populateTouchSetData(iT begin, iT end,
+ void populateTouchSetData(iT begin, iT end,
                                      property_type property) {
       for( ; begin != end; ++begin) {
- pmd.push_back(vertex_property(half_edge((*begin).first.first, (*begin).first.second),
+ pmd.push_back(vertex_property(half_edge((*begin).first.first, (*begin).first.second),
                                       std::pair<property_type, int>(property, (*begin).second)));
       }
     }
 
   };
 
-}
+}
 }
 #endif
-

Modified: branches/release/boost/polygon/detail/transform_detail.hpp
==============================================================================
--- branches/release/boost/polygon/detail/transform_detail.hpp (original)
+++ branches/release/boost/polygon/detail/transform_detail.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
     Copyright 2008 Intel Corporation
-
+
     Use, modification and distribution are 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).
@@ -54,7 +54,7 @@
     };
     atr_ = tmp[orient.to_int()];
   }
-
+
   inline axis_transformation::axis_transformation(const orientation_2d& orient) : atr_(NULL_TRANSFORM) {
     const ATR tmp[3] = {
       NORTH_EAST_UP, //sort by z, then x, then y
@@ -62,7 +62,7 @@
     };
     atr_ = tmp[orient.to_int()];
   }
-
+
   inline axis_transformation::axis_transformation(const direction_3d& dir) : atr_(NULL_TRANSFORM) {
     const ATR tmp[6] = {
       DOWN_EAST_NORTH, //sort by -x, then z, then y
@@ -74,7 +74,7 @@
     };
     atr_ = tmp[dir.to_int()];
   }
-
+
   inline axis_transformation::axis_transformation(const direction_2d& dir) : atr_(NULL_TRANSFORM) {
     const ATR tmp[4] = {
       SOUTH_EAST_UP, //sort by z, then x, then y
@@ -84,7 +84,7 @@
     };
     atr_ = tmp[dir.to_int()];
   }
-
+
   inline axis_transformation& axis_transformation::operator=(const axis_transformation& a) {
     atr_ = a.atr_;
     return *this;
@@ -113,13 +113,13 @@
     bool abit3 = (a.atr_ & 8) != 0;
     bool abit2 = (a.atr_ & 4) != 0;
     bool abit1 = (a.atr_ & 2) != 0;
- bool abit0 = (a.atr_ & 1) != 0;
+ bool abit0 = (a.atr_ & 1) != 0;
     bool bit5 = (atr_ & 32) != 0;
     bool bit4 = (atr_ & 16) != 0;
     bool bit3 = (atr_ & 8) != 0;
     bool bit2 = (atr_ & 4) != 0;
     bool bit1 = (atr_ & 2) != 0;
- bool bit0 = (atr_ & 1) != 0;
+ bool bit0 = (atr_ & 1) != 0;
     int indexes[2][3] = {
       {
         ((int)((bit5 & bit2) | (bit4 & !bit2)) << 1) +
@@ -127,7 +127,7 @@
         ((int)((bit4 & bit2) | (bit5 & !bit2)) << 1) +
         (int)(!bit5 & !bit2),
         ((int)(!bit4 & !bit5) << 1) +
- (int)(bit5)
+ (int)(bit5)
       },
       {
         ((int)((abit5 & abit2) | (abit4 & !abit2)) << 1) +
@@ -135,7 +135,7 @@
         ((int)((abit4 & abit2) | (abit5 & !abit2)) << 1) +
         (int)(!abit5 & !abit2),
         ((int)(!abit4 & !abit5) << 1) +
- (int)(abit5)
+ (int)(abit5)
       }
     };
     int zero_bits[2][3] = {
@@ -153,19 +153,19 @@
     int nbit2 = (!(nbit5 | nbit4) & (bool)(indexes[0][0] & 1)) | //swap xy
       (nbit5 & ((indexes[0][0] & 2) >> 1)) | //z->y x->z
       (nbit4 & ((indexes[0][1] & 2) >> 1)); //z->x y->z
- atr_ = (ATR)((nbit5 << 5) +
- (nbit4 << 4) +
- (nbit3 << 3) +
- (nbit2 << 2) +
+ atr_ = (ATR)((nbit5 << 5) +
+ (nbit4 << 4) +
+ (nbit3 << 3) +
+ (nbit2 << 2) +
                  (nbit1 << 1) + nbit0);
     return *this;
   }
-
+
   inline axis_transformation axis_transformation::operator+(const axis_transformation& a) const {
     axis_transformation retval(*this);
     return retval+=a;
   }
-
+
   // populate_axis_array writes the three INDIVIDUAL_AXIS values that the
   // ATR enum value of 'this' represent into axis_array
   inline void axis_transformation::populate_axis_array(INDIVIDUAL_AXIS axis_array[]) const {
@@ -174,24 +174,24 @@
     bool bit3 = (atr_ & 8) != 0;
     bool bit2 = (atr_ & 4) != 0;
     bool bit1 = (atr_ & 2) != 0;
- bool bit0 = (atr_ & 1) != 0;
- axis_array[2] =
+ bool bit0 = (atr_ & 1) != 0;
+ axis_array[2] =
       (INDIVIDUAL_AXIS)((((int)(!bit4 & !bit5)) << 2) +
- ((int)(bit5) << 1) +
+ ((int)(bit5) << 1) +
                         bit3);
- axis_array[1] =
+ axis_array[1] =
       (INDIVIDUAL_AXIS)((((int)((bit4 & bit2) | (bit5 & !bit2))) << 2)+
- ((int)(!bit5 & !bit2) << 1) +
+ ((int)(!bit5 & !bit2) << 1) +
                         bit1);
- axis_array[0] =
+ axis_array[0] =
       (INDIVIDUAL_AXIS)((((int)((bit5 & bit2) | (bit4 & !bit2))) << 2) +
- ((int)(bit2 & !bit5) << 1) +
+ ((int)(bit2 & !bit5) << 1) +
                         bit0);
   }
-
+
   // combine_axis_arrays concatenates this_array and that_array overwriting
   // the result into this_array
- inline void
+ inline void
   axis_transformation::combine_axis_arrays (INDIVIDUAL_AXIS this_array[],
                                             const INDIVIDUAL_AXIS that_array[]){
     int indexes[3] = {this_array[0] >> 1,
@@ -203,21 +203,21 @@
     };
     this_array[0] = that_array[indexes[0]];
     this_array[0] = (INDIVIDUAL_AXIS)((int)this_array[0] & (int)((int)PZ+(int)PY));
- this_array[0] = (INDIVIDUAL_AXIS)((int)this_array[0] |
- ((int)zero_bits[0][0] ^
+ this_array[0] = (INDIVIDUAL_AXIS)((int)this_array[0] |
+ ((int)zero_bits[0][0] ^
                                        (int)zero_bits[1][indexes[0]]));
     this_array[1] = that_array[indexes[1]];
     this_array[1] = (INDIVIDUAL_AXIS)((int)this_array[1] & (int)((int)PZ+(int)PY));
- this_array[1] = (INDIVIDUAL_AXIS)((int)this_array[1] |
- ((int)zero_bits[0][1] ^
+ this_array[1] = (INDIVIDUAL_AXIS)((int)this_array[1] |
+ ((int)zero_bits[0][1] ^
                                        (int)zero_bits[1][indexes[1]]));
     this_array[2] = that_array[indexes[2]];
     this_array[2] = (INDIVIDUAL_AXIS)((int)this_array[2] & (int)((int)PZ+(int)PY));
- this_array[2] = (INDIVIDUAL_AXIS)((int)this_array[2] |
- ((int)zero_bits[0][2] ^
+ this_array[2] = (INDIVIDUAL_AXIS)((int)this_array[2] |
+ ((int)zero_bits[0][2] ^
                                        (int)zero_bits[1][indexes[2]]));
   }
-
+
   // write_back_axis_array converts an array of three INDIVIDUAL_AXIS values
   // to the ATR enum value and sets 'this' to that value
   inline void axis_transformation::write_back_axis_array(const INDIVIDUAL_AXIS this_array[]) {
@@ -230,16 +230,16 @@
       (bit4 & (((int)this_array[1] & 4) >> 2)); //z->x y->z
     int bit1 = ((int)this_array[1] & 1);
     int bit0 = ((int)this_array[0] & 1);
- atr_ = ATR((bit5 << 5) +
- (bit4 << 4) +
- (bit3 << 3) +
- (bit2 << 2) +
+ atr_ = ATR((bit5 << 5) +
+ (bit4 << 4) +
+ (bit3 << 3) +
+ (bit2 << 2) +
                (bit1 << 1) + bit0);
   }
-
+
   // behavior is deterministic but undefined in the case where illegal
- // combinations of directions are passed in.
- inline axis_transformation&
+ // combinations of directions are passed in.
+ inline axis_transformation&
   axis_transformation::set_directions(const direction_2d& horizontalDir,
                                       const direction_2d& verticalDir){
     int bit2 = (static_cast<orientation_2d>(horizontalDir).to_int()) != 0;
@@ -248,42 +248,39 @@
     atr_ = ATR((bit2 << 2) + (bit1 << 1) + bit0);
     return *this;
   }
-
+
   // behavior is deterministic but undefined in the case where illegal
   // combinations of directions are passed in.
- inline axis_transformation& axis_transformation::set_directions(const direction_3d& horizontalDir,
- const direction_3d& verticalDir,
- const direction_3d& proximalDir){
- int this_array[3] = {horizontalDir.to_int(),
- verticalDir.to_int(),
- proximalDir.to_int()};
- int bit5 = (this_array[2] & 2) != 0;
- int bit4 = !(((this_array[2] & 4) != 0) | ((this_array[2] & 2) != 0));
- int bit3 = !((this_array[2] & 1) != 0);
+ inline axis_transformation& axis_transformation::set_directions(
+ const direction_3d& horizontalDir,
+ const direction_3d& verticalDir,
+ const direction_3d& proximalDir){
+ unsigned int this_array[3] = {horizontalDir.to_int(),
+ verticalDir.to_int(),
+ proximalDir.to_int()};
+ unsigned int bit5 = (this_array[2] & 2) != 0;
+ unsigned int bit4 = !(((this_array[2] & 4) != 0) | ((this_array[2] & 2) != 0));
+ unsigned int bit3 = !((this_array[2] & 1) != 0);
     //bit 2 is the tricky bit
- int bit2 = (!(bit5 | bit4) & ((this_array[0] & 2) != 0 )) | //swap xy
- (bit5 & ((this_array[0] & 4) >> 2)) | //z->y x->z
- (bit4 & ((this_array[1] & 4) >> 2)); //z->x y->z
- int bit1 = !(this_array[1] & 1);
- int bit0 = !(this_array[0] & 1);
- atr_ = ATR((bit5 << 5) +
- (bit4 << 4) +
- (bit3 << 3) +
- (bit2 << 2) +
- (bit1 << 1) + bit0);
+ unsigned int bit2 = (!(bit5 | bit4) & ((this_array[0] & 2) != 0 )) | //swap xy
+ (bit5 & ((this_array[0] & 4) >> 2)) | //z->y x->z
+ (bit4 & ((this_array[1] & 4) >> 2)); //z->x y->z
+ unsigned int bit1 = !(this_array[1] & 1);
+ unsigned int bit0 = !(this_array[0] & 1);
+ atr_ = ATR((bit5 << 5) | (bit4 << 4) | (bit3 << 3) | (bit2 << 2) | (bit1 << 1) | bit0);
     return *this;
   }
-
+
   template <typename coordinate_type_2>
   inline void axis_transformation::transform(coordinate_type_2& x, coordinate_type_2& y) const {
     int bit2 = (atr_ & 4) != 0;
     int bit1 = (atr_ & 2) != 0;
     int bit0 = (atr_ & 1) != 0;
     x *= -((bit0 << 1) - 1);
- y *= -((bit1 << 1) - 1);
+ y *= -((bit1 << 1) - 1);
     predicated_swap(bit2 != 0,x,y);
   }
-
+
   template <typename coordinate_type_2>
   inline void axis_transformation::transform(coordinate_type_2& x, coordinate_type_2& y, coordinate_type_2& z) const {
     int bit5 = (atr_ & 32) != 0;
@@ -293,13 +290,13 @@
     int bit1 = (atr_ & 2) != 0;
     int bit0 = (atr_ & 1) != 0;
     x *= -((bit0 << 1) - 1);
- y *= -((bit1 << 1) - 1);
+ y *= -((bit1 << 1) - 1);
     z *= -((bit3 << 1) - 1);
     predicated_swap(bit2 != 0, x, y);
     predicated_swap(bit5 != 0, y, z);
     predicated_swap(bit4 != 0, x, z);
   }
-
+
   inline axis_transformation& axis_transformation::invert_2d() {
     int bit2 = ((atr_ & 4) != 0);
     int bit1 = ((atr_ & 2) != 0);
@@ -311,15 +308,15 @@
     atr_ = (ATR)(atr_ | bit0 | bit1);
     return *this;
   }
-
+
   inline axis_transformation axis_transformation::inverse_2d() const {
     axis_transformation retval(*this);
     return retval.invert_2d();
   }
-
+
   inline axis_transformation& axis_transformation::invert() {
     int bit5 = ((atr_ & 32) != 0);
- int bit4 = ((atr_ & 16) != 0);
+ int bit4 = ((atr_ & 16) != 0);
     int bit3 = ((atr_ & 8) != 0);
     int bit2 = ((atr_ & 4) != 0);
     int bit1 = ((atr_ & 2) != 0);
@@ -328,24 +325,24 @@
     predicated_swap(bit4 != 0, bit0, bit3);
     predicated_swap(bit5 != 0, bit1, bit3);
     predicated_swap(bit2 != 0, bit0, bit1);
- atr_ = (ATR)((bit5 << 5) +
- (bit4 << 4) +
- (bit3 << 3) +
- (bit2 << 2) +
+ atr_ = (ATR)((bit5 << 5) +
+ (bit4 << 4) +
+ (bit3 << 3) +
+ (bit2 << 2) +
                  (bit1 << 1) + bit0);
     return *this;
   }
-
+
   inline axis_transformation axis_transformation::inverse() const {
     axis_transformation retval(*this);
     return retval.invert();
   }
-
+
   template <typename scale_factor_type>
   inline scale_factor_type anisotropic_scale_factor<scale_factor_type>::get(orientation_3d orient) const {
     return scale_[orient.to_int()];
   }
-
+
   template <typename scale_factor_type>
   inline void anisotropic_scale_factor<scale_factor_type>::set(orientation_3d orient, scale_factor_type value) {
     scale_[orient.to_int()] = value;
@@ -363,14 +360,14 @@
   inline void anisotropic_scale_factor<scale_factor_type>::y(scale_factor_type value) { scale_[VERTICAL] = value; }
   template <typename scale_factor_type>
   inline void anisotropic_scale_factor<scale_factor_type>::z(scale_factor_type value) { scale_[PROXIMAL] = value; }
-
+
   //concatenation operator (convolve scale factors)
   template <typename scale_factor_type>
   inline anisotropic_scale_factor<scale_factor_type> anisotropic_scale_factor<scale_factor_type>::operator+(const anisotropic_scale_factor<scale_factor_type>& s) const {
     anisotropic_scale_factor<scale_factor_type> retval(*this);
     return retval+=s;
   }
-
+
   //concatenate this with that
   template <typename scale_factor_type>
   inline const anisotropic_scale_factor<scale_factor_type>& anisotropic_scale_factor<scale_factor_type>::operator+=(const anisotropic_scale_factor<scale_factor_type>& s){
@@ -379,7 +376,7 @@
     scale_[2] *= s.scale_[2];
     return *this;
   }
-
+
   //transform
   template <typename scale_factor_type>
   inline anisotropic_scale_factor<scale_factor_type>& anisotropic_scale_factor<scale_factor_type>::transform(axis_transformation atr){
@@ -453,30 +450,30 @@
   }
 
   template <typename coordinate_type>
- inline transformation<coordinate_type>::transformation(const transformation<coordinate_type>& tr) :
+ inline transformation<coordinate_type>::transformation(const transformation<coordinate_type>& tr) :
     atr_(tr.atr_), p_(tr.p_) {;}
-
+
   template <typename coordinate_type>
   inline bool transformation<coordinate_type>::operator==(const transformation<coordinate_type>& tr) const {
     return atr_ == tr.atr_ && p_ == tr.p_;
   }
-
+
   template <typename coordinate_type>
   inline bool transformation<coordinate_type>::operator!=(const transformation<coordinate_type>& tr) const {
     return !(*this == tr);
   }
-
+
   template <typename coordinate_type>
   inline bool transformation<coordinate_type>::operator<(const transformation<coordinate_type>& tr) const {
- return atr_ < tr.atr_ || atr_ == tr.atr_ && p_ < tr.p_;
+ return atr_ < tr.atr_ || (atr_ == tr.atr_ && p_ < tr.p_);
   }
-
+
   template <typename coordinate_type>
   inline transformation<coordinate_type> transformation<coordinate_type>::operator+(const transformation<coordinate_type>& tr) const {
     transformation<coordinate_type> retval(*this);
     return retval+=tr;
   }
-
+
   template <typename coordinate_type>
   inline const transformation<coordinate_type>& transformation<coordinate_type>::operator+=(const transformation<coordinate_type>& tr){
     //apply the inverse transformation of this to the translation point of that
@@ -491,24 +488,24 @@
     atr_ += tr.atr_;
     return *this;
   }
-
+
   template <typename coordinate_type>
   inline void transformation<coordinate_type>::set_axis_transformation(const axis_transformation& atr) {
     atr_ = atr;
   }
-
+
   template <typename coordinate_type>
   template <typename point_type>
   inline void transformation<coordinate_type>::get_translation(point_type& p) const {
     assign(p, p_);
   }
-
+
   template <typename coordinate_type>
   template <typename point_type>
   inline void transformation<coordinate_type>::set_translation(const point_type& p) {
     assign(p_, p);
   }
-
+
   template <typename coordinate_type>
   inline void transformation<coordinate_type>::transform(coordinate_type& x, coordinate_type& y) const {
     //subtract each component of new origin point
@@ -525,7 +522,7 @@
     x -= p_.get(HORIZONTAL);
     atr_.transform(x,y,z);
   }
-
+
   // sets the axis_transform portion to its inverse
   // transforms the tranlastion portion by that inverse axis_transform
   // multiplies the translation portion by -1 to reverse it
@@ -540,7 +537,7 @@
     atr_.invert();
     return *this;
   }
-
+
   template <typename coordinate_type>
   inline transformation<coordinate_type> transformation<coordinate_type>::inverse() const {
     transformation<coordinate_type> retval(*this);
@@ -549,5 +546,3 @@
 }
 }
 #endif
-
-

Added: branches/release/boost/polygon/detail/voronoi_ctypes.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/detail/voronoi_ctypes.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,650 @@
+// Boost.Polygon library detail/voronoi_ctypes.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_DETAIL_VORONOI_CTYPES
+#define BOOST_POLYGON_DETAIL_VORONOI_CTYPES
+
+#include <boost/cstdint.hpp>
+
+#include <cmath>
+#include <cstring>
+#include <utility>
+#include <vector>
+
+namespace boost {
+namespace polygon {
+namespace detail {
+
+typedef boost::int32_t int32;
+typedef boost::int64_t int64;
+typedef boost::uint32_t uint32;
+typedef boost::uint64_t uint64;
+typedef double fpt64;
+
+// If two floating-point numbers in the same format are ordered (x < y),
+// then they are ordered the same way when their bits are reinterpreted as
+// sign-magnitude integers. Values are considered to be almost equal if
+// their integer bits reinterpretations differ in not more than maxUlps units.
+template <typename _fpt>
+struct ulp_comparison;
+
+template <>
+struct ulp_comparison<fpt64> {
+ enum Result {
+ LESS = -1,
+ EQUAL = 0,
+ MORE = 1
+ };
+
+ Result operator()(fpt64 a, fpt64 b, unsigned int maxUlps) const {
+ uint64 ll_a, ll_b;
+
+ // Reinterpret double bits as 64-bit signed integer.
+ std::memcpy(&ll_a, &a, sizeof(fpt64));
+ std::memcpy(&ll_b, &b, sizeof(fpt64));
+
+ // Positive 0.0 is integer zero. Negative 0.0 is 0x8000000000000000.
+ // Map negative zero to an integer zero representation - making it
+ // identical to positive zero - the smallest negative number is
+ // represented by negative one, and downwards from there.
+ if (ll_a < 0x8000000000000000ULL)
+ ll_a = 0x8000000000000000ULL - ll_a;
+ if (ll_b < 0x8000000000000000ULL)
+ ll_b = 0x8000000000000000ULL - ll_b;
+
+ // Compare 64-bit signed integer representations of input values.
+ // Difference in 1 Ulp is equivalent to a relative error of between
+ // 1/4,000,000,000,000,000 and 1/8,000,000,000,000,000.
+ if (ll_a > ll_b)
+ return (ll_a - ll_b <= maxUlps) ? EQUAL : LESS;
+ return (ll_b - ll_a <= maxUlps) ? EQUAL : MORE;
+ }
+};
+
+template <typename _fpt>
+struct extened_exponent_fpt_traits;
+
+template <>
+class extened_exponent_fpt_traits<fpt64> {
+ public:
+ typedef int exp_type;
+ static const int kMaxSignificantExpDif;
+};
+
+const int extened_exponent_fpt_traits<fpt64>::kMaxSignificantExpDif = 54;
+
+// Floating point type wrapper. Allows to extend exponent boundaries to the
+// integer type range. This class does not handle division by zero, subnormal
+// numbers or NaNs.
+template <typename _fpt, typename _traits = extened_exponent_fpt_traits<_fpt> >
+class extended_exponent_fpt {
+ public:
+ typedef _fpt fpt_type;
+ typedef typename _traits::exp_type exp_type;
+
+ explicit extended_exponent_fpt(fpt_type val) {
+ val_ = std::frexp(val, &exp_);
+ }
+
+ extended_exponent_fpt(fpt_type val, exp_type exp) {
+ val_ = std::frexp(val, &exp_);
+ exp_ += exp;
+ }
+
+ bool is_pos() const {
+ return val_ > 0;
+ }
+
+ bool is_neg() const {
+ return val_ < 0;
+ }
+
+ bool is_zero() const {
+ return val_ == 0;
+ }
+
+ extended_exponent_fpt operator-() const {
+ return extended_exponent_fpt(-val_, exp_);
+ }
+
+ extended_exponent_fpt operator+(const extended_exponent_fpt& that) const {
+ if (this->val_ == 0.0 ||
+ that.exp_ > this->exp_ + _traits::kMaxSignificantExpDif) {
+ return that;
+ }
+ if (that.val_ == 0.0 ||
+ this->exp_ > that.exp_ + _traits::kMaxSignificantExpDif) {
+ return *this;
+ }
+ if (this->exp_ >= that.exp_) {
+ exp_type exp_dif = this->exp_ - that.exp_;
+ fpt_type val = std::ldexp(this->val_, exp_dif) + that.val_;
+ return extended_exponent_fpt(val, that.exp_);
+ } else {
+ exp_type exp_dif = that.exp_ - this->exp_;
+ fpt_type val = std::ldexp(that.val_, exp_dif) + this->val_;
+ return extended_exponent_fpt(val, this->exp_);
+ }
+ }
+
+ extended_exponent_fpt operator-(const extended_exponent_fpt& that) const {
+ if (this->val_ == 0.0 ||
+ that.exp_ > this->exp_ + _traits::kMaxSignificantExpDif) {
+ return extended_exponent_fpt(-that.val_, that.exp_);
+ }
+ if (that.val_ == 0.0 ||
+ this->exp_ > that.exp_ + _traits::kMaxSignificantExpDif) {
+ return *this;
+ }
+ if (this->exp_ >= that.exp_) {
+ exp_type exp_dif = this->exp_ - that.exp_;
+ fpt_type val = std::ldexp(this->val_, exp_dif) - that.val_;
+ return extended_exponent_fpt(val, that.exp_);
+ } else {
+ exp_type exp_dif = that.exp_ - this->exp_;
+ fpt_type val = std::ldexp(-that.val_, exp_dif) + this->val_;
+ return extended_exponent_fpt(val, this->exp_);
+ }
+ }
+
+ extended_exponent_fpt operator*(const extended_exponent_fpt& that) const {
+ fpt_type val = this->val_ * that.val_;
+ exp_type exp = this->exp_ + that.exp_;
+ return extended_exponent_fpt(val, exp);
+ }
+
+ extended_exponent_fpt operator/(const extended_exponent_fpt& that) const {
+ fpt_type val = this->val_ / that.val_;
+ exp_type exp = this->exp_ - that.exp_;
+ return extended_exponent_fpt(val, exp);
+ }
+
+ extended_exponent_fpt& operator+=(const extended_exponent_fpt& that) {
+ return *this = *this + that;
+ }
+
+ extended_exponent_fpt& operator-=(const extended_exponent_fpt& that) {
+ return *this = *this - that;
+ }
+
+ extended_exponent_fpt& operator*=(const extended_exponent_fpt& that) {
+ return *this = *this * that;
+ }
+
+ extended_exponent_fpt& operator/=(const extended_exponent_fpt& that) {
+ return *this = *this / that;
+ }
+
+ extended_exponent_fpt sqrt() const {
+ fpt_type val = val_;
+ exp_type exp = exp_;
+ if (exp & 1) {
+ val *= 2.0;
+ --exp;
+ }
+ return extended_exponent_fpt(std::sqrt(val), exp >> 1);
+ }
+
+ fpt_type d() const {
+ return std::ldexp(val_, exp_);
+ }
+
+ private:
+ fpt_type val_;
+ exp_type exp_;
+};
+typedef extended_exponent_fpt<double> efpt64;
+
+template <typename _fpt>
+extended_exponent_fpt<_fpt> get_sqrt(const extended_exponent_fpt<_fpt>& that) {
+ return that.sqrt();
+}
+
+template <typename _fpt>
+bool is_pos(const extended_exponent_fpt<_fpt>& that) {
+ return that.is_pos();
+}
+
+template <typename _fpt>
+bool is_neg(const extended_exponent_fpt<_fpt>& that) {
+ return that.is_neg();
+}
+
+template <typename _fpt>
+bool is_zero(const extended_exponent_fpt<_fpt>& that) {
+ return that.is_zero();
+}
+
+// Very efficient stack allocated big integer class.
+// Supports next set of arithmetic operations: +, -, *.
+template<std::size_t N>
+class extended_int {
+ public:
+ static const uint64 kUInt64LowMask;
+ static const uint64 kUInt64HighMask;
+
+ extended_int() {}
+
+ extended_int(int32 that) {
+ if (that > 0) {
+ this->chunks_[0] = that;
+ this->count_ = 1;
+ } else if (that < 0) {
+ this->chunks_[0] = -that;
+ this->count_ = -1;
+ } else {
+ this->count_ = 0;
+ }
+ }
+
+ extended_int(int64 that) {
+ if (that > 0) {
+ this->chunks_[0] = static_cast<uint32>(that & kUInt64LowMask);
+ this->chunks_[1] = that >> 32;
+ this->count_ = this->chunks_[1] ? 2 : 1;
+ } else if (that < 0) {
+ that = -that;
+ this->chunks_[0] = static_cast<uint32>(that & kUInt64LowMask);
+ this->chunks_[1] = that >> 32;
+ this->count_ = this->chunks_[1] ? -2 : -1;
+ } else {
+ this->count_ = 0;
+ }
+ }
+
+ extended_int(const std::vector<uint32>& chunks, bool plus = true) {
+ this->count_ = static_cast<int32>((std::min)(N, chunks.size()));
+ for (int i = 0; i < this->count_; ++i)
+ this->chunks_[i] = chunks[chunks.size() - i - 1];
+ if (!plus)
+ this->count_ = -this->count_;
+ }
+
+ template<std::size_t M>
+ extended_int(const extended_int<M>& that) {
+ this->count_ = that.count();
+ std::memcpy(this->chunks_, that.chunks(), that.size() * sizeof(uint32));
+ }
+
+ extended_int& operator=(int32 that) {
+ if (that > 0) {
+ this->chunks_[0] = that;
+ this->count_ = 1;
+ } else if (that < 0) {
+ this->chunks_[0] = -that;
+ this->count_ = -1;
+ } else {
+ this->count_ = 0;
+ }
+ return *this;
+ }
+
+ extended_int& operator=(int64 that) {
+ if (that > 0) {
+ this->chunks_[0] = static_cast<uint32>(that & kUInt64LowMask);
+ this->chunks_[1] = that >> 32;
+ this->count_ = this->chunks_[1] ? 2 : 1;
+ } else if (that < 0) {
+ that = -that;
+ this->chunks_[0] = static_cast<uint32>(that & kUInt64LowMask);
+ this->chunks_[1] = that >> 32;
+ this->count_ = this->chunks_[1] ? -2 : -1;
+ } else {
+ this->count_ = 0;
+ }
+ return *this;
+ }
+
+ template<std::size_t M>
+ extended_int& operator=(const extended_int<M>& that) {
+ this->count_ = that.count();
+ std::memcpy(this->chunks_, that.chunks(), that.size() * sizeof(uint32));
+ return *this;
+ }
+
+ bool is_pos() const {
+ return this->count_ > 0;
+ }
+
+ bool is_neg() const {
+ return this->count_ < 0;
+ }
+
+ bool is_zero() const {
+ return this->count_ == 0;
+ }
+
+ bool operator==(const extended_int& that) const {
+ if (this->count_ != that.count())
+ return false;
+ for (std::size_t i = 0; i < this->size(); ++i)
+ if (this->chunks_[i] != that.chunks()[i])
+ return false;
+ return true;
+ }
+
+ bool operator!=(const extended_int& that) const {
+ return !(*this == that);
+ }
+
+ bool operator<(const extended_int& that) const {
+ if (this->count_ != that.count())
+ return this->count_ < that.count();
+ std::size_t i = this->size();
+ if (!i)
+ return false;
+ do {
+ --i;
+ if (this->chunks_[i] != that.chunks()[i])
+ return (this->chunks_[i] < that.chunks()[i]) ^ (this->count_ < 0);
+ } while (i);
+ return false;
+ }
+
+ bool operator>(const extended_int& that) const {
+ return that < *this;
+ }
+
+ bool operator<=(const extended_int& that) const {
+ return !(that < *this);
+ }
+
+ bool operator>=(const extended_int& that) const {
+ return !(*this < that);
+ }
+
+ extended_int operator-() const {
+ extended_int ret_val = *this;
+ ret_val.neg();
+ return ret_val;
+ }
+
+ void neg() {
+ this->count_ = -this->count_;
+ }
+
+ extended_int operator+(const extended_int& that) const {
+ extended_int ret_val;
+ ret_val.add(*this, that);
+ return ret_val;
+ }
+
+ void add(const extended_int& e1, const extended_int& e2) {
+ if (!e1.count()) {
+ *this = e2;
+ return;
+ }
+ if (!e2.count()) {
+ *this = e1;
+ return;
+ }
+ if ((e1.count() > 0) ^ (e2.count() > 0)) {
+ dif(e1.chunks(), e1.size(), e2.chunks(), e2.size());
+ } else {
+ add(e1.chunks(), e1.size(), e2.chunks(), e2.size());
+ }
+ if (e1.count() < 0)
+ this->count_ = -this->count_;
+ }
+
+ extended_int operator-(const extended_int& that) const {
+ extended_int ret_val;
+ ret_val.dif(*this, that);
+ return ret_val;
+ }
+
+ void dif(const extended_int& e1, const extended_int& e2) {
+ if (!e1.count()) {
+ *this = e2;
+ this->count_ = -this->count_;
+ return;
+ }
+ if (!e2.count()) {
+ *this = e1;
+ return;
+ }
+ if ((e1.count() > 0) ^ (e2.count() > 0)) {
+ add(e1.chunks(), e1.size(), e2.chunks(), e2.size());
+ } else {
+ dif(e1.chunks(), e1.size(), e2.chunks(), e2.size());
+ }
+ if (e1.count() < 0)
+ this->count_ = -this->count_;
+ }
+
+ extended_int operator*(int32 that) const {
+ extended_int temp(that);
+ return (*this) * temp;
+ }
+
+ extended_int operator*(int64 that) const {
+ extended_int temp(that);
+ return (*this) * temp;
+ }
+
+ extended_int operator*(const extended_int& that) const {
+ extended_int ret_val;
+ ret_val.mul(*this, that);
+ return ret_val;
+ }
+
+ void mul(const extended_int& e1, const extended_int& e2) {
+ if (!e1.count() || !e2.count()) {
+ this->count_ = 0;
+ return;
+ }
+ mul(e1.chunks(), e1.size(), e2.chunks(), e2.size());
+ if ((e1.count() > 0) ^ (e2.count() > 0))
+ this->count_ = -this->count_;
+ }
+
+ const uint32* chunks() const {
+ return chunks_;
+ }
+
+ int32 count() const {
+ return count_;
+ }
+
+ std::size_t size() const {
+ return (std::abs)(count_);
+ }
+
+ std::pair<fpt64, int> p() const {
+ std::pair<fpt64, int> ret_val(0, 0);
+ std::size_t sz = this->size();
+ if (!sz) {
+ return ret_val;
+ } else {
+ if (sz == 1) {
+ ret_val.first = static_cast<fpt64>(this->chunks_[0]);
+ } else if (sz == 2) {
+ ret_val.first = static_cast<fpt64>(this->chunks_[1]) *
+ static_cast<fpt64>(0x100000000LL) +
+ static_cast<fpt64>(this->chunks_[0]);
+ } else {
+ for (std::size_t i = 1; i <= 3; ++i) {
+ ret_val.first *= static_cast<fpt64>(0x100000000LL);
+ ret_val.first += static_cast<fpt64>(this->chunks_[sz - i]);
+ }
+ ret_val.second = (sz - 3) << 5;
+ }
+ }
+ if (this->count_ < 0)
+ ret_val.first = -ret_val.first;
+ return ret_val;
+ }
+
+ fpt64 d() const {
+ std::pair<fpt64, int> p = this->p();
+ return std::ldexp(p.first, p.second);
+ }
+
+ private:
+ void add(const uint32* c1, std::size_t sz1,
+ const uint32* c2, std::size_t sz2) {
+ if (sz1 < sz2) {
+ add(c2, sz2, c1, sz1);
+ return;
+ }
+ this->count_ = sz1;
+ uint64 temp = 0;
+ for (std::size_t i = 0; i < sz2; ++i) {
+ temp += static_cast<uint64>(c1[i]) + static_cast<uint64>(c2[i]);
+ this->chunks_[i] = static_cast<uint32>(temp & kUInt64LowMask);
+ temp >>= 32;
+ }
+ for (std::size_t i = sz2; i < sz1; ++i) {
+ temp += static_cast<uint64>(c1[i]);
+ this->chunks_[i] = static_cast<uint32>(temp & kUInt64LowMask);
+ temp >>= 32;
+ }
+ if (temp && (this->count_ != N)) {
+ this->chunks_[this->count_] = static_cast<uint32>(temp & kUInt64LowMask);
+ ++this->count_;
+ }
+ }
+
+ void dif(const uint32* c1, std::size_t sz1,
+ const uint32* c2, std::size_t sz2,
+ bool rec = false) {
+ if (sz1 < sz2) {
+ dif(c2, sz2, c1, sz1, true);
+ this->count_ = -this->count_;
+ return;
+ } else if ((sz1 == sz2) && !rec) {
+ do {
+ --sz1;
+ if (c1[sz1] < c2[sz1]) {
+ ++sz1;
+ dif(c2, sz1, c1, sz1, true);
+ this->count_ = -this->count_;
+ return;
+ } else if (c1[sz1] > c2[sz1]) {
+ ++sz1;
+ break;
+ }
+ } while (sz1);
+ if (!sz1) {
+ this->count_ = 0;
+ return;
+ }
+ sz2 = sz1;
+ }
+ this->count_ = sz1-1;
+ bool flag = false;
+ for (std::size_t i = 0; i < sz2; ++i) {
+ this->chunks_[i] = c1[i] - c2[i] - (flag?1:0);
+ flag = (c1[i] < c2[i]) || ((c1[i] == c2[i]) && flag);
+ }
+ for (std::size_t i = sz2; i < sz1; ++i) {
+ this->chunks_[i] = c1[i] - (flag?1:0);
+ flag = !c1[i] && flag;
+ }
+ if (this->chunks_[this->count_])
+ ++this->count_;
+ }
+
+ void mul(const uint32* c1, std::size_t sz1,
+ const uint32* c2, std::size_t sz2) {
+ uint64 cur = 0, nxt, tmp;
+ this->count_ = static_cast<int32>((std::min)(N, sz1 + sz2 - 1));
+ for (std::size_t shift = 0; shift < static_cast<std::size_t>(this->count_);
+ ++shift) {
+ nxt = 0;
+ for (std::size_t first = 0; first <= shift; ++first) {
+ if (first >= sz1)
+ break;
+ std::size_t second = shift - first;
+ if (second >= sz2)
+ continue;
+ tmp = static_cast<uint64>(c1[first]) * static_cast<uint64>(c2[second]);
+ cur += tmp & kUInt64LowMask;
+ nxt += tmp >> 32;
+ }
+ this->chunks_[shift] = static_cast<uint32>(cur & kUInt64LowMask);
+ cur = nxt + (cur >> 32);
+ }
+ if (cur && (this->count_ != N)) {
+ this->chunks_[this->count_] = static_cast<uint32>(cur & kUInt64LowMask);
+ ++this->count_;
+ }
+ }
+
+ uint32 chunks_[N];
+ int32 count_;
+};
+
+template <std::size_t N>
+const uint64 extended_int<N>::kUInt64LowMask = 0x00000000ffffffffULL;
+template <std::size_t N>
+const uint64 extended_int<N>::kUInt64HighMask = 0xffffffff00000000ULL;
+
+template <std::size_t N>
+bool is_pos(const extended_int<N>& that) {
+ return that.count() > 0;
+}
+
+template <std::size_t N>
+bool is_neg(const extended_int<N>& that) {
+ return that.count() < 0;
+}
+
+template <std::size_t N>
+bool is_zero(const extended_int<N>& that) {
+ return !that.count();
+}
+
+struct type_converter_fpt {
+ template <typename T>
+ fpt64 operator()(const T& that) const {
+ return static_cast<fpt64>(that);
+ }
+
+ template <std::size_t N>
+ fpt64 operator()(const extended_int<N>& that) const {
+ return that.d();
+ }
+
+ fpt64 operator()(const extended_exponent_fpt<fpt64>& that) const {
+ return that.d();
+ }
+};
+
+struct type_converter_efpt {
+ template <std::size_t N>
+ extended_exponent_fpt<fpt64> operator()(const extended_int<N>& that) const {
+ std::pair<fpt64, int> p = that.p();
+ return extended_exponent_fpt<fpt64>(p.first, p.second);
+ }
+};
+
+// Voronoi coordinate type traits make it possible to extend algorithm
+// input coordinate range to any user provided integer type and algorithm
+// output coordinate range to any ieee-754 like floating point type.
+template <typename T>
+struct voronoi_ctype_traits;
+
+template <>
+struct voronoi_ctype_traits<int32> {
+ typedef int32 int_type;
+ typedef int64 int_x2_type;
+ typedef uint64 uint_x2_type;
+ typedef extended_int<64> big_int_type;
+ typedef fpt64 fpt_type;
+ typedef extended_exponent_fpt<fpt_type> efpt_type;
+ typedef ulp_comparison<fpt_type> ulp_cmp_type;
+ typedef type_converter_fpt to_fpt_converter_type;
+ typedef type_converter_efpt to_efpt_converter_type;
+};
+} // detail
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_DETAIL_VORONOI_CTYPES

Added: branches/release/boost/polygon/detail/voronoi_predicates.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/detail/voronoi_predicates.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,1520 @@
+// Boost.Polygon library detail/voronoi_predicates.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_DETAIL_VORONOI_PREDICATES
+#define BOOST_POLYGON_DETAIL_VORONOI_PREDICATES
+
+#include <utility>
+
+#include "voronoi_robust_fpt.hpp"
+
+namespace boost {
+namespace polygon {
+namespace detail {
+
+// Predicate utilities. Operates with the coordinate types that could
+// be converted to the 32-bit signed integer without precision loss.
+template <typename CTYPE_TRAITS>
+class voronoi_predicates {
+ public:
+ typedef typename CTYPE_TRAITS::int_type int_type;
+ typedef typename CTYPE_TRAITS::int_x2_type int_x2_type;
+ typedef typename CTYPE_TRAITS::uint_x2_type uint_x2_type;
+ typedef typename CTYPE_TRAITS::big_int_type big_int_type;
+ typedef typename CTYPE_TRAITS::fpt_type fpt_type;
+ typedef typename CTYPE_TRAITS::efpt_type efpt_type;
+ typedef typename CTYPE_TRAITS::ulp_cmp_type ulp_cmp_type;
+ typedef typename CTYPE_TRAITS::to_fpt_converter_type to_fpt_converter;
+ typedef typename CTYPE_TRAITS::to_efpt_converter_type to_efpt_converter;
+
+ enum {
+ ULPS = 64,
+ ULPSx2 = 128
+ };
+
+ template <typename Point>
+ static bool is_vertical(const Point& point1, const Point& point2) {
+ return point1.x() == point2.x();
+ }
+
+ template <typename Site>
+ static bool is_vertical(const Site& site) {
+ return is_vertical(site.point0(), site.point1());
+ }
+
+ // Compute robust cross_product: a1 * b2 - b1 * a2.
+ // It was mathematically proven that the result is correct
+ // with epsilon relative error equal to 1EPS.
+ static fpt_type robust_cross_product(int_x2_type a1_,
+ int_x2_type b1_,
+ int_x2_type a2_,
+ int_x2_type b2_) {
+ static to_fpt_converter to_fpt;
+ uint_x2_type a1 = static_cast<uint_x2_type>(is_neg(a1_) ? -a1_ : a1_);
+ uint_x2_type b1 = static_cast<uint_x2_type>(is_neg(b1_) ? -b1_ : b1_);
+ uint_x2_type a2 = static_cast<uint_x2_type>(is_neg(a2_) ? -a2_ : a2_);
+ uint_x2_type b2 = static_cast<uint_x2_type>(is_neg(b2_) ? -b2_ : b2_);
+
+ uint_x2_type l = a1 * b2;
+ uint_x2_type r = b1 * a2;
+
+ if (is_neg(a1_) ^ is_neg(b2_)) {
+ if (is_neg(a2_) ^ is_neg(b1_))
+ return (l > r) ? -to_fpt(l - r) : to_fpt(r - l);
+ else
+ return -to_fpt(l + r);
+ } else {
+ if (is_neg(a2_) ^ is_neg(b1_))
+ return to_fpt(l + r);
+ else
+ return (l < r) ? -to_fpt(r - l) : to_fpt(l - r);
+ }
+ }
+
+ typedef struct orientation_test {
+ public:
+ // Represents orientation test result.
+ enum Orientation {
+ RIGHT = -1,
+ COLLINEAR = 0,
+ LEFT = 1
+ };
+
+ // Value is a determinant of two vectors (e.g. x1 * y2 - x2 * y1).
+ // Return orientation based on the sign of the determinant.
+ template <typename T>
+ static Orientation eval(T value) {
+ if (is_zero(value)) return COLLINEAR;
+ return (is_neg(value)) ? RIGHT : LEFT;
+ }
+
+ static Orientation eval(int_x2_type dif_x1_,
+ int_x2_type dif_y1_,
+ int_x2_type dif_x2_,
+ int_x2_type dif_y2_) {
+ return eval(robust_cross_product(dif_x1_, dif_y1_, dif_x2_, dif_y2_));
+ }
+
+ template <typename Point>
+ static Orientation eval(const Point& point1,
+ const Point& point2,
+ const Point& point3) {
+ int_x2_type dx1 = static_cast<int_x2_type>(point1.x()) -
+ static_cast<int_x2_type>(point2.x());
+ int_x2_type dx2 = static_cast<int_x2_type>(point2.x()) -
+ static_cast<int_x2_type>(point3.x());
+ int_x2_type dy1 = static_cast<int_x2_type>(point1.y()) -
+ static_cast<int_x2_type>(point2.y());
+ int_x2_type dy2 = static_cast<int_x2_type>(point2.y()) -
+ static_cast<int_x2_type>(point3.y());
+ return eval(robust_cross_product(dx1, dy1, dx2, dy2));
+ }
+ } ot;
+
+ template <typename Point>
+ class point_comparison_predicate {
+ public:
+ typedef Point point_type;
+
+ bool operator()(const point_type& lhs, const point_type& rhs) const {
+ if (lhs.x() == rhs.x())
+ return lhs.y() < rhs.y();
+ return lhs.x() < rhs.x();
+ }
+ };
+
+ template <typename Site, typename Circle>
+ class event_comparison_predicate {
+ public:
+ typedef Site site_type;
+ typedef Circle circle_type;
+
+ bool operator()(const site_type& lhs, const site_type& rhs) const {
+ if (lhs.x0() != rhs.x0())
+ return lhs.x0() < rhs.x0();
+ if (!lhs.is_segment()) {
+ if (!rhs.is_segment())
+ return lhs.y0() < rhs.y0();
+ if (is_vertical(rhs))
+ return lhs.y0() <= rhs.y0();
+ return true;
+ } else {
+ if (is_vertical(rhs)) {
+ if (is_vertical(lhs))
+ return lhs.y0() < rhs.y0();
+ return false;
+ }
+ if (is_vertical(lhs))
+ return true;
+ if (lhs.y0() != rhs.y0())
+ return lhs.y0() < rhs.y0();
+ return ot::eval(lhs.point1(), lhs.point0(), rhs.point1()) == ot::LEFT;
+ }
+ }
+
+ bool operator()(const site_type& lhs, const circle_type& rhs) const {
+ typename ulp_cmp_type::Result xCmp =
+ ulp_cmp(to_fpt(lhs.x()), to_fpt(rhs.lower_x()), ULPS);
+ if (xCmp != ulp_cmp_type::EQUAL)
+ return xCmp == ulp_cmp_type::LESS;
+ typename ulp_cmp_type::Result yCmp =
+ ulp_cmp(to_fpt(lhs.y()), to_fpt(rhs.lower_y()), ULPS);
+ return yCmp == ulp_cmp_type::LESS;
+ }
+
+ bool operator()(const circle_type& lhs, const site_type& rhs) const {
+ typename ulp_cmp_type::Result xCmp =
+ ulp_cmp(to_fpt(lhs.lower_x()), to_fpt(rhs.x()), ULPS);
+ if (xCmp != ulp_cmp_type::EQUAL)
+ return xCmp == ulp_cmp_type::LESS;
+ typename ulp_cmp_type::Result yCmp =
+ ulp_cmp(to_fpt(lhs.lower_y()), to_fpt(rhs.y()), ULPS);
+ return yCmp == ulp_cmp_type::LESS;
+ }
+
+ bool operator()(const circle_type& lhs, const circle_type& rhs) const {
+ typename ulp_cmp_type::Result xCmp =
+ ulp_cmp(to_fpt(lhs.lower_x()), to_fpt(rhs.lower_x()), ULPSx2);
+ if (xCmp != ulp_cmp_type::EQUAL)
+ return xCmp == ulp_cmp_type::LESS;
+ typename ulp_cmp_type::Result yCmp =
+ ulp_cmp(to_fpt(lhs.lower_y()), to_fpt(rhs.lower_y()), ULPSx2);
+ return yCmp == ulp_cmp_type::LESS;
+ }
+
+ private:
+ ulp_cmp_type ulp_cmp;
+ to_fpt_converter to_fpt;
+ };
+
+ template <typename Site>
+ class distance_predicate {
+ public:
+ typedef Site site_type;
+
+ // Returns true if a horizontal line going through a new site intersects
+ // right arc at first, else returns false. If horizontal line goes
+ // through intersection point of the given two arcs returns false also.
+ bool operator()(const site_type& left_site,
+ const site_type& right_site,
+ const site_type& new_site) const {
+ if (!left_site.is_segment()) {
+ if (!right_site.is_segment()) {
+ return pp(left_site, right_site, new_site);
+ } else {
+ return ps(left_site, right_site, new_site, false);
+ }
+ } else {
+ if (!right_site.is_segment()) {
+ return ps(right_site, left_site, new_site, true);
+ } else {
+ return ss(left_site, right_site, new_site);
+ }
+ }
+ }
+
+ private:
+ // Represents the result of the epsilon robust predicate. If the
+ // result is undefined some further processing is usually required.
+ enum kPredicateResult {
+ LESS = -1,
+ UNDEFINED = 0,
+ MORE = 1
+ };
+
+ typedef typename Site::point_type point_type;
+
+ // Robust predicate, avoids using high-precision libraries.
+ // Returns true if a horizontal line going through the new point site
+ // intersects right arc at first, else returns false. If horizontal line
+ // goes through intersection point of the given two arcs returns false.
+ bool pp(const site_type& left_site,
+ const site_type& right_site,
+ const site_type& new_site) const {
+ const point_type& left_point = left_site.point0();
+ const point_type& right_point = right_site.point0();
+ const point_type& new_point = new_site.point0();
+ if (left_point.x() > right_point.x()) {
+ if (new_point.y() <= left_point.y())
+ return false;
+ } else if (left_point.x() < right_point.x()) {
+ if (new_point.y() >= right_point.y())
+ return true;
+ } else {
+ return static_cast<int_x2_type>(left_point.y()) +
+ static_cast<int_x2_type>(right_point.y()) <
+ static_cast<int_x2_type>(new_point.y()) * 2;
+ }
+
+ fpt_type dist1 = find_distance_to_point_arc(left_site, new_point);
+ fpt_type dist2 = find_distance_to_point_arc(right_site, new_point);
+
+ // The undefined ulp range is equal to 3EPS + 3EPS <= 6ULP.
+ return dist1 < dist2;
+ }
+
+ bool ps(const site_type& left_site, const site_type& right_site,
+ const site_type& new_site, bool reverse_order) const {
+ kPredicateResult fast_res = fast_ps(
+ left_site, right_site, new_site, reverse_order);
+ if (fast_res != UNDEFINED)
+ return (fast_res == LESS);
+
+ fpt_type dist1 = find_distance_to_point_arc(
+ left_site, new_site.point0());
+ fpt_type dist2 = find_distance_to_segment_arc(
+ right_site, new_site.point0());
+
+ // The undefined ulp range is equal to 3EPS + 7EPS <= 10ULP.
+ return reverse_order ^ (dist1 < dist2);
+ }
+
+ bool ss(const site_type& left_site,
+ const site_type& right_site,
+ const site_type& new_site) const {
+ // Handle temporary segment sites.
+ if (left_site.point0() == right_site.point0() &&
+ left_site.point1() == right_site.point1()) {
+ return ot::eval(left_site.point0(),
+ left_site.point1(),
+ new_site.point0()) == ot::LEFT;
+ }
+
+ fpt_type dist1 = find_distance_to_segment_arc(
+ left_site, new_site.point0());
+ fpt_type dist2 = find_distance_to_segment_arc(
+ right_site, new_site.point0());
+
+ // The undefined ulp range is equal to 7EPS + 7EPS <= 14ULP.
+ return dist1 < dist2;
+ }
+
+ fpt_type find_distance_to_point_arc(
+ const site_type& site, const point_type& point) const {
+ fpt_type dx = to_fpt(site.x()) - to_fpt(point.x());
+ fpt_type dy = to_fpt(site.y()) - to_fpt(point.y());
+ // The relative error is at most 3EPS.
+ return (dx * dx + dy * dy) / (to_fpt(2.0) * dx);
+ }
+
+ fpt_type find_distance_to_segment_arc(
+ const site_type& site, const point_type& point) const {
+ if (is_vertical(site)) {
+ return (to_fpt(site.x()) - to_fpt(point.x())) * to_fpt(0.5);
+ } else {
+ const point_type& segment0 = site.point0(true);
+ const point_type& segment1 = site.point1(true);
+ fpt_type a1 = to_fpt(segment1.x()) - to_fpt(segment0.x());
+ fpt_type b1 = to_fpt(segment1.y()) - to_fpt(segment0.y());
+ fpt_type k = get_sqrt(a1 * a1 + b1 * b1);
+ // Avoid subtraction while computing k.
+ if (!is_neg(b1)) {
+ k = to_fpt(1.0) / (b1 + k);
+ } else {
+ k = (k - b1) / (a1 * a1);
+ }
+ // The relative error is at most 7EPS.
+ return k * robust_cross_product(
+ static_cast<int_x2_type>(segment1.x()) -
+ static_cast<int_x2_type>(segment0.x()),
+ static_cast<int_x2_type>(segment1.y()) -
+ static_cast<int_x2_type>(segment0.y()),
+ static_cast<int_x2_type>(point.x()) -
+ static_cast<int_x2_type>(segment0.x()),
+ static_cast<int_x2_type>(point.y()) -
+ static_cast<int_x2_type>(segment0.y()));
+ }
+ }
+
+ kPredicateResult fast_ps(
+ const site_type& left_site, const site_type& right_site,
+ const site_type& new_site, bool reverse_order) const {
+ const point_type& site_point = left_site.point0();
+ const point_type& segment_start = right_site.point0(true);
+ const point_type& segment_end = right_site.point1(true);
+ const point_type& new_point = new_site.point0();
+
+ if (ot::eval(segment_start, segment_end, new_point) != ot::RIGHT)
+ return (!right_site.is_inverse()) ? LESS : MORE;
+
+ fpt_type dif_x = to_fpt(new_point.x()) - to_fpt(site_point.x());
+ fpt_type dif_y = to_fpt(new_point.y()) - to_fpt(site_point.y());
+ fpt_type a = to_fpt(segment_end.x()) - to_fpt(segment_start.x());
+ fpt_type b = to_fpt(segment_end.y()) - to_fpt(segment_start.y());
+
+ if (is_vertical(right_site)) {
+ if (new_point.y() < site_point.y() && !reverse_order)
+ return MORE;
+ else if (new_point.y() > site_point.y() && reverse_order)
+ return LESS;
+ return UNDEFINED;
+ } else {
+ typename ot::Orientation orientation = ot::eval(
+ static_cast<int_x2_type>(segment_end.x()) -
+ static_cast<int_x2_type>(segment_start.x()),
+ static_cast<int_x2_type>(segment_end.y()) -
+ static_cast<int_x2_type>(segment_start.y()),
+ static_cast<int_x2_type>(new_point.x()) -
+ static_cast<int_x2_type>(site_point.x()),
+ static_cast<int_x2_type>(new_point.y()) -
+ static_cast<int_x2_type>(site_point.y()));
+ if (orientation == ot::LEFT) {
+ if (!right_site.is_inverse())
+ return reverse_order ? LESS : UNDEFINED;
+ return reverse_order ? UNDEFINED : MORE;
+ }
+ }
+
+ fpt_type fast_left_expr = a * (dif_y + dif_x) * (dif_y - dif_x);
+ fpt_type fast_right_expr = (to_fpt(2.0) * b) * dif_x * dif_y;
+ typename ulp_cmp_type::Result expr_cmp =
+ ulp_cmp(fast_left_expr, fast_right_expr, 4);
+ if (expr_cmp != ulp_cmp_type::EQUAL) {
+ if ((expr_cmp == ulp_cmp_type::MORE) ^ reverse_order)
+ return reverse_order ? LESS : MORE;
+ return UNDEFINED;
+ }
+ return UNDEFINED;
+ }
+
+ private:
+ ulp_cmp_type ulp_cmp;
+ to_fpt_converter to_fpt;
+ };
+
+ template <typename Node>
+ class node_comparison_predicate {
+ public:
+ typedef Node node_type;
+ typedef typename Node::site_type site_type;
+ typedef typename site_type::coordinate_type coordinate_type;
+ typedef distance_predicate<site_type> distance_predicate_type;
+
+ // Compares nodes in the balanced binary search tree. Nodes are
+ // compared based on the y coordinates of the arcs intersection points.
+ // Nodes with less y coordinate of the intersection point go first.
+ // Comparison is only called during the new site events processing.
+ // That's why one of the nodes will always lie on the sweepline and may
+ // be represented as a straight horizontal line.
+ bool operator() (const node_type& node1,
+ const node_type& node2) const {
+ // Get x coordinate of the rightmost site from both nodes.
+ const site_type& site1 = get_comparison_site(node1);
+ const site_type& site2 = get_comparison_site(node2);
+
+ if (site1.x() < site2.x()) {
+ // The second node contains a new site.
+ return predicate_(node1.left_site(), node1.right_site(), site2);
+ } else if (site1.x() > site2.x()) {
+ // The first node contains a new site.
+ return !predicate_(node2.left_site(), node2.right_site(), site1);
+ } else {
+ // This checks were evaluated experimentally.
+ if (site1.sorted_index() == site2.sorted_index()) {
+ // Both nodes are new (inserted during same site event processing).
+ return get_comparison_y(node1) < get_comparison_y(node2);
+ } else if (site1.sorted_index() < site2.sorted_index()) {
+ std::pair<coordinate_type, int> y1 = get_comparison_y(node1, false);
+ std::pair<coordinate_type, int> y2 = get_comparison_y(node2, true);
+ if (y1.first != y2.first) return y1.first < y2.first;
+ return (!site1.is_segment()) ? (y1.second < 0) : false;
+ } else {
+ std::pair<coordinate_type, int> y1 = get_comparison_y(node1, true);
+ std::pair<coordinate_type, int> y2 = get_comparison_y(node2, false);
+ if (y1.first != y2.first) return y1.first < y2.first;
+ return (!site2.is_segment()) ? (y2.second > 0) : true;
+ }
+ }
+ }
+
+ private:
+ // Get the newer site.
+ const site_type& get_comparison_site(const node_type& node) const {
+ if (node.left_site().sorted_index() > node.right_site().sorted_index()) {
+ return node.left_site();
+ }
+ return node.right_site();
+ }
+
+ // Get comparison pair: y coordinate and direction of the newer site.
+ std::pair<coordinate_type, int> get_comparison_y(
+ const node_type& node, bool is_new_node = true) const {
+ if (node.left_site().sorted_index() ==
+ node.right_site().sorted_index()) {
+ return std::make_pair(node.left_site().y(), 0);
+ }
+ if (node.left_site().sorted_index() > node.right_site().sorted_index()) {
+ if (!is_new_node &&
+ node.left_site().is_segment() &&
+ is_vertical(node.left_site())) {
+ return std::make_pair(node.left_site().y1(), 1);
+ }
+ return std::make_pair(node.left_site().y(), 1);
+ }
+ return std::make_pair(node.right_site().y(), -1);
+ }
+
+ distance_predicate_type predicate_;
+ };
+
+ template <typename Site>
+ class circle_existence_predicate {
+ public:
+ typedef typename Site::point_type point_type;
+ typedef Site site_type;
+
+ bool ppp(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3) const {
+ return ot::eval(site1.point0(), site2.point0(), site3.point0()) ==
+ ot::RIGHT;
+ }
+
+ bool pps(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ int segment_index) const {
+ if (segment_index != 2) {
+ typename ot::Orientation orient1 = ot::eval(site1.point0(),
+ site2.point0(), site3.point0(true));
+ typename ot::Orientation orient2 = ot::eval(site1.point0(),
+ site2.point0(), site3.point1(true));
+ if (segment_index == 1 && site1.x0() >= site2.x0()) {
+ if (orient1 != ot::RIGHT)
+ return false;
+ } else if (segment_index == 3 && site2.x0() >= site1.x0()) {
+ if (orient2 != ot::RIGHT)
+ return false;
+ } else if (orient1 != ot::RIGHT && orient2 != ot::RIGHT) {
+ return false;
+ }
+ } else {
+ if (site3.point0(true) == site1.point0() &&
+ site3.point1(true) == site2.point0())
+ return false;
+ }
+ return true;
+ }
+
+ bool pss(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ int point_index) const {
+ if (site2.point0() == site3.point0() &&
+ site2.point1() == site3.point1()) {
+ return false;
+ }
+ if (point_index == 2) {
+ if (!site2.is_inverse() && site3.is_inverse())
+ return false;
+ if (site2.is_inverse() == site3.is_inverse() &&
+ ot::eval(site2.point0(true),
+ site1.point0(),
+ site3.point1(true)) != ot::RIGHT)
+ return false;
+ }
+ return true;
+ }
+
+ bool sss(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3) const {
+ if (site1.point0() == site2.point0() && site1.point1() == site2.point1())
+ return false;
+ if (site2.point0() == site3.point0() && site2.point1() == site3.point1())
+ return false;
+ return true;
+ }
+ };
+
+ template <typename Site, typename Circle>
+ class mp_circle_formation_functor {
+ public:
+ typedef typename Site::point_type point_type;
+ typedef Site site_type;
+ typedef Circle circle_type;
+ typedef robust_sqrt_expr<big_int_type, efpt_type, to_efpt_converter>
+ robust_sqrt_expr_type;
+
+ void ppp(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ circle_type& circle,
+ bool recompute_c_x = true,
+ bool recompute_c_y = true,
+ bool recompute_lower_x = true) {
+ big_int_type dif_x[3], dif_y[3], sum_x[2], sum_y[2];
+ dif_x[0] = static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(site2.x());
+ dif_x[1] = static_cast<int_x2_type>(site2.x()) -
+ static_cast<int_x2_type>(site3.x());
+ dif_x[2] = static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(site3.x());
+ dif_y[0] = static_cast<int_x2_type>(site1.y()) -
+ static_cast<int_x2_type>(site2.y());
+ dif_y[1] = static_cast<int_x2_type>(site2.y()) -
+ static_cast<int_x2_type>(site3.y());
+ dif_y[2] = static_cast<int_x2_type>(site1.y()) -
+ static_cast<int_x2_type>(site3.y());
+ sum_x[0] = static_cast<int_x2_type>(site1.x()) +
+ static_cast<int_x2_type>(site2.x());
+ sum_x[1] = static_cast<int_x2_type>(site2.x()) +
+ static_cast<int_x2_type>(site3.x());
+ sum_y[0] = static_cast<int_x2_type>(site1.y()) +
+ static_cast<int_x2_type>(site2.y());
+ sum_y[1] = static_cast<int_x2_type>(site2.y()) +
+ static_cast<int_x2_type>(site3.y());
+ fpt_type inv_denom = to_fpt(0.5) / to_fpt(static_cast<big_int_type>(
+ dif_x[0] * dif_y[1] - dif_x[1] * dif_y[0]));
+ big_int_type numer1 = dif_x[0] * sum_x[0] + dif_y[0] * sum_y[0];
+ big_int_type numer2 = dif_x[1] * sum_x[1] + dif_y[1] * sum_y[1];
+
+ if (recompute_c_x || recompute_lower_x) {
+ big_int_type c_x = numer1 * dif_y[1] - numer2 * dif_y[0];
+ circle.x(to_fpt(c_x) * inv_denom);
+
+ if (recompute_lower_x) {
+ // Evaluate radius of the circle.
+ big_int_type sqr_r = (dif_x[0] * dif_x[0] + dif_y[0] * dif_y[0]) *
+ (dif_x[1] * dif_x[1] + dif_y[1] * dif_y[1]) *
+ (dif_x[2] * dif_x[2] + dif_y[2] * dif_y[2]);
+ fpt_type r = get_sqrt(to_fpt(sqr_r));
+
+ // If c_x >= 0 then lower_x = c_x + r,
+ // else lower_x = (c_x * c_x - r * r) / (c_x - r).
+ // To guarantee epsilon relative error.
+ if (!is_neg(circle.x())) {
+ if (!is_neg(inv_denom)) {
+ circle.lower_x(circle.x() + r * inv_denom);
+ } else {
+ circle.lower_x(circle.x() - r * inv_denom);
+ }
+ } else {
+ big_int_type numer = c_x * c_x - sqr_r;
+ fpt_type lower_x = to_fpt(numer) * inv_denom / (to_fpt(c_x) + r);
+ circle.lower_x(lower_x);
+ }
+ }
+ }
+
+ if (recompute_c_y) {
+ big_int_type c_y = numer2 * dif_x[0] - numer1 * dif_x[1];
+ circle.y(to_fpt(c_y) * inv_denom);
+ }
+ }
+
+ // Recompute parameters of the circle event using high-precision library.
+ void pps(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ int segment_index,
+ circle_type& c_event,
+ bool recompute_c_x = true,
+ bool recompute_c_y = true,
+ bool recompute_lower_x = true) {
+ big_int_type cA[4], cB[4];
+ big_int_type line_a = static_cast<int_x2_type>(site3.point1(true).y()) -
+ static_cast<int_x2_type>(site3.point0(true).y());
+ big_int_type line_b = static_cast<int_x2_type>(site3.point0(true).x()) -
+ static_cast<int_x2_type>(site3.point1(true).x());
+ big_int_type segm_len = line_a * line_a + line_b * line_b;
+ big_int_type vec_x = static_cast<int_x2_type>(site2.y()) -
+ static_cast<int_x2_type>(site1.y());
+ big_int_type vec_y = static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(site2.x());
+ big_int_type sum_x = static_cast<int_x2_type>(site1.x()) +
+ static_cast<int_x2_type>(site2.x());
+ big_int_type sum_y = static_cast<int_x2_type>(site1.y()) +
+ static_cast<int_x2_type>(site2.y());
+ big_int_type teta = line_a * vec_x + line_b * vec_y;
+ big_int_type denom = vec_x * line_b - vec_y * line_a;
+
+ big_int_type dif0 = static_cast<int_x2_type>(site3.point1().y()) -
+ static_cast<int_x2_type>(site1.y());
+ big_int_type dif1 = static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(site3.point1().x());
+ big_int_type A = line_a * dif1 - line_b * dif0;
+ dif0 = static_cast<int_x2_type>(site3.point1().y()) -
+ static_cast<int_x2_type>(site2.y());
+ dif1 = static_cast<int_x2_type>(site2.x()) -
+ static_cast<int_x2_type>(site3.point1().x());
+ big_int_type B = line_a * dif1 - line_b * dif0;
+ big_int_type sum_AB = A + B;
+
+ if (is_zero(denom)) {
+ big_int_type numer = teta * teta - sum_AB * sum_AB;
+ big_int_type denom = teta * sum_AB;
+ cA[0] = denom * sum_x * 2 + numer * vec_x;
+ cB[0] = segm_len;
+ cA[1] = denom * sum_AB * 2 + numer * teta;
+ cB[1] = 1;
+ cA[2] = denom * sum_y * 2 + numer * vec_y;
+ fpt_type inv_denom = to_fpt(1.0) / to_fpt(denom);
+ if (recompute_c_x)
+ c_event.x(to_fpt(0.25) * to_fpt(cA[0]) * inv_denom);
+ if (recompute_c_y)
+ c_event.y(to_fpt(0.25) * to_fpt(cA[2]) * inv_denom);
+ if (recompute_lower_x) {
+ c_event.lower_x(to_fpt(0.25) * to_fpt(sqrt_expr_.eval2(cA, cB)) *
+ inv_denom / get_sqrt(to_fpt(segm_len)));
+ }
+ return;
+ }
+
+ big_int_type det = (teta * teta + denom * denom) * A * B * 4;
+ fpt_type inv_denom_sqr = to_fpt(1.0) / to_fpt(denom);
+ inv_denom_sqr *= inv_denom_sqr;
+
+ if (recompute_c_x || recompute_lower_x) {
+ cA[0] = sum_x * denom * denom + teta * sum_AB * vec_x;
+ cB[0] = 1;
+ cA[1] = (segment_index == 2) ? -vec_x : vec_x;
+ cB[1] = det;
+ if (recompute_c_x) {
+ c_event.x(to_fpt(0.5) * to_fpt(sqrt_expr_.eval2(cA, cB)) *
+ inv_denom_sqr);
+ }
+ }
+
+ if (recompute_c_y || recompute_lower_x) {
+ cA[2] = sum_y * denom * denom + teta * sum_AB * vec_y;
+ cB[2] = 1;
+ cA[3] = (segment_index == 2) ? -vec_y : vec_y;
+ cB[3] = det;
+ if (recompute_c_y) {
+ c_event.y(to_fpt(0.5) * to_fpt(sqrt_expr_.eval2(&cA[2], &cB[2])) *
+ inv_denom_sqr);
+ }
+ }
+
+ if (recompute_lower_x) {
+ cB[0] = cB[0] * segm_len;
+ cB[1] = cB[1] * segm_len;
+ cA[2] = sum_AB * (denom * denom + teta * teta);
+ cB[2] = 1;
+ cA[3] = (segment_index == 2) ? -teta : teta;
+ cB[3] = det;
+ c_event.lower_x(to_fpt(0.5) * to_fpt(sqrt_expr_.eval4(cA, cB)) *
+ inv_denom_sqr / get_sqrt(to_fpt(segm_len)));
+ }
+ }
+
+ // Recompute parameters of the circle event using high-precision library.
+ void pss(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ int point_index,
+ circle_type& c_event,
+ bool recompute_c_x = true,
+ bool recompute_c_y = true,
+ bool recompute_lower_x = true) {
+ big_int_type a[2], b[2], c[2], cA[4], cB[4];
+ const point_type& segm_start1 = site2.point1(true);
+ const point_type& segm_end1 = site2.point0(true);
+ const point_type& segm_start2 = site3.point0(true);
+ const point_type& segm_end2 = site3.point1(true);
+ a[0] = static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x());
+ b[0] = static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y());
+ a[1] = static_cast<int_x2_type>(segm_end2.x()) -
+ static_cast<int_x2_type>(segm_start2.x());
+ b[1] = static_cast<int_x2_type>(segm_end2.y()) -
+ static_cast<int_x2_type>(segm_start2.y());
+ big_int_type orientation = a[1] * b[0] - a[0] * b[1];
+ if (is_zero(orientation)) {
+ fpt_type denom = to_fpt(2.0) * to_fpt(
+ static_cast<big_int_type>(a[0] * a[0] + b[0] * b[0]));
+ c[0] = b[0] * (static_cast<int_x2_type>(segm_start2.x()) -
+ static_cast<int_x2_type>(segm_start1.x())) -
+ a[0] * (static_cast<int_x2_type>(segm_start2.y()) -
+ static_cast<int_x2_type>(segm_start1.y()));
+ big_int_type dx = a[0] * (static_cast<int_x2_type>(site1.y()) -
+ static_cast<int_x2_type>(segm_start1.y())) -
+ b[0] * (static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()));
+ big_int_type dy = b[0] * (static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(segm_start2.x())) -
+ a[0] * (static_cast<int_x2_type>(site1.y()) -
+ static_cast<int_x2_type>(segm_start2.y()));
+ cB[0] = dx * dy;
+ cB[1] = 1;
+
+ if (recompute_c_y) {
+ cA[0] = b[0] * ((point_index == 2) ? 2 : -2);
+ cA[1] = a[0] * a[0] * (static_cast<int_x2_type>(segm_start1.y()) +
+ static_cast<int_x2_type>(segm_start2.y())) -
+ a[0] * b[0] * (static_cast<int_x2_type>(segm_start1.x()) +
+ static_cast<int_x2_type>(segm_start2.x()) -
+ static_cast<int_x2_type>(site1.x()) * 2) +
+ b[0] * b[0] * (static_cast<int_x2_type>(site1.y()) * 2);
+ fpt_type c_y = to_fpt(sqrt_expr_.eval2(cA, cB));
+ c_event.y(c_y / denom);
+ }
+
+ if (recompute_c_x || recompute_lower_x) {
+ cA[0] = a[0] * ((point_index == 2) ? 2 : -2);
+ cA[1] = b[0] * b[0] * (static_cast<int_x2_type>(segm_start1.x()) +
+ static_cast<int_x2_type>(segm_start2.x())) -
+ a[0] * b[0] * (static_cast<int_x2_type>(segm_start1.y()) +
+ static_cast<int_x2_type>(segm_start2.y()) -
+ static_cast<int_x2_type>(site1.y()) * 2) +
+ a[0] * a[0] * (static_cast<int_x2_type>(site1.x()) * 2);
+
+ if (recompute_c_x) {
+ fpt_type c_x = to_fpt(sqrt_expr_.eval2(cA, cB));
+ c_event.x(c_x / denom);
+ }
+
+ if (recompute_lower_x) {
+ cA[2] = is_neg(c[0]) ? -c[0] : c[0];
+ cB[2] = a[0] * a[0] + b[0] * b[0];
+ fpt_type lower_x = to_fpt(sqrt_expr_.eval3(cA, cB));
+ c_event.lower_x(lower_x / denom);
+ }
+ }
+ return;
+ }
+ c[0] = b[0] * segm_end1.x() - a[0] * segm_end1.y();
+ c[1] = a[1] * segm_end2.y() - b[1] * segm_end2.x();
+ big_int_type ix = a[0] * c[1] + a[1] * c[0];
+ big_int_type iy = b[0] * c[1] + b[1] * c[0];
+ big_int_type dx = ix - orientation * site1.x();
+ big_int_type dy = iy - orientation * site1.y();
+ if (is_zero(dx) && is_zero(dy)) {
+ fpt_type denom = to_fpt(orientation);
+ fpt_type c_x = to_fpt(ix) / denom;
+ fpt_type c_y = to_fpt(iy) / denom;
+ c_event = circle_type(c_x, c_y, c_x);
+ return;
+ }
+
+ big_int_type sign = ((point_index == 2) ? 1 : -1) *
+ (is_neg(orientation) ? 1 : -1);
+ cA[0] = a[1] * -dx + b[1] * -dy;
+ cA[1] = a[0] * -dx + b[0] * -dy;
+ cA[2] = sign;
+ cA[3] = 0;
+ cB[0] = a[0] * a[0] + b[0] * b[0];
+ cB[1] = a[1] * a[1] + b[1] * b[1];
+ cB[2] = a[0] * a[1] + b[0] * b[1];
+ cB[3] = (a[0] * dy - b[0] * dx) * (a[1] * dy - b[1] * dx) * -2;
+ fpt_type temp = to_fpt(
+ sqrt_expr_evaluator_pss4<big_int_type, efpt_type>(cA, cB));
+ fpt_type denom = temp * to_fpt(orientation);
+
+ if (recompute_c_y) {
+ cA[0] = b[1] * (dx * dx + dy * dy) - iy * (dx * a[1] + dy * b[1]);
+ cA[1] = b[0] * (dx * dx + dy * dy) - iy * (dx * a[0] + dy * b[0]);
+ cA[2] = iy * sign;
+ fpt_type cy = to_fpt(
+ sqrt_expr_evaluator_pss4<big_int_type, efpt_type>(cA, cB));
+ c_event.y(cy / denom);
+ }
+
+ if (recompute_c_x || recompute_lower_x) {
+ cA[0] = a[1] * (dx * dx + dy * dy) - ix * (dx * a[1] + dy * b[1]);
+ cA[1] = a[0] * (dx * dx + dy * dy) - ix * (dx * a[0] + dy * b[0]);
+ cA[2] = ix * sign;
+
+ if (recompute_c_x) {
+ fpt_type cx = to_fpt(
+ sqrt_expr_evaluator_pss4<big_int_type, efpt_type>(cA, cB));
+ c_event.x(cx / denom);
+ }
+
+ if (recompute_lower_x) {
+ cA[3] = orientation * (dx * dx + dy * dy) * (is_neg(temp) ? -1 : 1);
+ fpt_type lower_x = to_fpt(
+ sqrt_expr_evaluator_pss4<big_int_type, efpt_type>(cA, cB));
+ c_event.lower_x(lower_x / denom);
+ }
+ }
+ }
+
+ // Recompute parameters of the circle event using high-precision library.
+ void sss(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ circle_type& c_event,
+ bool recompute_c_x = true,
+ bool recompute_c_y = true,
+ bool recompute_lower_x = true) {
+ big_int_type a[3], b[3], c[3], cA[4], cB[4];
+ // cA - corresponds to the cross product.
+ // cB - corresponds to the squared length.
+ a[0] = static_cast<int_x2_type>(site1.x1(true)) -
+ static_cast<int_x2_type>(site1.x0(true));
+ a[1] = static_cast<int_x2_type>(site2.x1(true)) -
+ static_cast<int_x2_type>(site2.x0(true));
+ a[2] = static_cast<int_x2_type>(site3.x1(true)) -
+ static_cast<int_x2_type>(site3.x0(true));
+
+ b[0] = static_cast<int_x2_type>(site1.y1(true)) -
+ static_cast<int_x2_type>(site1.y0(true));
+ b[1] = static_cast<int_x2_type>(site2.y1(true)) -
+ static_cast<int_x2_type>(site2.y0(true));
+ b[2] = static_cast<int_x2_type>(site3.y1(true)) -
+ static_cast<int_x2_type>(site3.y0(true));
+
+ c[0] = static_cast<int_x2_type>(site1.x0(true)) *
+ static_cast<int_x2_type>(site1.y1(true)) -
+ static_cast<int_x2_type>(site1.y0(true)) *
+ static_cast<int_x2_type>(site1.x1(true));
+ c[1] = static_cast<int_x2_type>(site2.x0(true)) *
+ static_cast<int_x2_type>(site2.y1(true)) -
+ static_cast<int_x2_type>(site2.y0(true)) *
+ static_cast<int_x2_type>(site2.x1(true));
+ c[2] = static_cast<int_x2_type>(site3.x0(true)) *
+ static_cast<int_x2_type>(site3.y1(true)) -
+ static_cast<int_x2_type>(site3.y0(true)) *
+ static_cast<int_x2_type>(site3.x1(true));
+
+ for (int i = 0; i < 3; ++i)
+ cB[i] = a[i] * a[i] + b[i] * b[i];
+
+ for (int i = 0; i < 3; ++i) {
+ int j = (i+1) % 3;
+ int k = (i+2) % 3;
+ cA[i] = a[j] * b[k] - a[k] * b[j];
+ }
+ fpt_type denom = to_fpt(sqrt_expr_.eval3(cA, cB));
+
+ if (recompute_c_y) {
+ for (int i = 0; i < 3; ++i) {
+ int j = (i+1) % 3;
+ int k = (i+2) % 3;
+ cA[i] = b[j] * c[k] - b[k] * c[j];
+ }
+ fpt_type c_y = to_fpt(sqrt_expr_.eval3(cA, cB));
+ c_event.y(c_y / denom);
+ }
+
+ if (recompute_c_x || recompute_lower_x) {
+ cA[3] = 0;
+ for (int i = 0; i < 3; ++i) {
+ int j = (i+1) % 3;
+ int k = (i+2) % 3;
+ cA[i] = a[j] * c[k] - a[k] * c[j];
+ if (recompute_lower_x) {
+ cA[3] = cA[3] + cA[i] * b[i];
+ }
+ }
+
+ if (recompute_c_x) {
+ fpt_type c_x = to_fpt(sqrt_expr_.eval3(cA, cB));
+ c_event.x(c_x / denom);
+ }
+
+ if (recompute_lower_x) {
+ cB[3] = 1;
+ fpt_type lower_x = to_fpt(sqrt_expr_.eval4(cA, cB));
+ c_event.lower_x(lower_x / denom);
+ }
+ }
+ }
+
+ private:
+ // Evaluates A[3] + A[0] * sqrt(B[0]) + A[1] * sqrt(B[1]) +
+ // A[2] * sqrt(B[3] * (sqrt(B[0] * B[1]) + B[2])).
+ template <typename _int, typename _fpt>
+ _fpt sqrt_expr_evaluator_pss4(_int *A, _int *B) {
+ _int cA[4], cB[4];
+ if (is_zero(A[3])) {
+ _fpt lh = sqrt_expr_.eval2(A, B);
+ cA[0] = 1;
+ cB[0] = B[0] * B[1];
+ cA[1] = B[2];
+ cB[1] = 1;
+ _fpt rh = sqrt_expr_.eval1(A+2, B+3) *
+ get_sqrt(sqrt_expr_.eval2(cA, cB));
+ if ((!is_neg(lh) && !is_neg(rh)) || (!is_pos(lh) && !is_pos(rh)))
+ return lh + rh;
+ cA[0] = A[0] * A[0] * B[0] + A[1] * A[1] * B[1] -
+ A[2] * A[2] * B[3] * B[2];
+ cB[0] = 1;
+ cA[1] = A[0] * A[1] * 2 - A[2] * A[2] * B[3];
+ cB[1] = B[0] * B[1];
+ _fpt numer = sqrt_expr_.eval2(cA, cB);
+ return numer / (lh - rh);
+ }
+ cA[0] = 1;
+ cB[0] = B[0] * B[1];
+ cA[1] = B[2];
+ cB[1] = 1;
+ _fpt rh = sqrt_expr_.eval1(A+2, B+3) * get_sqrt(sqrt_expr_.eval2(cA, cB));
+ cA[0] = A[0];
+ cB[0] = B[0];
+ cA[1] = A[1];
+ cB[1] = B[1];
+ cA[2] = A[3];
+ cB[2] = 1;
+ _fpt lh = sqrt_expr_.eval3(cA, cB);
+ if ((!is_neg(lh) && !is_neg(rh)) || (!is_pos(lh) && !is_pos(rh)))
+ return lh + rh;
+ cA[0] = A[3] * A[0] * 2;
+ cA[1] = A[3] * A[1] * 2;
+ cA[2] = A[0] * A[0] * B[0] + A[1] * A[1] * B[1] +
+ A[3] * A[3] - A[2] * A[2] * B[2] * B[3];
+ cA[3] = A[0] * A[1] * 2 - A[2] * A[2] * B[3];
+ cB[3] = B[0] * B[1];
+ _fpt numer = sqrt_expr_evaluator_pss3<_int, _fpt>(cA, cB);
+ return numer / (lh - rh);
+ }
+
+ template <typename _int, typename _fpt>
+ // Evaluates A[0] * sqrt(B[0]) + A[1] * sqrt(B[1]) +
+ // A[2] + A[3] * sqrt(B[0] * B[1]).
+ // B[3] = B[0] * B[1].
+ _fpt sqrt_expr_evaluator_pss3(_int *A, _int *B) {
+ _int cA[2], cB[2];
+ _fpt lh = sqrt_expr_.eval2(A, B);
+ _fpt rh = sqrt_expr_.eval2(A+2, B+2);
+ if ((!is_neg(lh) && !is_neg(rh)) || (!is_pos(lh) && !is_pos(rh)))
+ return lh + rh;
+ cA[0] = A[0] * A[0] * B[0] + A[1] * A[1] * B[1] -
+ A[2] * A[2] - A[3] * A[3] * B[0] * B[1];
+ cB[0] = 1;
+ cA[1] = (A[0] * A[1] - A[2] * A[3]) * 2;
+ cB[1] = B[3];
+ _fpt numer = sqrt_expr_.eval2(cA, cB);
+ return numer / (lh - rh);
+ }
+
+ robust_sqrt_expr_type sqrt_expr_;
+ to_fpt_converter to_fpt;
+ };
+
+ template <typename Site, typename Circle>
+ class lazy_circle_formation_functor {
+ public:
+ typedef robust_fpt<fpt_type> robust_fpt_type;
+ typedef robust_dif<robust_fpt_type> robust_dif_type;
+ typedef typename Site::point_type point_type;
+ typedef Site site_type;
+ typedef Circle circle_type;
+ typedef mp_circle_formation_functor<site_type, circle_type>
+ exact_circle_formation_functor_type;
+
+ void ppp(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ circle_type& c_event) {
+ fpt_type dif_x1 = to_fpt(site1.x()) - to_fpt(site2.x());
+ fpt_type dif_x2 = to_fpt(site2.x()) - to_fpt(site3.x());
+ fpt_type dif_y1 = to_fpt(site1.y()) - to_fpt(site2.y());
+ fpt_type dif_y2 = to_fpt(site2.y()) - to_fpt(site3.y());
+ fpt_type orientation = robust_cross_product(
+ static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(site2.x()),
+ static_cast<int_x2_type>(site2.x()) -
+ static_cast<int_x2_type>(site3.x()),
+ static_cast<int_x2_type>(site1.y()) -
+ static_cast<int_x2_type>(site2.y()),
+ static_cast<int_x2_type>(site2.y()) -
+ static_cast<int_x2_type>(site3.y()));
+ robust_fpt_type inv_orientation(to_fpt(0.5) / orientation, to_fpt(2.0));
+ fpt_type sum_x1 = to_fpt(site1.x()) + to_fpt(site2.x());
+ fpt_type sum_x2 = to_fpt(site2.x()) + to_fpt(site3.x());
+ fpt_type sum_y1 = to_fpt(site1.y()) + to_fpt(site2.y());
+ fpt_type sum_y2 = to_fpt(site2.y()) + to_fpt(site3.y());
+ fpt_type dif_x3 = to_fpt(site1.x()) - to_fpt(site3.x());
+ fpt_type dif_y3 = to_fpt(site1.y()) - to_fpt(site3.y());
+ robust_dif_type c_x, c_y;
+ c_x += robust_fpt_type(dif_x1 * sum_x1 * dif_y2, to_fpt(2.0));
+ c_x += robust_fpt_type(dif_y1 * sum_y1 * dif_y2, to_fpt(2.0));
+ c_x -= robust_fpt_type(dif_x2 * sum_x2 * dif_y1, to_fpt(2.0));
+ c_x -= robust_fpt_type(dif_y2 * sum_y2 * dif_y1, to_fpt(2.0));
+ c_y += robust_fpt_type(dif_x2 * sum_x2 * dif_x1, to_fpt(2.0));
+ c_y += robust_fpt_type(dif_y2 * sum_y2 * dif_x1, to_fpt(2.0));
+ c_y -= robust_fpt_type(dif_x1 * sum_x1 * dif_x2, to_fpt(2.0));
+ c_y -= robust_fpt_type(dif_y1 * sum_y1 * dif_x2, to_fpt(2.0));
+ robust_dif_type lower_x(c_x);
+ lower_x -= robust_fpt_type(get_sqrt(
+ (dif_x1 * dif_x1 + dif_y1 * dif_y1) *
+ (dif_x2 * dif_x2 + dif_y2 * dif_y2) *
+ (dif_x3 * dif_x3 + dif_y3 * dif_y3)), to_fpt(5.0));
+ c_event = circle_type(
+ c_x.dif().fpv() * inv_orientation.fpv(),
+ c_y.dif().fpv() * inv_orientation.fpv(),
+ lower_x.dif().fpv() * inv_orientation.fpv());
+ bool recompute_c_x = c_x.dif().ulp() > ULPS;
+ bool recompute_c_y = c_y.dif().ulp() > ULPS;
+ bool recompute_lower_x = lower_x.dif().ulp() > ULPS;
+ if (recompute_c_x || recompute_c_y || recompute_lower_x) {
+ exact_circle_formation_functor_.ppp(
+ site1, site2, site3, c_event,
+ recompute_c_x, recompute_c_y, recompute_lower_x);
+ }
+ }
+
+ void pps(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ int segment_index,
+ circle_type& c_event) {
+ fpt_type line_a = to_fpt(site3.point1(true).y()) -
+ to_fpt(site3.point0(true).y());
+ fpt_type line_b = to_fpt(site3.point0(true).x()) -
+ to_fpt(site3.point1(true).x());
+ fpt_type vec_x = to_fpt(site2.y()) - to_fpt(site1.y());
+ fpt_type vec_y = to_fpt(site1.x()) - to_fpt(site2.x());
+ robust_fpt_type teta(robust_cross_product(
+ static_cast<int_x2_type>(site3.point1(true).y()) -
+ static_cast<int_x2_type>(site3.point0(true).y()),
+ static_cast<int_x2_type>(site3.point0(true).x()) -
+ static_cast<int_x2_type>(site3.point1(true).x()),
+ static_cast<int_x2_type>(site2.x()) -
+ static_cast<int_x2_type>(site1.x()),
+ static_cast<int_x2_type>(site2.y()) -
+ static_cast<int_x2_type>(site1.y())), to_fpt(1.0));
+ robust_fpt_type A(robust_cross_product(
+ static_cast<int_x2_type>(site3.point1(true).y()) -
+ static_cast<int_x2_type>(site3.point0(true).y()),
+ static_cast<int_x2_type>(site3.point0(true).x()) -
+ static_cast<int_x2_type>(site3.point1(true).x()),
+ static_cast<int_x2_type>(site3.point1().y()) -
+ static_cast<int_x2_type>(site1.y()),
+ static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(site3.point1().x())), to_fpt(1.0));
+ robust_fpt_type B(robust_cross_product(
+ static_cast<int_x2_type>(site3.point1(true).y()) -
+ static_cast<int_x2_type>(site3.point0(true).y()),
+ static_cast<int_x2_type>(site3.point0(true).x()) -
+ static_cast<int_x2_type>(site3.point1(true).x()),
+ static_cast<int_x2_type>(site3.point1().y()) -
+ static_cast<int_x2_type>(site2.y()),
+ static_cast<int_x2_type>(site2.x()) -
+ static_cast<int_x2_type>(site3.point1().x())), to_fpt(1.0));
+ robust_fpt_type denom(robust_cross_product(
+ static_cast<int_x2_type>(site2.y()) -
+ static_cast<int_x2_type>(site1.y()),
+ static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(site2.x()),
+ static_cast<int_x2_type>(site3.point1(true).y()) -
+ static_cast<int_x2_type>(site3.point0(true).y()),
+ static_cast<int_x2_type>(site3.point0(true).x()) -
+ static_cast<int_x2_type>(site3.point1(true).x())), to_fpt(1.0));
+ robust_fpt_type inv_segm_len(to_fpt(1.0) /
+ get_sqrt(line_a * line_a + line_b * line_b), to_fpt(3.0));
+ robust_dif_type t;
+ if (ot::eval(denom) == ot::COLLINEAR) {
+ t += teta / (robust_fpt_type(to_fpt(8.0)) * A);
+ t -= A / (robust_fpt_type(to_fpt(2.0)) * teta);
+ } else {
+ robust_fpt_type det = ((teta * teta + denom * denom) * A * B).sqrt();
+ if (segment_index == 2) {
+ t -= det / (denom * denom);
+ } else {
+ t += det / (denom * denom);
+ }
+ t += teta * (A + B) / (robust_fpt_type(to_fpt(2.0)) * denom * denom);
+ }
+ robust_dif_type c_x, c_y;
+ c_x += robust_fpt_type(to_fpt(0.5) * (to_fpt(site1.x()) +
+ to_fpt(site2.x())));
+ c_x += robust_fpt_type(vec_x) * t;
+ c_y += robust_fpt_type(to_fpt(0.5) * (to_fpt(site1.y()) +
+ to_fpt(site2.y())));
+ c_y += robust_fpt_type(vec_y) * t;
+ robust_dif_type r, lower_x(c_x);
+ r -= robust_fpt_type(line_a) * robust_fpt_type(site3.x0());
+ r -= robust_fpt_type(line_b) * robust_fpt_type(site3.y0());
+ r += robust_fpt_type(line_a) * c_x;
+ r += robust_fpt_type(line_b) * c_y;
+ if (r.pos().fpv() < r.neg().fpv())
+ r = -r;
+ lower_x += r * inv_segm_len;
+ c_event = circle_type(
+ c_x.dif().fpv(), c_y.dif().fpv(), lower_x.dif().fpv());
+ bool recompute_c_x = c_x.dif().ulp() > ULPS;
+ bool recompute_c_y = c_y.dif().ulp() > ULPS;
+ bool recompute_lower_x = lower_x.dif().ulp() > ULPS;
+ if (recompute_c_x || recompute_c_y || recompute_lower_x) {
+ exact_circle_formation_functor_.pps(
+ site1, site2, site3, segment_index, c_event,
+ recompute_c_x, recompute_c_y, recompute_lower_x);
+ }
+ }
+
+ void pss(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ int point_index,
+ circle_type& c_event) {
+ const point_type& segm_start1 = site2.point1(true);
+ const point_type& segm_end1 = site2.point0(true);
+ const point_type& segm_start2 = site3.point0(true);
+ const point_type& segm_end2 = site3.point1(true);
+ fpt_type a1 = to_fpt(segm_end1.x()) - to_fpt(segm_start1.x());
+ fpt_type b1 = to_fpt(segm_end1.y()) - to_fpt(segm_start1.y());
+ fpt_type a2 = to_fpt(segm_end2.x()) - to_fpt(segm_start2.x());
+ fpt_type b2 = to_fpt(segm_end2.y()) - to_fpt(segm_start2.y());
+ bool recompute_c_x, recompute_c_y, recompute_lower_x;
+ robust_fpt_type orientation(robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(segm_end2.y()) -
+ static_cast<int_x2_type>(segm_start2.y()),
+ static_cast<int_x2_type>(segm_end2.x()) -
+ static_cast<int_x2_type>(segm_start2.x())), to_fpt(1.0));
+ if (ot::eval(orientation) == ot::COLLINEAR) {
+ robust_fpt_type a(a1 * a1 + b1 * b1, to_fpt(2.0));
+ robust_fpt_type c(robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(segm_start2.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(segm_start2.x()) -
+ static_cast<int_x2_type>(segm_start1.x())), to_fpt(1.0));
+ robust_fpt_type det(
+ robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(site1.y()) -
+ static_cast<int_x2_type>(segm_start1.y())) *
+ robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(site1.y()) -
+ static_cast<int_x2_type>(segm_start2.y()),
+ static_cast<int_x2_type>(site1.x()) -
+ static_cast<int_x2_type>(segm_start2.x())),
+ to_fpt(3.0));
+ robust_dif_type t;
+ t -= robust_fpt_type(a1) * robust_fpt_type((
+ to_fpt(segm_start1.x()) + to_fpt(segm_start2.x())) * to_fpt(0.5) -
+ to_fpt(site1.x()));
+ t -= robust_fpt_type(b1) * robust_fpt_type((
+ to_fpt(segm_start1.y()) + to_fpt(segm_start2.y())) * to_fpt(0.5) -
+ to_fpt(site1.y()));
+ if (point_index == 2) {
+ t += det.sqrt();
+ } else {
+ t -= det.sqrt();
+ }
+ t /= a;
+ robust_dif_type c_x, c_y;
+ c_x += robust_fpt_type(to_fpt(0.5) * (
+ to_fpt(segm_start1.x()) + to_fpt(segm_start2.x())));
+ c_x += robust_fpt_type(a1) * t;
+ c_y += robust_fpt_type(to_fpt(0.5) * (
+ to_fpt(segm_start1.y()) + to_fpt(segm_start2.y())));
+ c_y += robust_fpt_type(b1) * t;
+ robust_dif_type lower_x(c_x);
+ if (is_neg(c)) {
+ lower_x -= robust_fpt_type(to_fpt(0.5)) * c / a.sqrt();
+ } else {
+ lower_x += robust_fpt_type(to_fpt(0.5)) * c / a.sqrt();
+ }
+ recompute_c_x = c_x.dif().ulp() > ULPS;
+ recompute_c_y = c_y.dif().ulp() > ULPS;
+ recompute_lower_x = lower_x.dif().ulp() > ULPS;
+ c_event =
+ circle_type(c_x.dif().fpv(), c_y.dif().fpv(), lower_x.dif().fpv());
+ } else {
+ robust_fpt_type sqr_sum1(get_sqrt(a1 * a1 + b1 * b1), to_fpt(2.0));
+ robust_fpt_type sqr_sum2(get_sqrt(a2 * a2 + b2 * b2), to_fpt(2.0));
+ robust_fpt_type a(robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(segm_start2.y()) -
+ static_cast<int_x2_type>(segm_end2.y()),
+ static_cast<int_x2_type>(segm_end2.x()) -
+ static_cast<int_x2_type>(segm_start2.x())), to_fpt(1.0));
+ if (!is_neg(a)) {
+ a += sqr_sum1 * sqr_sum2;
+ } else {
+ a = (orientation * orientation) / (sqr_sum1 * sqr_sum2 - a);
+ }
+ robust_fpt_type or1(robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(site1.y()),
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(site1.x())), to_fpt(1.0));
+ robust_fpt_type or2(robust_cross_product(
+ static_cast<int_x2_type>(segm_end2.x()) -
+ static_cast<int_x2_type>(segm_start2.x()),
+ static_cast<int_x2_type>(segm_end2.y()) -
+ static_cast<int_x2_type>(segm_start2.y()),
+ static_cast<int_x2_type>(segm_end2.x()) -
+ static_cast<int_x2_type>(site1.x()),
+ static_cast<int_x2_type>(segm_end2.y()) -
+ static_cast<int_x2_type>(site1.y())), to_fpt(1.0));
+ robust_fpt_type det = robust_fpt_type(to_fpt(2.0)) * a * or1 * or2;
+ robust_fpt_type c1(robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(segm_end1.y()),
+ static_cast<int_x2_type>(segm_end1.x())), to_fpt(1.0));
+ robust_fpt_type c2(robust_cross_product(
+ static_cast<int_x2_type>(segm_end2.x()) -
+ static_cast<int_x2_type>(segm_start2.x()),
+ static_cast<int_x2_type>(segm_end2.y()) -
+ static_cast<int_x2_type>(segm_start2.y()),
+ static_cast<int_x2_type>(segm_end2.x()),
+ static_cast<int_x2_type>(segm_end2.y())), to_fpt(1.0));
+ robust_fpt_type inv_orientation =
+ robust_fpt_type(to_fpt(1.0)) / orientation;
+ robust_dif_type t, b, ix, iy;
+ ix += robust_fpt_type(a2) * c1 * inv_orientation;
+ ix += robust_fpt_type(a1) * c2 * inv_orientation;
+ iy += robust_fpt_type(b1) * c2 * inv_orientation;
+ iy += robust_fpt_type(b2) * c1 * inv_orientation;
+
+ b += ix * (robust_fpt_type(a1) * sqr_sum2);
+ b += ix * (robust_fpt_type(a2) * sqr_sum1);
+ b += iy * (robust_fpt_type(b1) * sqr_sum2);
+ b += iy * (robust_fpt_type(b2) * sqr_sum1);
+ b -= sqr_sum1 * robust_fpt_type(robust_cross_product(
+ static_cast<int_x2_type>(segm_end2.x()) -
+ static_cast<int_x2_type>(segm_start2.x()),
+ static_cast<int_x2_type>(segm_end2.y()) -
+ static_cast<int_x2_type>(segm_start2.y()),
+ static_cast<int_x2_type>(-site1.y()),
+ static_cast<int_x2_type>(site1.x())), to_fpt(1.0));
+ b -= sqr_sum2 * robust_fpt_type(robust_cross_product(
+ static_cast<int_x2_type>(segm_end1.x()) -
+ static_cast<int_x2_type>(segm_start1.x()),
+ static_cast<int_x2_type>(segm_end1.y()) -
+ static_cast<int_x2_type>(segm_start1.y()),
+ static_cast<int_x2_type>(-site1.y()),
+ static_cast<int_x2_type>(site1.x())), to_fpt(1.0));
+ t -= b;
+ if (point_index == 2) {
+ t += det.sqrt();
+ } else {
+ t -= det.sqrt();
+ }
+ t /= (a * a);
+ robust_dif_type c_x(ix), c_y(iy);
+ c_x += t * (robust_fpt_type(a1) * sqr_sum2);
+ c_x += t * (robust_fpt_type(a2) * sqr_sum1);
+ c_y += t * (robust_fpt_type(b1) * sqr_sum2);
+ c_y += t * (robust_fpt_type(b2) * sqr_sum1);
+ if (t.pos().fpv() < t.neg().fpv()) {
+ t = -t;
+ }
+ robust_dif_type lower_x(c_x);
+ if (is_neg(orientation)) {
+ lower_x -= t * orientation;
+ } else {
+ lower_x += t * orientation;
+ }
+ recompute_c_x = c_x.dif().ulp() > ULPS;
+ recompute_c_y = c_y.dif().ulp() > ULPS;
+ recompute_lower_x = lower_x.dif().ulp() > ULPS;
+ c_event = circle_type(
+ c_x.dif().fpv(), c_y.dif().fpv(), lower_x.dif().fpv());
+ }
+ if (recompute_c_x || recompute_c_y || recompute_lower_x) {
+ exact_circle_formation_functor_.pss(
+ site1, site2, site3, point_index, c_event,
+ recompute_c_x, recompute_c_y, recompute_lower_x);
+ }
+ }
+
+ void sss(const site_type& site1,
+ const site_type& site2,
+ const site_type& site3,
+ circle_type& c_event) {
+ robust_fpt_type a1(to_fpt(site1.x1(true)) - to_fpt(site1.x0(true)));
+ robust_fpt_type b1(to_fpt(site1.y1(true)) - to_fpt(site1.y0(true)));
+ robust_fpt_type c1(robust_cross_product(
+ site1.x0(true), site1.y0(true),
+ site1.x1(true), site1.y1(true)), to_fpt(1.0));
+
+ robust_fpt_type a2(to_fpt(site2.x1(true)) - to_fpt(site2.x0(true)));
+ robust_fpt_type b2(to_fpt(site2.y1(true)) - to_fpt(site2.y0(true)));
+ robust_fpt_type c2(robust_cross_product(
+ site2.x0(true), site2.y0(true),
+ site2.x1(true), site2.y1(true)), to_fpt(1.0));
+
+ robust_fpt_type a3(to_fpt(site3.x1(true)) - to_fpt(site3.x0(true)));
+ robust_fpt_type b3(to_fpt(site3.y1(true)) - to_fpt(site3.y0(true)));
+ robust_fpt_type c3(robust_cross_product(
+ site3.x0(true), site3.y0(true),
+ site3.x1(true), site3.y1(true)), to_fpt(1.0));
+
+ robust_fpt_type len1 = (a1 * a1 + b1 * b1).sqrt();
+ robust_fpt_type len2 = (a2 * a2 + b2 * b2).sqrt();
+ robust_fpt_type len3 = (a3 * a3 + b3 * b3).sqrt();
+ robust_fpt_type cross_12(robust_cross_product(
+ static_cast<int_x2_type>(site1.x1(true)) -
+ static_cast<int_x2_type>(site1.x0(true)),
+ static_cast<int_x2_type>(site1.y1(true)) -
+ static_cast<int_x2_type>(site1.y0(true)),
+ static_cast<int_x2_type>(site2.x1(true)) -
+ static_cast<int_x2_type>(site2.x0(true)),
+ static_cast<int_x2_type>(site2.y1(true)) -
+ static_cast<int_x2_type>(site2.y0(true))), to_fpt(1.0));
+ robust_fpt_type cross_23(robust_cross_product(
+ static_cast<int_x2_type>(site2.x1(true)) -
+ static_cast<int_x2_type>(site2.x0(true)),
+ static_cast<int_x2_type>(site2.y1(true)) -
+ static_cast<int_x2_type>(site2.y0(true)),
+ static_cast<int_x2_type>(site3.x1(true)) -
+ static_cast<int_x2_type>(site3.x0(true)),
+ static_cast<int_x2_type>(site3.y1(true)) -
+ static_cast<int_x2_type>(site3.y0(true))), to_fpt(1.0));
+ robust_fpt_type cross_31(robust_cross_product(
+ static_cast<int_x2_type>(site3.x1(true)) -
+ static_cast<int_x2_type>(site3.x0(true)),
+ static_cast<int_x2_type>(site3.y1(true)) -
+ static_cast<int_x2_type>(site3.y0(true)),
+ static_cast<int_x2_type>(site1.x1(true)) -
+ static_cast<int_x2_type>(site1.x0(true)),
+ static_cast<int_x2_type>(site1.y1(true)) -
+ static_cast<int_x2_type>(site1.y0(true))), to_fpt(1.0));
+ robust_dif_type denom, c_x, c_y, r;
+
+ // denom = cross_12 * len3 + cross_23 * len1 + cross_31 * len2.
+ denom += cross_12 * len3;
+ denom += cross_23 * len1;
+ denom += cross_31 * len2;
+
+ // denom * r = (b2 * c_x - a2 * c_y - c2 * denom) / len2.
+ r -= cross_12 * c3;
+ r -= cross_23 * c1;
+ r -= cross_31 * c2;
+
+ c_x += a1 * c2 * len3;
+ c_x -= a2 * c1 * len3;
+ c_x += a2 * c3 * len1;
+ c_x -= a3 * c2 * len1;
+ c_x += a3 * c1 * len2;
+ c_x -= a1 * c3 * len2;
+ c_y += b1 * c2 * len3;
+ c_y -= b2 * c1 * len3;
+ c_y += b2 * c3 * len1;
+ c_y -= b3 * c2 * len1;
+ c_y += b3 * c1 * len2;
+ c_y -= b1 * c3 * len2;
+ robust_dif_type lower_x(c_x + r);
+ bool recompute_c_x = c_x.dif().ulp() > ULPS;
+ bool recompute_c_y = c_y.dif().ulp() > ULPS;
+ bool recompute_lower_x = lower_x.dif().ulp() > ULPS;
+ bool recompute_denom = denom.dif().ulp() > ULPS;
+ c_event = circle_type(
+ c_x.dif().fpv() / denom.dif().fpv(),
+ c_y.dif().fpv() / denom.dif().fpv(),
+ lower_x.dif().fpv() / denom.dif().fpv());
+ if (recompute_c_x || recompute_c_y ||
+ recompute_lower_x || recompute_denom) {
+ exact_circle_formation_functor_.sss(
+ site1, site2, site3, c_event,
+ recompute_c_x, recompute_c_y, recompute_lower_x);
+ }
+ }
+
+ private:
+ exact_circle_formation_functor_type exact_circle_formation_functor_;
+ to_fpt_converter to_fpt;
+ };
+
+ template <typename Site,
+ typename Circle,
+ typename CEP = circle_existence_predicate<Site>,
+ typename CFF = lazy_circle_formation_functor<Site, Circle> >
+ class circle_formation_predicate {
+ public:
+ typedef Site site_type;
+ typedef Circle circle_type;
+ typedef CEP circle_existence_predicate_type;
+ typedef CFF circle_formation_functor_type;
+
+ // Create a circle event from the given three sites.
+ // Returns true if the circle event exists, else false.
+ // If exists circle event is saved into the c_event variable.
+ bool operator()(const site_type& site1, const site_type& site2,
+ const site_type& site3, circle_type& circle) {
+ if (!site1.is_segment()) {
+ if (!site2.is_segment()) {
+ if (!site3.is_segment()) {
+ // (point, point, point) sites.
+ if (!circle_existence_predicate_.ppp(site1, site2, site3))
+ return false;
+ circle_formation_functor_.ppp(site1, site2, site3, circle);
+ } else {
+ // (point, point, segment) sites.
+ if (!circle_existence_predicate_.pps(site1, site2, site3, 3))
+ return false;
+ circle_formation_functor_.pps(site1, site2, site3, 3, circle);
+ }
+ } else {
+ if (!site3.is_segment()) {
+ // (point, segment, point) sites.
+ if (!circle_existence_predicate_.pps(site1, site3, site2, 2))
+ return false;
+ circle_formation_functor_.pps(site1, site3, site2, 2, circle);
+ } else {
+ // (point, segment, segment) sites.
+ if (!circle_existence_predicate_.pss(site1, site2, site3, 1))
+ return false;
+ circle_formation_functor_.pss(site1, site2, site3, 1, circle);
+ }
+ }
+ } else {
+ if (!site2.is_segment()) {
+ if (!site3.is_segment()) {
+ // (segment, point, point) sites.
+ if (!circle_existence_predicate_.pps(site2, site3, site1, 1))
+ return false;
+ circle_formation_functor_.pps(site2, site3, site1, 1, circle);
+ } else {
+ // (segment, point, segment) sites.
+ if (!circle_existence_predicate_.pss(site2, site1, site3, 2))
+ return false;
+ circle_formation_functor_.pss(site2, site1, site3, 2, circle);
+ }
+ } else {
+ if (!site3.is_segment()) {
+ // (segment, segment, point) sites.
+ if (!circle_existence_predicate_.pss(site3, site1, site2, 3))
+ return false;
+ circle_formation_functor_.pss(site3, site1, site2, 3, circle);
+ } else {
+ // (segment, segment, segment) sites.
+ if (!circle_existence_predicate_.sss(site1, site2, site3))
+ return false;
+ circle_formation_functor_.sss(site1, site2, site3, circle);
+ }
+ }
+ }
+ return true;
+ }
+
+ private:
+ circle_existence_predicate_type circle_existence_predicate_;
+ circle_formation_functor_type circle_formation_functor_;
+ };
+};
+} // detail
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_DETAIL_VORONOI_PREDICATES

Added: branches/release/boost/polygon/detail/voronoi_robust_fpt.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/detail/voronoi_robust_fpt.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,519 @@
+// Boost.Polygon library detail/voronoi_robust_fpt.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_DETAIL_VORONOI_ROBUST_FPT
+#define BOOST_POLYGON_DETAIL_VORONOI_ROBUST_FPT
+
+#include <cmath>
+
+// Geometry predicates with floating-point variables usually require
+// high-precision predicates to retrieve the correct result.
+// Epsilon robust predicates give the result within some epsilon relative
+// error, but are a lot faster than high-precision predicates.
+// To make algorithm robust and efficient epsilon robust predicates are
+// used at the first step. In case of the undefined result high-precision
+// arithmetic is used to produce required robustness. This approach
+// requires exact computation of epsilon intervals within which epsilon
+// robust predicates have undefined value.
+// There are two ways to measure an error of floating-point calculations:
+// relative error and ULPs (units in the last place).
+// Let EPS be machine epsilon, then next inequalities have place:
+// 1 EPS <= 1 ULP <= 2 EPS (1), 0.5 ULP <= 1 EPS <= 1 ULP (2).
+// ULPs are good for measuring rounding errors and comparing values.
+// Relative errors are good for computation of general relative
+// error of formulas or expressions. So to calculate epsilon
+// interval within which epsilon robust predicates have undefined result
+// next schema is used:
+// 1) Compute rounding errors of initial variables using ULPs;
+// 2) Transform ULPs to epsilons using upper bound of the (1);
+// 3) Compute relative error of the formula using epsilon arithmetic;
+// 4) Transform epsilon to ULPs using upper bound of the (2);
+// In case two values are inside undefined ULP range use high-precision
+// arithmetic to produce the correct result, else output the result.
+// Look at almost_equal function to see how two floating-point variables
+// are checked to fit in the ULP range.
+// If A has relative error of r(A) and B has relative error of r(B) then:
+// 1) r(A + B) <= max(r(A), r(B)), for A * B >= 0;
+// 2) r(A - B) <= B*r(A)+A*r(B)/(A-B), for A * B >= 0;
+// 2) r(A * B) <= r(A) + r(B);
+// 3) r(A / B) <= r(A) + r(B);
+// In addition rounding error should be added, that is always equal to
+// 0.5 ULP or at most 1 epsilon. As you might see from the above formulas
+// subtraction relative error may be extremely large, that's why
+// epsilon robust comparator class is used to store floating point values
+// and compute subtraction as the final step of the evaluation.
+// For further information about relative errors and ULPs try this link:
+// http://docs.sun.com/source/806-3568/ncg_goldberg.html
+
+namespace boost {
+namespace polygon {
+namespace detail {
+
+template <typename T>
+T get_sqrt(const T& that) {
+ return (std::sqrt)(that);
+}
+
+template <typename T>
+bool is_pos(const T& that) {
+ return that > 0;
+}
+
+template <typename T>
+bool is_neg(const T& that) {
+ return that < 0;
+}
+
+template <typename T>
+bool is_zero(const T& that) {
+ return that == 0;
+}
+
+template <typename _fpt>
+class robust_fpt {
+ public:
+ typedef _fpt floating_point_type;
+ typedef _fpt relative_error_type;
+
+ // Rounding error is at most 1 EPS.
+ static const relative_error_type ROUNDING_ERROR;
+
+ robust_fpt() : fpv_(0.0), re_(0.0) {}
+ explicit robust_fpt(floating_point_type fpv) :
+ fpv_(fpv), re_(0.0) {}
+ robust_fpt(floating_point_type fpv, relative_error_type error) :
+ fpv_(fpv), re_(error) {}
+
+ floating_point_type fpv() const { return fpv_; }
+ relative_error_type re() const { return re_; }
+ relative_error_type ulp() const { return re_; }
+
+ robust_fpt& operator=(const robust_fpt& that) {
+ this->fpv_ = that.fpv_;
+ this->re_ = that.re_;
+ return *this;
+ }
+
+ bool has_pos_value() const {
+ return is_pos(fpv_);
+ }
+
+ bool has_neg_value() const {
+ return is_neg(fpv_);
+ }
+
+ bool has_zero_value() const {
+ return is_zero(fpv_);
+ }
+
+ robust_fpt operator-() const {
+ return robust_fpt(-fpv_, re_);
+ }
+
+ robust_fpt& operator+=(const robust_fpt& that) {
+ floating_point_type fpv = this->fpv_ + that.fpv_;
+ if ((!is_neg(this->fpv_) && !is_neg(that.fpv_)) ||
+ (!is_pos(this->fpv_) && !is_pos(that.fpv_))) {
+ this->re_ = (std::max)(this->re_, that.re_) + ROUNDING_ERROR;
+ } else {
+ floating_point_type temp =
+ (this->fpv_ * this->re_ - that.fpv_ * that.re_) / fpv;
+ if (is_neg(temp))
+ temp = -temp;
+ this->re_ = temp + ROUNDING_ERROR;
+ }
+ this->fpv_ = fpv;
+ return *this;
+ }
+
+ robust_fpt& operator-=(const robust_fpt& that) {
+ floating_point_type fpv = this->fpv_ - that.fpv_;
+ if ((!is_neg(this->fpv_) && !is_pos(that.fpv_)) ||
+ (!is_pos(this->fpv_) && !is_neg(that.fpv_))) {
+ this->re_ = (std::max)(this->re_, that.re_) + ROUNDING_ERROR;
+ } else {
+ floating_point_type temp =
+ (this->fpv_ * this->re_ + that.fpv_ * that.re_) / fpv;
+ if (is_neg(temp))
+ temp = -temp;
+ this->re_ = temp + ROUNDING_ERROR;
+ }
+ this->fpv_ = fpv;
+ return *this;
+ }
+
+ robust_fpt& operator*=(const robust_fpt& that) {
+ this->re_ += that.re_ + ROUNDING_ERROR;
+ this->fpv_ *= that.fpv_;
+ return *this;
+ }
+
+ robust_fpt& operator/=(const robust_fpt& that) {
+ this->re_ += that.re_ + ROUNDING_ERROR;
+ this->fpv_ /= that.fpv_;
+ return *this;
+ }
+
+ robust_fpt operator+(const robust_fpt& that) const {
+ floating_point_type fpv = this->fpv_ + that.fpv_;
+ relative_error_type re;
+ if ((!is_neg(this->fpv_) && !is_neg(that.fpv_)) ||
+ (!is_pos(this->fpv_) && !is_pos(that.fpv_))) {
+ re = (std::max)(this->re_, that.re_) + ROUNDING_ERROR;
+ } else {
+ floating_point_type temp =
+ (this->fpv_ * this->re_ - that.fpv_ * that.re_) / fpv;
+ if (is_neg(temp))
+ temp = -temp;
+ re = temp + ROUNDING_ERROR;
+ }
+ return robust_fpt(fpv, re);
+ }
+
+ robust_fpt operator-(const robust_fpt& that) const {
+ floating_point_type fpv = this->fpv_ - that.fpv_;
+ relative_error_type re;
+ if ((!is_neg(this->fpv_) && !is_pos(that.fpv_)) ||
+ (!is_pos(this->fpv_) && !is_neg(that.fpv_))) {
+ re = (std::max)(this->re_, that.re_) + ROUNDING_ERROR;
+ } else {
+ floating_point_type temp =
+ (this->fpv_ * this->re_ + that.fpv_ * that.re_) / fpv;
+ if (is_neg(temp))
+ temp = -temp;
+ re = temp + ROUNDING_ERROR;
+ }
+ return robust_fpt(fpv, re);
+ }
+
+ robust_fpt operator*(const robust_fpt& that) const {
+ floating_point_type fpv = this->fpv_ * that.fpv_;
+ relative_error_type re = this->re_ + that.re_ + ROUNDING_ERROR;
+ return robust_fpt(fpv, re);
+ }
+
+ robust_fpt operator/(const robust_fpt& that) const {
+ floating_point_type fpv = this->fpv_ / that.fpv_;
+ relative_error_type re = this->re_ + that.re_ + ROUNDING_ERROR;
+ return robust_fpt(fpv, re);
+ }
+
+ robust_fpt sqrt() const {
+ return robust_fpt(get_sqrt(fpv_),
+ re_ * static_cast<relative_error_type>(0.5) +
+ ROUNDING_ERROR);
+ }
+
+ private:
+ floating_point_type fpv_;
+ relative_error_type re_;
+};
+
+template <typename T>
+const typename robust_fpt<T>::relative_error_type
+ robust_fpt<T>::ROUNDING_ERROR = 1;
+
+template <typename T>
+robust_fpt<T> get_sqrt(const robust_fpt<T>& that) {
+ return that.sqrt();
+}
+
+template <typename T>
+bool is_pos(const robust_fpt<T>& that) {
+ return that.has_pos_value();
+}
+
+template <typename T>
+bool is_neg(const robust_fpt<T>& that) {
+ return that.has_neg_value();
+}
+
+template <typename T>
+bool is_zero(const robust_fpt<T>& that) {
+ return that.has_zero_value();
+}
+
+// robust_dif consists of two not negative values: value1 and value2.
+// The resulting expression is equal to the value1 - value2.
+// Subtraction of a positive value is equivalent to the addition to value2
+// and subtraction of a negative value is equivalent to the addition to
+// value1. The structure implicitly avoids difference computation.
+template <typename T>
+class robust_dif {
+ public:
+ robust_dif() :
+ positive_sum_(0),
+ negative_sum_(0) {}
+
+ explicit robust_dif(const T& value) :
+ positive_sum_((value > 0)?value:0),
+ negative_sum_((value < 0)?-value:0) {}
+
+ robust_dif(const T& pos, const T& neg) :
+ positive_sum_(pos),
+ negative_sum_(neg) {}
+
+ T dif() const {
+ return positive_sum_ - negative_sum_;
+ }
+
+ T pos() const {
+ return positive_sum_;
+ }
+
+ T neg() const {
+ return negative_sum_;
+ }
+
+ robust_dif<T> operator-() const {
+ return robust_dif(negative_sum_, positive_sum_);
+ }
+
+ robust_dif<T>& operator+=(const T& val) {
+ if (!is_neg(val))
+ positive_sum_ += val;
+ else
+ negative_sum_ -= val;
+ return *this;
+ }
+
+ robust_dif<T>& operator+=(const robust_dif<T>& that) {
+ positive_sum_ += that.positive_sum_;
+ negative_sum_ += that.negative_sum_;
+ return *this;
+ }
+
+ robust_dif<T>& operator-=(const T& val) {
+ if (!is_neg(val))
+ negative_sum_ += val;
+ else
+ positive_sum_ -= val;
+ return *this;
+ }
+
+ robust_dif<T>& operator-=(const robust_dif<T>& that) {
+ positive_sum_ += that.negative_sum_;
+ negative_sum_ += that.positive_sum_;
+ return *this;
+ }
+
+ robust_dif<T>& operator*=(const T& val) {
+ if (!is_neg(val)) {
+ positive_sum_ *= val;
+ negative_sum_ *= val;
+ } else {
+ positive_sum_ *= -val;
+ negative_sum_ *= -val;
+ swap();
+ }
+ return *this;
+ }
+
+ robust_dif<T>& operator*=(const robust_dif<T>& that) {
+ T positive_sum = this->positive_sum_ * that.positive_sum_ +
+ this->negative_sum_ * that.negative_sum_;
+ T negative_sum = this->positive_sum_ * that.negative_sum_ +
+ this->negative_sum_ * that.positive_sum_;
+ positive_sum_ = positive_sum;
+ negative_sum_ = negative_sum;
+ return *this;
+ }
+
+ robust_dif<T>& operator/=(const T& val) {
+ if (!is_neg(val)) {
+ positive_sum_ /= val;
+ negative_sum_ /= val;
+ } else {
+ positive_sum_ /= -val;
+ negative_sum_ /= -val;
+ swap();
+ }
+ return *this;
+ }
+
+ private:
+ void swap() {
+ (std::swap)(positive_sum_, negative_sum_);
+ }
+
+ T positive_sum_;
+ T negative_sum_;
+};
+
+template<typename T>
+robust_dif<T> operator+(const robust_dif<T>& lhs,
+ const robust_dif<T>& rhs) {
+ return robust_dif<T>(lhs.pos() + rhs.pos(), lhs.neg() + rhs.neg());
+}
+
+template<typename T>
+robust_dif<T> operator+(const robust_dif<T>& lhs, const T& rhs) {
+ if (!is_neg(rhs)) {
+ return robust_dif<T>(lhs.pos() + rhs, lhs.neg());
+ } else {
+ return robust_dif<T>(lhs.pos(), lhs.neg() - rhs);
+ }
+}
+
+template<typename T>
+robust_dif<T> operator+(const T& lhs, const robust_dif<T>& rhs) {
+ if (!is_neg(lhs)) {
+ return robust_dif<T>(lhs + rhs.pos(), rhs.neg());
+ } else {
+ return robust_dif<T>(rhs.pos(), rhs.neg() - lhs);
+ }
+}
+
+template<typename T>
+robust_dif<T> operator-(const robust_dif<T>& lhs,
+ const robust_dif<T>& rhs) {
+ return robust_dif<T>(lhs.pos() + rhs.neg(), lhs.neg() + rhs.pos());
+}
+
+template<typename T>
+robust_dif<T> operator-(const robust_dif<T>& lhs, const T& rhs) {
+ if (!is_neg(rhs)) {
+ return robust_dif<T>(lhs.pos(), lhs.neg() + rhs);
+ } else {
+ return robust_dif<T>(lhs.pos() - rhs, lhs.neg());
+ }
+}
+
+template<typename T>
+robust_dif<T> operator-(const T& lhs, const robust_dif<T>& rhs) {
+ if (!is_neg(lhs)) {
+ return robust_dif<T>(lhs + rhs.neg(), rhs.pos());
+ } else {
+ return robust_dif<T>(rhs.neg(), rhs.pos() - lhs);
+ }
+}
+
+template<typename T>
+robust_dif<T> operator*(const robust_dif<T>& lhs,
+ const robust_dif<T>& rhs) {
+ T res_pos = lhs.pos() * rhs.pos() + lhs.neg() * rhs.neg();
+ T res_neg = lhs.pos() * rhs.neg() + lhs.neg() * rhs.pos();
+ return robust_dif<T>(res_pos, res_neg);
+}
+
+template<typename T>
+robust_dif<T> operator*(const robust_dif<T>& lhs, const T& val) {
+ if (!is_neg(val)) {
+ return robust_dif<T>(lhs.pos() * val, lhs.neg() * val);
+ } else {
+ return robust_dif<T>(-lhs.neg() * val, -lhs.pos() * val);
+ }
+}
+
+template<typename T>
+robust_dif<T> operator*(const T& val, const robust_dif<T>& rhs) {
+ if (!is_neg(val)) {
+ return robust_dif<T>(val * rhs.pos(), val * rhs.neg());
+ } else {
+ return robust_dif<T>(-val * rhs.neg(), -val * rhs.pos());
+ }
+}
+
+template<typename T>
+robust_dif<T> operator/(const robust_dif<T>& lhs, const T& val) {
+ if (!is_neg(val)) {
+ return robust_dif<T>(lhs.pos() / val, lhs.neg() / val);
+ } else {
+ return robust_dif<T>(-lhs.neg() / val, -lhs.pos() / val);
+ }
+}
+
+// Used to compute expressions that operate with sqrts with predefined
+// relative error. Evaluates expressions of the next type:
+// sum(i = 1 .. n)(A[i] * sqrt(B[i])), 1 <= n <= 4.
+template <typename _int, typename _fpt, typename _converter>
+class robust_sqrt_expr {
+ public:
+ static const unsigned int EVAL1_MAX_RELATIVE_ERROR;
+ static const unsigned int EVAL2_MAX_RELATIVE_ERROR;
+ static const unsigned int EVAL3_MAX_RELATIVE_ERROR;
+ static const unsigned int EVAL4_MAX_RELATIVE_ERROR;
+
+ // Evaluates expression (re = 4 EPS):
+ // A[0] * sqrt(B[0]).
+ _fpt eval1(_int* A, _int* B) {
+ _fpt a = convert(A[0]);
+ _fpt b = convert(B[0]);
+ return a * get_sqrt(b);
+ }
+
+ // Evaluates expression (re = 7 EPS):
+ // A[0] * sqrt(B[0]) + A[1] * sqrt(B[1]).
+ _fpt eval2(_int* A, _int* B) {
+ _fpt a = eval1(A, B);
+ _fpt b = eval1(A + 1, B + 1);
+ if ((!is_neg(a) && !is_neg(b)) ||
+ (!is_pos(a) && !is_pos(b)))
+ return a + b;
+ return convert(A[0] * A[0] * B[0] - A[1] * A[1] * B[1]) / (a - b);
+ }
+
+ // Evaluates expression (re = 16 EPS):
+ // A[0] * sqrt(B[0]) + A[1] * sqrt(B[1]) + A[2] * sqrt(B[2]).
+ _fpt eval3(_int* A, _int* B) {
+ _fpt a = eval2(A, B);
+ _fpt b = eval1(A + 2, B + 2);
+ if ((!is_neg(a) && !is_neg(b)) ||
+ (!is_pos(a) && !is_pos(b)))
+ return a + b;
+ tA[3] = A[0] * A[0] * B[0] + A[1] * A[1] * B[1] - A[2] * A[2] * B[2];
+ tB[3] = 1;
+ tA[4] = A[0] * A[1] * 2;
+ tB[4] = B[0] * B[1];
+ return eval2(tA + 3, tB + 3) / (a - b);
+ }
+
+
+ // Evaluates expression (re = 25 EPS):
+ // A[0] * sqrt(B[0]) + A[1] * sqrt(B[1]) +
+ // A[2] * sqrt(B[2]) + A[3] * sqrt(B[3]).
+ _fpt eval4(_int* A, _int* B) {
+ _fpt a = eval2(A, B);
+ _fpt b = eval2(A + 2, B + 2);
+ if ((!is_neg(a) && !is_neg(b)) ||
+ (!is_pos(a) && !is_pos(b)))
+ return a + b;
+ tA[0] = A[0] * A[0] * B[0] + A[1] * A[1] * B[1] -
+ A[2] * A[2] * B[2] - A[3] * A[3] * B[3];
+ tB[0] = 1;
+ tA[1] = A[0] * A[1] * 2;
+ tB[1] = B[0] * B[1];
+ tA[2] = A[2] * A[3] * -2;
+ tB[2] = B[2] * B[3];
+ return eval3(tA, tB) / (a - b);
+ }
+
+ private:
+ _int tA[5];
+ _int tB[5];
+ _converter convert;
+};
+
+template <typename _int, typename _fpt, typename _converter>
+const unsigned int robust_sqrt_expr<_int, _fpt, _converter>::
+ EVAL1_MAX_RELATIVE_ERROR = 4;
+template <typename _int, typename _fpt, typename _converter>
+const unsigned int robust_sqrt_expr<_int, _fpt, _converter>::
+ EVAL2_MAX_RELATIVE_ERROR = 7;
+template <typename _int, typename _fpt, typename _converter>
+const unsigned int robust_sqrt_expr<_int, _fpt, _converter>::
+ EVAL3_MAX_RELATIVE_ERROR = 16;
+template <typename _int, typename _fpt, typename _converter>
+const unsigned int robust_sqrt_expr<_int, _fpt, _converter>::
+ EVAL4_MAX_RELATIVE_ERROR = 25;
+} // detail
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_DETAIL_VORONOI_ROBUST_FPT

Added: branches/release/boost/polygon/detail/voronoi_structures.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/detail/voronoi_structures.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,461 @@
+// Boost.Polygon library detail/voronoi_structures.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_DETAIL_VORONOI_STRUCTURES
+#define BOOST_POLYGON_DETAIL_VORONOI_STRUCTURES
+
+#include <list>
+#include <queue>
+#include <vector>
+
+#include "boost/polygon/voronoi_geometry_type.hpp"
+
+namespace boost {
+namespace polygon {
+namespace detail {
+// Cartesian 2D point data structure.
+template <typename T>
+class point_2d {
+ public:
+ typedef T coordinate_type;
+
+ point_2d() {}
+
+ point_2d(coordinate_type x, coordinate_type y) :
+ x_(x),
+ y_(y) {}
+
+ bool operator==(const point_2d& that) const {
+ return (this->x_ == that.x()) && (this->y_ == that.y());
+ }
+
+ bool operator!=(const point_2d& that) const {
+ return (this->x_ != that.x()) || (this->y_ != that.y());
+ }
+
+ coordinate_type x() const {
+ return x_;
+ }
+
+ coordinate_type y() const {
+ return y_;
+ }
+
+ point_2d& x(coordinate_type x) {
+ x_ = x;
+ return *this;
+ }
+
+ point_2d& y(coordinate_type y) {
+ y_ = y;
+ return *this;
+ }
+
+ private:
+ coordinate_type x_;
+ coordinate_type y_;
+};
+
+// Site event type.
+// Occurs when the sweepline sweeps over one of the initial sites:
+// 1) point site
+// 2) start-point of the segment site
+// 3) endpoint of the segment site
+// Implicit segment direction is defined: the start-point of
+// the segment compares less than its endpoint.
+// Each input segment is divided onto two site events:
+// 1) One going from the start-point to the endpoint
+// (is_inverse() = false)
+// 2) Another going from the endpoint to the start-point
+// (is_inverse() = true)
+// In beach line data structure segment sites of the first
+// type precede sites of the second type for the same segment.
+// Members:
+// point0_ - point site or segment's start-point
+// point1_ - segment's endpoint if site is a segment
+// sorted_index_ - the last bit encodes information if the site is inverse;
+// the other bits encode site event index among the sorted site events
+// initial_index_ - site index among the initial input set
+// Note: for all sites is_inverse_ flag is equal to false by default.
+template <typename T>
+class site_event {
+ public:
+ typedef T coordinate_type;
+ typedef point_2d<T> point_type;
+
+ site_event() :
+ point0_(0, 0),
+ point1_(0, 0),
+ sorted_index_(0),
+ flags_(0) {}
+
+ site_event(coordinate_type x, coordinate_type y) :
+ point0_(x, y),
+ point1_(x, y),
+ sorted_index_(0),
+ flags_(0) {}
+
+ explicit site_event(const point_type& point) :
+ point0_(point),
+ point1_(point),
+ sorted_index_(0),
+ flags_(0) {}
+
+ site_event(coordinate_type x1, coordinate_type y1,
+ coordinate_type x2, coordinate_type y2):
+ point0_(x1, y1),
+ point1_(x2, y2),
+ sorted_index_(0),
+ flags_(0) {}
+
+ site_event(const point_type& point1, const point_type& point2) :
+ point0_(point1),
+ point1_(point2),
+ sorted_index_(0),
+ flags_(0) {}
+
+ bool operator==(const site_event& that) const {
+ return (this->point0_ == that.point0_) &&
+ (this->point1_ == that.point1_);
+ }
+
+ bool operator!=(const site_event& that) const {
+ return (this->point0_ != that.point0_) ||
+ (this->point1_ != that.point1_);
+ }
+
+ coordinate_type x(bool oriented = false) const {
+ return x0(oriented);
+ }
+
+ coordinate_type y(bool oriented = false) const {
+ return y0(oriented);
+ }
+
+ coordinate_type x0(bool oriented = false) const {
+ if (!oriented)
+ return point0_.x();
+ return is_inverse() ? point1_.x() : point0_.x();
+ }
+
+ coordinate_type y0(bool oriented = false) const {
+ if (!oriented)
+ return point0_.y();
+ return is_inverse() ? point1_.y() : point0_.y();
+ }
+
+ coordinate_type x1(bool oriented = false) const {
+ if (!oriented)
+ return point1_.x();
+ return is_inverse() ? point0_.x() : point1_.x();
+ }
+
+ coordinate_type y1(bool oriented = false) const {
+ if (!oriented)
+ return point1_.y();
+ return is_inverse() ? point0_.y() : point1_.y();
+ }
+
+ const point_type& point0(bool oriented = false) const {
+ if (!oriented)
+ return point0_;
+ return is_inverse() ? point1_ : point0_;
+ }
+
+ const point_type& point1(bool oriented = false) const {
+ if (!oriented)
+ return point1_;
+ return is_inverse() ? point0_ : point1_;
+ }
+
+ std::size_t sorted_index() const {
+ return sorted_index_;
+ }
+
+ site_event& sorted_index(std::size_t index) {
+ sorted_index_ = index;
+ return *this;
+ }
+
+ std::size_t initial_index() const {
+ return initial_index_;
+ }
+
+ site_event& initial_index(std::size_t index) {
+ initial_index_ = index;
+ return *this;
+ }
+
+ bool is_inverse() const {
+ return (flags_ & IS_INVERSE) ? true : false;
+ }
+
+ site_event& inverse() {
+ flags_ ^= IS_INVERSE;
+ return *this;
+ }
+
+ SourceCategory source_category() const {
+ return static_cast<SourceCategory>(flags_ & SOURCE_CATEGORY_BITMASK);
+ }
+
+ site_event& source_category(SourceCategory source_category) {
+ flags_ |= source_category;
+ return *this;
+ }
+
+ bool is_point() const {
+ return (point0_.x() == point1_.x()) && (point0_.y() == point1_.y());
+ }
+
+ bool is_segment() const {
+ return (point0_.x() != point1_.x()) || (point0_.y() != point1_.y());
+ }
+
+ private:
+ enum Bits {
+ IS_INVERSE = 0x20 // 32
+ };
+
+ point_type point0_;
+ point_type point1_;
+ std::size_t sorted_index_;
+ std::size_t initial_index_;
+ std::size_t flags_;
+};
+
+// Circle event type.
+// Occurs when the sweepline sweeps over the rightmost point of the Voronoi
+// circle (with the center at the intersection point of the bisectors).
+// Circle event is made of the two consecutive nodes in the beach line data
+// structure. In case another node was inserted during algorithm execution
+// between the given two nodes circle event becomes inactive.
+// Variables:
+// center_x_ - center x-coordinate;
+// center_y_ - center y-coordinate;
+// lower_x_ - leftmost x-coordinate;
+// is_active_ - states whether circle event is still active.
+// NOTE: lower_y coordinate is always equal to center_y.
+template <typename T>
+class circle_event {
+ public:
+ typedef T coordinate_type;
+
+ circle_event() : is_active_(true) {}
+
+ circle_event(coordinate_type c_x,
+ coordinate_type c_y,
+ coordinate_type lower_x) :
+ center_x_(c_x),
+ center_y_(c_y),
+ lower_x_(lower_x),
+ is_active_(true) {}
+
+ coordinate_type x() const {
+ return center_x_;
+ }
+
+ circle_event& x(coordinate_type center_x) {
+ center_x_ = center_x;
+ return *this;
+ }
+
+ coordinate_type y() const {
+ return center_y_;
+ }
+
+ circle_event& y(coordinate_type center_y) {
+ center_y_ = center_y;
+ return *this;
+ }
+
+ coordinate_type lower_x() const {
+ return lower_x_;
+ }
+
+ circle_event& lower_x(coordinate_type lower_x) {
+ lower_x_ = lower_x;
+ return *this;
+ }
+
+ coordinate_type lower_y() const {
+ return center_y_;
+ }
+
+ bool is_active() const {
+ return is_active_;
+ }
+
+ circle_event& deactivate() {
+ is_active_ = false;
+ return *this;
+ }
+
+ private:
+ coordinate_type center_x_;
+ coordinate_type center_y_;
+ coordinate_type lower_x_;
+ bool is_active_;
+};
+
+// Event queue data structure, holds circle events.
+// During algorithm run, some of the circle events disappear (become
+// inactive). Priority queue data structure doesn't support
+// iterators (there is no direct ability to modify its elements).
+// Instead list is used to store all the circle events and priority queue
+// of the iterators to the list elements is used to keep the correct circle
+// events ordering.
+template <typename T, typename Predicate>
+class ordered_queue {
+ public:
+ ordered_queue() {}
+
+ bool empty() const {
+ return c_.empty();
+ }
+
+ const T &top() const {
+ return *c_.top();
+ }
+
+ void pop() {
+ list_iterator_type it = c_.top();
+ c_.pop();
+ c_list_.erase(it);
+ }
+
+ T &push(const T &e) {
+ c_list_.push_front(e);
+ c_.push(c_list_.begin());
+ return c_list_.front();
+ }
+
+ void clear() {
+ while (!c_.empty())
+ c_.pop();
+ c_list_.clear();
+ }
+
+ private:
+ typedef typename std::list<T>::iterator list_iterator_type;
+
+ struct comparison {
+ bool operator() (const list_iterator_type &it1,
+ const list_iterator_type &it2) const {
+ return cmp_(*it1, *it2);
+ }
+ Predicate cmp_;
+ };
+
+ std::priority_queue< list_iterator_type,
+ std::vector<list_iterator_type>,
+ comparison > c_;
+ std::list<T> c_list_;
+
+ // Disallow copy constructor and operator=
+ ordered_queue(const ordered_queue&);
+ void operator=(const ordered_queue&);
+};
+
+// Represents a bisector node made by two arcs that correspond to the left
+// and right sites. Arc is defined as a curve with points equidistant from
+// the site and from the sweepline. If the site is a point then arc is
+// a parabola, otherwise it's a line segment. A segment site event will
+// produce different bisectors based on its direction.
+// In general case two sites will create two opposite bisectors. That's
+// why the order of the sites is important to define the unique bisector.
+// The one site is considered to be newer than the other one if it was
+// processed by the algorithm later (has greater index).
+template <typename Site>
+class beach_line_node_key {
+ public:
+ typedef Site site_type;
+
+ // Constructs degenerate bisector, used to search an arc that is above
+ // the given site. The input to the constructor is the new site point.
+ explicit beach_line_node_key(const site_type &new_site) :
+ left_site_(new_site),
+ right_site_(new_site) {}
+
+ // Constructs a new bisector. The input to the constructor is the two
+ // sites that create the bisector. The order of sites is important.
+ beach_line_node_key(const site_type &left_site,
+ const site_type &right_site) :
+ left_site_(left_site),
+ right_site_(right_site) {}
+
+ const site_type &left_site() const {
+ return left_site_;
+ }
+
+ site_type &left_site() {
+ return left_site_;
+ }
+
+ beach_line_node_key& left_site(const site_type &site) {
+ left_site_ = site;
+ return *this;
+ }
+
+ const site_type &right_site() const {
+ return right_site_;
+ }
+
+ site_type &right_site() {
+ return right_site_;
+ }
+
+ beach_line_node_key& right_site(const site_type &site) {
+ right_site_ = site;
+ return *this;
+ }
+
+ private:
+ site_type left_site_;
+ site_type right_site_;
+};
+
+// Represents edge data structure from the Voronoi output, that is
+// associated as a value with beach line bisector in the beach
+// line. Contains pointer to the circle event in the circle event
+// queue if the edge corresponds to the right bisector of the circle event.
+template <typename Edge, typename Circle>
+class beach_line_node_data {
+ public:
+ explicit beach_line_node_data(Edge* new_edge) :
+ circle_event_(NULL),
+ edge_(new_edge) {}
+
+ Circle* circle_event() const {
+ return circle_event_;
+ }
+
+ beach_line_node_data& circle_event(Circle* circle_event) {
+ circle_event_ = circle_event;
+ return *this;
+ }
+
+ Edge* edge() const {
+ return edge_;
+ }
+
+ beach_line_node_data& edge(Edge* new_edge) {
+ edge_ = new_edge;
+ return *this;
+ }
+
+ private:
+ Circle* circle_event_;
+ Edge* edge_;
+};
+} // detail
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_DETAIL_VORONOI_STRUCTURES

Modified: branches/release/boost/polygon/gmp_override.hpp
==============================================================================
--- branches/release/boost/polygon/gmp_override.hpp (original)
+++ branches/release/boost/polygon/gmp_override.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -25,14 +25,14 @@
       v_ = that;
       return (*this);
     }
- inline operator int() const {
+ inline operator int() const {
       std::cout << "cast\n";
       mpz_class num = v_.get_num();
       mpz_class den = v_.get_den();
       num /= den;
- return num.get_si();
+ return num.get_si();
     }
- inline double get_d() const {
+ inline double get_d() const {
       return v_.get_d();
     }
     inline int get_num() const {
@@ -109,7 +109,7 @@
   private:
     mpq_class v_;
   };
-
+
   template <>
   struct high_precision_type<int> {
     typedef mpq_class type;
@@ -120,10 +120,9 @@
     mpz_class num = v.get_num();
     mpz_class den = v.get_den();
     num /= den;
- return num.get_si();
+ return num.get_si();
   };
 
 }
 }
-//==
 #endif

Modified: branches/release/boost/polygon/gtl.hpp
==============================================================================
--- branches/release/boost/polygon/gtl.hpp (original)
+++ branches/release/boost/polygon/gtl.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).

Modified: branches/release/boost/polygon/interval_concept.hpp
==============================================================================
--- branches/release/boost/polygon/interval_concept.hpp (original)
+++ branches/release/boost/polygon/interval_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -13,7 +13,7 @@
 
 namespace boost { namespace polygon{
   struct interval_concept {};
-
+
   template <typename T>
   struct is_interval_concept { typedef gtl_no type; };
   template <>
@@ -38,7 +38,7 @@
   template <typename T, typename CT>
   struct interval_difference_type_by_concept { typedef void type; };
   template <typename T>
- struct interval_difference_type_by_concept<T, gtl_yes> {
+ struct interval_difference_type_by_concept<T, gtl_yes> {
     typedef typename coordinate_traits<typename interval_traits<T>::coordinate_type>::coordinate_difference type; };
 
   template <typename T>
@@ -47,73 +47,87 @@
             T, typename is_interval_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
+ struct y_i_get : gtl_yes {};
 
   template <typename T>
- typename interval_coordinate_type<T>::type
- get(const T& interval, direction_1d dir,
- typename enable_if<typename gtl_if<typename is_interval_concept<typename geometry_concept<T>::type>::type>::type>::type * = 0
- ) {
- return interval_traits<T>::get(interval, dir);
+ typename enable_if< typename gtl_and<
+ y_i_get,
+ typename is_interval_concept<typename geometry_concept<T>::type>::type>::type,
+ typename interval_coordinate_type<T>::type>::type
+ get(const T& interval, direction_1d dir) {
+ return interval_traits<T>::get(interval, dir);
   }
 
+ struct y_i_set : gtl_yes {};
+
   template <typename T, typename coordinate_type>
- void
- set(T& interval, direction_1d dir, coordinate_type value,
- typename enable_if<typename is_mutable_interval_concept<typename geometry_concept<T>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and<
+ y_i_set,
+ typename is_mutable_interval_concept<typename geometry_concept<T>::type>::type>::type,
+ void>::type
+ set(T& interval, direction_1d dir, coordinate_type value) {
     //this may need to be refined
- interval_mutable_traits<T>::set(interval, dir, value);
+ interval_mutable_traits<T>::set(interval, dir, value);
     if(high(interval) < low(interval))
       interval_mutable_traits<T>::set(interval, dir.backward(), value);
   }
-
+
+ struct y_i_construct : gtl_yes {};
+
   template <typename T, typename T2, typename T3>
- T
- construct(T2 low_value, T3 high_value,
- typename enable_if<typename is_mutable_interval_concept<typename geometry_concept<T>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and<
+ y_i_construct,
+ typename is_mutable_interval_concept<typename geometry_concept<T>::type>::type>::type,
+ T>::type
+ construct(T2 low_value, T3 high_value) {
     if(low_value > high_value) std::swap(low_value, high_value);
- return interval_mutable_traits<T>::construct(low_value, high_value);
+ return interval_mutable_traits<T>::construct(low_value, high_value);
   }
-
+
+ struct y_i_copy_construct : gtl_yes {};
+
   template <typename T, typename T2>
- T
- copy_construct(const T2& interval,
- typename enable_if< typename gtl_and<typename is_mutable_interval_concept<typename geometry_concept<T>::type>::type,
- typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type>::type * = 0
- ) {
- return construct<T>
- (get(interval, LOW ),
- get(interval, HIGH));
+ typename enable_if< typename gtl_and_3<
+ y_i_copy_construct,
+ typename is_mutable_interval_concept<typename geometry_concept<T>::type>::type,
+ typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
+ T>::type
+ copy_construct(const T2& interval) {
+ return construct<T>(get(interval, LOW ), get(interval, HIGH));
   }
 
+ struct y_i_assign : gtl_yes {};
+
   template <typename T1, typename T2>
- T1 &
- assign(T1& lvalue, const T2& rvalue,
- typename enable_if< typename gtl_and< typename is_mutable_interval_concept<typename geometry_concept<T1>::type>::type,
- typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type>::type * = 0) {
+ typename enable_if< typename gtl_and_3<
+ y_i_assign,
+ typename is_mutable_interval_concept<typename geometry_concept<T1>::type>::type,
+ typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
+ T1>::type &
+ assign(T1& lvalue, const T2& rvalue) {
     lvalue = copy_construct<T1>(rvalue);
     return lvalue;
   }
 
+ struct y_i_equivalence : gtl_yes {};
+
   template <typename T, typename T2>
- bool
- equivalence(const T& interval1, const T2& interval2,
- typename enable_if< typename gtl_and< typename is_interval_concept<typename geometry_concept<T>::type>::type,
- typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type>::type * = 0
- ) {
- return get(interval1, LOW) ==
- get(interval2, LOW) &&
- get(interval1, HIGH) ==
- get(interval2, HIGH);
+ typename enable_if< typename gtl_and_3<
+ y_i_equivalence,
+ typename is_interval_concept<typename geometry_concept<T>::type>::type,
+ typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
+ bool>::type
+ equivalence(const T& interval1, const T2& interval2) {
+ return get(interval1, LOW) == get(interval2, LOW) &&
+ get(interval1, HIGH) == get(interval2, HIGH);
   }
-
+
   struct y_i_contains : gtl_yes {};
 
   template <typename interval_type>
- typename enable_if< typename gtl_and< y_i_contains, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type >::type, bool>::type
+ typename enable_if< typename gtl_and< y_i_contains, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type >::type, bool>::type
   contains(const interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type value,
+ typename interval_coordinate_type<interval_type>::type value,
            bool consider_touch = true ) {
     if(consider_touch) {
       return value <= high(interval) && value >= low(interval);
@@ -121,63 +135,85 @@
       return value < high(interval) && value > low(interval);
     }
   }
-
+
+ struct y_i_contains2 : gtl_yes {};
+
   template <typename interval_type, typename interval_type_2>
- bool
+ typename enable_if< typename gtl_and_3<
+ y_i_contains2,
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
+ typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
+ bool>::type
   contains(const interval_type& interval,
- const interval_type_2& value, bool consider_touch = true,
- typename enable_if< typename gtl_and< typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
- typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type>::type * = 0
- ) {
+ const interval_type_2& value,
+ bool consider_touch = true) {
     return contains(interval, get(value, LOW), consider_touch) &&
       contains(interval, get(value, HIGH), consider_touch);
   }
-
+
+ struct y_i_low : gtl_yes {};
+
   // get the low coordinate
   template <typename interval_type>
- typename interval_traits<interval_type>::coordinate_type
- low(const interval_type& interval,
- typename enable_if< typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type * = 0
- ) { return get(interval, LOW); }
+ typename enable_if< typename gtl_and<
+ y_i_low,
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ typename interval_coordinate_type<interval_type>::type>::type
+ low(const interval_type& interval) { return get(interval, LOW); }
+
+ struct y_i_high : gtl_yes {};
 
   // get the high coordinate
   template <typename interval_type>
- typename interval_traits<interval_type>::coordinate_type
- high(const interval_type& interval,
- typename enable_if< typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type * = 0
- ) { return get(interval, HIGH); }
+ typename enable_if< typename gtl_and<
+ y_i_high,
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ typename interval_coordinate_type<interval_type>::type>::type
+ high(const interval_type& interval) { return get(interval, HIGH); }
+
+ struct y_i_center : gtl_yes {};
 
   // get the center coordinate
   template <typename interval_type>
- typename interval_traits<interval_type>::coordinate_type
- center(const interval_type& interval,
- typename enable_if< typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type * = 0
- ) { return (high(interval) + low(interval))/2; }
+ typename enable_if< typename gtl_and<
+ y_i_center,
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ typename interval_coordinate_type<interval_type>::type>::type
+ center(const interval_type& interval) { return (high(interval) + low(interval))/2; }
 
 
- struct y_i_low : gtl_yes {};
+ struct y_i_low2 : gtl_yes {};
 
   // set the low coordinate to v
   template <typename interval_type>
- typename enable_if<typename gtl_and<y_i_low, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, void>::type
+ typename enable_if<typename gtl_and<
+ y_i_low2,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ void>::type
   low(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type v) { set(interval, LOW, v); }
-
- struct y_i_high : gtl_yes {};
+ typename interval_coordinate_type<interval_type>::type v) { set(interval, LOW, v); }
+
+ struct y_i_high2 : gtl_yes {};
 
   // set the high coordinate to v
   template <typename interval_type>
- typename enable_if<typename gtl_and<y_i_high, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, void>::type
+ typename enable_if<typename gtl_and<
+ y_i_high2,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ void>::type
   high(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type v) { set(interval, HIGH, v); }
-
+ typename interval_coordinate_type<interval_type>::type v) { set(interval, HIGH, v); }
+
+ struct y_i_delta : gtl_yes {};
+
   // get the magnitude of the interval
   template <typename interval_type>
- typename interval_difference_type<interval_type>::type
- delta(const interval_type& interval,
- typename enable_if< typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type * = 0
- ) {
- typedef typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::coordinate_difference diffT;
+ typename enable_if< typename gtl_and<
+ y_i_delta,
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ typename interval_difference_type<interval_type>::type >::type
+ delta(const interval_type& interval) {
+ typedef typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::coordinate_difference diffT;
     return (diffT)high(interval) - (diffT)low(interval); }
 
   struct y_i_flip : gtl_yes {};
@@ -186,8 +222,8 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_flip, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   flip(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type axis = 0) {
- typename interval_traits<interval_type>::coordinate_type newLow, newHigh;
+ typename interval_coordinate_type<interval_type>::type axis = 0) {
+ typename interval_coordinate_type<interval_type>::type newLow, newHigh;
     newLow = 2 * axis - high(interval);
     newHigh = 2 * axis - low(interval);
     low(interval, newLow);
@@ -200,9 +236,9 @@
   // scale interval by factor
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_scale_up, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
- scale_up(interval_type& interval,
- typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::unsigned_area_type factor) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ scale_up(interval_type& interval,
+ typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::unsigned_area_type factor) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newHigh = high(interval) * (Unit)factor;
     low(interval, low(interval) * (Unit)factor);
     high(interval, (newHigh));
@@ -213,12 +249,12 @@
 
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_scale_down, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
- scale_down(interval_type& interval,
- typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::unsigned_area_type factor) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ scale_down(interval_type& interval,
+ typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::unsigned_area_type factor) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     typedef typename coordinate_traits<Unit>::coordinate_distance dt;
- Unit newHigh = scaling_policy<Unit>::round((dt)(high(interval)) / (dt)factor);
- low(interval, scaling_policy<Unit>::round((dt)(low(interval)) / (dt)factor));
+ Unit newHigh = scaling_policy<Unit>::round((dt)(high(interval)) / (dt)factor);
+ low(interval, scaling_policy<Unit>::round((dt)(low(interval)) / (dt)factor));
     high(interval, (newHigh));
     return interval;
   }
@@ -228,36 +264,38 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_scale, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   scale(interval_type& interval, double factor) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newHigh = scaling_policy<Unit>::round((double)(high(interval)) * factor);
     low(interval, scaling_policy<Unit>::round((double)low(interval)* factor));
     high(interval, (newHigh));
     return interval;
   }
-
+
+ struct y_i_move : gtl_yes {};
+
   // move interval by delta
   template <typename interval_type>
- interval_type&
- move(interval_type& interval,
- typename interval_difference_type<interval_type>::type displacement,
- typename enable_if<typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type * = 0
- ) {
- typedef typename interval_traits<interval_type>::coordinate_type ctype;
+ typename enable_if< typename gtl_and<
+ y_i_move,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ interval_type>::type &
+ move(interval_type& interval, typename interval_difference_type<interval_type>::type displacement) {
+ typedef typename interval_coordinate_type<interval_type>::type ctype;
     typedef typename coordinate_traits<ctype>::coordinate_difference Unit;
     Unit len = delta(interval);
     low(interval, static_cast<ctype>(static_cast<Unit>(low(interval)) + displacement));
     high(interval, static_cast<ctype>(static_cast<Unit>(low(interval)) + len));
     return interval;
   }
-
+
   struct y_i_convolve : gtl_yes {};
 
   // convolve this with b
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_convolve, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   convolve(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typename interval_coordinate_type<interval_type>::type b) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) + b;
     Unit newHigh = high(interval) + b;
     low(interval, newLow);
@@ -271,8 +309,8 @@
   template <typename interval_type>
   typename enable_if<typename gtl_and<y_i_deconvolve, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
   deconvolve(interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typename interval_coordinate_type<interval_type>::type b) {
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) - b;
     Unit newHigh = high(interval) - b;
     low(interval, newLow);
@@ -284,78 +322,78 @@
 
   // convolve this with b
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_convolve2,
- typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
                        typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
     interval_type>::type &
   convolve(interval_type& interval,
            const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) + low(b);
     Unit newHigh = high(interval) + high(b);
     low(interval, newLow);
                          high(interval, newHigh);
                          return interval;
   }
-
+
   struct y_i_deconvolve2 : gtl_yes {};
 
   // deconvolve this with b
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3< y_i_deconvolve2,
                         typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
                         typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
     interval_type>::type &
   deconvolve(interval_type& interval,
              const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) - low(b);
     Unit newHigh = high(interval) - high(b);
     low(interval, newLow);
     high(interval, newHigh);
     return interval;
   }
-
+
   struct y_i_reconvolve : gtl_yes {};
 
   // reflected convolve this with b
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_reconvolve,
                        typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
                        typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
     interval_type>::type &
   reflected_convolve(interval_type& interval,
                      const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) - high(b);
     Unit newHigh = high(interval) - low(b);
     low(interval, newLow);
     high(interval, newHigh);
     return interval;
   }
-
+
   struct y_i_redeconvolve : gtl_yes {};
 
   // reflected deconvolve this with b
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3< y_i_redeconvolve,
- typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
- typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
+ typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
     interval_type>::type &
   reflected_deconvolve(interval_type& interval,
                        const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit newLow = low(interval) + high(b);
     Unit newHigh = high(interval) + low(b);
     low(interval, newLow);
     high(interval, newHigh);
     return interval;
   }
-
+
   struct y_i_e_dist1 : gtl_yes {};
 
   // distance from a coordinate to an interval
@@ -363,38 +401,38 @@
   typename enable_if< typename gtl_and<y_i_e_dist1, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        typename interval_difference_type<interval_type>::type>::type
   euclidean_distance(const interval_type& interval,
- typename interval_traits<interval_type>::coordinate_type position) {
- typedef typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::coordinate_difference Unit;
+ typename interval_coordinate_type<interval_type>::type position) {
+ typedef typename coordinate_traits<typename interval_difference_type<interval_type>::type>::coordinate_difference Unit;
     Unit dist[3] = {0, (Unit)low(interval) - (Unit)position, (Unit)position - (Unit)high(interval)};
     return dist[ (dist[1] > 0) + ((dist[2] > 0) << 1) ];
   }
 
   struct y_i_e_dist2 : gtl_yes {};
-
+
   // distance between two intervals
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_e_dist2, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
                        typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
     typename interval_difference_type<interval_type>::type>::type
   euclidean_distance(const interval_type& interval,
                      const interval_type_2& b) {
- typedef typename coordinate_traits<typename interval_traits<interval_type>::coordinate_type>::coordinate_difference Unit;
+ typedef typename coordinate_traits<typename interval_difference_type<interval_type>::type>::coordinate_difference Unit;
     Unit dist[3] = {0, (Unit)low(interval) - (Unit)high(b), (Unit)low(b) - (Unit)high(interval)};
     return dist[ (dist[1] > 0) + ((dist[2] > 0) << 1) ];
   }
-
+
   struct y_i_e_intersects : gtl_yes {};
 
   // check if Interval b intersects `this` Interval
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_e_intersects, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
                        typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
- intersects(const interval_type& interval, const interval_type_2& b,
+ bool>::type
+ intersects(const interval_type& interval, const interval_type_2& b,
                bool consider_touch = true) {
- return consider_touch ?
+ return consider_touch ?
                            (low(interval) <= high(b)) & (high(interval) >= low(b)) :
                            (low(interval) < high(b)) & (high(interval) > low(b));
   }
@@ -403,15 +441,15 @@
 
   // check if Interval b partially overlaps `this` Interval
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_e_bintersect, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
                        typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
- boundaries_intersect(const interval_type& interval, const interval_type_2& b,
+ bool>::type
+ boundaries_intersect(const interval_type& interval, const interval_type_2& b,
                        bool consider_touch = true) {
- return (contains(interval, low(b), consider_touch) ||
+ return (contains(interval, low(b), consider_touch) ||
             contains(interval, high(b), consider_touch)) &&
- (contains(b, low(interval), consider_touch) ||
+ (contains(b, low(interval), consider_touch) ||
        contains(b, high(interval), consider_touch));
   }
 
@@ -421,7 +459,7 @@
   template <typename interval_type, typename interval_type_2>
   typename enable_if< typename gtl_and_3<y_i_abuts1, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
                                          typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   abuts(const interval_type& interval, const interval_type_2& b, direction_1d dir) {
     return dir.to_int() ? low(b) == high(interval) : low(interval) == high(b);
   }
@@ -430,13 +468,13 @@
 
   // check if they are end to end
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_abuts2, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
                        typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   abuts(const interval_type& interval, const interval_type_2& b) {
     return abuts(interval, b, HIGH) || abuts(interval, b, LOW);
- }
+ }
 
   struct y_i_intersect : gtl_yes {};
 
@@ -444,9 +482,9 @@
   template <typename interval_type, typename interval_type_2>
   typename enable_if< typename gtl_and_3<y_i_intersect, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
                                          typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   intersect(interval_type& interval, const interval_type_2& b, bool consider_touch = true) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit lowVal = (std::max)(low(interval), low(b));
     Unit highVal = (std::min)(high(interval), high(b));
     bool valid = consider_touch ?
@@ -463,15 +501,15 @@
 
   // set 'this' interval to the generalized intersection of 'this' and b
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_g_intersect, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
                       typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
     interval_type>::type &
   generalized_intersect(interval_type& interval, const interval_type_2& b) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit coords[4] = {low(interval), high(interval), low(b), high(b)};
     //consider implementing faster sorting of small fixed length range
- gtlsort(coords, coords+4);
+ polygon_sort(coords, coords+4);
     low(interval, coords[1]);
     high(interval, coords[2]);
     return interval;
@@ -483,19 +521,19 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_bloat, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- bloat(interval_type& interval, typename interval_traits<interval_type>::coordinate_type bloating) {
+ bloat(interval_type& interval, typename interval_coordinate_type<interval_type>::type bloating) {
     low(interval, low(interval)-bloating);
     high(interval, high(interval)+bloating);
     return interval;
   }
-
+
   struct y_i_bloat2 : gtl_yes {};
 
   // bloat the specified side of `this` Interval
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_bloat2, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- bloat(interval_type& interval, direction_1d dir, typename interval_traits<interval_type>::coordinate_type bloating) {
+ bloat(interval_type& interval, direction_1d dir, typename interval_coordinate_type<interval_type>::type bloating) {
     set(interval, dir, get(interval, dir) + dir.get_sign() * bloating);
     return interval;
   }
@@ -506,7 +544,7 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_shrink, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- shrink(interval_type& interval, typename interval_traits<interval_type>::coordinate_type shrinking) {
+ shrink(interval_type& interval, typename interval_coordinate_type<interval_type>::type shrinking) {
     return bloat(interval, -shrinking);
   }
 
@@ -516,44 +554,46 @@
   template <typename interval_type>
   typename enable_if< typename gtl_and<y_i_shrink2, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        interval_type>::type &
- shrink(interval_type& interval, direction_1d dir, typename interval_traits<interval_type>::coordinate_type shrinking) {
+ shrink(interval_type& interval, direction_1d dir, typename interval_coordinate_type<interval_type>::type shrinking) {
     return bloat(interval, dir, -shrinking);
   }
 
+ struct y_i_encompass : gtl_yes {};
+
   // Enlarge `this` Interval to encompass the specified Interval
   template <typename interval_type, typename interval_type_2>
- bool
- encompass(interval_type& interval, const interval_type_2& b,
- typename enable_if<
- typename gtl_and< typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
- typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and_3<
+ y_i_encompass,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
+ typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
+ bool>::type
+ encompass(interval_type& interval, const interval_type_2& b) {
     bool retval = !contains(interval, b, true);
     low(interval, (std::min)(low(interval), low(b)));
     high(interval, (std::max)(high(interval), high(b)));
     return retval;
- }
+ }
 
- struct y_i_encompass : gtl_yes {};
+ struct y_i_encompass2 : gtl_yes {};
 
   // Enlarge `this` Interval to encompass the specified Interval
   template <typename interval_type>
- typename enable_if< typename gtl_and<y_i_encompass, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_i_encompass2, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
                        bool>::type
- encompass(interval_type& interval, typename interval_traits<interval_type>::coordinate_type b) {
+ encompass(interval_type& interval, typename interval_coordinate_type<interval_type>::type b) {
     bool retval = !contains(interval, b, true);
     low(interval, (std::min)(low(interval), b));
     high(interval, (std::max)(high(interval), b));
     return retval;
- }
+ }
 
   struct y_i_get_half : gtl_yes {};
 
   // gets the half of the interval as an interval
   template <typename interval_type>
- typename enable_if<typename gtl_and<y_i_get_half, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type
+ typename enable_if<typename gtl_and<y_i_get_half, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type
   get_half(const interval_type& interval, direction_1d d1d) {
- typedef typename interval_traits<interval_type>::coordinate_type Unit;
+ typedef typename interval_coordinate_type<interval_type>::type Unit;
     Unit c = (get(interval, LOW) + get(interval, HIGH)) / 2;
     return construct<interval_type>((d1d == LOW) ? get(interval, LOW) : c,
                                     (d1d == LOW) ? c : get(interval, HIGH));
@@ -564,10 +604,10 @@
   // returns true if the 2 intervals exactly touch at one value, like in l1 <= h1 == l2 <= h2
   // sets the argument to the joined interval
   template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_i_join_with, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
                       typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   join_with(interval_type& interval, const interval_type_2& b) {
     if(abuts(interval, b)) {
       encompass(interval, b);

Modified: branches/release/boost/polygon/interval_data.hpp
==============================================================================
--- branches/release/boost/polygon/interval_data.hpp (original)
+++ branches/release/boost/polygon/interval_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -14,31 +14,31 @@
   public:
     typedef T coordinate_type;
     inline interval_data()
-#ifndef BOOST_POLYGON_MSVC
- :coords_()
-#endif
- {}
+#ifndef BOOST_POLYGON_MSVC
+ :coords_()
+#endif
+ {}
     inline interval_data(coordinate_type low, coordinate_type high)
-#ifndef BOOST_POLYGON_MSVC
- :coords_()
-#endif
+#ifndef BOOST_POLYGON_MSVC
+ :coords_()
+#endif
     {
- coords_[LOW] = low; coords_[HIGH] = high;
+ coords_[LOW] = low; coords_[HIGH] = high;
     }
     inline interval_data(const interval_data& that)
-#ifndef BOOST_POLYGON_MSVC
- :coords_()
-#endif
+#ifndef BOOST_POLYGON_MSVC
+ :coords_()
+#endif
     {
- (*this) = that;
+ (*this) = that;
     }
     inline interval_data& operator=(const interval_data& that) {
- coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
+ coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
     }
     template <typename T2>
     inline interval_data& operator=(const T2& rvalue);
     inline coordinate_type get(direction_1d dir) const {
- return coords_[dir.to_int()];
+ return coords_[dir.to_int()];
     }
     inline coordinate_type low() const { return coords_[0]; }
     inline coordinate_type high() const { return coords_[1]; }
@@ -56,10 +56,10 @@
     inline bool operator>(const interval_data& that) const { return that < *this; }
     inline bool operator>=(const interval_data& that) const { return !((*this) < that); }
   inline void set(direction_1d dir, coordinate_type value) {
- coords_[dir.to_int()] = value;
+ coords_[dir.to_int()] = value;
   }
 private:
- coordinate_type coords_[2];
+ coordinate_type coords_[2];
 };
 
 }

Modified: branches/release/boost/polygon/interval_traits.hpp
==============================================================================
--- branches/release/boost/polygon/interval_traits.hpp (original)
+++ branches/release/boost/polygon/interval_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -13,21 +13,20 @@
     typedef typename T::coordinate_type coordinate_type;
 
     static inline coordinate_type get(const T& interval, direction_1d dir) {
- return interval.get(dir);
+ return interval.get(dir);
     }
   };
 
   template <typename T>
   struct interval_mutable_traits {
     static inline void set(T& interval, direction_1d dir, typename interval_traits<T>::coordinate_type value) {
- interval.set(dir, value);
+ interval.set(dir, value);
     }
- static inline T construct(typename interval_traits<T>::coordinate_type low_value,
+ static inline T construct(typename interval_traits<T>::coordinate_type low_value,
                               typename interval_traits<T>::coordinate_type high_value) {
- return T(low_value, high_value);
+ return T(low_value, high_value);
     }
   };
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/isotropy.hpp
==============================================================================
--- branches/release/boost/polygon/isotropy.hpp (original)
+++ branches/release/boost/polygon/isotropy.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -26,7 +26,7 @@
 
 #ifndef BOOST_POLYGON_NO_DEPS
 
-#include <boost/config.hpp>
+#include <boost/config.hpp>
 #ifdef BOOST_MSVC
 #define BOOST_POLYGON_MSVC
 #endif
@@ -58,7 +58,7 @@
 typedef long long polygon_long_long_type;
 typedef unsigned long long polygon_ulong_long_type;
 
- namespace boost {
+ namespace boost {
     template <bool B, class T = void>
     struct enable_if_c {
       typedef T type;
@@ -67,7 +67,7 @@
     template <class T>
     struct enable_if_c<false, T> {};
 
- template <class Cond, class T = void>
+ template <class Cond, class T = void>
     struct enable_if : public enable_if_c<Cond::value, T> {};
 
     template <bool B, class T>
@@ -78,7 +78,7 @@
     template <class T>
     struct lazy_enable_if_c<false, T> {};
 
- template <class Cond, class T>
+ template <class Cond, class T>
     struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
 
 
@@ -90,7 +90,7 @@
     template <class T>
     struct disable_if_c<true, T> {};
 
- template <class Cond, class T = void>
+ template <class Cond, class T = void>
     struct disable_if : public disable_if_c<Cond::value, T> {};
 
     template <bool B, class T>
@@ -101,7 +101,7 @@
     template <class T>
     struct lazy_disable_if_c<true, T> {};
 
- template <class Cond, class T>
+ template <class Cond, class T>
     struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
   }
 
@@ -129,17 +129,18 @@
   struct undefined_concept {};
 
   template <typename T>
- struct geometry_concept { typedef undefined_concept type; };
+ struct geometry_concept { typedef undefined_concept type; };
 
   template <typename GCT, typename T>
   struct view_of {};
 
   template <typename T1, typename T2>
- view_of<T1, T2> view_as(const T2& obj) { return view_of<T1, T2>(obj); }
+ view_of<T1, T2> view_as(const T2& obj) { return view_of<T1, T2>(obj); }
 
   template <typename T>
   struct coordinate_traits {};
 
+ //used to override long double with an infinite precision datatype
   template <typename T>
   struct high_precision_type {
     typedef long double type;
@@ -150,6 +151,14 @@
     return T(v);
   }
 
+ //used to override std::sort with an alternative (parallel) algorithm
+ template <typename iter_type>
+ void polygon_sort(iter_type _b_, iter_type _e_);
+
+ template <typename iter_type, typename pred_type>
+ void polygon_sort(iter_type _b_, iter_type _e_, const pred_type& _pred_);
+
+
   template <>
   struct coordinate_traits<int> {
     typedef int coordinate_type;
@@ -314,13 +323,13 @@
   template <typename domain_type, typename coordinate_type>
   struct area_type_by_domain { typedef typename coordinate_traits<coordinate_type>::area_type type; };
   template <typename coordinate_type>
- struct area_type_by_domain<manhattan_domain, coordinate_type> {
+ struct area_type_by_domain<manhattan_domain, coordinate_type> {
     typedef typename coordinate_traits<coordinate_type>::manhattan_area_type type; };
 
   struct y_c_edist : gtl_yes {};
 
   template <typename coordinate_type_1, typename coordinate_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_c_edist, typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type,
                        typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
     typename coordinate_traits<coordinate_type_1>::coordinate_difference>::type
@@ -383,7 +392,7 @@
     inline direction_1d(const direction_1d_enum val) : val_(val) {}
     explicit inline direction_1d(const direction_2d& that);
     explicit inline direction_1d(const direction_3d& that);
- inline direction_1d& operator = (const direction_1d& d) {
+ inline direction_1d& operator = (const direction_1d& d) {
       val_ = d.val_; return * this; }
     inline bool operator==(direction_1d d) const { return (val_ == d.val_); }
     inline bool operator!=(direction_1d d) const { return !((*this) == d); }
@@ -426,7 +435,7 @@
     inline direction_2d() : val_(WEST) {}
 
     inline direction_2d(const direction_2d& that) : val_(that.val_) {}
-
+
     inline direction_2d(const direction_2d_enum val) : val_(val) {}
 
     inline direction_2d& operator=(const direction_2d& d) {
@@ -489,7 +498,7 @@
     explicit inline orientation_3d(const direction_2d& that);
     explicit inline orientation_3d(const direction_3d& that);
     inline ~orientation_3d() { }
- inline orientation_3d& operator=(const orientation_3d& ori) {
+ inline orientation_3d& operator=(const orientation_3d& ori) {
       val_ = ori.val_; return * this; }
     inline bool operator==(orientation_3d that) const { return (val_ == that.val_); }
     inline bool operator!=(orientation_3d that) const { return (val_ != that.val_); }
@@ -507,7 +516,7 @@
 
     inline direction_3d(direction_2d that) : val_(that.to_int()) {}
     inline direction_3d(const direction_3d& that) : val_(that.val_) {}
-
+
     inline direction_3d(const direction_2d_enum val) : val_(val) {}
     inline direction_3d(const direction_3d_enum val) : val_(val) {}
 
@@ -551,4 +560,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/point_3d_concept.hpp
==============================================================================
--- branches/release/boost/polygon/point_3d_concept.hpp (original)
+++ branches/release/boost/polygon/point_3d_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -12,7 +12,7 @@
 #include "point_3d_traits.hpp"
 namespace boost { namespace polygon{
   struct point_3d_concept {};
-
+
   template <typename T>
   struct is_point_3d_concept { typedef gtl_no type; };
   template <>
@@ -38,8 +38,8 @@
   template <typename T, typename CT>
   struct point_3d_difference_type_by_concept { typedef void type; };
   template <typename T>
- struct point_3d_difference_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_3d_traits<T>::coordinate_type>::coordinate_difference type; };
+ struct point_3d_difference_type_by_concept<T, gtl_yes> {
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<T>::type>::coordinate_difference type; };
 
   template <typename T>
   struct point_3d_difference_type {
@@ -50,8 +50,8 @@
   template <typename T, typename CT>
   struct point_3d_distance_type_by_concept { typedef void type; };
   template <typename T>
- struct point_3d_distance_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_3d_traits<T>::coordinate_type>::coordinate_distance type; };
+ struct point_3d_distance_type_by_concept<T, gtl_yes> {
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<T>::type>::coordinate_distance type; };
 
   template <typename T>
   struct point_3d_distance_type {
@@ -62,10 +62,10 @@
   struct y_p3d_get : gtl_yes {};
 
   template <typename T>
- typename enable_if< typename gtl_and<y_p3d_get, typename gtl_if<typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type>::type,
- typename point_3d_coordinate_type<T>::type >::type
+ typename enable_if< typename gtl_and<y_p3d_get, typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type,
+ typename point_3d_coordinate_type<T>::type >::type
   get(const T& point, orientation_3d orient) { return point_3d_traits<T>::get(point, orient); }
-
+
   struct y_p3d_set : gtl_yes {};
 
   template <typename T, typename coordinate_type>
@@ -86,11 +86,11 @@
     return point_3d_mutable_traits<T>::construct(x_value, y_value, z_value); }
 
   struct y_p3d_assign : gtl_yes {};
-
+
   template <typename point_3d_type_1, typename point_3d_type_2>
   typename enable_if<
- typename gtl_and_3<y_p3d_assign, typename is_mutable_point_3d_concept<typename geometry_concept<point_3d_type_1>::type>::type,
- typename is_point_3d_concept<typename geometry_concept<point_3d_type_2>::type>::type>::type,
+ typename gtl_and_3<y_p3d_assign, typename is_mutable_point_3d_concept<typename geometry_concept<point_3d_type_1>::type>::type,
+ typename is_point_3d_concept<typename geometry_concept<point_3d_type_2>::type>::type>::type,
     point_3d_type_1>::type &
   assign(point_3d_type_1& lvalue, const point_3d_type_2& rvalue) {
     set(lvalue, HORIZONTAL, get(rvalue, HORIZONTAL));
@@ -102,8 +102,8 @@
   struct y_p3d_z : gtl_yes {};
 
   template <typename point_type>
- typename enable_if< typename gtl_and<y_p3d_z, typename is_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_3d_traits<point_type>::coordinate_type >::type
+ typename enable_if< typename gtl_and<y_p3d_z, typename is_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename point_3d_coordinate_type<point_type>::type >::type
   z(const point_type& point) { return get(point, PROXIMAL); }
 
   struct y_p3d_x : gtl_yes {};
@@ -128,7 +128,7 @@
 
   template <typename T, typename T2>
   typename enable_if<
- typename gtl_and_3<y_p3d_equiv, typename gtl_same_type<point_3d_concept, typename geometry_concept<T>::type>::type,
+ typename gtl_and_3<y_p3d_equiv, typename gtl_same_type<point_3d_concept, typename geometry_concept<T>::type>::type,
                        typename gtl_same_type<point_3d_concept, typename geometry_concept<T2>::type>::type>::type,
     bool>::type
   equivalence(const T& point1, const T2& point2) {
@@ -138,11 +138,11 @@
   struct y_p3d_dist : gtl_yes {};
 
   template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3<y_p3d_dist, typename is_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
- typename is_point_3d_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ typename enable_if< typename gtl_and_3<y_p3d_dist, typename is_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_3d_concept<typename geometry_concept<point_type_2>::type>::type>::type,
                        typename point_3d_difference_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2, orientation_3d orient) {
- typedef typename coordinate_traits<typename point_3d_traits<point_type_1>::coordinate_type>::coordinate_difference return_type;
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<point_type_1>::type>::coordinate_difference return_type;
     return_type return_value =
       (return_type)get(point1, orient) - (return_type)get(point2, orient);
     return return_value < 0 ? -return_value : return_value;
@@ -151,33 +151,33 @@
   struct y_p3d_man_dist : gtl_yes {};
 
   template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3<y_p3d_man_dist, typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
+ typename enable_if< typename gtl_and_3<y_p3d_man_dist, typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
                                           typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
                        typename point_3d_difference_type<point_type_1>::type>::type
   manhattan_distance(const point_type_1& point1, const point_type_2& point2) {
- return euclidean_distance(point1, point2, HORIZONTAL) + euclidean_distance(point1, point2, VERTICAL)
+ return euclidean_distance(point1, point2, HORIZONTAL) + euclidean_distance(point1, point2, VERTICAL)
       + euclidean_distance(point1, point2, PROXIMAL);
   }
 
   struct y_p3d_dist2 : gtl_yes {};
 
   template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3< y_p3d_dist2,
- typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
+ typename enable_if< typename gtl_and_3< y_p3d_dist2,
+ typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
     typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
                        typename point_3d_distance_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2) {
- typedef typename coordinate_traits<typename point_3d_traits<point_type_1>::coordinate_type>::coordinate_distance return_value;
+ typedef typename coordinate_traits<typename point_3d_coordinate_type<point_type_1>::type>::coordinate_distance return_value;
     return_value pdist = (return_value)euclidean_distance(point1, point2, PROXIMAL);
     pdist *= pdist;
- return sqrt((double)(distance_squared(point1, point2) + pdist));
+ return std::sqrt((double)(distance_squared(point1, point2) + pdist));
   }
-
+
   struct y_p3d_convolve : gtl_yes {};
 
   template <typename point_type_1, typename point_type_2>
   typename enable_if< typename gtl_and_3< y_p3d_convolve,
- typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
     typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
                        point_type_1>::type &
   convolve(point_type_1& lvalue, const point_type_2& rvalue) {
@@ -186,12 +186,12 @@
     z(lvalue, z(lvalue) + z(rvalue));
     return lvalue;
   }
-
+
   struct y_p3d_deconvolve : gtl_yes {};
 
   template <typename point_type_1, typename point_type_2>
   typename enable_if<
- typename gtl_and_3<y_p3d_deconvolve, typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename gtl_and_3<y_p3d_deconvolve, typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
                        typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
     point_type_1>::type &
   deconvolve(point_type_1& lvalue, const point_type_2& rvalue) {
@@ -204,39 +204,39 @@
   struct y_p3d_scale_up : gtl_yes {};
 
   template <typename point_type>
- typename enable_if< typename gtl_and<y_p3d_scale_up, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_scale_up, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
                        point_type>::type &
- scale_up(point_type& point,
- typename coordinate_traits<typename point_3d_traits<point_type>::coordinate_type>::unsigned_area_type factor) {
- x(point, x(point) * (typename point_3d_traits<point_type>::coordinate_type)factor);
- y(point, y(point) * (typename point_3d_traits<point_type>::coordinate_type)factor);
- z(point, z(point) * (typename point_3d_traits<point_type>::coordinate_type)factor);
+ scale_up(point_type& point,
+ typename coordinate_traits<typename point_3d_coordinate_type<point_type>::type>::unsigned_area_type factor) {
+ x(point, x(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
+ y(point, y(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
+ z(point, z(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
     return point;
   }
 
   struct y_p3d_scale_down : gtl_yes {};
 
   template <typename point_type>
- typename enable_if< typename gtl_and<y_p3d_scale_down, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_scale_down, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
                        point_type>::type &
- scale_down(point_type& point,
- typename coordinate_traits<typename point_3d_traits<point_type>::coordinate_type>::unsigned_area_type factor) {
- typedef typename point_3d_traits<point_type>::coordinate_type Unit;
+ scale_down(point_type& point,
+ typename coordinate_traits<typename point_3d_coordinate_type<point_type>::type>::unsigned_area_type factor) {
+ typedef typename point_3d_coordinate_type<point_type>::type Unit;
     typedef typename coordinate_traits<Unit>::coordinate_distance dt;
- x(point, scaling_policy<Unit>::round((dt)(x(point)) / (dt)factor));
- y(point, scaling_policy<Unit>::round((dt)(y(point)) / (dt)factor));
- z(point, scaling_policy<Unit>::round((dt)(z(point)) / (dt)factor));
+ x(point, scaling_policy<Unit>::round((dt)(x(point)) / (dt)factor));
+ y(point, scaling_policy<Unit>::round((dt)(y(point)) / (dt)factor));
+ z(point, scaling_policy<Unit>::round((dt)(z(point)) / (dt)factor));
     return point;
   }
 
   struct y_p3d_scale : gtl_yes {};
 
   template <typename point_type, typename scaling_type>
- typename enable_if< typename gtl_and<y_p3d_scale, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_scale, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
                        point_type>::type &
- scale(point_type& point,
+ scale(point_type& point,
         const scaling_type& scaling) {
- typedef typename point_3d_traits<point_type>::coordinate_type Unit;
+ typedef typename point_3d_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point)), z_(z(point));
     scaling.scale(x_, y_, z_);
     x(point, x_);
@@ -248,10 +248,10 @@
   struct y_p3d_transform : gtl_yes {};
 
   template <typename point_type, typename transformation_type>
- typename enable_if< typename gtl_and<y_p3d_transform, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_transform, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
                        point_type>::type &
   transform(point_type& point, const transformation_type& transformation) {
- typedef typename point_3d_traits<point_type>::coordinate_type Unit;
+ typedef typename point_3d_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point)), z_(z(point));
     transformation.transform(x_, y_, z_);
     x(point, x_);

Modified: branches/release/boost/polygon/point_3d_data.hpp
==============================================================================
--- branches/release/boost/polygon/point_3d_data.hpp (original)
+++ branches/release/boost/polygon/point_3d_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -12,7 +12,7 @@
   class point_3d_data {
   public:
     typedef T coordinate_type;
- inline point_3d_data():coords_(){}
+ inline point_3d_data():coords_(){}
     inline point_3d_data(coordinate_type x, coordinate_type y):coords_() {
       coords_[HORIZONTAL] = x; coords_[VERTICAL] = y; coords_[PROXIMAL] = 0; }
     inline point_3d_data(coordinate_type x, coordinate_type y, coordinate_type z)
@@ -23,7 +23,7 @@
       coords_[HORIZONTAL] = x; coords_[VERTICAL] = y; coords_[PROXIMAL] = z; }
     inline point_3d_data(const point_3d_data& that):coords_() { (*this) = that; }
     inline point_3d_data& operator=(const point_3d_data& that) {
- coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1];
+ coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1];
       coords_[2] = that.coords_[2]; return *this; }
     template <typename T2>
     inline point_3d_data& operator=(const T2& rvalue);
@@ -42,10 +42,8 @@
     inline void set(orientation_3d orient, coordinate_type value) {
       coords_[orient.to_int()] = value; }
   private:
- coordinate_type coords_[3];
+ coordinate_type coords_[3];
   };
 }
 }
 #endif
-
-

Modified: branches/release/boost/polygon/point_3d_traits.hpp
==============================================================================
--- branches/release/boost/polygon/point_3d_traits.hpp (original)
+++ branches/release/boost/polygon/point_3d_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -23,7 +23,7 @@
   struct point_3d_mutable_traits {
     static inline void set(T& point, orientation_3d orient, typename point_3d_traits<T>::coordinate_type value) {
       point.set(orient, value); }
-
+
     static inline T construct(typename point_3d_traits<T>::coordinate_type x_value,
                               typename point_3d_traits<T>::coordinate_type y_value,
                               typename point_3d_traits<T>::coordinate_type z_value) {
@@ -32,4 +32,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/point_concept.hpp
==============================================================================
--- branches/release/boost/polygon/point_concept.hpp (original)
+++ branches/release/boost/polygon/point_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -13,7 +13,7 @@
 
 namespace boost { namespace polygon{
   struct point_concept {};
-
+
   template <typename T>
   struct is_point_concept { typedef gtl_no type; };
   template <>
@@ -41,8 +41,8 @@
   template <typename T, typename CT>
   struct point_difference_type_by_concept { typedef void type; };
   template <typename T>
- struct point_difference_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_traits<T>::coordinate_type>::coordinate_difference type; };
+ struct point_difference_type_by_concept<T, gtl_yes> {
+ typedef typename coordinate_traits<typename point_coordinate_type<T>::type>::coordinate_difference type; };
 
   template <typename T>
   struct point_difference_type {
@@ -53,8 +53,8 @@
   template <typename T, typename CT>
   struct point_distance_type_by_concept { typedef void type; };
   template <typename T>
- struct point_distance_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename point_traits<T>::coordinate_type>::coordinate_distance type; };
+ struct point_distance_type_by_concept<T, gtl_yes> {
+ typedef typename coordinate_traits<typename point_coordinate_type<T>::type>::coordinate_distance type; };
 
   template <typename T>
   struct point_distance_type {
@@ -62,36 +62,42 @@
             T, typename is_point_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
+ struct y_pt_get : gtl_yes {};
+
   template <typename T>
- typename point_coordinate_type<T>::type
- get(const T& point, orientation_2d orient,
- typename enable_if< typename gtl_if<typename is_point_concept<typename geometry_concept<T>::type>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and<y_pt_get, typename is_point_concept<typename geometry_concept<T>::type>::type>::type,
+ typename point_coordinate_type<T>::type >::type
+ get(const T& point, orientation_2d orient) {
     return point_traits<T>::get(point, orient);
   }
-
+
+ struct y_pt_set : gtl_yes {};
+
   template <typename T, typename coordinate_type>
- void
- set(T& point, orientation_2d orient, coordinate_type value,
- typename enable_if<typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and<y_pt_set, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
+ void>::type
+ set(T& point, orientation_2d orient, coordinate_type value) {
     point_mutable_traits<T>::set(point, orient, value);
   }
-
+
+ struct y_pt_construct : gtl_yes {};
+
   template <typename T, typename coordinate_type1, typename coordinate_type2>
- T
- construct(coordinate_type1 x_value, coordinate_type2 y_value,
- typename enable_if<typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type * = 0
- ) {
- return point_mutable_traits<T>::construct(x_value, y_value);
+ typename enable_if< typename gtl_and<y_pt_construct, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
+ T>::type
+ construct(coordinate_type1 x_value, coordinate_type2 y_value) {
+ return point_mutable_traits<T>::construct(x_value, y_value);
   }
 
+ struct y_pt_assign : gtl_yes {};
+
   template <typename T1, typename T2>
- T1&
- assign(T1& lvalue, const T2& rvalue,
- typename enable_if< typename gtl_and< typename is_mutable_point_concept<typename geometry_concept<T1>::type>::type,
- typename is_point_concept<typename geometry_concept<T2>::type>::type>::type>::type * = 0
- ) {
+ typename enable_if<typename gtl_and_3<
+ y_pt_assign,
+ typename is_mutable_point_concept<typename geometry_concept<T1>::type>::type,
+ typename is_point_concept<typename geometry_concept<T2>::type>::type>::type,
+ T1>::type &
+ assign(T1& lvalue, const T2& rvalue) {
     set(lvalue, HORIZONTAL, get(rvalue, HORIZONTAL));
     set(lvalue, VERTICAL, get(rvalue, VERTICAL));
     return lvalue;
@@ -100,8 +106,8 @@
   struct y_p_x : gtl_yes {};
 
   template <typename point_type>
- typename enable_if< typename gtl_and<y_p_x, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_traits<point_type>::coordinate_type >::type
+ typename enable_if< typename gtl_and<y_p_x, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename point_coordinate_type<point_type>::type >::type
   x(const point_type& point) {
     return get(point, HORIZONTAL);
   }
@@ -109,8 +115,8 @@
   struct y_p_y : gtl_yes {};
 
   template <typename point_type>
- typename enable_if< typename gtl_and<y_p_y, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_traits<point_type>::coordinate_type >::type
+ typename enable_if< typename gtl_and<y_p_y, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename point_coordinate_type<point_type>::type >::type
   y(const point_type& point) {
     return get(point, VERTICAL);
   }
@@ -119,7 +125,7 @@
 
   template <typename point_type, typename coordinate_type>
   typename enable_if<typename gtl_and<y_p_sx, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- void>::type
+ void>::type
   x(point_type& point, coordinate_type value) {
     set(point, HORIZONTAL, value);
   }
@@ -128,62 +134,71 @@
 
   template <typename point_type, typename coordinate_type>
   typename enable_if<typename gtl_and<y_p_sy, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- void>::type
+ void>::type
   y(point_type& point, coordinate_type value) {
     set(point, VERTICAL, value);
   }
 
+ struct y_pt_equiv : gtl_yes {};
+
   template <typename T, typename T2>
- bool
- equivalence(const T& point1, const T2& point2,
- typename enable_if< typename gtl_and<typename gtl_same_type<point_concept, typename geometry_concept<T>::type>::type,
- typename is_point_concept<typename geometry_concept<T2>::type>::type>::type>::type * = 0
- ) {
- typename point_traits<T>::coordinate_type x1 = x(point1);
- typename point_traits<T2>::coordinate_type x2 = get(point2, HORIZONTAL);
- typename point_traits<T>::coordinate_type y1 = get(point1, VERTICAL);
- typename point_traits<T2>::coordinate_type y2 = y(point2);
+ typename enable_if<typename gtl_and_3<y_pt_equiv,
+ typename gtl_same_type<point_concept, typename geometry_concept<T>::type>::type,
+ typename is_point_concept<typename geometry_concept<T2>::type>::type>::type,
+ bool>::type
+ equivalence(const T& point1, const T2& point2) {
+ typename point_coordinate_type<T>::type x1 = x(point1);
+ typename point_coordinate_type<T2>::type x2 = get(point2, HORIZONTAL);
+ typename point_coordinate_type<T>::type y1 = get(point1, VERTICAL);
+ typename point_coordinate_type<T2>::type y2 = y(point2);
     return x1 == x2 && y1 == y2;
   }
 
+ struct y_pt_man_dist : gtl_yes {};
+
   template <typename point_type_1, typename point_type_2>
- typename point_difference_type<point_type_1>::type
- manhattan_distance(const point_type_1& point1, const point_type_2& point2,
- typename enable_if< typename gtl_and<typename gtl_same_type<point_concept, typename geometry_concept<point_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type>::type * = 0) {
+ typename enable_if< typename gtl_and_3<
+ y_pt_man_dist,
+ typename gtl_same_type<point_concept, typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ typename point_difference_type<point_type_1>::type>::type
+ manhattan_distance(const point_type_1& point1, const point_type_2& point2) {
     return euclidean_distance(point1, point2, HORIZONTAL) + euclidean_distance(point1, point2, VERTICAL);
   }
-
- struct y_i_ed1 : gtl_yes {};
+
+ struct y_pt_ed1 : gtl_yes {};
 
   template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3<y_i_ed1, typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename enable_if< typename gtl_and_3<y_pt_ed1, typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
   typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
   typename point_difference_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2, orientation_2d orient) {
- typename coordinate_traits<typename point_traits<point_type_1>::coordinate_type>::coordinate_difference return_value =
+ typename coordinate_traits<typename point_coordinate_type<point_type_1>::type>::coordinate_difference return_value =
       get(point1, orient) - get(point2, orient);
- return return_value < 0 ? (typename coordinate_traits<typename point_traits<point_type_1>::coordinate_type>::coordinate_difference)-return_value : return_value;
+ return return_value < 0 ? (typename coordinate_traits<typename point_coordinate_type<point_type_1>::type>::coordinate_difference)-return_value : return_value;
   }
-
- struct y_i_ed2 : gtl_yes {};
+
+ struct y_pt_ed2 : gtl_yes {};
 
   template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3<y_i_ed2, typename gtl_same_type<point_concept, typename geometry_concept<point_type_1>::type>::type,
+ typename enable_if< typename gtl_and_3<y_pt_ed2, typename gtl_same_type<point_concept, typename geometry_concept<point_type_1>::type>::type,
   typename gtl_same_type<point_concept, typename geometry_concept<point_type_2>::type>::type>::type,
   typename point_distance_type<point_type_1>::type>::type
   euclidean_distance(const point_type_1& point1, const point_type_2& point2) {
- typedef typename point_traits<point_type_1>::coordinate_type Unit;
- return sqrt((double)(distance_squared(point1, point2)));
+ typedef typename point_coordinate_type<point_type_1>::type Unit;
+ return std::sqrt((double)(distance_squared(point1, point2)));
   }
-
+
+ struct y_pt_eds : gtl_yes {};
+
   template <typename point_type_1, typename point_type_2>
- typename point_difference_type<point_type_1>::type
- distance_squared(const point_type_1& point1, const point_type_2& point2,
- typename enable_if< typename gtl_and<typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type>::type * = 0
- ) {
- typedef typename point_traits<point_type_1>::coordinate_type Unit;
+ typename enable_if< typename gtl_and_3<
+ y_pt_eds,
+ typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ typename point_difference_type<point_type_1>::type>::type
+ distance_squared(const point_type_1& point1, const point_type_2& point2) {
+ typedef typename point_coordinate_type<point_type_1>::type Unit;
     typename coordinate_traits<Unit>::coordinate_difference dx = euclidean_distance(point1, point2, HORIZONTAL);
     typename coordinate_traits<Unit>::coordinate_difference dy = euclidean_distance(point1, point2, VERTICAL);
     dx *= dx;
@@ -191,58 +206,66 @@
     return dx + dy;
   }
 
+ struct y_pt_convolve : gtl_yes {};
+
   template <typename point_type_1, typename point_type_2>
- point_type_1 &
- convolve(point_type_1& lvalue, const point_type_2& rvalue,
- typename enable_if< typename gtl_and<typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and_3<
+ y_pt_convolve,
+ typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ point_type_1>::type &
+ convolve(point_type_1& lvalue, const point_type_2& rvalue) {
     x(lvalue, x(lvalue) + x(rvalue));
     y(lvalue, y(lvalue) + y(rvalue));
     return lvalue;
   }
-
+
+ struct y_pt_deconvolve : gtl_yes {};
+
   template <typename point_type_1, typename point_type_2>
- point_type_1 &
- deconvolve(point_type_1& lvalue, const point_type_2& rvalue,
- typename enable_if< typename gtl_and<typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and_3<
+ y_pt_deconvolve,
+ typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ point_type_1>::type &
+ deconvolve(point_type_1& lvalue, const point_type_2& rvalue) {
     x(lvalue, x(lvalue) - x(rvalue));
     y(lvalue, y(lvalue) - y(rvalue));
     return lvalue;
   }
-
+
+ struct y_pt_scale_up : gtl_yes {};
+
   template <typename point_type, typename coord_type>
- point_type &
- scale_up(point_type& point, coord_type factor,
- typename enable_if<typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type * = 0
- ) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typename enable_if< typename gtl_and<y_pt_scale_up, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ point_type>::type &
+ scale_up(point_type& point, coord_type factor) {
+ typedef typename point_coordinate_type<point_type>::type Unit;
     x(point, x(point) * (Unit)factor);
     y(point, y(point) * (Unit)factor);
     return point;
   }
 
+ struct y_pt_scale_down : gtl_yes {};
+
   template <typename point_type, typename coord_type>
- point_type &
- scale_down(point_type& point, coord_type factor,
- typename enable_if<typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type * = 0
- ) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typename enable_if< typename gtl_and<y_pt_scale_down, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ point_type>::type &
+ scale_down(point_type& point, coord_type factor) {
+ typedef typename point_coordinate_type<point_type>::type Unit;
     typedef typename coordinate_traits<Unit>::coordinate_distance dt;
- x(point, scaling_policy<Unit>::round((dt)((dt)(x(point)) / (dt)factor)));
- y(point, scaling_policy<Unit>::round((dt)((dt)(y(point)) / (dt)factor)));
+ x(point, scaling_policy<Unit>::round((dt)((dt)(x(point)) / (dt)factor)));
+ y(point, scaling_policy<Unit>::round((dt)((dt)(y(point)) / (dt)factor)));
     return point;
   }
 
+ struct y_pt_scale : gtl_yes {};
+
   template <typename point_type, typename scaling_type>
- point_type &
- scale(point_type& point,
- const scaling_type& scaling,
- typename enable_if<typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type * = 0
- ) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typename enable_if< typename gtl_and<y_pt_scale, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ point_type>::type &
+ scale(point_type& point, const scaling_type& scaling) {
+ typedef typename point_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point));
     scaling.scale(x_, y_);
     x(point, x_);
@@ -250,12 +273,13 @@
     return point;
   }
 
+ struct y_pt_transform : gtl_yes {};
+
   template <typename point_type, typename transformation_type>
- point_type &
- transform(point_type& point, const transformation_type& transformation,
- typename enable_if<typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type * = 0
- ) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typename enable_if< typename gtl_and<y_pt_transform, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ point_type>::type &
+ transform(point_type& point, const transformation_type& transformation) {
+ typedef typename point_coordinate_type<point_type>::type Unit;
     Unit x_(x(point)), y_(y(point));
     transformation.transform(x_, y_);
     x(point, x_);
@@ -266,16 +290,11 @@
   struct y_pt_move : gtl_yes {};
 
   template <typename point_type>
- typename enable_if<
- typename gtl_and< y_pt_move,
- typename is_mutable_point_concept<
- typename geometry_concept<point_type>::type>::type>::type,
- point_type>::type &
+ typename enable_if< typename gtl_and<y_pt_move, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ point_type>::type &
   move(point_type& point, orientation_2d orient,
- typename point_traits<point_type>::coordinate_type displacement,
- typename enable_if<typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type * = 0
- ) {
- typedef typename point_traits<point_type>::coordinate_type Unit;
+ typename point_coordinate_type<point_type>::type displacement) {
+ typedef typename point_coordinate_type<point_type>::type Unit;
     Unit v(get(point, orient));
     set(point, orient, v + displacement);
     return point;
@@ -295,4 +314,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/point_data.hpp
==============================================================================
--- branches/release/boost/polygon/point_data.hpp (original)
+++ branches/release/boost/polygon/point_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -18,34 +18,34 @@
     typedef T coordinate_type;
     inline point_data()
 #ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
 #endif
- {}
+ {}
     inline point_data(coordinate_type x, coordinate_type y)
 #ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
 #endif
     {
- coords_[HORIZONTAL] = x; coords_[VERTICAL] = y;
+ coords_[HORIZONTAL] = x; coords_[VERTICAL] = y;
     }
     inline point_data(const point_data& that)
 #ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
 #endif
     { (*this) = that; }
     template <typename other>
     point_data(const other& that)
 #ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
 #endif
     { (*this) = that; }
     inline point_data& operator=(const point_data& that) {
- coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
+ coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
     }
     template<typename T1, typename T2>
     inline point_data(const T1& x, const T2& y)
 #ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
 #endif
     {
       coords_[HORIZONTAL] = (coordinate_type)x;
@@ -54,7 +54,7 @@
     template <typename T2>
     inline point_data(const point_data<T2>& rvalue)
 #ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
 #endif
     {
       coords_[HORIZONTAL] = (coordinate_type)(rvalue.x());
@@ -76,10 +76,10 @@
     inline bool operator>(const point_data& that) const { return that < *this; }
     inline bool operator>=(const point_data& that) const { return !((*this) < that); }
     inline coordinate_type get(orientation_2d orient) const {
- return coords_[orient.to_int()];
+ return coords_[orient.to_int()];
     }
     inline void set(orientation_2d orient, coordinate_type value) {
- coords_[orient.to_int()] = value;
+ coords_[orient.to_int()] = value;
     }
     inline coordinate_type x() const {
       return coords_[HORIZONTAL];
@@ -96,10 +96,9 @@
       return *this;
     }
   private:
- coordinate_type coords_[2];
+ coordinate_type coords_[2];
   };
 
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/point_traits.hpp
==============================================================================
--- branches/release/boost/polygon/point_traits.hpp (original)
+++ branches/release/boost/polygon/point_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -14,22 +14,21 @@
   template <typename T>
   struct point_traits {
     typedef typename T::coordinate_type coordinate_type;
-
+
     static inline coordinate_type get(const T& point, orientation_2d orient) {
- return point.get(orient);
+ return point.get(orient);
     }
   };
 
   template <typename T>
   struct point_mutable_traits {
     static inline void set(T& point, orientation_2d orient, typename point_traits<T>::coordinate_type value) {
- point.set(orient, value);
+ point.set(orient, value);
     }
     static inline T construct(typename point_traits<T>::coordinate_type x_value, typename point_traits<T>::coordinate_type y_value) {
- return T(x_value, y_value);
+ return T(x_value, y_value);
     }
   };
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon.hpp
==============================================================================
--- branches/release/boost/polygon/polygon.hpp (original)
+++ branches/release/boost/polygon/polygon.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -34,6 +34,11 @@
 #include "rectangle_traits.hpp"
 #include "rectangle_concept.hpp"
 
+//segment
+#include "segment_data.hpp"
+#include "segment_traits.hpp"
+#include "segment_concept.hpp"
+
 //algorithms needed by polygon types
 #include "detail/iterator_points_to_compact.hpp"
 #include "detail/iterator_compact_to_points.hpp"
@@ -88,4 +93,6 @@
 
 #include "polygon_set_concept.hpp"
 
+#include "segment_utils.hpp"
+
 #endif

Modified: branches/release/boost/polygon/polygon_45_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_45_data.hpp (original)
+++ branches/release/boost/polygon/polygon_45_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -34,7 +34,7 @@
 
   // copy constructor (since we have dynamic memory)
   inline polygon_45_data(const polygon_45_data& that) : coords_(that.coords_) {}
-
+
   // assignment operator (since we have dynamic memory do a deep copy)
   inline polygon_45_data& operator=(const polygon_45_data& that) {
     coords_ = that.coords_;
@@ -63,11 +63,10 @@
   inline std::size_t size() const { return coords_.size(); }
 
 public:
- std::vector<point_data<coordinate_type> > coords_;
+ std::vector<point_data<coordinate_type> > coords_;
 };
 
 
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_45_set_concept.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_45_set_concept.hpp (original)
+++ branches/release/boost/polygon/polygon_45_set_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -28,14 +28,14 @@
   begin_45_set_data(const polygon_set_type& polygon_set) {
     return polygon_45_set_traits<polygon_set_type>::begin(polygon_set);
   }
-
+
   template <typename polygon_set_type>
   typename enable_if< typename gtl_if<typename is_polygon_45_or_90_set_type<polygon_set_type>::type>::type,
                        typename polygon_45_set_traits<polygon_set_type>::iterator_type>::type
   end_45_set_data(const polygon_set_type& polygon_set) {
     return polygon_45_set_traits<polygon_set_type>::end(polygon_set);
   }
-
+
   template <typename polygon_set_type>
   typename enable_if< typename gtl_if<typename is_polygon_45_set_type<polygon_set_type>::type>::type,
                        bool>::type
@@ -79,9 +79,9 @@
   template <typename polygon_set_type_1, typename polygon_set_type_2>
   typename enable_if< typename gtl_and_3<typename gtl_if<typename is_polygon_45_or_90_set_type<polygon_set_type_1>::type>::type,
                                           typename gtl_if<typename is_polygon_45_or_90_set_type<polygon_set_type_2>::type>::type,
- typename gtl_if<typename is_either_polygon_45_set_type<polygon_set_type_1,
+ typename gtl_if<typename is_either_polygon_45_set_type<polygon_set_type_1,
                                                                                                  polygon_set_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   equivalence(const polygon_set_type_1& lvalue,
               const polygon_set_type_2& rvalue) {
     polygon_45_set_data<typename polygon_45_set_traits<polygon_set_type_1>::coordinate_type> ps1;
@@ -111,14 +111,14 @@
     ps.clean();
     return ps.empty();
   }
-
+
   //extents
   template <typename polygon_set_type, typename rectangle_type>
   typename enable_if<
     typename gtl_and< typename gtl_if<typename is_mutable_polygon_45_set_type<polygon_set_type>::type>::type,
                       typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
     bool>::type
- extents(rectangle_type& extents_rectangle,
+ extents(rectangle_type& extents_rectangle,
           const polygon_set_type& polygon_set) {
     clean(polygon_set);
     polygon_45_set_data<typename polygon_45_set_traits<polygon_set_type>::coordinate_type> ps;
@@ -181,7 +181,7 @@
   template <typename polygon_set_type, typename coord_type>
   typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- resize(polygon_set_type& polygon_set, coord_type resizing,
+ resize(polygon_set_type& polygon_set, coord_type resizing,
          RoundingOption rounding = CLOSEST, CornerOption corner = INTERSECTION) {
     typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
     clean(polygon_set);
@@ -195,7 +195,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- bloat(polygon_set_type& polygon_set,
+ bloat(polygon_set_type& polygon_set,
         typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
     return resize(polygon_set, static_cast<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>(bloating));
   }
@@ -203,7 +203,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- shrink(polygon_set_type& polygon_set,
+ shrink(polygon_set_type& polygon_set,
         typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type shrinking) {
     return resize(polygon_set, -(typename polygon_45_set_traits<polygon_set_type>::coordinate_type)shrinking);
   }
@@ -211,7 +211,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- grow_and(polygon_set_type& polygon_set,
+ grow_and(polygon_set_type& polygon_set,
         typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
     typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
     std::vector<polygon_45_data<Unit> > polys;
@@ -233,7 +233,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- scale_up(polygon_set_type& polygon_set,
+ scale_up(polygon_set_type& polygon_set,
            typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
     typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
     clean(polygon_set);
@@ -247,7 +247,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- scale_down(polygon_set_type& polygon_set,
+ scale_down(polygon_set_type& polygon_set,
            typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
     typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
     clean(polygon_set);
@@ -316,7 +316,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- keep(polygon_set_type& polygon_set,
+ keep(polygon_set_type& polygon_set,
        typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::area_type min_area,
        typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::area_type max_area,
        typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_width,
@@ -408,13 +408,13 @@
       return polygon_set.end();
     }
 
- static inline orientation_2d orient(const view_of<polygon_90_set_concept, T>& polygon_set) {
+ static inline orientation_2d orient(const view_of<polygon_90_set_concept, T>& polygon_set) {
       return polygon_set.orient(); }
 
- static inline bool clean(const view_of<polygon_90_set_concept, T>& polygon_set) {
+ static inline bool clean(const view_of<polygon_90_set_concept, T>& polygon_set) {
       return polygon_set.clean(); }
 
- static inline bool sorted(const view_of<polygon_90_set_concept, T>& polygon_set) {
+ static inline bool sorted(const view_of<polygon_90_set_concept, T>& polygon_set) {
       return polygon_set.sorted(); }
 
   };

Modified: branches/release/boost/polygon/polygon_45_set_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_45_set_data.hpp (original)
+++ branches/release/boost/polygon/polygon_45_set_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -19,7 +19,7 @@
 
   template <typename ltype, typename rtype, int op_type>
   class polygon_45_set_view;
-
+
   struct polygon_45_set_concept {};
 
   template <typename Unit>
@@ -43,8 +43,8 @@
     }
 
     // copy constructor
- inline polygon_45_set_data(const polygon_45_set_data& that) :
- error_data_(that.error_data_), data_(that.data_), dirty_(that.dirty_),
+ inline polygon_45_set_data(const polygon_45_set_data& that) :
+ error_data_(that.error_data_), data_(that.data_), dirty_(that.dirty_),
       unsorted_(that.unsorted_), is_manhattan_(that.is_manhattan_) {}
 
     template <typename ltype, typename rtype, int op_type>
@@ -123,7 +123,7 @@
       unsorted_ = true;
       insert_clean(vertex_45, is_hole);
     }
-
+
     template <typename coordinate_type_2>
     inline void insert(const polygon_90_set_data<coordinate_type_2>& polygon_set, bool is_hole = false) {
       if(polygon_set.orient() == VERTICAL) {
@@ -158,14 +158,14 @@
       p.data_.insert(p.data_.end(), error_data_.begin(), error_data_.end());
     }
 
- // equivalence operator
+ // equivalence operator
     inline bool operator==(const polygon_45_set_data& p) const {
       clean();
       p.clean();
       return data_ == p.data_;
     }
 
- // inequivalence operator
+ // inequivalence operator
     inline bool operator!=(const polygon_45_set_data& p) const {
       return !((*this) == p);
     }
@@ -212,7 +212,7 @@
 
     void sort() const{
       if(unsorted_) {
- gtlsort(data_.begin(), data_.end());
+ polygon_sort(data_.begin(), data_.end());
         unsorted_ = false;
       }
     }
@@ -220,6 +220,7 @@
     template <typename input_iterator_type>
     void set(input_iterator_type input_begin, input_iterator_type input_end) {
       data_.clear();
+ reserve(std::distance(input_begin, input_end));
       insert(input_begin, input_end);
       dirty_ = true;
       unsorted_ = true;
@@ -232,7 +233,7 @@
     }
 
     void set(const value_type& value) {
- data_ = value;
+ data_ = value;
       dirty_ = true;
       unsorted_ = true;
     }
@@ -242,13 +243,13 @@
     void get_polygons(cT& container) const {
       get_dispatch(container, polygon_45_concept());
     }
-
+
     // append to the container cT with PolygonWithHoles objects
     template <class cT>
     void get_polygons_with_holes(cT& container) const {
       get_dispatch(container, polygon_45_with_holes_concept());
     }
-
+
     // append to the container cT with polygons of three or four verticies
     // slicing orientation is vertical
     template <class cT>
@@ -288,7 +289,7 @@
 
     // snap verticies of set to even,even or odd,odd coordinates
     void snap() const;
-
+
     // |= &= += *= -= ^= binary operators
     polygon_45_set_data& operator|=(const polygon_45_set_data& b);
     polygon_45_set_data& operator&=(const polygon_45_set_data& b);
@@ -300,7 +301,7 @@
     // resizing operations
     polygon_45_set_data& operator+=(Unit delta);
     polygon_45_set_data& operator-=(Unit delta);
-
+
     // shrink the Polygon45Set by shrinking
     polygon_45_set_data& resize(coordinate_type resizing, RoundingOption rounding = CLOSEST,
                                 CornerOption corner = INTERSECTION);
@@ -338,14 +339,14 @@
                                             bool hole = false) {
       return insert_with_resize_dispatch(poly, resizing, rounding, corner, hole, typename geometry_concept<geometry_type>::type());
     }
-
+
   private:
     mutable value_type error_data_;
     mutable value_type data_;
     mutable bool dirty_;
     mutable bool unsorted_;
     mutable bool is_manhattan_;
-
+
   private:
     //functions
     template <typename output_container>
@@ -377,7 +378,7 @@
       insert(geometry_object.begin(), geometry_object.end(), is_hole);
     }
     template <typename geometry_type>
- void insert_dispatch(const geometry_type& geometry_object, bool is_hole, rectangle_concept tag);
+ void insert_dispatch(const geometry_type& geometry_object, bool is_hole, rectangle_concept tag);
     template <typename geometry_type>
     void insert_dispatch(const geometry_type& geometry_object, bool is_hole, polygon_90_concept ) {
       insert_vertex_sequence(begin_points(geometry_object), end_points(geometry_object), winding(geometry_object), is_hole);
@@ -417,20 +418,20 @@
       insert(pl.begin(), pl.end(), is_hole);
     }
 
- void insert_vertex_half_edge_45_pair(const point_data<Unit>& pt1, point_data<Unit>& pt2,
+ void insert_vertex_half_edge_45_pair(const point_data<Unit>& pt1, point_data<Unit>& pt2,
                                          const point_data<Unit>& pt3, direction_1d wdir);
 
     template <typename geometry_type>
     polygon_45_set_data& insert_with_resize_dispatch(const geometry_type& poly,
                                                      coordinate_type resizing, RoundingOption rounding,
                                                      CornerOption corner, bool hole, polygon_45_concept tag);
-
+
     // accumulate the bloated polygon with holes
     template <typename geometry_type>
     polygon_45_set_data& insert_with_resize_dispatch(const geometry_type& poly,
                                                      coordinate_type resizing, RoundingOption rounding,
- CornerOption corner, bool hole, polygon_45_with_holes_concept tag);
-
+ CornerOption corner, bool hole, polygon_45_with_holes_concept tag);
+
     static void snap_vertex_45(Vertex45Compact& vertex);
 
   public:
@@ -446,7 +447,7 @@
   struct geometry_concept<polygon_45_set_data<T> > {
     typedef polygon_45_set_concept type;
   };
-
+
   template <typename iT, typename T>
   void scale_up_vertex_45_compact_range(iT beginr, iT endr, T factor) {
     for( ; beginr != endr; ++beginr) {
@@ -490,17 +491,17 @@
 
   template <typename cT, typename pT>
   bool insert_vertex_half_edge_45_pair_into_vector(cT& output,
- const pT& pt1, pT& pt2,
- const pT& pt3,
+ const pT& pt1, pT& pt2,
+ const pT& pt3,
                                        direction_1d wdir) {
     int multiplier = wdir == LOW ? -1 : 1;
     typename cT::value_type vertex(pt2, 0, 0);
     //std::cout << pt1 << " " << pt2 << " " << pt3 << std::endl;
     std::pair<int, int> check;
- check = characterizeEdge45(pt1, pt2);
+ check = characterizeEdge45(pt1, pt2);
     //std::cout << "index " << check.first << " " << check.second * -multiplier << std::endl;
     vertex.count[check.first] += check.second * -multiplier;
- check = characterizeEdge45(pt2, pt3);
+ check = characterizeEdge45(pt2, pt3);
     //std::cout << "index " << check.first << " " << check.second * multiplier << std::endl;
     vertex.count[check.first] += check.second * multiplier;
     output.push_back(vertex);
@@ -508,8 +509,8 @@
   }
 
   template <typename Unit>
- inline void polygon_45_set_data<Unit>::insert_vertex_half_edge_45_pair(const point_data<Unit>& pt1, point_data<Unit>& pt2,
- const point_data<Unit>& pt3,
+ inline void polygon_45_set_data<Unit>::insert_vertex_half_edge_45_pair(const point_data<Unit>& pt1, point_data<Unit>& pt2,
+ const point_data<Unit>& pt3,
                                                                          direction_1d wdir) {
     if(insert_vertex_half_edge_45_pair_into_vector(data_, pt1, pt2, pt3, wdir)) is_manhattan_ = false;
   }
@@ -611,7 +612,7 @@
 
   template <typename cT, typename rT>
   void insert_rectangle_into_vector_45(cT& output, const rT& rect, bool is_hole) {
- point_data<typename rectangle_traits<rT>::coordinate_type>
+ point_data<typename rectangle_traits<rT>::coordinate_type>
       llpt = ll(rect), lrpt = lr(rect), ulpt = ul(rect), urpt = ur(rect);
     direction_1d dir = COUNTERCLOCKWISE;
     if(is_hole) dir = CLOCKWISE;
@@ -623,7 +624,7 @@
 
   template <typename Unit>
   template <typename geometry_type>
- inline void polygon_45_set_data<Unit>::insert_dispatch(const geometry_type& geometry_object,
+ inline void polygon_45_set_data<Unit>::insert_dispatch(const geometry_type& geometry_object,
                                                          bool is_hole, rectangle_concept ) {
     dirty_ = true;
     unsorted_ = true;
@@ -640,7 +641,7 @@
     }
     Unit low = (std::numeric_limits<Unit>::max)();
     Unit high = (std::numeric_limits<Unit>::min)();
- interval_data<Unit> xivl(low, high);
+ interval_data<Unit> xivl(low, high);
     interval_data<Unit> yivl(low, high);
     for(typename value_type::const_iterator itr = data_.begin();
         itr != data_.end(); ++ itr) {
@@ -714,7 +715,7 @@
   inline polygon_45_set_data<Unit>& polygon_45_set_data<Unit>::operator-=(const polygon_45_set_data<Unit>& b) {
     //b.sort();
     //sort();
- applyAdaptiveBoolean_<2>(b);
+ applyAdaptiveBoolean_<2>(b);
     dirty_ = false;
     unsorted_ = false;
     return *this;
@@ -723,7 +724,7 @@
   inline polygon_45_set_data<Unit>& polygon_45_set_data<Unit>::operator^=(const polygon_45_set_data<Unit>& b) {
     //b.sort();
     //sort();
- applyAdaptiveBoolean_<3>(b);
+ applyAdaptiveBoolean_<3>(b);
     dirty_ = false;
     unsorted_ = false;
     return *this;
@@ -739,7 +740,7 @@
   }
 
   template <typename Unit>
- inline polygon_45_set_data<Unit>&
+ inline polygon_45_set_data<Unit>&
   polygon_45_set_data<Unit>::resize(Unit resizing, RoundingOption rounding, CornerOption corner) {
     if(resizing == 0) return *this;
     std::list<polygon_45_with_holes_data<Unit> > pl;
@@ -852,7 +853,7 @@
     Unit y = 0;
     if(run1 == 0) {
       x = pt1.x();
- y = (Unit)(((x1 - x2) * rise2) / run2) + pt2.y();
+ y = (Unit)(((x1 - x2) * rise2) / run2) + pt2.y();
     } else if(run2 == 0) {
       x = pt2.x();
       y = (Unit)(((x2 - x1) * rise1) / run1) + pt1.y();
@@ -863,7 +864,7 @@
       // (rise1/run1 - rise2/run2)x = y2 - y1 + rise1/run1 x1 - rise2/run2 x2
       // x = (y2 - y1 + rise1/run1 x1 - rise2/run2 x2)/(rise1/run1 - rise2/run2)
       // x = (y2 - y1 + rise1/run1 x1 - rise2/run2 x2)(rise1 run2 - rise2 run1)/(run1 run2)
- x = (Unit)((y2 - y1 + ((rise1 * x1) / run1) - ((rise2 * x2) / run2)) *
+ x = (Unit)((y2 - y1 + ((rise1 * x1) / run1) - ((rise2 * x2) / run2)) *
                  (run1 * run2) / (rise1 * run2 - rise2 * run1));
       if(rise1 == 0) {
         y = pt1.y();
@@ -873,7 +874,7 @@
         // y - y1 = (rise1/run1)(x - x1)
         // (run1/rise1)(y - y1) = x - x1
         // x = (run1/rise1)(y - y1) + x1 = (run2/rise2)(y - y2) + x2
- y = (Unit)((x2 - x1 + ((run1 * y1) / rise1) - ((run2 * y2) / rise2)) *
+ y = (Unit)((x2 - x1 + ((run1 * y1) / rise1) - ((run2 * y2) / rise2)) *
                    (rise1 * rise2) / (run1 * rise2 - run2 * rise1));
       }
     }
@@ -882,7 +883,7 @@
 
   template <typename Unit>
   inline
- void handleResizingEdge45_SQRT1OVER2(polygon_45_set_data<Unit>& sizingSet, point_data<Unit> first,
+ void handleResizingEdge45_SQRT1OVER2(polygon_45_set_data<Unit>& sizingSet, point_data<Unit> first,
                                        point_data<Unit> second, Unit resizing, CornerOption corner) {
     if(first.x() == second.x()) {
       sizingSet.insert(rectangle_data<Unit>(first.x() - resizing, first.y(), first.x() + resizing, second.y()));
@@ -932,7 +933,7 @@
 
   template <typename Unit>
   inline
- void handleResizingEdge45(polygon_45_set_data<Unit>& sizingSet, point_data<Unit> first,
+ void handleResizingEdge45(polygon_45_set_data<Unit>& sizingSet, point_data<Unit> first,
                             point_data<Unit> second, Unit resizing, RoundingOption rounding) {
     if(first.x() == second.x()) {
       sizingSet.insert(rectangle_data<int>(first.x() - resizing, first.y(), first.x() + resizing, second.y()));
@@ -998,14 +999,14 @@
 
   template <typename Unit>
   inline
- void handleResizingVertex45(polygon_45_set_data<Unit>& sizingSet, const point_data<Unit>& first,
- const point_data<Unit>& second, const point_data<Unit>& third, Unit resizing,
- RoundingOption rounding, CornerOption corner,
+ void handleResizingVertex45(polygon_45_set_data<Unit>& sizingSet, const point_data<Unit>& first,
+ const point_data<Unit>& second, const point_data<Unit>& third, Unit resizing,
+ RoundingOption rounding, CornerOption corner,
                               int multiplier) {
     unsigned int edge1 = getEdge45Direction(first, second);
     unsigned int edge2 = getEdge45Direction(second, third);
     unsigned int diffAngle;
- if(multiplier < 0)
+ if(multiplier < 0)
       diffAngle = (edge2 + 8 - edge1) % 8;
     else
       diffAngle = (edge1 + 8 - edge2) % 8;
@@ -1015,7 +1016,7 @@
     }
     Unit bloating = abs(resizing);
     if(rounding == SQRT1OVER2) {
- if(edge1 % 2 && edge2 % 2) return;
+ if(edge1 % 2 && edge2 % 2) return;
       if(corner == ORTHOGONAL && edge1 % 2 == 0 && edge2 % 2 == 0) {
         rectangle_data<Unit> insertion_rect;
         set_points(insertion_rect, second, second);
@@ -1074,7 +1075,7 @@
         sizingSet.insert(insertion_rect);
         return;
       }
- }
+ }
     std::vector<point_data<Unit> > pts;
     pts.push_back(edgePoint1);
     pts.push_back(second);
@@ -1086,15 +1087,15 @@
 
   template <typename Unit>
   template <typename geometry_type>
- inline polygon_45_set_data<Unit>&
+ inline polygon_45_set_data<Unit>&
   polygon_45_set_data<Unit>::insert_with_resize_dispatch(const geometry_type& poly,
- coordinate_type resizing,
+ coordinate_type resizing,
                                                          RoundingOption rounding,
                                                          CornerOption corner,
                                                          bool hole, polygon_45_concept ) {
     direction_1d wdir = winding(poly);
     int multiplier = wdir == LOW ? -1 : 1;
- if(hole) resizing *= -1;
+ if(hole) resizing *= -1;
     typedef typename polygon_45_data<Unit>::iterator_type piterator;
     piterator first, second, third, end, real_end;
     real_end = end_points(poly);
@@ -1113,8 +1114,8 @@
         handleResizingEdge45(sizingSet, *first, *second, resizing, rounding);
       } else {
         handleResizingEdge45_SQRT1OVER2(sizingSet, *first, *second, resizing, corner);
- }
- if(corner != UNFILLED)
+ }
+ if(corner != UNFILLED)
         handleResizingVertex45(sizingSet, *first, *second, *third, resizing, rounding, corner, multiplier);
       first = second;
       second = third;
@@ -1144,9 +1145,9 @@
   template <typename geometry_type>
   inline polygon_45_set_data<Unit>&
   polygon_45_set_data<Unit>::insert_with_resize_dispatch(const geometry_type& poly,
- coordinate_type resizing,
+ coordinate_type resizing,
                                                          RoundingOption rounding,
- CornerOption corner,
+ CornerOption corner,
                                                          bool hole, polygon_45_with_holes_concept ) {
     insert_with_resize_dispatch(poly, resizing, rounding, corner, hole, polygon_45_concept());
     for(typename polygon_with_holes_traits<geometry_type>::iterator_holes_type itr =
@@ -1170,11 +1171,11 @@
     }
     clear();
     insert(polys.begin(), polys.end());
- dirty_ = true;
+ dirty_ = true;
     unsorted_ = true;
     return *this;
   }
-
+
   template <typename Unit>
   inline polygon_45_set_data<Unit>& polygon_45_set_data<Unit>::scale_up(typename coordinate_traits<Unit>::unsigned_area_type factor) {
     scale_up_vertex_45_compact_range(data_.begin(), data_.end(), factor);
@@ -1192,7 +1193,7 @@
     }
     clear();
     insert(polys.begin(), polys.end());
- dirty_ = true;
+ dirty_ = true;
     unsorted_ = true;
     return *this;
   }
@@ -1208,7 +1209,7 @@
     }
     clear();
     insert(polys.begin(), polys.end());
- dirty_ = true;
+ dirty_ = true;
     unsorted_ = true;
     return *this;
   }
@@ -1244,7 +1245,7 @@
     typename boolean_op_45<Unit2>::template Scan45<typename boolean_op_45<Unit2>::Count2,
       typename boolean_op_45<Unit2>::template boolean_op_45_output_functor<op> > scan45;
     std::vector<typename boolean_op_45<Unit2>::Vertex45> eventOut;
- typedef std::pair<typename boolean_op_45<Unit2>::Point,
+ typedef std::pair<typename boolean_op_45<Unit2>::Point,
       typename boolean_op_45<Unit2>::template Scan45CountT<typename boolean_op_45<Unit2>::Count2> > Scan45Vertex;
     std::vector<Scan45Vertex> eventIn;
     typedef std::vector<typename polygon_45_formation<Unit2>::Vertex45Compact> value_type;
@@ -1262,7 +1263,7 @@
         //std::cout << "SCAN " << currentX << "\n";
         //scan event
         scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
         std::size_t ptCount = 0;
         for(std::size_t i = 0; i < eventOut.size(); ++i) {
           if(!result_data.empty() &&
@@ -1270,7 +1271,7 @@
             result_data.back().count += eventOut[i];
             ++ptCount;
           } else {
- if(!result_data.empty()) {
+ if(!result_data.empty()) {
               if(result_data.back().count.is_45()) {
                 result_is_manhattan_ = false;
               }
@@ -1290,24 +1291,24 @@
         x = currentX;
       }
       //std::cout << "get next\n";
- if(iter2 != end2 && (iter1 == end1 || iter2->pt.x() < iter1->pt.x() ||
+ if(iter2 != end2 && (iter1 == end1 || iter2->pt.x() < iter1->pt.x() ||
                            (iter2->pt.x() == iter1->pt.x() &&
                             iter2->pt.y() < iter1->pt.y()) )) {
         //std::cout << "case1 next\n";
         eventIn.push_back(Scan45Vertex
- (iter2->pt,
+ (iter2->pt,
                            typename polygon_45_formation<Unit2>::
                            Scan45Count(typename polygon_45_formation<Unit2>::Count2(0, iter2->count[0]),
                                        typename polygon_45_formation<Unit2>::Count2(0, iter2->count[1]),
                                        typename polygon_45_formation<Unit2>::Count2(0, iter2->count[2]),
                                        typename polygon_45_formation<Unit2>::Count2(0, iter2->count[3]))));
         ++iter2;
- } else if(iter1 != end1 && (iter2 == end2 || iter1->pt.x() < iter2->pt.x() ||
+ } else if(iter1 != end1 && (iter2 == end2 || iter1->pt.x() < iter2->pt.x() ||
                                   (iter1->pt.x() == iter2->pt.x() &&
                                    iter1->pt.y() < iter2->pt.y()) )) {
         //std::cout << "case2 next\n";
         eventIn.push_back(Scan45Vertex
- (iter1->pt,
+ (iter1->pt,
                            typename polygon_45_formation<Unit2>::
                            Scan45Count(
                                        typename polygon_45_formation<Unit2>::Count2(iter1->count[0], 0),
@@ -1318,22 +1319,22 @@
       } else {
         //std::cout << "case3 next\n";
         eventIn.push_back(Scan45Vertex
- (iter2->pt,
+ (iter2->pt,
                            typename polygon_45_formation<Unit2>::
- Scan45Count(typename polygon_45_formation<Unit2>::Count2(iter1->count[0],
+ Scan45Count(typename polygon_45_formation<Unit2>::Count2(iter1->count[0],
                                                                                     iter2->count[0]),
- typename polygon_45_formation<Unit2>::Count2(iter1->count[1],
+ typename polygon_45_formation<Unit2>::Count2(iter1->count[1],
                                                                                     iter2->count[1]),
- typename polygon_45_formation<Unit2>::Count2(iter1->count[2],
+ typename polygon_45_formation<Unit2>::Count2(iter1->count[2],
                                                                                     iter2->count[2]),
- typename polygon_45_formation<Unit2>::Count2(iter1->count[3],
+ typename polygon_45_formation<Unit2>::Count2(iter1->count[3],
                                                                                     iter2->count[3]))));
         ++iter1;
         ++iter2;
       }
     }
     scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
 
     std::size_t ptCount = 0;
     for(std::size_t i = 0; i < eventOut.size(); ++i) {
@@ -1342,7 +1343,7 @@
         result_data.back().count += eventOut[i];
         ++ptCount;
       } else {
- if(!result_data.empty()) {
+ if(!result_data.empty()) {
           if(result_data.back().count.is_45()) {
             result_is_manhattan_ = false;
           }
@@ -1385,7 +1386,7 @@
         //std::cout << "SCAN " << currentX << "\n";
         //scan event
         scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
         std::size_t ptCount = 0;
         for(std::size_t i = 0; i < eventOut.size(); ++i) {
           if(!result_data.empty() &&
@@ -1393,7 +1394,7 @@
             result_data.back().count += eventOut[i];
             ++ptCount;
           } else {
- if(!result_data.empty()) {
+ if(!result_data.empty()) {
               if(result_data.back().count.is_45()) {
                 result_is_manhattan_ = false;
               }
@@ -1414,7 +1415,7 @@
       }
       //std::cout << "get next\n";
       eventIn.push_back(Scan45Vertex
- (iter1->pt,
+ (iter1->pt,
                          Scan45Count( typename boolean_op_45<Unit2>::Count1(iter1->count[0]),
                                       typename boolean_op_45<Unit2>::Count1(iter1->count[1]),
                                       typename boolean_op_45<Unit2>::Count1(iter1->count[2]),
@@ -1422,7 +1423,7 @@
       ++iter1;
     }
     scan45.scan(eventOut, eventIn.begin(), eventIn.end());
- gtlsort(eventOut.begin(), eventOut.end());
+ polygon_sort(eventOut.begin(), eventOut.end());
 
     std::size_t ptCount = 0;
     for(std::size_t i = 0; i < eventOut.size(); ++i) {
@@ -1431,7 +1432,7 @@
         result_data.back().count += eventOut[i];
         ++ptCount;
       } else {
- if(!result_data.empty()) {
+ if(!result_data.empty()) {
           if(result_data.back().count.is_45()) {
             result_is_manhattan_ = false;
           }
@@ -1453,9 +1454,9 @@
     return result_is_manhattan_;
   }
 
- template <typename cT, typename iT>
+ template <typename cT, typename iT>
   void get_error_rects_shell(cT& posE, cT& negE, iT beginr, iT endr) {
- typedef typename iT::value_type Point;
+ typedef typename std::iterator_traits<iT>::value_type Point;
     typedef typename point_traits<Point>::coordinate_type Unit;
     typedef typename coordinate_traits<Unit>::area_type area_type;
     Point pt1, pt2, pt3;
@@ -1493,7 +1494,7 @@
         const Point& pt = *beginr;
         pt3 = pt;
         ++beginr;
- if(beginr == endr) {
+ if(beginr == endr) {
           next_to_last = true;
           //skip last point equal to first
           continue;
@@ -1508,7 +1509,7 @@
         if(dir == CLOCKWISE) {
           posE.push_back(rectangle_data<typename Point::coordinate_type>
                          (x(pt2) - 1, y(pt2) - 1, x(pt2) + 1, y(pt2) + 1));
-
+
         } else {
           negE.push_back(rectangle_data<typename Point::coordinate_type>
                          (x(pt2) - 1, y(pt2) - 1, x(pt2) + 1, y(pt2) + 1));
@@ -1518,8 +1519,8 @@
       pt2 = pt3;
     }
   }
-
- template <typename cT, typename pT>
+
+ template <typename cT, typename pT>
   void get_error_rects(cT& posE, cT& negE, const pT& p) {
     get_error_rects_shell(posE, negE, p.begin(), p.end());
     for(typename pT::iterator_holes_type iHb = p.begin_holes();
@@ -1554,16 +1555,16 @@
 #endif
       if(op == 0) {
         output.applyBooleanBinaryOp(l90sd.begin(), l90sd.end(),
- r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryOr>());
+ r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryOr>());
       } else if (op == 1) {
         output.applyBooleanBinaryOp(l90sd.begin(), l90sd.end(),
- r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryAnd>());
+ r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryAnd>());
       } else if (op == 2) {
         output.applyBooleanBinaryOp(l90sd.begin(), l90sd.end(),
- r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryNot>());
+ r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryNot>());
       } else if (op == 3) {
         output.applyBooleanBinaryOp(l90sd.begin(), l90sd.end(),
- r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryXor>());
+ r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryXor>());
       }
 #ifdef BOOST_POLYGON_MSVC
 #pragma warning (default: 4127)
@@ -1590,7 +1591,7 @@
           lvalue_data.reserve(data_.size());
           for(std::size_t i = 0 ; i < data_.size(); ++i) {
             const Vertex45Compact& vi = data_[i];
- Vertex45Compact2 ci;
+ Vertex45Compact2 ci;
             ci.pt = point_data<Unit2>(x(vi.pt), y(vi.pt));
             ci.count = typename polygon_45_formation<Unit2>::Vertex45Count
               ( vi.count[0], vi.count[1], vi.count[2], vi.count[3]);
@@ -1639,7 +1640,7 @@
               result.error_data_.push_back(ci);
             }
             Data2 new_result_data;
- gtlsort(result_data.begin(), result_data.end());
+ polygon_sort(result_data.begin(), result_data.end());
             applyUnary45OpOnVectors<Unit2, 0>(new_result_data, result_data); //OR operation
             result_data.swap(new_result_data);
           }
@@ -1709,7 +1710,7 @@
           lvalue_data.reserve(data_.size());
           for(std::size_t i = 0 ; i < data_.size(); ++i) {
             const Vertex45Compact& vi = data_[i];
- Vertex45Compact2 ci;
+ Vertex45Compact2 ci;
             ci.pt.x(static_cast<Unit>(x(vi.pt)));
             ci.pt.y(static_cast<Unit>(y(vi.pt)));
             ci.count = typename polygon_45_formation<Unit2>::Vertex45Count
@@ -1749,7 +1750,7 @@
               result.error_data_.push_back(ci);
             }
             Data2 new_result_data;
- gtlsort(result_data.begin(), result_data.end());
+ polygon_sort(result_data.begin(), result_data.end());
             applyUnary45OpOnVectors<Unit2, 0>(new_result_data, result_data); //OR operation
             result_data.swap(new_result_data);
           }
@@ -1787,11 +1788,11 @@
   public:
     inline property_merge_45() : tsd_() {}
     inline property_merge_45(const property_merge_45& that) : tsd_(that.tsd_) {}
- inline property_merge_45& operator=(const property_merge_45& that) {
- tsd_ = that.tsd_;
+ inline property_merge_45& operator=(const property_merge_45& that) {
+ tsd_ = that.tsd_;
       return *this;
     }
-
+
     inline void insert(const polygon_45_set_data<coordinate_type>& ps, property_type property) {
       ps.clean();
       polygon_45_property_merge<big_coord, property_type>::populateMergeSetData(tsd_, ps.begin(), ps.end(), property);
@@ -1844,12 +1845,12 @@
     inline connectivity_extraction_45() : tsd_(), nodeCount_(0) {}
     inline connectivity_extraction_45(const connectivity_extraction_45& that) : tsd_(that.tsd_),
                                                                           nodeCount_(that.nodeCount_) {}
- inline connectivity_extraction_45& operator=(const connectivity_extraction_45& that) {
- tsd_ = that.tsd_;
+ inline connectivity_extraction_45& operator=(const connectivity_extraction_45& that) {
+ tsd_ = that.tsd_;
       nodeCount_ = that.nodeCount_; {}
       return *this;
     }
-
+
     //insert a polygon set graph node, the value returned is the id of the graph node
     inline unsigned int insert(const polygon_45_set_data<coordinate_type>& ps) {
       ps.clean();
@@ -1862,7 +1863,7 @@
       ps.insert(geoObj);
       return insert(ps);
     }
-
+
     //extract connectivity and store the edges in the graph
     //graph must be indexable by graph node id and the indexed value must be a std::set of
     //graph node id

Modified: branches/release/boost/polygon/polygon_45_set_traits.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_45_set_traits.hpp (original)
+++ branches/release/boost/polygon/polygon_45_set_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -43,13 +43,13 @@
     typedef typename is_45_polygonal_concept<typename geometry_concept<T>::type>::type type;
   };
   template <typename T>
- struct is_polygon_45_set_type<std::list<T> > {
+ struct is_polygon_45_set_type<std::list<T> > {
     typedef typename gtl_or<
       typename is_45_polygonal_concept<typename geometry_concept<std::list<T> >::type>::type,
       typename is_45_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
   };
   template <typename T>
- struct is_polygon_45_set_type<std::vector<T> > {
+ struct is_polygon_45_set_type<std::vector<T> > {
     typedef typename gtl_or<
       typename is_45_polygonal_concept<typename geometry_concept<std::vector<T> >::type>::type,
       typename is_45_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -60,13 +60,13 @@
     typedef typename gtl_same_type<polygon_45_set_concept, typename geometry_concept<T>::type>::type type;
   };
   template <typename T>
- struct is_mutable_polygon_45_set_type<std::list<T> > {
+ struct is_mutable_polygon_45_set_type<std::list<T> > {
     typedef typename gtl_or<
       typename gtl_same_type<polygon_45_set_concept, typename geometry_concept<std::list<T> >::type>::type,
       typename is_45_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
   };
   template <typename T>
- struct is_mutable_polygon_45_set_type<std::vector<T> > {
+ struct is_mutable_polygon_45_set_type<std::vector<T> > {
     typedef typename gtl_or<
       typename gtl_same_type<polygon_45_set_concept, typename geometry_concept<std::vector<T> >::type>::type,
       typename is_45_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -94,6 +94,7 @@
     static inline void set(std::list<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
       polygon_45_set_data<typename polygon_45_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(std::distance(input_begin, input_end));
       ps.insert(input_begin, input_end);
       ps.sort();
       ps.clean();
@@ -105,7 +106,10 @@
     template <typename input_iterator_type>
     static inline void set(std::vector<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
+ size_t num_ele = std::distance(input_begin, input_end);
+ polygon_set.reserve(num_ele);
       polygon_45_set_data<typename polygon_45_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(num_ele);
       ps.insert(input_begin, input_end);
       ps.sort();
       ps.clean();
@@ -116,7 +120,7 @@
   template <typename T>
   struct polygon_45_set_mutable_traits<polygon_45_set_data<T> > {
     template <typename input_iterator_type>
- static inline void set(polygon_45_set_data<T>& polygon_set,
+ static inline void set(polygon_45_set_data<T>& polygon_set,
                            input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.set(input_begin, input_end);
     }
@@ -140,7 +144,6 @@
     static inline bool sorted(const polygon_45_set_data<T>& polygon_set) { polygon_set.sort(); return true; }
 
   };
-}
+}
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_45_with_holes_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_45_with_holes_data.hpp (original)
+++ branches/release/boost/polygon/polygon_45_with_holes_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -18,7 +18,7 @@
   typedef T coordinate_type;
   typedef typename polygon_45_data<T>::iterator_type iterator_type;
   typedef typename std::list<polygon_45_data<coordinate_type> >::const_iterator iterator_holes_type;
- typedef polygon_45_data<coordinate_type> hole_type;
+ typedef polygon_45_data<coordinate_type> hole_type;
   typedef typename coordinate_traits<T>::coordinate_distance area_type;
   typedef point_data<T> point_type;
 
@@ -55,9 +55,9 @@
   }
 
   // copy constructor (since we have dynamic memory)
- inline polygon_45_with_holes_data(const polygon_45_with_holes_data& that) : self_(that.self_),
+ inline polygon_45_with_holes_data(const polygon_45_with_holes_data& that) : self_(that.self_),
                                                                   holes_(that.holes_) {}
-
+
   // assignment operator (since we have dynamic memory do a deep copy)
   inline polygon_45_with_holes_data& operator=(const polygon_45_with_holes_data& that) {
     self_ = that.self_;
@@ -80,7 +80,7 @@
 
   inline std::size_t size() const {
     return self_.size();
- }
+ }
 
   // get begin iterator, returns a pointer to a const polygon
   inline const iterator_holes_type begin_holes() const {
@@ -98,11 +98,10 @@
 
 public:
   polygon_45_data<coordinate_type> self_;
- std::list<hole_type> holes_;
+ std::list<hole_type> holes_;
 };
 
 
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_90_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_90_data.hpp (original)
+++ branches/release/boost/polygon/polygon_90_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -40,7 +40,7 @@
 
   // copy constructor (since we have dynamic memory)
   inline polygon_90_data(const polygon_90_data& that) : coords_(that.coords_) {}
-
+
   // assignment operator (since we have dynamic memory do a deep copy)
   inline polygon_90_data& operator=(const polygon_90_data& that) {
     coords_ = that.coords_;
@@ -63,18 +63,17 @@
 
   // get begin iterator, returns a pointer to a const Unit
   inline compact_iterator_type begin_compact() const { return coords_.begin(); }
-
+
   // get end iterator, returns a pointer to a const Unit
   inline compact_iterator_type end_compact() const { return coords_.end(); }
 
   inline std::size_t size() const { return coords_.size(); }
-
+
 private:
- std::vector<coordinate_type> coords_;
+ std::vector<coordinate_type> coords_;
 };
 
 
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_90_set_concept.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_90_set_concept.hpp (original)
+++ branches/release/boost/polygon/polygon_90_set_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -17,14 +17,14 @@
   begin_90_set_data(const polygon_set_type& polygon_set) {
     return polygon_90_set_traits<polygon_set_type>::begin(polygon_set);
   }
-
+
   template <typename polygon_set_type>
   typename enable_if< typename is_polygon_90_set_type<polygon_set_type>::type,
                        typename polygon_90_set_traits<polygon_set_type>::iterator_type>::type
   end_90_set_data(const polygon_set_type& polygon_set) {
     return polygon_90_set_traits<polygon_set_type>::end(polygon_set);
   }
-
+
   template <typename polygon_set_type>
   typename enable_if< typename is_polygon_90_set_type<polygon_set_type>::type,
                        orientation_2d>::type
@@ -47,7 +47,7 @@
       typename is_polygon_90_set_type<polygon_set_type_2>::type>::type,
     polygon_set_type_1>::type &
   assign(polygon_set_type_1& lvalue, const polygon_set_type_2& rvalue) {
- polygon_90_set_mutable_traits<polygon_set_type_1>::set(lvalue, begin_90_set_data(rvalue), end_90_set_data(rvalue),
+ polygon_90_set_mutable_traits<polygon_set_type_1>::set(lvalue, begin_90_set_data(rvalue), end_90_set_data(rvalue),
                                                            scanline_orientation(rvalue));
     return lvalue;
   }
@@ -59,12 +59,12 @@
 
   //equivalence
   template <typename polygon_set_type_1, typename polygon_set_type_2>
- typename enable_if< typename gtl_and_3<
+ typename enable_if< typename gtl_and_3<
     typename is_polygon_90_set_type<polygon_set_type_1>::type,
     typename is_polygon_90_set_type<polygon_set_type_2>::type,
     typename are_not_both_rectangle_concept<typename geometry_concept<polygon_set_type_1>::type,
                                             typename geometry_concept<polygon_set_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   equivalence(const polygon_set_type_1& lvalue,
               const polygon_set_type_2& rvalue) {
     polygon_90_set_data<typename polygon_90_set_traits<polygon_set_type_1>::coordinate_type> ps1;
@@ -99,7 +99,7 @@
 
   //get: min_rectangles max_rectangles
   template <typename output_container_type, typename polygon_set_type>
- typename enable_if <typename gtl_and<
+ typename enable_if <typename gtl_and<
     typename is_polygon_90_set_type<polygon_set_type>::type,
     typename gtl_same_type<rectangle_concept,
                            typename geometry_concept
@@ -111,7 +111,7 @@
     assign(rects, polygon_set);
     MaxCover<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::getMaxCover(output, rects, scanline_orientation(polygon_set));
   }
-
+
   //clear
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
@@ -120,7 +120,7 @@
     polygon_90_set_data<typename polygon_90_set_traits<polygon_set_type>::coordinate_type> ps(scanline_orientation(polygon_set));
     assign(polygon_set, ps);
   }
-
+
   //empty
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
@@ -132,13 +132,13 @@
     ps.clean();
     return ps.empty();
   }
-
+
   //extents
   template <typename polygon_set_type, typename rectangle_type>
   typename enable_if <typename gtl_and< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                                          typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        bool>::type
- extents(rectangle_type& extents_rectangle,
+ extents(rectangle_type& extents_rectangle,
                              const polygon_set_type& polygon_set) {
     typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
     polygon_90_set_data<Unit> ps;
@@ -177,7 +177,7 @@
     assign(polygon_set_1, ps);
     return polygon_set_1;
   }
-
+
   //self_intersect
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
@@ -207,7 +207,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- bloat(polygon_set_type& polygon_set,
+ bloat(polygon_set_type& polygon_set,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
     return bloat(polygon_set, bloating, bloating, bloating, bloating);
   }
@@ -250,7 +250,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- bloat(polygon_set_type& polygon_set,
+ bloat(polygon_set_type& polygon_set,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type west_bloating,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type east_bloating,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type south_bloating,
@@ -267,7 +267,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- shrink(polygon_set_type& polygon_set,
+ shrink(polygon_set_type& polygon_set,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type shrinking) {
     return shrink(polygon_set, shrinking, shrinking, shrinking, shrinking);
   }
@@ -310,7 +310,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- shrink(polygon_set_type& polygon_set,
+ shrink(polygon_set_type& polygon_set,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type west_shrinking,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type east_shrinking,
         typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type south_shrinking,
@@ -354,7 +354,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- grow_and(polygon_set_type& polygon_set,
+ grow_and(polygon_set_type& polygon_set,
            typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
     return grow_and(polygon_set, bloating, bloating, bloating, bloating);
   }
@@ -397,7 +397,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename gtl_if<typename is_mutable_polygon_90_set_type<polygon_set_type>::type>::type,
                        polygon_set_type>::type &
- grow_and(polygon_set_type& polygon_set,
+ grow_and(polygon_set_type& polygon_set,
            typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type west_bloating,
            typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type east_bloating,
            typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type south_bloating,
@@ -422,7 +422,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- scale_up(polygon_set_type& polygon_set,
+ scale_up(polygon_set_type& polygon_set,
            typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>
            ::unsigned_area_type factor) {
     typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
@@ -436,7 +436,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- scale_down(polygon_set_type& polygon_set,
+ scale_down(polygon_set_type& polygon_set,
              typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>
              ::unsigned_area_type factor) {
     typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
@@ -450,7 +450,7 @@
   template <typename polygon_set_type, typename scaling_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- scale(polygon_set_type& polygon_set,
+ scale(polygon_set_type& polygon_set,
         const scaling_type& scaling) {
     typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
     polygon_90_set_data<Unit> ps;
@@ -460,24 +460,27 @@
     return polygon_set;
   }
 
+ struct y_p_s_move : gtl_yes {};
+
   //move
   template <typename polygon_set_type>
- polygon_set_type&
+ typename enable_if< typename gtl_and<y_p_s_move, typename gtl_if<typename is_mutable_polygon_90_set_type<polygon_set_type>::type>::type>::type,
+ polygon_set_type>::type &
   move(polygon_set_type& polygon_set,
- orientation_2d orient, typename polygon_90_set_traits<polygon_set_type>::coordinate_type displacement,
- typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type>::type * = 0) {
+ orientation_2d orient, typename polygon_90_set_traits<polygon_set_type>::coordinate_type displacement) {
     if(orient == HORIZONTAL)
       return move(polygon_set, displacement, 0);
- else
+ else
       return move(polygon_set, 0, displacement);
   }
 
+ struct y_p_s_move2 : gtl_yes {};
+
   template <typename polygon_set_type>
- polygon_set_type&
- move(polygon_set_type& polygon_set, typename polygon_90_set_traits<polygon_set_type>::coordinate_type x_displacement,
- typename polygon_90_set_traits<polygon_set_type>::coordinate_type y_displacement,
- typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and<y_p_s_move2, typename gtl_if<typename is_mutable_polygon_90_set_type<polygon_set_type>::type>::type>::type,
+ polygon_set_type>::type &
+ move(polygon_set_type& polygon_set, typename polygon_90_set_traits<polygon_set_type>::coordinate_type x_displacement,
+ typename polygon_90_set_traits<polygon_set_type>::coordinate_type y_displacement) {
     typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
     polygon_90_set_data<Unit> ps;
     assign(ps, polygon_set);
@@ -507,7 +510,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- keep(polygon_set_type& polygon_set,
+ keep(polygon_set_type& polygon_set,
        typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_area,
        typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type max_area,
        typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_width,

Modified: branches/release/boost/polygon/polygon_90_set_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_90_set_data.hpp (original)
+++ branches/release/boost/polygon/polygon_90_set_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -13,6 +13,7 @@
 #include "transform.hpp"
 #include "interval_concept.hpp"
 #include "rectangle_concept.hpp"
+#include "segment_concept.hpp"
 #include "detail/iterator_points_to_compact.hpp"
 #include "detail/iterator_compact_to_points.hpp"
 #include "polygon_traits.hpp"
@@ -46,7 +47,7 @@
 
     // constructor from an iterator pair over vertex data
     template <typename iT>
- inline polygon_90_set_data(orientation_2d orient, iT input_begin, iT input_end) :
+ inline polygon_90_set_data(orientation_2d orient, iT input_begin, iT input_end) :
       orient_(HORIZONTAL), data_(), dirty_(false), unsorted_(false) {
       dirty_ = true;
       unsorted_ = true;
@@ -54,14 +55,14 @@
     }
 
     // copy constructor
- inline polygon_90_set_data(const polygon_90_set_data& that) :
+ inline polygon_90_set_data(const polygon_90_set_data& that) :
       orient_(that.orient_), data_(that.data_), dirty_(that.dirty_), unsorted_(that.unsorted_) {}
 
     template <typename ltype, typename rtype, typename op_type>
     inline polygon_90_set_data(const polygon_90_set_view<ltype, rtype, op_type>& that);
 
     // copy with orientation change constructor
- inline polygon_90_set_data(orientation_2d orient, const polygon_90_set_data& that) :
+ inline polygon_90_set_data(orientation_2d orient, const polygon_90_set_data& that) :
       orient_(orient), data_(), dirty_(false), unsorted_(false) {
       insert(that, false, that.orient_);
     }
@@ -138,7 +139,7 @@
       insert(begin_input, end_input, orient_);
     }
 
- inline void insert(const std::pair<coordinate_type, std::pair<coordinate_type, int> >& vertex, bool is_hole = false,
+ inline void insert(const std::pair<coordinate_type, std::pair<coordinate_type, int> >& vertex, bool is_hole = false,
                        orientation_2d orient = HORIZONTAL) {
       data_.push_back(vertex);
       if(orient != orient_) std::swap(data_.back().first, data_.back().second.first);
@@ -190,7 +191,7 @@
       }
     }
 
- // equivalence operator
+ // equivalence operator
     inline bool operator==(const polygon_90_set_data& p) const {
       if(orient_ == p.orient()) {
         clean();
@@ -201,7 +202,7 @@
       }
     }
 
- // inequivalence operator
+ // inequivalence operator
     inline bool operator!=(const polygon_90_set_data& p) const {
       return !((*this) == p);
     }
@@ -260,7 +261,7 @@
     // value_type data;
     // std::swap(data, data_);
     // applyBooleanBinaryOp(data.begin(), data.end(),
- // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryNot>());
+ // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryNot>());
     // return *this;
     // }
     // polygon_90_set_data<coordinate_type>& operator^=(const polygon_90_set_data& that) {
@@ -269,7 +270,7 @@
     // value_type data;
     // std::swap(data, data_);
     // applyBooleanBinaryOp(data.begin(), data.end(),
- // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryXor>());
+ // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryXor>());
     // return *this;
     // }
     // polygon_90_set_data<coordinate_type>& operator&=(const polygon_90_set_data& that) {
@@ -278,7 +279,7 @@
     // value_type data;
     // std::swap(data, data_);
     // applyBooleanBinaryOp(data.begin(), data.end(),
- // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryAnd>());
+ // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryAnd>());
     // return *this;
     // }
     // polygon_90_set_data<coordinate_type>& operator|=(const polygon_90_set_data& that) {
@@ -296,7 +297,7 @@
 
     void sort() const{
       if(unsorted_) {
- gtlsort(data_.begin(), data_.end());
+ polygon_sort(data_.begin(), data_.end());
         unsorted_ = false;
       }
     }
@@ -304,6 +305,7 @@
     template <typename input_iterator_type>
     void set(input_iterator_type input_begin, input_iterator_type input_end, orientation_2d orient) {
       data_.clear();
+ reserve(std::distance(input_begin, input_end));
       data_.insert(data_.end(), input_begin, input_end);
       orient_ = orient;
       dirty_ = true;
@@ -311,7 +313,7 @@
     }
 
     void set(const value_type& value, orientation_2d orient) {
- data_ = value;
+ data_ = value;
       orient_ = orient;
       dirty_ = true;
       unsorted_ = true;
@@ -345,11 +347,11 @@
           typename coordinate_traits<coordinate_type>::unsigned_area_type north_bloating) {
       std::vector<rectangle_data<coordinate_type> > rects;
       clean();
- rects.reserve(data_.size() / 2);
+ rects.reserve(data_.size() / 2);
       get(rects);
- rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)west_bloating),
+ rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)west_bloating),
                                                                                           (coordinate_type)east_bloating),
- interval_data<coordinate_type>(-((coordinate_type)south_bloating),
+ interval_data<coordinate_type>(-((coordinate_type)south_bloating),
                                                                                           (coordinate_type)north_bloating));
       for(typename std::vector<rectangle_data<coordinate_type> >::iterator itr = rects.begin();
           itr != rects.end(); ++itr) {
@@ -392,7 +394,7 @@
       if(nyg)
         pt.x(current_pt.x() + east_bloating);
     }
- static void resize_poly_up(std::vector<point_data<coordinate_type> >& poly,
+ static void resize_poly_up(std::vector<point_data<coordinate_type> >& poly,
                                coordinate_type west_bloating,
                                coordinate_type east_bloating,
                                coordinate_type south_bloating,
@@ -415,7 +417,7 @@
       modify_pt(poly[0], prev_pt, current_pt, next_pt, west_bloating, east_bloating, south_bloating, north_bloating);
       remove_colinear_pts(poly);
     }
- static bool resize_poly_down(std::vector<point_data<coordinate_type> >& poly,
+ static bool resize_poly_down(std::vector<point_data<coordinate_type> >& poly,
                                  coordinate_type west_shrinking,
                                  coordinate_type east_shrinking,
                                  coordinate_type south_shrinking,
@@ -427,7 +429,7 @@
       point_data<coordinate_type> prev_pt = poly[0];
       point_data<coordinate_type> current_pt = poly[1];
       encompass(extents_rectangle, current_pt);
- for(int i = 2; i < poly.size(); ++i) {
+ for(std::size_t i = 2; i < poly.size(); ++i) {
         point_data<coordinate_type> next_pt = poly[i];
         encompass(extents_rectangle, next_pt);
         modify_pt(poly[i-1], prev_pt, current_pt, next_pt, west_shrinking, east_shrinking, south_shrinking, north_shrinking);
@@ -451,7 +453,7 @@
       bool found_colinear = true;
       while(found_colinear && poly.size() >= 4) {
         found_colinear = false;
- typename std::vector<point_data<coordinate_type> >::iterator itr = poly.begin();
+ typename std::vector<point_data<coordinate_type> >::iterator itr = poly.begin();
         itr += poly.size() - 1; //get last element position
         typename std::vector<point_data<coordinate_type> >::iterator itr2 = poly.begin();
         typename std::vector<point_data<coordinate_type> >::iterator itr3 = itr2;
@@ -477,7 +479,7 @@
         poly.erase(poly.end() - count, poly.end());
       }
       return poly.size() >= 4;
- }
+ }
 
     polygon_90_set_data&
     bloat(typename coordinate_traits<coordinate_type>::unsigned_area_type west_bloating,
@@ -493,9 +495,10 @@
         //psref.insert(view_as<polygon_90_concept>((*itr).self_));
         //rectangle_data<coordinate_type> prerect;
         //psref.extents(prerect);
- resize_poly_up((*itr).self_.coords_, west_bloating, east_bloating, south_bloating, north_bloating);
+ resize_poly_up((*itr).self_.coords_, (coordinate_type)west_bloating, (coordinate_type)east_bloating,
+ (coordinate_type)south_bloating, (coordinate_type)north_bloating);
         iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
+ begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
           end_input(view_as<polygon_90_concept>((*itr).self_), HIGH, orient_, false, true, COUNTERCLOCKWISE);
         insert(begin_input, end_input, orient_);
         //polygon_90_set_data<coordinate_type> pstest;
@@ -512,15 +515,16 @@
           //psrefhole.insert(prerect);
           //psrefhole.insert(view_as<polygon_90_concept>(*itrh), true);
           //polygon_45_data<coordinate_type> testpoly(*itrh);
- if(resize_poly_down((*itrh).coords_, west_bloating, east_bloating, south_bloating, north_bloating)) {
+ if(resize_poly_down((*itrh).coords_,(coordinate_type)west_bloating, (coordinate_type)east_bloating,
+ (coordinate_type)south_bloating, (coordinate_type)north_bloating)) {
             iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
+ begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
               end_input2(view_as<polygon_90_concept>(*itrh), HIGH, orient_, true, true);
             insert(begin_input2, end_input2, orient_);
             //polygon_90_set_data<coordinate_type> pstesthole;
             //pstesthole.insert(rect);
             //iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
+ // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
             //pstesthole.insert(begin_input2, end_input, orient_);
             //psrefhole.bloat2(west_bloating, east_bloating, south_bloating, north_bloating);
             //if(!equivalence(psrefhole, pstesthole)) {
@@ -556,13 +560,14 @@
         //rectangle_data<coordinate_type> prerect;
         //psref.extents(prerect);
         //polygon_45_data<coordinate_type> testpoly((*itr).self_);
- if(resize_poly_down((*itr).self_.coords_, -west_shrinking, -east_shrinking, -south_shrinking, -north_shrinking)) {
+ if(resize_poly_down((*itr).self_.coords_, -(coordinate_type)west_shrinking, -(coordinate_type)east_shrinking,
+ -(coordinate_type)south_shrinking, -(coordinate_type)north_shrinking)) {
           iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
+ begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
             end_input(view_as<polygon_90_concept>((*itr).self_), HIGH, orient_, false, true, COUNTERCLOCKWISE);
           insert(begin_input, end_input, orient_);
           //iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- // begin_input2(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE);
+ // begin_input2(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE);
           //polygon_90_set_data<coordinate_type> pstest;
           //pstest.insert(begin_input2, end_input, orient_);
           //psref.shrink2(west_shrinking, east_shrinking, south_shrinking, north_shrinking);
@@ -577,15 +582,16 @@
             //psrefhole.insert(prerect);
             //psrefhole.insert(view_as<polygon_90_concept>(*itrh), true);
             //polygon_45_data<coordinate_type> testpoly(*itrh);
- resize_poly_up((*itrh).coords_, -west_shrinking, -east_shrinking, -south_shrinking, -north_shrinking);
+ resize_poly_up((*itrh).coords_, -(coordinate_type)west_shrinking, -(coordinate_type)east_shrinking,
+ -(coordinate_type)south_shrinking, -(coordinate_type)north_shrinking);
             iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
+ begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
               end_input2(view_as<polygon_90_concept>(*itrh), HIGH, orient_, true, true);
             insert(begin_input2, end_input2, orient_);
             //polygon_90_set_data<coordinate_type> pstesthole;
             //pstesthole.insert(rect);
             //iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
+ // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
             //pstesthole.insert(begin_input2, end_input, orient_);
             //psrefhole.shrink2(west_shrinking, east_shrinking, south_shrinking, north_shrinking);
             //if(!equivalence(psrefhole, pstesthole)) {
@@ -618,13 +624,13 @@
       insert(externalBoundary, true); //note that the set is in a dirty state now
       sort(); //does not apply implicit OR operation
       std::vector<rectangle_data<coordinate_type> > rects;
- rects.reserve(data_.size() / 2);
+ rects.reserve(data_.size() / 2);
       //begin does not apply implicit or operation, this is a dirty range
       form_rectangles(rects, data_.begin(), data_.end(), orient_, rectangle_concept());
       clear();
- rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)east_shrinking),
+ rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)east_shrinking),
                                                                                           (coordinate_type)west_shrinking),
- interval_data<coordinate_type>(-((coordinate_type)north_shrinking),
+ interval_data<coordinate_type>(-((coordinate_type)north_shrinking),
                                                                                           (coordinate_type)south_shrinking));
       for(typename std::vector<rectangle_data<coordinate_type> >::iterator itr = rects.begin();
           itr != rects.end(); ++itr) {
@@ -663,10 +669,10 @@
     }
 
     polygon_90_set_data&
- resize(coordinate_type west, coordinate_type east, coordinate_type south, coordinate_type north);
+ resize(coordinate_type west, coordinate_type east, coordinate_type south, coordinate_type north);
 
     polygon_90_set_data& move(coordinate_type x_delta, coordinate_type y_delta) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
             itr = data_.begin(); itr != data_.end(); ++itr) {
         if(orient_ == orientation_2d(VERTICAL)) {
           (*itr).first += x_delta;
@@ -701,7 +707,7 @@
 
     // scale set
     polygon_90_set_data& scale_up(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
             itr = data_.begin(); itr != data_.end(); ++itr) {
         (*itr).first *= (coordinate_type)factor;
         (*itr).second.first *= (coordinate_type)factor;
@@ -710,7 +716,7 @@
     }
     polygon_90_set_data& scale_down(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
       typedef typename coordinate_traits<coordinate_type>::coordinate_distance dt;
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
             itr = data_.begin(); itr != data_.end(); ++itr) {
         (*itr).first = scaling_policy<coordinate_type>::round((dt)((*itr).first) / (dt)factor);
         (*itr).second.first = scaling_policy<coordinate_type>::round((dt)((*itr).second.first) / (dt)factor);
@@ -720,7 +726,7 @@
     }
     template <typename scaling_type>
     polygon_90_set_data& scale(const anisotropic_scale_factor<scaling_type>& scaling) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
             itr = data_.begin(); itr != data_.end(); ++itr) {
         if(orient_ == orientation_2d(VERTICAL)) {
           scaling.scale((*itr).first, (*itr).second.first);
@@ -733,7 +739,7 @@
     }
     template <typename scaling_type>
     polygon_90_set_data& scale_with(const scaling_type& scaling) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
             itr = data_.begin(); itr != data_.end(); ++itr) {
         if(orient_ == orientation_2d(VERTICAL)) {
           scaling.scale((*itr).first, (*itr).second.first);
@@ -746,7 +752,7 @@
     }
     polygon_90_set_data& scale(double factor) {
       typedef typename coordinate_traits<coordinate_type>::coordinate_distance dt;
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
             itr = data_.begin(); itr != data_.end(); ++itr) {
         (*itr).first = scaling_policy<coordinate_type>::round((dt)((*itr).first) * (dt)factor);
         (*itr).second.first = scaling_policy<coordinate_type>::round((dt)((*itr).second.first) * (dt)factor);
@@ -812,7 +818,7 @@
     mutable value_type data_;
     mutable bool dirty_;
     mutable bool unsorted_;
-
+
   private:
     //functions
     template <typename output_container>
@@ -882,7 +888,7 @@
       return bloat(0, e_total, 0, n_total);
     }
   }
-
+
   template <typename coordinate_type, typename property_type>
   class property_merge_90 {
   private:
@@ -905,7 +911,7 @@
     //with unique sets of merged properties to polygons sets in a map keyed by sets of properties
     // T = std::map<std::set<property_type>, polygon_90_set_data<coordiante_type> > or
     // T = std::map<std::vector<property_type>, polygon_90_set_data<coordiante_type> >
- template <typename ResultType>
+ template <typename ResultType>
     inline void merge(ResultType& result) {
       merge_scanline<coordinate_type, property_type, polygon_90_set_data<coordinate_type>, typename ResultType::key_type> ms;
       ms.perform_merge(result, pmd_);
@@ -924,12 +930,12 @@
     inline connectivity_extraction_90() : tsd_(), nodeCount_(0) {}
     inline connectivity_extraction_90(const connectivity_extraction_90& that) : tsd_(that.tsd_),
                                                                           nodeCount_(that.nodeCount_) {}
- inline connectivity_extraction_90& operator=(const connectivity_extraction_90& that) {
- tsd_ = that.tsd_;
+ inline connectivity_extraction_90& operator=(const connectivity_extraction_90& that) {
+ tsd_ = that.tsd_;
       nodeCount_ = that.nodeCount_; {}
       return *this;
     }
-
+
     //insert a polygon set graph node, the value returned is the id of the graph node
     inline unsigned int insert(const polygon_90_set_data<coordinate_type>& ps) {
       ps.clean();
@@ -942,7 +948,7 @@
       ps.insert(geoObj);
       return insert(ps);
     }
-
+
     //extract connectivity and store the edges in the graph
     //graph must be indexable by graph node id and the indexed value must be a std::set of
     //graph node id
@@ -954,4 +960,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_90_set_traits.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_90_set_traits.hpp (original)
+++ branches/release/boost/polygon/polygon_90_set_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -24,6 +24,8 @@
   template <typename T>
   struct traits_by_concept<T, rectangle_concept> { typedef rectangle_traits<T> type; };
   template <typename T>
+ struct traits_by_concept<T, segment_concept> { typedef segment_traits<T> type; };
+ template <typename T>
   struct traits_by_concept<T, polygon_90_concept> { typedef polygon_traits<T> type; };
   template <typename T>
   struct traits_by_concept<T, polygon_90_with_holes_concept> { typedef polygon_traits<T> type; };
@@ -63,7 +65,7 @@
     typedef typename traits_type::coordinate_type type;
   };
   template <typename T>
- struct get_coordinate_type<T, undefined_concept> {
+ struct get_coordinate_type<T, undefined_concept> {
     typedef typename get_coordinate_type_2<typename std::iterator_traits
                                            <typename T::iterator>::value_type,
                                            typename geometry_concept<typename std::iterator_traits
@@ -71,7 +73,7 @@
 
   template <typename T, typename T2>
   struct get_iterator_type_2 {
- typedef const T* type;
+ typedef const T* type;
     static type begin(const T& t) { return &t; }
     static type end(const T& t) { const T* tp = &t; ++tp; return tp; }
   };
@@ -88,7 +90,7 @@
     static type begin(const T& t) { return t.begin(); }
     static type end(const T& t) { return t.end(); }
   };
-
+
 // //helpers for allowing polygon 45 and containers of polygon 45 to behave interchangably in polygon_45_set_traits
 // template <typename T, typename T2>
 // struct get_coordinate_type_45 {};
@@ -109,25 +111,25 @@
 // struct get_iterator_type_45 {};
 // template <typename T>
 // struct get_iterator_type_45<T, void> {
-// typedef typename T::const_iterator type;
+// typedef typename T::const_iterator type;
 // static type begin(const T& t) { return t.begin(); }
 // static type end(const T& t) { return t.end(); }
 // };
 // template <typename T>
-// struct get_iterator_type_45<T, polygon_45_concept> {
-// typedef const T* type;
+// struct get_iterator_type_45<T, polygon_45_concept> {
+// typedef const T* type;
 // static type begin(const T& t) { return &t; }
 // static type end(const T& t) { const T* tp = &t; ++tp; return tp; }
 // };
 // template <typename T>
-// struct get_iterator_type_45<T, polygon_45_with_holes_concept> {
-// typedef const T* type;
+// struct get_iterator_type_45<T, polygon_45_with_holes_concept> {
+// typedef const T* type;
 // static type begin(const T& t) { return &t; }
 // static type end(const T& t) { const T* tp = &t; ++tp; return tp; }
 // };
 // template <typename T>
-// struct get_iterator_type_45<T, polygon_90_set_concept> {
-// typedef const T* type;
+// struct get_iterator_type_45<T, polygon_90_set_concept> {
+// typedef const T* type;
 // static type begin(const T& t) { return &t; }
 // static type end(const T& t) { const T* tp = &t; ++tp; return tp; }
 // };
@@ -170,13 +172,13 @@
     typedef typename is_manhattan_polygonal_concept<typename geometry_concept<T>::type>::type type;
   };
   template <typename T>
- struct is_polygon_90_set_type<std::list<T> > {
+ struct is_polygon_90_set_type<std::list<T> > {
     typedef typename gtl_or<
       typename is_manhattan_polygonal_concept<typename geometry_concept<std::list<T> >::type>::type,
       typename is_manhattan_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
   };
   template <typename T>
- struct is_polygon_90_set_type<std::vector<T> > {
+ struct is_polygon_90_set_type<std::vector<T> > {
     typedef typename gtl_or<
       typename is_manhattan_polygonal_concept<typename geometry_concept<std::vector<T> >::type>::type,
       typename is_manhattan_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -187,15 +189,15 @@
     typedef typename gtl_same_type<polygon_90_set_concept, typename geometry_concept<T>::type>::type type;
   };
   template <typename T>
- struct is_mutable_polygon_90_set_type<std::list<T> > {
+ struct is_mutable_polygon_90_set_type<std::list<T> > {
     typedef typename gtl_or<
- typename gtl_same_type<polygon_90_set_concept, typename geometry_concept<std::list<T> >::type>::type,
+ typename gtl_same_type<polygon_90_set_concept, typename geometry_concept<std::list<T> >::type>::type,
       typename is_manhattan_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
   };
   template <typename T>
- struct is_mutable_polygon_90_set_type<std::vector<T> > {
+ struct is_mutable_polygon_90_set_type<std::vector<T> > {
     typedef typename gtl_or<
- typename gtl_same_type<polygon_90_set_concept, typename geometry_concept<std::vector<T> >::type>::type,
+ typename gtl_same_type<polygon_90_set_concept, typename geometry_concept<std::vector<T> >::type>::type,
       typename is_manhattan_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
   };
 
@@ -278,6 +280,7 @@
     static inline void set(std::list<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end, orientation_2d orient) {
       polygon_set.clear();
       polygon_90_set_data<typename polygon_90_set_traits<std::list<T> >::coordinate_type> ps(orient);
+ ps.reserve(std::distance(input_begin, input_end));
       ps.insert(input_begin, input_end, orient);
       ps.clean();
       get_90_dispatch(polygon_set, ps, orient, concept_type());
@@ -289,7 +292,10 @@
     template <typename input_iterator_type>
     static inline void set(std::vector<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end, orientation_2d orient) {
       polygon_set.clear();
+ size_t num_ele = std::distance(input_begin, input_end);
+ polygon_set.reserve(num_ele);
       polygon_90_set_data<typename polygon_90_set_traits<std::list<T> >::coordinate_type> ps(orient);
+ ps.reserve(num_ele);
       ps.insert(input_begin, input_end, orient);
       ps.clean();
       get_90_dispatch(polygon_set, ps, orient, concept_type());
@@ -300,10 +306,11 @@
   struct polygon_90_set_mutable_traits<polygon_90_set_data<T> > {
 
     template <typename input_iterator_type>
- static inline void set(polygon_90_set_data<T>& polygon_set,
- input_iterator_type input_begin, input_iterator_type input_end,
+ static inline void set(polygon_90_set_data<T>& polygon_set,
+ input_iterator_type input_begin, input_iterator_type input_end,
                            orientation_2d orient) {
       polygon_set.clear();
+ polygon_set.reserve(std::distance(input_begin, input_end));
       polygon_set.insert(input_begin, input_end, orient);
     }
 
@@ -341,15 +348,15 @@
   struct is_polygon_90_set_concept<polygon_90_concept> { typedef gtl_yes type; };
   template <>
   struct is_polygon_90_set_concept<polygon_90_with_holes_concept> { typedef gtl_yes type; };
-
+
   template <typename T>
   struct is_mutable_polygon_90_set_concept { typedef gtl_no type; };
   template <>
   struct is_mutable_polygon_90_set_concept<polygon_90_set_concept> { typedef gtl_yes type; };
-
+
   template <typename T>
   struct geometry_concept<polygon_90_set_data<T> > { typedef polygon_90_set_concept type; };
-
+
   //template <typename T>
   //typename enable_if<typename is_polygon_90_set_type<T>::type, void>::type
   //print_is_polygon_90_set_concept(const T& t) { std::cout << "is polygon 90 set concept\n"; }
@@ -359,4 +366,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_90_with_holes_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_90_with_holes_data.hpp (original)
+++ branches/release/boost/polygon/polygon_90_with_holes_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -19,7 +19,7 @@
   typedef typename polygon_90_data<T>::iterator_type iterator_type;
   typedef typename polygon_90_data<T>::compact_iterator_type compact_iterator_type;
   typedef typename std::list<polygon_90_data<coordinate_type> >::const_iterator iterator_holes_type;
- typedef polygon_90_data<coordinate_type> hole_type;
+ typedef polygon_90_data<coordinate_type> hole_type;
   typedef typename coordinate_traits<T>::area_type area_type;
   typedef point_data<T> point_type;
 
@@ -55,9 +55,9 @@
   }
 
   // copy constructor (since we have dynamic memory)
- inline polygon_90_with_holes_data(const polygon_90_with_holes_data& that) : self_(that.self_),
+ inline polygon_90_with_holes_data(const polygon_90_with_holes_data& that) : self_(that.self_),
                                                                   holes_(that.holes_) {}
-
+
   // assignment operator (since we have dynamic memory do a deep copy)
   inline polygon_90_with_holes_data& operator=(const polygon_90_with_holes_data& that) {
     self_ = that.self_;
@@ -90,7 +90,7 @@
 
   inline std::size_t size() const {
     return self_.size();
- }
+ }
 
   // get begin iterator, returns a pointer to a const polygon
   inline const iterator_holes_type begin_holes() const {
@@ -108,9 +108,8 @@
 
 private:
   polygon_90_data<coordinate_type> self_;
- std::list<hole_type> holes_;
+ std::list<hole_type> holes_;
 };
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_data.hpp (original)
+++ branches/release/boost/polygon/polygon_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -32,7 +32,7 @@
 
   // copy constructor (since we have dynamic memory)
   inline polygon_data(const polygon_data& that) : coords_(that.coords_) {}
-
+
   // assignment operator (since we have dynamic memory do a deep copy)
   inline polygon_data& operator=(const polygon_data& that) {
     coords_ = that.coords_;
@@ -61,10 +61,9 @@
   inline std::size_t size() const { return coords_.size(); }
 
 public:
- std::vector<point_data<coordinate_type> > coords_;
+ std::vector<point_data<coordinate_type> > coords_;
 };
 
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_set_concept.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_set_concept.hpp (original)
+++ branches/release/boost/polygon/polygon_set_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -27,14 +27,14 @@
   begin_polygon_set_data(const polygon_set_type& polygon_set) {
     return polygon_set_traits<polygon_set_type>::begin(polygon_set);
   }
-
+
   template <typename polygon_set_type>
   typename enable_if< typename is_any_polygon_set_type<polygon_set_type>::type,
                        typename polygon_set_traits<polygon_set_type>::iterator_type>::type
   end_polygon_set_data(const polygon_set_type& polygon_set) {
     return polygon_set_traits<polygon_set_type>::end(polygon_set);
   }
-
+
   template <typename polygon_set_type>
   typename enable_if< typename is_polygon_set_type<polygon_set_type>::type,
                        bool>::type
@@ -83,11 +83,11 @@
 
   //equivalence
   template <typename polygon_set_type_1, typename polygon_set_type_2>
- typename enable_if< typename gtl_and_3 <
+ typename enable_if< typename gtl_and_3 <
     typename is_any_polygon_set_type<polygon_set_type_1>::type,
     typename is_any_polygon_set_type<polygon_set_type_2>::type,
     typename is_either_polygon_set_type<polygon_set_type_1, polygon_set_type_2>::type>::type,
- bool>::type
+ bool>::type
   equivalence(const polygon_set_type_1& lvalue,
               const polygon_set_type_2& rvalue) {
     polygon_set_data<typename polygon_set_traits<polygon_set_type_1>::coordinate_type> ps1;
@@ -117,14 +117,14 @@
     ps.clean();
     return ps.empty();
   }
-
+
   //extents
   template <typename polygon_set_type, typename rectangle_type>
- typename enable_if< typename gtl_and<
+ typename enable_if< typename gtl_and<
     typename is_mutable_polygon_set_type<polygon_set_type>::type,
     typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        bool>::type
- extents(rectangle_type& extents_rectangle,
+ extents(rectangle_type& extents_rectangle,
           const polygon_set_type& polygon_set) {
     clean(polygon_set);
     polygon_set_data<typename polygon_set_traits<polygon_set_type>::coordinate_type> ps;
@@ -161,11 +161,11 @@
     assign(polys, polygon_set);
     std::size_t retval = 0;
     for(std::size_t i = 0; i < polys.size(); ++i) {
- retval += detail::simplify_detail::simplify(polys[i].self_.coords_,
+ retval += detail::simplify_detail::simplify(polys[i].self_.coords_,
                                                   polys[i].self_.coords_, threshold);
- for(typename std::list<polygon_data<Unit> >::iterator itrh =
+ for(typename std::list<polygon_data<Unit> >::iterator itrh =
             polys[i].holes_.begin(); itrh != (polys[i].holes_.end()); ++itrh) {
- retval += detail::simplify_detail::simplify((*itrh).coords_,
+ retval += detail::simplify_detail::simplify((*itrh).coords_,
                                                     (*itrh).coords_, threshold);
       }
     }
@@ -204,7 +204,7 @@
 
   //interact
   template <typename polygon_set_type_1, typename polygon_set_type_2>
- typename enable_if< typename gtl_and_3 <
+ typename enable_if< typename gtl_and_3 <
     typename is_any_polygon_set_type<polygon_set_type_1>::type,
     typename is_any_polygon_set_type<polygon_set_type_2>::type,
     typename is_either_polygon_set_type<polygon_set_type_1, polygon_set_type_2>::type>::type,
@@ -222,7 +222,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- scale_up(polygon_set_type& polygon_set,
+ scale_up(polygon_set_type& polygon_set,
            typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
     typedef typename polygon_set_traits<polygon_set_type>::coordinate_type Unit;
     clean(polygon_set);
@@ -236,7 +236,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- scale_down(polygon_set_type& polygon_set,
+ scale_down(polygon_set_type& polygon_set,
              typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
     typedef typename polygon_set_traits<polygon_set_type>::coordinate_type Unit;
     clean(polygon_set);
@@ -266,7 +266,7 @@
   template <typename polygon_set_type>
   typename enable_if< typename is_mutable_polygon_set_type<polygon_set_type>::type,
                        polygon_set_type>::type &
- keep(polygon_set_type& polygon_set,
+ keep(polygon_set_type& polygon_set,
        typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::area_type min_area,
        typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::area_type max_area,
        typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_width,
@@ -307,7 +307,7 @@
   typename enable_if< typename gtl_and_4 < yes_ps_ob, typename is_any_polygon_set_type<geometry_type_1>::type,
                                             typename is_any_polygon_set_type<geometry_type_2>::type,
                                             typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
   operator|(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_set_view<geometry_type_1, geometry_type_2, 0>
       (lvalue, rvalue);
@@ -317,23 +317,23 @@
 
   template <typename geometry_type_1, typename geometry_type_2>
   typename enable_if< typename gtl_and_4 < yes_ps_op,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
     typename gtl_if<typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type>
- ::type, polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ ::type, polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
   operator+(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_set_view<geometry_type_1, geometry_type_2, 0>
       (lvalue, rvalue);
   }
-
+
   struct yes_ps_os : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_4 < yes_ps_os,
+ typename enable_if< typename gtl_and_4 < yes_ps_os,
     typename is_any_polygon_set_type<geometry_type_1>::type,
     typename is_any_polygon_set_type<geometry_type_2>::type,
     typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
   operator*(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_set_view<geometry_type_1, geometry_type_2, 1>
       (lvalue, rvalue);
@@ -346,7 +346,7 @@
     typename is_any_polygon_set_type<geometry_type_1>::type,
     typename is_any_polygon_set_type<geometry_type_2>::type,
     typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
   operator&(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_set_view<geometry_type_1, geometry_type_2, 1>
       (lvalue, rvalue);
@@ -359,30 +359,30 @@
     typename is_any_polygon_set_type<geometry_type_1>::type,
     typename is_any_polygon_set_type<geometry_type_2>::type,
     typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 2> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 2> >::type
   operator^(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_set_view<geometry_type_1, geometry_type_2, 2>
       (lvalue, rvalue);
   }
-
+
   struct yes_ps_om : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
     typename enable_if< typename gtl_and_4 < yes_ps_om,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
     typename gtl_if<typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type>
- ::type, polygon_set_view<geometry_type_1, geometry_type_2, 3> >::type
+ ::type, polygon_set_view<geometry_type_1, geometry_type_2, 3> >::type
   operator-(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return polygon_set_view<geometry_type_1, geometry_type_2, 3>
       (lvalue, rvalue);
   }
-
+
   struct yes_ps_ope : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_4< yes_ps_ope, gtl_yes, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_4< yes_ps_ope, gtl_yes, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator+=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -391,8 +391,8 @@
   struct yes_ps_obe : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< yes_ps_obe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< yes_ps_obe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator|=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -401,8 +401,8 @@
   struct yes_ps_ose : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< yes_ps_ose, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< yes_ps_ose, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator*=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -412,8 +412,8 @@
 
   template <typename geometry_type_1, typename geometry_type_2>
   typename enable_if<
- typename gtl_and_3< yes_ps_oae, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename gtl_and_3< yes_ps_oae, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
     geometry_type_1>::type &
   operator&=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -422,8 +422,8 @@
   struct yes_ps_oxe : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< yes_ps_oxe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< yes_ps_oxe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
                        geometry_type_1>::type &
   operator^=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 2>(lvalue, rvalue);
@@ -432,9 +432,9 @@
   struct yes_ps_ome : gtl_yes {};
 
   template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if<
- typename gtl_and_3< yes_ps_ome, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if<
+ typename gtl_and_3< yes_ps_ome, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
     geometry_type_1>::type &
   operator-=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
     return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 3>(lvalue, rvalue);
@@ -550,13 +550,13 @@
       return polygon_set.end();
     }
 
- static inline orientation_2d orient(const view_of<polygon_45_set_concept, T>& polygon_set) {
+ static inline orientation_2d orient(const view_of<polygon_45_set_concept, T>& polygon_set) {
       return polygon_set.orient(); }
 
- static inline bool clean(const view_of<polygon_45_set_concept, T>& polygon_set) {
+ static inline bool clean(const view_of<polygon_45_set_concept, T>& polygon_set) {
       return polygon_set.clean(); }
 
- static inline bool sorted(const view_of<polygon_45_set_concept, T>& polygon_set) {
+ static inline bool sorted(const view_of<polygon_45_set_concept, T>& polygon_set) {
       return polygon_set.sorted(); }
 
   };

Modified: branches/release/boost/polygon/polygon_set_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_set_data.hpp (original)
+++ branches/release/boost/polygon/polygon_set_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -11,7 +11,6 @@
 #include "polygon_45_set_concept.hpp"
 #include "polygon_traits.hpp"
 #include "detail/polygon_arbitrary_formation.hpp"
-#include <iostream>
 
 namespace boost { namespace polygon {
 
@@ -22,7 +21,7 @@
   template <typename T>
   static inline T round_down(double val) {
      T rounded_val = (T)(val);
- if(val < (double)rounded_val)
+ if(val < (double)rounded_val)
         --rounded_val;
      return rounded_val;
   }
@@ -57,11 +56,11 @@
     }
 
     // copy constructor
- inline polygon_set_data(const polygon_set_data& that) :
+ inline polygon_set_data(const polygon_set_data& that) :
       data_(that.data_), dirty_(that.dirty_), unsorted_(that.unsorted_), is_45_(that.is_45_) {}
 
     // copy constructor
- template <typename ltype, typename rtype, int op_type>
+ template <typename ltype, typename rtype, int op_type>
     inline polygon_set_data(const polygon_set_view<ltype, rtype, op_type>& that);
 
     // destructor
@@ -150,10 +149,10 @@
       insert(polygon_object, is_hole, polygon_concept()); }
 
     template <typename polygon_with_holes_type>
- inline void insert(const polygon_with_holes_type& polygon_with_holes_object, bool is_hole,
+ inline void insert(const polygon_with_holes_type& polygon_with_holes_object, bool is_hole,
                        polygon_with_holes_concept ) {
       insert(polygon_with_holes_object, is_hole, polygon_concept());
- for(typename polygon_with_holes_traits<polygon_with_holes_type>::iterator_holes_type itr =
+ for(typename polygon_with_holes_traits<polygon_with_holes_type>::iterator_holes_type itr =
             begin_holes(polygon_with_holes_object);
           itr != end_holes(polygon_with_holes_object); ++itr) {
         insert(*itr, !is_hole, polygon_concept());
@@ -161,12 +160,12 @@
     }
 
     template <typename polygon_with_holes_type>
- inline void insert(const polygon_with_holes_type& polygon_with_holes_object, bool is_hole,
+ inline void insert(const polygon_with_holes_type& polygon_with_holes_object, bool is_hole,
                        polygon_45_with_holes_concept ) {
       insert(polygon_with_holes_object, is_hole, polygon_with_holes_concept()); }
 
     template <typename polygon_with_holes_type>
- inline void insert(const polygon_with_holes_type& polygon_with_holes_object, bool is_hole,
+ inline void insert(const polygon_with_holes_type& polygon_with_holes_object, bool is_hole,
                        polygon_90_with_holes_concept ) {
       insert(polygon_with_holes_object, is_hole, polygon_with_holes_concept()); }
 
@@ -212,7 +211,7 @@
           first_point = previous_point = current_point;
         } else {
           if(previous_point != current_point) {
- element_type elem(edge_type(previous_point, current_point),
+ element_type elem(edge_type(previous_point, current_point),
                               ( previous_point.get(HORIZONTAL) == current_point.get(HORIZONTAL) ? -1 : 1) * multiplier);
             insert_clean(elem);
           }
@@ -222,7 +221,7 @@
       current_point = first_point;
       if(!first_iteration) {
         if(previous_point != current_point) {
- element_type elem(edge_type(previous_point, current_point),
+ element_type elem(edge_type(previous_point, current_point),
                             ( previous_point.get(HORIZONTAL) == current_point.get(HORIZONTAL) ? -1 : 1) * multiplier);
           insert_clean(elem);
         }
@@ -248,7 +247,7 @@
         data.push_back(vertex_half_edge((*itr).first.first, (*itr).first.second, (*itr).second));
         data.push_back(vertex_half_edge((*itr).first.second, (*itr).first.first, -1 * (*itr).second));
       }
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(container, data.begin(), data.end());
       //std::cout << "DONE FORMING POLYGONS\n";
     }
@@ -270,14 +269,10 @@
       }
     }
 
- // equivalence operator
- inline bool operator==(const polygon_set_data& p) const {
- clean();
- p.clean();
- return data_ == p.data_;
- }
-
- // inequivalence operator
+ // equivalence operator
+ inline bool operator==(const polygon_set_data& p) const;
+
+ // inequivalence operator
     inline bool operator!=(const polygon_set_data& p) const {
       return !((*this) == p);
     }
@@ -321,7 +316,7 @@
 
     void sort() const{
       if(unsorted_) {
- gtlsort(data_.begin(), data_.end());
+ polygon_sort(data_.begin(), data_.end());
         unsorted_ = false;
       }
     }
@@ -329,13 +324,14 @@
     template <typename input_iterator_type>
     void set(input_iterator_type input_begin, input_iterator_type input_end) {
       clear();
+ reserve(std::distance(input_begin,input_end));
       insert(input_begin, input_end);
       dirty_ = true;
       unsorted_ = true;
     }
 
     void set(const value_type& value) {
- data_ = value;
+ data_ = value;
       dirty_ = true;
       unsorted_ = true;
     }
@@ -362,7 +358,7 @@
     resize(coordinate_type resizing, bool corner_fill_arc = false, unsigned int num_circle_segments=0);
 
     template <typename transform_type>
- inline polygon_set_data&
+ inline polygon_set_data&
     transform(const transform_type& tr) {
       std::vector<polygon_with_holes_data<T> > polys;
       get(polys);
@@ -376,7 +372,7 @@
       return *this;
     }
 
- inline polygon_set_data&
+ inline polygon_set_data&
     scale_up(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
       for(typename value_type::iterator itr = data_.begin(); itr != data_.end(); ++itr) {
         ::boost::polygon::scale_up((*itr).first.first, factor);
@@ -384,31 +380,41 @@
       }
       return *this;
     }
-
- inline polygon_set_data&
+
+ inline polygon_set_data&
     scale_down(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
       for(typename value_type::iterator itr = data_.begin(); itr != data_.end(); ++itr) {
+ bool vb = (*itr).first.first.x() == (*itr).first.second.x();
         ::boost::polygon::scale_down((*itr).first.first, factor);
         ::boost::polygon::scale_down((*itr).first.second, factor);
+ bool va = (*itr).first.first.x() == (*itr).first.second.x();
+ if(!vb && va) {
+ (*itr).second *= -1;
+ }
       }
       unsorted_ = true;
       dirty_ = true;
       return *this;
     }
-
+
     template <typename scaling_type>
- inline polygon_set_data& scale(polygon_set_data& polygon_set,
+ inline polygon_set_data& scale(polygon_set_data& polygon_set,
                                    const scaling_type& scaling) {
       for(typename value_type::iterator itr = begin(); itr != end(); ++itr) {
+ bool vb = (*itr).first.first.x() == (*itr).first.second.x();
         ::boost::polygon::scale((*itr).first.first, scaling);
         ::boost::polygon::scale((*itr).first.second, scaling);
+ bool va = (*itr).first.first.x() == (*itr).first.second.x();
+ if(!vb && va) {
+ (*itr).second *= -1;
+ }
       }
       unsorted_ = true;
       dirty_ = true;
       return *this;
     }
 
- static inline void compute_offset_edge(point_data<long double>& pt1, point_data<long double>& pt2,
+ static inline void compute_offset_edge(point_data<long double>& pt1, point_data<long double>& pt2,
                                            const point_data<long double>& prev_pt,
                                            const point_data<long double>& current_pt,
                                            long double distance, int multiplier) {
@@ -439,17 +445,17 @@
       he2.second.y((long double)(next_pt.y()));
       compute_offset_edge(he1.first, he1.second, prev_pt, current_pt, distance, multiplier);
       compute_offset_edge(he2.first, he2.second, current_pt, next_pt, distance, multiplier);
- typename scanline_base<long double>::compute_intersection_pack pack;
+ typedef scanline_base<long double>::compute_intersection_pack pack;
       point_data<long double> rpt;
       point_data<long double> bisectorpt((he1.second.x()+he2.first.x())/2,
                                          (he1.second.y()+he2.first.y())/2);
       point_data<long double> orig_pt((long double)pt.x(), (long double)pt.y());
       if(euclidean_distance(bisectorpt, orig_pt) < distance/2) {
- if(!pack.compute_lazy_intersection(rpt, he1, he2, true, false)) {
+ if(!pack::compute_lazy_intersection(rpt, he1, he2, true, false)) {
           rpt = he1.second; //colinear offset edges use shared point
         }
       } else {
- if(!pack.compute_lazy_intersection(rpt, he1, std::pair<point_data<long double>, point_data<long double> >(orig_pt, bisectorpt), true, false)) {
+ if(!pack::compute_lazy_intersection(rpt, he1, std::pair<point_data<long double>, point_data<long double> >(orig_pt, bisectorpt), true, false)) {
           rpt = he1.second; //colinear offset edges use shared point
         }
       }
@@ -565,8 +571,8 @@
     }
 
     template <typename geometry_type>
- inline polygon_set_data&
- insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
+ inline polygon_set_data&
+ insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
                                polygon_with_holes_concept tag) {
       insert_with_resize_dispatch(poly, resizing, corner_fill_arc, num_circle_segments, hole, polygon_concept());
       for(typename polygon_with_holes_traits<geometry_type>::iterator_holes_type itr =
@@ -578,14 +584,14 @@
     }
 
     template <typename geometry_type>
- inline polygon_set_data&
- insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
+ inline polygon_set_data&
+ insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
                           polygon_concept tag) {
 
       if (resizing==0)
          return *this;
 
-
+
       // one dimensional used to store CCW/CW flag
       //direction_1d wdir = winding(poly);
       // LOW==CLOCKWISE just faster to type
@@ -630,25 +636,25 @@
         point_data<coordinate_type> normal2( third->y()-second->y(), second->x()-third->x());
         double direction = normal1.x()*normal2.y()- normal2.x()*normal1.y();
         bool convex = direction>0;
-
+
         bool treat_as_concave = !convex;
         if(sizing_sign)
           treat_as_concave = convex;
         point_data<double> v;
         assign(v, normal1);
         double s2 = (v.x()*v.x()+v.y()*v.y());
- double s = sqrt(s2)/resizing;
+ double s = std::sqrt(s2)/resizing;
         v = point_data<double>(v.x()/s,v.y()/s);
         point_data<T> curr_prev;
         if (prev_concave)
           //TODO missing round_down()
           curr_prev = point_data<T>(first->x()+v.x(),first->y()+v.y());
- else
+ else
           curr_prev = prev_point;
 
            // around concave corners - insert rectangle
            // if previous corner is concave it's point info may be ignored
- if ( treat_as_concave) {
+ if ( treat_as_concave) {
            std::vector<point_data<T> > pts;
 
            pts.push_back(point_data<T>(second->x()+v.x(),second->y()+v.y()));
@@ -669,13 +675,13 @@
            direction_1d winding;
            winding = convex?COUNTERCLOCKWISE:CLOCKWISE;
            if (make_resizing_vertex_list(pts, curr_prev, prev_concave, *first, *second, *third, resizing
- , num_circle_segments, corner_fill_arc))
+ , num_circle_segments, corner_fill_arc))
            {
                if (first_pts.size()) {
                   for (int i=0; i<pts.size(); i++) {
                     sizingSet.insert_vertex_sequence(pts[i].begin(),pts[i].end(),winding,false);
                   }
-
+
                } else {
                   first_pts = pts[0];
                   first_wdir = resize_wdir;
@@ -684,7 +690,7 @@
                   }
                }
                prev_point = curr_prev;
-
+
            } else {
               treat_as_concave = true;
            }
@@ -707,7 +713,7 @@
           first_pts[first_pts.size()-1]=prev_point;
       }
       sizingSet.insert_vertex_sequence(first_pts.begin(),first_pts.end(),first_wdir,false);
-
+
       polygon_set_data<coordinate_type> tmp;
 
       //insert original shape
@@ -721,7 +727,7 @@
 
 
     inline polygon_set_data&
- interact(const polygon_set_data& that);
+ interact(const polygon_set_data& that);
 
     inline bool downcast(polygon_45_set_data<coordinate_type>& result) const {
       if(!is_45_) return false;
@@ -790,7 +796,7 @@
         data.push_back(vertex_half_edge((*itr).first.first, (*itr).first.second, (*itr).second));
         data.push_back(vertex_half_edge((*itr).first.second, (*itr).first.first, -1 * (*itr).second));
       }
- gtlsort(data.begin(), data.end());
+ polygon_sort(data.begin(), data.end());
       pf.scan(container, data.begin(), data.end());
     }
   };
@@ -810,17 +816,17 @@
 // }
 
   template <typename T>
- inline int make_resizing_vertex_list(std::vector<std::vector<point_data< T> > >& return_points,
+ inline int make_resizing_vertex_list(std::vector<std::vector<point_data< T> > >& return_points,
                        point_data<T>& curr_prev, bool ignore_prev_point,
                        point_data< T> start, point_data<T> middle, point_data< T> end,
                        double sizing_distance, unsigned int num_circle_segments, bool corner_fill_arc) {
 
       // handle the case of adding an intersection point
       point_data<double> dn1( middle.y()-start.y(), start.x()-middle.x());
- double size = sizing_distance/sqrt( dn1.x()*dn1.x()+dn1.y()*dn1.y());
+ double size = sizing_distance/std::sqrt( dn1.x()*dn1.x()+dn1.y()*dn1.y());
       dn1 = point_data<double>( dn1.x()*size, dn1.y()* size);
       point_data<double> dn2( end.y()-middle.y(), middle.x()-end.x());
- size = sizing_distance/sqrt( dn2.x()*dn2.x()+dn2.y()*dn2.y());
+ size = sizing_distance/std::sqrt( dn2.x()*dn2.x()+dn2.y()*dn2.y());
       dn2 = point_data<double>( dn2.x()*size, dn2.y()* size);
       point_data<double> start_offset((start.x()+dn1.x()),(start.y()+dn1.y()));
       point_data<double> mid1_offset((middle.x()+dn1.x()),(middle.y()+dn1.y()));
@@ -843,7 +849,7 @@
          int num = make_arc(return_points[return_points.size()-1],mid1_offset,mid2_offset,dmid,sizing_distance,num_circle_segments);
          curr_prev = round_down<T>(mid2_offset);
          return num;
-
+
       }
 
       std::pair<point_data<double>,point_data<double> > he1(start_offset,mid1_offset);
@@ -881,21 +887,21 @@
   // returnPoints will start with the first point after start
   // returnPoints vector may be empty
   template <typename T>
- inline int make_arc(std::vector<point_data< T> >& return_points,
+ inline int make_arc(std::vector<point_data< T> >& return_points,
                        point_data< double> start, point_data< double> end,
                        point_data< double> center, double r, unsigned int num_circle_segments) {
       const double our_pi=3.1415926535897932384626433832795028841971;
 
- // derive start and end angles
+ // derive start and end angles
       double ps = atan2(start.y()-center.y(), start.x()-center.x());
       double pe = atan2(end.y()-center.y(), end.x()-center.x());
- if (ps < 0.0)
+ if (ps < 0.0)
          ps += 2.0 * our_pi;
- if (pe <= 0.0)
+ if (pe <= 0.0)
          pe += 2.0 * our_pi;
- if (ps >= 2.0 * our_pi)
+ if (ps >= 2.0 * our_pi)
          ps -= 2.0 * our_pi;
- while (pe <= ps)
+ while (pe <= ps)
          pe += 2.0 * our_pi;
       double delta_angle = (2.0 * our_pi) / (double)num_circle_segments;
       if ( start==end) // full circle?
@@ -941,12 +947,12 @@
     inline connectivity_extraction() : ce_(), nodeCount_(0) {}
     inline connectivity_extraction(const connectivity_extraction& that) : ce_(that.ce_),
                                                                           nodeCount_(that.nodeCount_) {}
- inline connectivity_extraction& operator=(const connectivity_extraction& that) {
- ce_ = that.ce_;
+ inline connectivity_extraction& operator=(const connectivity_extraction& that) {
+ ce_ = that.ce_;
       nodeCount_ = that.nodeCount_; {}
       return *this;
     }
-
+
     //insert a polygon set graph node, the value returned is the id of the graph node
     inline unsigned int insert(const polygon_set_data<coordinate_type>& ps) {
       ps.clean();
@@ -959,7 +965,7 @@
       ps.insert(geoObj);
       return insert(ps);
     }
-
+
     //extract connectivity and store the edges in the graph
     //graph must be indexable by graph node id and the indexed value must be a std::set of
     //graph node id
@@ -997,4 +1003,3 @@
 #include "polygon_set_concept.hpp"
 #include "detail/minkowski.hpp"
 #endif
-

Modified: branches/release/boost/polygon/polygon_set_traits.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_set_traits.hpp (original)
+++ branches/release/boost/polygon/polygon_set_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -45,13 +45,13 @@
     typedef typename is_polygonal_concept<typename geometry_concept<T>::type>::type type;
   };
   template <typename T>
- struct is_polygon_set_type<std::list<T> > {
+ struct is_polygon_set_type<std::list<T> > {
     typedef typename gtl_or<
       typename is_polygonal_concept<typename geometry_concept<std::list<T> >::type>::type,
       typename is_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
   };
   template <typename T>
- struct is_polygon_set_type<std::vector<T> > {
+ struct is_polygon_set_type<std::vector<T> > {
     typedef typename gtl_or<
       typename is_polygonal_concept<typename geometry_concept<std::vector<T> >::type>::type,
       typename is_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -62,13 +62,13 @@
     typedef typename gtl_same_type<polygon_set_concept, typename geometry_concept<T>::type>::type type;
   };
   template <typename T>
- struct is_mutable_polygon_set_type<std::list<T> > {
+ struct is_mutable_polygon_set_type<std::list<T> > {
     typedef typename gtl_or<
- typename gtl_same_type<polygon_set_concept, typename geometry_concept<std::list<T> >::type>::type,
+ typename gtl_same_type<polygon_set_concept, typename geometry_concept<std::list<T> >::type>::type,
       typename is_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
   };
   template <typename T>
- struct is_mutable_polygon_set_type<std::vector<T> > {
+ struct is_mutable_polygon_set_type<std::vector<T> > {
     typedef typename gtl_or<
       typename gtl_same_type<polygon_set_concept, typename geometry_concept<std::vector<T> >::type>::type,
       typename is_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -82,6 +82,7 @@
     static inline void set(std::list<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
       polygon_set_data<typename polygon_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(std::distance(input_begin, input_end));
       ps.insert(input_begin, input_end);
       ps.get(polygon_set);
     }
@@ -91,7 +92,10 @@
     template <typename input_iterator_type>
     static inline void set(std::vector<T>& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.clear();
+ size_t num_ele = std::distance(input_begin, input_end);
+ polygon_set.reserve(num_ele);
       polygon_set_data<typename polygon_set_traits<std::list<T> >::coordinate_type> ps;
+ ps.reserve(num_ele);
       ps.insert(input_begin, input_end);
       ps.get(polygon_set);
     }
@@ -100,7 +104,7 @@
   template <typename T>
   struct polygon_set_mutable_traits<polygon_set_data<T> > {
     template <typename input_iterator_type>
- static inline void set(polygon_set_data<T>& polygon_set,
+ static inline void set(polygon_set_data<T>& polygon_set,
                            input_iterator_type input_begin, input_iterator_type input_end) {
       polygon_set.set(input_begin, input_end);
     }
@@ -124,7 +128,6 @@
     static inline bool sorted(const polygon_set_data<T>& polygon_set) { polygon_set.sort(); return true; }
 
   };
-}
+}
 }
 #endif
-

Modified: branches/release/boost/polygon/polygon_traits.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_traits.hpp (original)
+++ branches/release/boost/polygon/polygon_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -18,17 +18,17 @@
     static inline compact_iterator_type begin_compact(const T& t) {
       return t.begin_compact();
     }
-
+
     // Get the end iterator
     static inline compact_iterator_type end_compact(const T& t) {
       return t.end_compact();
     }
-
+
     // Get the number of sides of the polygon
     static inline std::size_t size(const T& t) {
       return t.size();
     }
-
+
     // Get the winding direction of the polygon
     static inline winding_direction winding(const T&) {
       return unknown_winding;
@@ -45,17 +45,17 @@
     static inline iterator_type begin_points(const T& t) {
       return t.begin();
     }
-
+
     // Get the end iterator
     static inline iterator_type end_points(const T& t) {
       return t.end();
     }
-
+
     // Get the number of sides of the polygon
     static inline std::size_t size(const T& t) {
       return t.size();
     }
-
+
     // Get the winding direction of the polygon
     static inline winding_direction winding(const T&) {
       return unknown_winding;
@@ -73,18 +73,18 @@
       return iterator_type(polygon_90_traits<T>::begin_compact(t),
                            polygon_90_traits<T>::end_compact(t));
     }
-
+
     // Get the end iterator
     static inline iterator_type end_points(const T& t) {
       return iterator_type(polygon_90_traits<T>::end_compact(t),
                            polygon_90_traits<T>::end_compact(t));
     }
-
+
     // Get the number of sides of the polygon
     static inline std::size_t size(const T& t) {
       return polygon_90_traits<T>::size(t);
     }
-
+
     // Get the winding direction of the polygon
     static inline winding_direction winding(const T& t) {
       return polygon_90_traits<T>::winding(t);
@@ -97,7 +97,7 @@
   struct polygon_traits {};
 
   template <typename T>
- struct polygon_traits<T,
+ struct polygon_traits<T,
                         typename gtl_or_4<
     typename gtl_same_type<typename geometry_concept<T>::type, polygon_concept>::type,
     typename gtl_same_type<typename geometry_concept<T>::type, polygon_45_concept>::type,
@@ -106,7 +106,7 @@
>::type> : public polygon_traits_general<T> {};
 
   template <typename T>
- struct polygon_traits< T,
+ struct polygon_traits< T,
                          typename gtl_or<
     typename gtl_same_type<typename geometry_concept<T>::type, polygon_90_concept>::type,
     typename gtl_same_type<typename geometry_concept<T>::type, polygon_90_with_holes_concept>::type
@@ -161,7 +161,7 @@
       return t.end_holes();
     }
 
- // Get the number of holes
+ // Get the number of holes
     static inline std::size_t size_holes(const T& t) {
       return t.size_holes();
     }
@@ -169,14 +169,14 @@
 
   template <typename T, typename enable = void>
   struct polygon_90_mutable_traits {
-
+
     // Set the data of a polygon with the unique coordinates in an iterator, starting with an x
     template <typename iT>
     static inline T& set_compact(T& t, iT input_begin, iT input_end) {
       t.set_compact(input_begin, input_end);
       return t;
     }
-
+
   };
 
   template <typename T>
@@ -199,7 +199,7 @@
       t.set(input_begin, input_end);
       return t;
     }
-
+
   };
 
   template <typename T, typename enable = void>
@@ -251,7 +251,7 @@
   struct polygon_45_with_holes_concept {};
   struct polygon_90_concept {};
   struct polygon_90_with_holes_concept {};
-
+
 
   template <typename T>
   struct is_polygon_90_type {
@@ -272,7 +272,7 @@
     typedef typename gtl_or<typename is_polygon_45_type<T>::type,
                             typename gtl_same_type<polygon_concept, GC>::type>::type type;
   };
-
+
   template <typename T>
   struct is_polygon_90_with_holes_type {
     typedef typename geometry_concept<T>::type GC;
@@ -284,7 +284,7 @@
   struct is_polygon_45_with_holes_type {
     typedef typename geometry_concept<T>::type GC;
     typedef typename gtl_or_3<typename is_polygon_90_with_holes_type<T>::type,
- typename is_polygon_45_type<T>::type,
+ typename is_polygon_45_type<T>::type,
                               typename gtl_same_type<polygon_45_with_holes_concept, GC>::type>::type type;
   };
 
@@ -292,7 +292,7 @@
   struct is_polygon_with_holes_type {
     typedef typename geometry_concept<T>::type GC;
     typedef typename gtl_or_3<typename is_polygon_45_with_holes_type<T>::type,
- typename is_polygon_type<T>::type,
+ typename is_polygon_type<T>::type,
                               typename gtl_same_type<polygon_with_holes_concept, GC>::type>::type type;
   };
 
@@ -301,7 +301,7 @@
     typedef typename geometry_concept<T>::type GC;
     typedef typename gtl_same_type<polygon_90_concept, GC>::type type;
   };
-
+
   template <typename T>
   struct is_mutable_polygon_45_type {
     typedef typename geometry_concept<T>::type GC;
@@ -313,7 +313,7 @@
     typedef typename geometry_concept<T>::type GC;
     typedef typename gtl_same_type<polygon_concept, GC>::type type;
   };
-
+
   template <typename T>
   struct is_mutable_polygon_90_with_holes_type {
     typedef typename geometry_concept<T>::type GC;
@@ -341,10 +341,10 @@
   template <typename T>
   struct is_any_mutable_polygon_without_holes_type {
     typedef typename gtl_or_3<
- typename is_mutable_polygon_90_type<T>::type,
- typename is_mutable_polygon_45_type<T>::type,
+ typename is_mutable_polygon_90_type<T>::type,
+ typename is_mutable_polygon_45_type<T>::type,
       typename is_mutable_polygon_type<T>::type>::type type; };
-
+
   template <typename T>
   struct is_any_mutable_polygon_type {
     typedef typename gtl_or<typename is_any_mutable_polygon_with_holes_type<T>::type,
@@ -372,7 +372,7 @@
   template <typename domain_type, typename coordinate_type>
   struct distance_type_by_domain { typedef typename coordinate_traits<coordinate_type>::coordinate_distance type; };
   template <typename coordinate_type>
- struct distance_type_by_domain<manhattan_domain, coordinate_type> {
+ struct distance_type_by_domain<manhattan_domain, coordinate_type> {
     typedef typename coordinate_traits<coordinate_type>::coordinate_difference type; };
 
   // \brief Sets the boundary of the polygon to the points in the iterator range
@@ -399,9 +399,9 @@
 
 /// \relatesalso polygon_90_concept
   template <typename T, typename iT>
- typename enable_if <typename gtl_or<
- typename is_mutable_polygon_90_type<T>::type,
- typename is_mutable_polygon_90_with_holes_type<T>::type>::type, T>::type &
+ typename enable_if <typename gtl_or<
+ typename is_mutable_polygon_90_type<T>::type,
+ typename is_mutable_polygon_90_with_holes_type<T>::type>::type, T>::type &
   set_compact(T& t, iT begin_compact_coordinates, iT end_compact_coordinates) {
     polygon_90_mutable_traits<T>::set_compact(t, begin_compact_coordinates, end_compact_coordinates);
     return t;
@@ -411,7 +411,7 @@
   template <typename T, typename iT>
   typename enable_if< typename gtl_and <
     typename is_any_mutable_polygon_with_holes_type<T>::type,
- typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
+ typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
                                 manhattan_domain>::type>::type,
                        T>::type &
   set_compact(T& t, iT begin_compact_coordinates, iT end_compact_coordinates) {
@@ -434,29 +434,29 @@
   typename polygon_90_traits<T>::compact_iterator_type
   begin_compact(const T& polygon,
     typename enable_if<
- typename gtl_and <typename is_polygon_with_holes_type<T>::type,
+ typename gtl_and <typename is_polygon_with_holes_type<T>::type,
                         typename gtl_same_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
                 manhattan_domain>::type>::type>::type * = 0
   ) {
     return polygon_90_traits<T>::begin_compact(polygon);
   }
-
+
 /// \relatesalso polygon_90_concept
   template <typename T>
   typename polygon_90_traits<T>::compact_iterator_type
   end_compact(const T& polygon,
- typename enable_if<
- typename gtl_and <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if<
+ typename gtl_and <typename is_polygon_with_holes_type<T>::type,
                       typename gtl_same_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
               manhattan_domain>::type>::type>::type * = 0
   ) {
     return polygon_90_traits<T>::end_compact(polygon);
   }
-
+
   /// \relatesalso polygon_concept
   template <typename T>
   typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
                         typename polygon_traits<T>::iterator_type>::type
   begin_points(const T& polygon) {
     return polygon_traits<T>::begin_points(polygon);
@@ -465,7 +465,7 @@
   /// \relatesalso polygon_concept
   template <typename T>
   typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
                         typename polygon_traits<T>::iterator_type>::type
   end_points(const T& polygon) {
     return polygon_traits<T>::end_points(polygon);
@@ -473,7 +473,7 @@
 
   /// \relatesalso polygon_concept
   template <typename T>
- typename enable_if <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if <typename is_polygon_with_holes_type<T>::type,
                        std::size_t>::type
   size(const T& polygon) {
     return polygon_traits<T>::size(polygon);
@@ -482,7 +482,7 @@
 /// \relatesalso polygon_with_holes_concept
   template <typename T>
   typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
                         typename polygon_with_holes_traits<T>::iterator_holes_type>::type
   begin_holes(const T& polygon) {
     return polygon_with_holes_traits<T>::begin_holes(polygon);
@@ -491,7 +491,7 @@
 /// \relatesalso polygon_with_holes_concept
   template <typename T>
   typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
                         typename polygon_with_holes_traits<T>::iterator_holes_type>::type
   end_holes(const T& polygon) {
     return polygon_with_holes_traits<T>::end_holes(polygon);
@@ -499,7 +499,7 @@
 
 /// \relatesalso polygon_with_holes_concept
   template <typename T>
- typename enable_if <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if <typename is_polygon_with_holes_type<T>::type,
                        std::size_t>::type
   size_holes(const T& polygon) {
     return polygon_with_holes_traits<T>::size_holes(polygon);
@@ -550,7 +550,7 @@
                                                      polygon_with_holes_traits<T2>::end_holes(rvalue));
     return lvalue;
   }
-
+
   // \relatesalso polygon_90_concept
   template <typename T1, typename T2>
   typename enable_if<
@@ -561,7 +561,7 @@
                                                polygon_90_traits<T2>::end_compact(rvalue));
     return lvalue;
   }
-
+
 // \relatesalso polygon_90_with_holes_concept
   template <typename T1, typename T2>
   typename enable_if<
@@ -589,14 +589,14 @@
 
 /// \relatesalso polygon_90_concept
   template <typename polygon_type, typename point_type>
- typename enable_if< typename gtl_and< typename is_mutable_polygon_90_type<polygon_type>::type,
+ typename enable_if< typename gtl_and< typename is_mutable_polygon_90_type<polygon_type>::type,
                                          typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                        polygon_type>::type &
   convolve(polygon_type& polygon, const point_type& point) {
     std::vector<typename polygon_90_traits<polygon_type>::coordinate_type> coords;
     coords.reserve(size(polygon));
     bool pingpong = true;
- for(typename polygon_90_traits<polygon_type>::compact_iterator_type iter = begin_compact(polygon);
+ for(typename polygon_90_traits<polygon_type>::compact_iterator_type iter = begin_compact(polygon);
         iter != end_compact(polygon); ++iter) {
       coords.push_back((*iter) + (pingpong ? x(point) : y(point)));
       pingpong = !pingpong;
@@ -607,15 +607,15 @@
 
 /// \relatesalso polygon_concept
   template <typename polygon_type, typename point_type>
- typename enable_if< typename gtl_and< typename gtl_or<
- typename is_mutable_polygon_45_type<polygon_type>::type,
- typename is_mutable_polygon_type<polygon_type>::type>::type,
+ typename enable_if< typename gtl_and< typename gtl_or<
+ typename is_mutable_polygon_45_type<polygon_type>::type,
+ typename is_mutable_polygon_type<polygon_type>::type>::type,
                                          typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                        polygon_type>::type &
   convolve(polygon_type& polygon, const point_type& point) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
       convolve(points.back(), point);
@@ -623,11 +623,11 @@
     polygon_mutable_traits<polygon_type>::set_points(polygon, points.begin(), points.end());
     return polygon;
   }
-
+
 /// \relatesalso polygon_with_holes_concept
   template <typename polygon_type, typename point_type>
   typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_with_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_with_holes_type<polygon_type>::type,
                       typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
     polygon_type>::type &
   convolve(polygon_type& polygon, const point_type& point) {
@@ -654,7 +654,7 @@
     typedef typename polygon_traits<T>::coordinate_type Unit;
     if(orient == HORIZONTAL) return convolve(polygon, point_data<Unit>(displacement, Unit(0)));
     return convolve(polygon, point_data<Unit>(Unit(0), displacement));
- }
+ }
 
 /// \relatesalso polygon_concept
 /// \brief Applies a transformation to the polygon.
@@ -667,7 +667,7 @@
   transform(polygon_type& polygon, const transform_type& tr) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
       transform(points.back(), tr);
@@ -701,7 +701,7 @@
   scale_up(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
       scale_up(points.back(), factor);
@@ -732,15 +732,15 @@
   //scale non-45 down
   template <typename polygon_type>
   typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
                       typename gtl_not<typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
                                          typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type>::type,
     polygon_type>::type &
   scale_down(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
       scale_down(points.back(), factor);
@@ -756,8 +756,6 @@
   void snap_point_vector_to_45(std::vector<point_data<Unit> >& pts) {
     typedef point_data<Unit> Point;
     if(pts.size() < 3) { pts.clear(); return; }
- Point firstPt = pts.front();
- Point prevPt = firstPt;
     typename std::vector<point_data<Unit> >::iterator endLocation = std::unique(pts.begin(), pts.end());
     if(endLocation != pts.end()){
       pts.resize(endLocation - pts.begin());
@@ -838,7 +836,7 @@
   snap_to_45(polygon_type& polygon) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
     }
@@ -869,15 +867,15 @@
   //scale specifically 45 down
   template <typename polygon_type>
   typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
                       typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
                         typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type,
     polygon_type>::type &
   scale_down(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
       scale_down(points.back(), factor);
@@ -906,18 +904,18 @@
     return polygon;
   }
 
- //scale non-45
+ //scale non-45
   template <typename polygon_type>
   typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
                       typename gtl_not<typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
                                          typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type>::type,
     polygon_type>::type &
   scale(polygon_type& polygon, double factor) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
       scale(points.back(), anisotropic_scale_factor<double>(factor, factor));
@@ -926,19 +924,19 @@
     return polygon;
   }
 
- //scale specifically 45
+ //scale specifically 45
   template <typename polygon_type>
   polygon_type&
   scale(polygon_type& polygon, double factor,
     typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
                       typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
         typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type>::type * = 0
   ) {
     std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
     points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
         iter != end_points(polygon); ++iter) {
       points.push_back(*iter);
       scale(points.back(), anisotropic_scale_factor<double>(factor, factor));
@@ -1012,7 +1010,7 @@
   }
 
   template <typename T>
- typename enable_if<
+ typename enable_if<
     typename is_polygon_with_holes_type<T>::type,
                         typename area_type_by_domain< typename geometry_domain<typename geometry_concept<T>::type>::type,
                                                       typename polygon_traits<T>::coordinate_type>::type>::type
@@ -1036,7 +1034,7 @@
 
   template <typename iT>
   bool point_sequence_is_45(iT itr, iT itr_end) {
- typedef typename iT::value_type Point;
+ typedef typename std::iterator_traits<iT>::value_type Point;
     typedef typename point_traits<Point>::coordinate_type Unit;
     if(itr == itr_end) return true;
     Point firstPt = *itr;
@@ -1097,7 +1095,7 @@
   typename distance_type_by_domain
   <typename geometry_domain<typename geometry_concept<T>::type>::type, typename polygon_traits<T>::coordinate_type>::type
   perimeter(const T& polygon,
- typename enable_if<
+ typename enable_if<
       typename is_polygon_with_holes_type<T>::type>::type * = 0
   ) {
     typedef typename distance_type_by_domain
@@ -1115,7 +1113,7 @@
   }
 
   template <typename T>
- typename enable_if <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if <typename is_polygon_with_holes_type<T>::type,
                        direction_1d>::type
   winding(const T& polygon) {
     winding_direction wd = polygon_traits<T>::winding(polygon);
@@ -1129,9 +1127,9 @@
   }
 
   template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and< typename is_polygon_90_type<T>::type,
- typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
+ typename enable_if<
+ typename gtl_and< typename is_polygon_90_type<T>::type,
+ typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
     bool>::type
   contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
     typedef T polygon_type;
@@ -1148,23 +1146,23 @@
       if(i == num-1) iter = begin_points(polygon);
       else ++iter;
       point_type current_pt = *iter;
- if(x(current_pt) ==
+ if(x(current_pt) ==
          x(prev_pt)) {
- unsigned int index = x(current_pt) >
+ unsigned int index = x(current_pt) >
           x(point);
         std::size_t increment = 0;
- interval_data<coordinate_type> ivl(y(current_pt),
+ interval_data<coordinate_type> ivl(y(current_pt),
                                            y(prev_pt));
         if(contains(ivl, y(point), true)) {
- if(x(current_pt) ==
+ if(x(current_pt) ==
              x(point)) return consider_touch;
           ++increment;
- if(y(current_pt) !=
+ if(y(current_pt) !=
              y(point) &&
- y(prev_pt) !=
+ y(prev_pt) !=
              y(point)) {
             ++increment;
- }
+ }
           counts[index] += increment;
         }
       }
@@ -1173,7 +1171,7 @@
     //odd count implies boundary condition
     if(counts[0] % 2 || counts[1] % 2) return consider_touch;
     //an odd number of edges to the left implies interior pt
- return counts[winding(polygon) == COUNTERCLOCKWISE ? 0 : 1] % 4 != 0;
+ return counts[winding(polygon) == COUNTERCLOCKWISE ? 0 : 1] % 4 != 0;
   }
 
   //TODO: refactor to expose as user APIs
@@ -1200,7 +1198,7 @@
         return lp(pt, pt2) && lp(pt1, pt);
       return lp(pt, pt1) && lp(pt2, pt);
     }
-
+
     template <typename area_type>
     static inline bool equal_slope(area_type dx1, area_type dy1, area_type dx2, area_type dy2) {
       typedef typename coordinate_traits<Unit>::unsigned_area_type unsigned_product_type;
@@ -1240,7 +1238,7 @@
         dy2 *= -1;
         dx2 *= -1;
       } else if(dx2 == 0) {
- //if the second slope is vertical the first is always less unless it is also vertical, in which case they are equal
+ //if the second slope is vertical the first is always less unless it is also vertical, in which case they are equal
         return dx1 != 0;
       }
       typedef typename coordinate_traits<Unit>::unsigned_area_type unsigned_product_type;
@@ -1285,8 +1283,8 @@
   };
 
   template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_with_holes_type<T>::type,
+ typename enable_if<
+ typename gtl_and< typename is_any_mutable_polygon_with_holes_type<T>::type,
                       typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
     bool>::type
   contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
@@ -1306,10 +1304,10 @@
   }
 
   template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and_3<
- typename is_polygon_type<T>::type,
- typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
+ typename enable_if<
+ typename gtl_and_3<
+ typename is_polygon_type<T>::type,
+ typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
       typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
     bool>::type
   contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
@@ -1367,16 +1365,16 @@
         }
       }
       he.first = he.second;
- }
+ }
     return above % 2 != 0; //if the point is above an odd number of edges is must be inside polygon
   }
 
   /*
   template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and_3<
- typename is_polygon_with_holes_type<T>::type,
- typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
+ typename enable_if<
+ typename gtl_and_3<
+ typename is_polygon_with_holes_type<T>::type,
+ typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
       typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
     bool>::type
   contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
@@ -1420,7 +1418,7 @@
         }
       }
       he.first = he.second;
- }
+ }
     return above % 2 != 0; //if the point is above an odd number of edges is must be inside polygon
   }
   */
@@ -1429,19 +1427,19 @@
   typename enable_if<
     typename gtl_and< typename is_mutable_point_concept<typename geometry_concept<T1>::type>::type,
                       typename is_polygon_with_holes_type<T2>::type>::type,
- bool>::type
+ bool>::type
   center(T1& center_point, const T2& polygon) {
     typedef typename polygon_traits<T2>::coordinate_type coordinate_type;
     rectangle_data<coordinate_type> bbox;
     extents(bbox, polygon);
     return center(center_point, bbox);
   }
-
+
   template <typename T1, typename T2>
   typename enable_if<
     typename gtl_and< typename is_mutable_rectangle_concept<typename geometry_concept<T1>::type>::type,
                       typename is_polygon_with_holes_type<T2>::type>::type,
- bool>::type
+ bool>::type
   extents(T1& bounding_box, const T2& polygon) {
     typedef typename polygon_traits<T2>::iterator_type iterator;
     bool first_iteration = true;
@@ -1548,7 +1546,7 @@
 // };
   template <typename T> struct get_void {};
   template <> struct get_void<gtl_yes> { typedef void type; };
-
+
   template <typename T> struct polygon_with_holes_traits<
     T, typename get_void<typename is_any_mutable_polygon_without_holes_type<T>::type>::type > {
     typedef T hole_type;
@@ -1565,7 +1563,7 @@
     rectangle_data<coordinate_type> rect;
     view_of(const T& obj) : rect() {
       point_data<coordinate_type> pts[2];
- typename polygon_traits<T>::iterator_type itr =
+ typename polygon_traits<T>::iterator_type itr =
         begin_points(obj), itre = end_points(obj);
       if(itr == itre) return;
       assign(pts[0], *itr);
@@ -1584,7 +1582,7 @@
   struct geometry_concept<view_of<rectangle_concept, T> > {
     typedef rectangle_concept type;
   };
-
+
   template <typename T>
   struct view_of<polygon_45_concept, T> {
     const T* t;
@@ -1597,17 +1595,17 @@
     inline iterator_type begin() const {
       return polygon_traits<T>::begin_points(*t);
     }
-
+
     /// Get the end iterator
     inline iterator_type end() const {
       return polygon_traits<T>::end_points(*t);
     }
-
+
     /// Get the number of sides of the polygon
     inline std::size_t size() const {
       return polygon_traits<T>::size(*t);
     }
-
+
     /// Get the winding direction of the polygon
     inline winding_direction winding() const {
       return polygon_traits<T>::winding(*t);
@@ -1618,7 +1616,7 @@
   struct geometry_concept<view_of<polygon_45_concept, T> > {
     typedef polygon_45_concept type;
   };
-
+
   template <typename T>
   struct view_of<polygon_90_concept, T> {
     const T* t;
@@ -1633,18 +1631,18 @@
       return compact_iterator_type(polygon_traits<T>::begin_points(*t),
                                    polygon_traits<T>::end_points(*t));
     }
-
+
     /// Get the end iterator
     inline compact_iterator_type end_compact() const {
       return compact_iterator_type(polygon_traits<T>::end_points(*t),
                                    polygon_traits<T>::end_points(*t));
     }
-
+
     /// Get the number of sides of the polygon
     inline std::size_t size() const {
       return polygon_traits<T>::size(*t);
     }
-
+
     /// Get the winding direction of the polygon
     inline winding_direction winding() const {
       return polygon_traits<T>::winding(*t);
@@ -1689,26 +1687,26 @@
       inline bool operator!=(const iterator_holes_type& that) const {
         return (internal_itr != that.internal_itr);
       }
- inline value_type operator*() const {
+ inline value_type operator*() const {
         return view_as<polygon_45_concept>(*internal_itr);
       }
     };
-
+
     /// Get the begin iterator
     inline iterator_type begin() const {
       return polygon_traits<T>::begin_points(*t);
     }
-
+
     /// Get the end iterator
     inline iterator_type end() const {
       return polygon_traits<T>::end_points(*t);
     }
-
+
     /// Get the number of sides of the polygon
     inline std::size_t size() const {
       return polygon_traits<T>::size(*t);
     }
-
+
     /// Get the winding direction of the polygon
     inline winding_direction winding() const {
       return polygon_traits<T>::winding(*t);
@@ -1718,24 +1716,24 @@
     inline iterator_holes_type begin_holes() const {
       return polygon_with_holes_traits<T>::begin_holes(*t);
     }
-
+
     /// Get the end iterator
     inline iterator_holes_type end_holes() const {
       return polygon_with_holes_traits<T>::end_holes(*t);
     }
-
+
     /// Get the number of sides of the polygon
     inline std::size_t size_holes() const {
       return polygon_with_holes_traits<T>::size_holes(*t);
     }
-
+
   };
 
   template <typename T>
   struct geometry_concept<view_of<polygon_45_with_holes_concept, T> > {
     typedef polygon_45_with_holes_concept type;
   };
-
+
   template <typename T>
   struct view_of<polygon_90_with_holes_concept, T> {
     const T* t;
@@ -1770,28 +1768,28 @@
       inline bool operator!=(const iterator_holes_type& that) const {
         return (internal_itr != that.internal_itr);
       }
- inline value_type operator*() const {
+ inline value_type operator*() const {
         return view_as<polygon_90_concept>(*internal_itr);
       }
     };
-
+
     /// Get the begin iterator
     inline compact_iterator_type begin_compact() const {
       return compact_iterator_type(polygon_traits<T>::begin_points(*t),
                                    polygon_traits<T>::end_points(*t));
     }
-
+
     /// Get the end iterator
     inline compact_iterator_type end_compact() const {
       return compact_iterator_type(polygon_traits<T>::end_points(*t),
                                    polygon_traits<T>::end_points(*t));
     }
-
+
     /// Get the number of sides of the polygon
     inline std::size_t size() const {
       return polygon_traits<T>::size(*t);
     }
-
+
     /// Get the winding direction of the polygon
     inline winding_direction winding() const {
       return polygon_traits<T>::winding(*t);
@@ -1801,17 +1799,17 @@
     inline iterator_holes_type begin_holes() const {
       return polygon_with_holes_traits<T>::begin_holes(*t);
     }
-
+
     /// Get the end iterator
     inline iterator_holes_type end_holes() const {
       return polygon_with_holes_traits<T>::end_holes(*t);
     }
-
+
     /// Get the number of sides of the polygon
     inline std::size_t size_holes() const {
       return polygon_with_holes_traits<T>::size_holes(*t);
     }
-
+
   };
 
   template <typename T>
@@ -1831,17 +1829,17 @@
     inline iterator_type begin() const {
       return polygon_traits<T>::begin_points(*t);
     }
-
+
     /// Get the end iterator
     inline iterator_type end() const {
       return polygon_traits<T>::end_points(*t);
     }
-
+
     /// Get the number of sides of the polygon
     inline std::size_t size() const {
       return polygon_traits<T>::size(*t);
     }
-
+
     /// Get the winding direction of the polygon
     inline winding_direction winding() const {
       return polygon_traits<T>::winding(*t);
@@ -1856,4 +1854,3 @@
 }
 
 #endif
-

Modified: branches/release/boost/polygon/polygon_with_holes_data.hpp
==============================================================================
--- branches/release/boost/polygon/polygon_with_holes_data.hpp (original)
+++ branches/release/boost/polygon/polygon_with_holes_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -18,7 +18,7 @@
   typedef T coordinate_type;
   typedef typename polygon_data<T>::iterator_type iterator_type;
   typedef typename std::list<polygon_data<coordinate_type> >::const_iterator iterator_holes_type;
- typedef polygon_data<coordinate_type> hole_type;
+ typedef polygon_data<coordinate_type> hole_type;
   typedef typename coordinate_traits<T>::coordinate_distance area_type;
   typedef point_data<T> point_type;
 
@@ -55,9 +55,9 @@
   }
 
   // copy constructor (since we have dynamic memory)
- inline polygon_with_holes_data(const polygon_with_holes_data& that) : self_(that.self_),
+ inline polygon_with_holes_data(const polygon_with_holes_data& that) : self_(that.self_),
                                                                   holes_(that.holes_) {}
-
+
   // assignment operator (since we have dynamic memory do a deep copy)
   inline polygon_with_holes_data& operator=(const polygon_with_holes_data& that) {
     self_ = that.self_;
@@ -80,7 +80,7 @@
 
   inline std::size_t size() const {
     return self_.size();
- }
+ }
 
   // get begin iterator, returns a pointer to a const polygon
   inline const iterator_holes_type begin_holes() const {
@@ -98,11 +98,10 @@
 
 public:
   polygon_data<coordinate_type> self_;
- std::list<hole_type> holes_;
+ std::list<hole_type> holes_;
   };
-
+
 
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/rectangle_concept.hpp
==============================================================================
--- branches/release/boost/polygon/rectangle_concept.hpp (original)
+++ branches/release/boost/polygon/rectangle_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -25,7 +25,7 @@
 
 namespace boost { namespace polygon{
   struct rectangle_concept {};
-
+
   template <typename T>
   struct is_rectangle_concept { typedef gtl_no type; };
   template <>
@@ -62,8 +62,8 @@
   template <typename T, typename CT>
   struct rectangle_difference_type_by_concept { typedef void type; };
   template <typename T>
- struct rectangle_difference_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename rectangle_traits<T>::coordinate_type>::coordinate_difference type; };
+ struct rectangle_difference_type_by_concept<T, gtl_yes> {
+ typedef typename coordinate_traits<typename rectangle_traits<T>::coordinate_type>::coordinate_difference type; };
 
   template <typename T>
   struct rectangle_difference_type {
@@ -74,8 +74,8 @@
   template <typename T, typename CT>
   struct rectangle_distance_type_by_concept { typedef void type; };
   template <typename T>
- struct rectangle_distance_type_by_concept<T, gtl_yes> {
- typedef typename coordinate_traits<typename rectangle_traits<T>::coordinate_type>::coordinate_distance type; };
+ struct rectangle_distance_type_by_concept<T, gtl_yes> {
+ typedef typename coordinate_traits<typename rectangle_coordinate_type<T>::type>::coordinate_distance type; };
 
   template <typename T>
   struct rectangle_distance_type {
@@ -83,91 +83,92 @@
       T, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
+ struct y_r_get_interval : gtl_yes {};
+
   template <typename T>
- typename rectangle_interval_type<T>::type
- get(const T& rectangle, orientation_2d orient,
- typename enable_if< typename gtl_if<typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type>::type * = 0
- ) {
- return rectangle_traits<T>::get(rectangle, orient);
+ typename enable_if< typename gtl_and<y_r_get_interval, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
+ typename rectangle_interval_type<T>::type>::type
+ get(const T& rectangle, orientation_2d orient) {
+ return rectangle_traits<T>::get(rectangle, orient);
   }
 
   struct y_r_h : gtl_yes {};
 
   template <typename T>
- typename enable_if< typename gtl_and<y_r_h, typename gtl_if<typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type>::type,
- typename rectangle_traits<T>::interval_type>::type
+ typename enable_if< typename gtl_and<y_r_h, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
+ typename rectangle_interval_type<T>::type>::type
   horizontal(const T& rectangle) {
- return rectangle_traits<T>::get(rectangle, HORIZONTAL);
+ return rectangle_traits<T>::get(rectangle, HORIZONTAL);
   }
 
   struct y_r_v : gtl_yes {};
 
   template <typename T>
- typename enable_if< typename gtl_and<y_r_v, typename gtl_if<typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type>::type,
- typename rectangle_traits<T>::interval_type>::type
+ typename enable_if< typename gtl_and<y_r_v, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
+ typename rectangle_interval_type<T>::type>::type
   vertical(const T& rectangle) {
- return rectangle_traits<T>::get(rectangle, VERTICAL);
+ return rectangle_traits<T>::get(rectangle, VERTICAL);
   }
 
   struct y_r_set : gtl_yes {};
 
   template <orientation_2d_enum orient, typename T, typename T2>
- typename enable_if< typename gtl_and_3<y_r_set, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename enable_if< typename gtl_and_3<y_r_set, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
                                         typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
- void>::type
+ void>::type
   set(T& rectangle, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, orient, interval);
+ rectangle_mutable_traits<T>::set(rectangle, orient, interval);
   }
 
   struct y_r_set2 : gtl_yes {};
 
   template <typename T, typename T2>
- typename enable_if< typename gtl_and_3<y_r_set2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename enable_if< typename gtl_and_3<y_r_set2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
                                         typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
- void>::type
+ void>::type
   set(T& rectangle, orientation_2d orient, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, orient, interval);
+ rectangle_mutable_traits<T>::set(rectangle, orient, interval);
   }
 
   struct y_r_h2 : gtl_yes {};
 
   template <typename T, typename T2>
- typename enable_if< typename gtl_and_3<y_r_h2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename enable_if< typename gtl_and_3<y_r_h2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
                                         typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
- void>::type
+ void>::type
   horizontal(T& rectangle, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, HORIZONTAL, interval);
+ rectangle_mutable_traits<T>::set(rectangle, HORIZONTAL, interval);
   }
 
   struct y_r_v2 : gtl_yes {};
 
   template <typename T, typename T2>
- typename enable_if<
- typename gtl_and_3<y_r_v2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
- typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type, void>::type
+ typename enable_if<
+ typename gtl_and_3<y_r_v2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type, void>::type
   vertical(T& rectangle, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, VERTICAL, interval);
+ rectangle_mutable_traits<T>::set(rectangle, VERTICAL, interval);
   }
 
   struct y_r_construct : gtl_yes {};
 
   template <typename T, typename T2, typename T3>
   typename enable_if< typename gtl_and<y_r_construct, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
- T>::type
+ T>::type
   construct(const T2& interval_horizontal,
             const T3& interval_vertical) {
     return rectangle_mutable_traits<T>::construct(interval_horizontal, interval_vertical); }
-
+
   struct y_r_construct2 : gtl_yes {};
 
   template <typename T, typename coord_type>
   typename enable_if< typename gtl_and<y_r_construct2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
- T>::type
+ T>::type
   construct(coord_type xl, coord_type yl, coord_type xh, coord_type yh) {
- return rectangle_mutable_traits<T>::construct(interval_data<coord_type>(xl, xh),
- interval_data<coord_type>(yl, yh));
+ return rectangle_mutable_traits<T>::construct(interval_data<coord_type>(xl, xh),
+ interval_data<coord_type>(yl, yh));
   }
-
+
   struct y_r_cconstruct : gtl_yes {};
 
   template <typename T, typename T2>
@@ -179,11 +180,11 @@
   copy_construct(const T2& rectangle) {
     return construct<T> (get(rectangle, HORIZONTAL), get(rectangle, VERTICAL));
   }
-
+
   struct y_r_assign : gtl_yes {};
 
   template <typename rectangle_type_1, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3< y_r_assign,
       typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
       typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
@@ -193,36 +194,36 @@
     set(lvalue, VERTICAL, get(rvalue, VERTICAL));
     return lvalue;
   }
-
+
   struct y_r_equiv : gtl_yes {};
 
   template <typename T, typename T2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3< y_r_equiv,
       typename is_rectangle_concept<typename geometry_concept<T>::type>::type,
       typename is_rectangle_concept<typename geometry_concept<T2>::type>::type>::type,
- bool>::type
+ bool>::type
   equivalence(const T& rect1, const T2& rect2) {
     return equivalence(get(rect1, HORIZONTAL), get(rect2, HORIZONTAL)) &&
       equivalence(get(rect1, VERTICAL), get(rect2, VERTICAL));
   }
-
+
   struct y_r_get : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if< typename gtl_and<y_r_get, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_r_get, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        typename rectangle_coordinate_type<rectangle_type>::type>::type
   get(const rectangle_type& rectangle, orientation_2d orient, direction_1d dir) {
- return get(rectangle_traits<rectangle_type>::get(rectangle, orient), dir);
+ return get(rectangle_traits<rectangle_type>::get(rectangle, orient), dir);
   }
-
+
   struct y_r_set3 : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_set3, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
- set(rectangle_type& rectangle, orientation_2d orient, direction_1d dir,
- typename rectangle_traits<rectangle_type>::coordinate_type value) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = get(rectangle, orient);
+ typename enable_if<typename gtl_and<y_r_set3, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ set(rectangle_type& rectangle, orientation_2d orient, direction_1d dir,
+ typename rectangle_coordinate_type<rectangle_type>::type value) {
+ typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
     set(ivl, dir, value);
     set(rectangle, orient, ivl);
   }
@@ -230,7 +231,7 @@
   struct y_r_xl : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if< typename gtl_and<y_r_xl, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_r_xl, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        typename rectangle_coordinate_type<rectangle_type>::type>::type
   xl(const rectangle_type& rectangle) {
     return get(rectangle, HORIZONTAL, LOW);
@@ -239,15 +240,15 @@
   struct y_r_xl2 : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_xl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
- xl(rectangle_type& rectangle, typename rectangle_traits<rectangle_type>::coordinate_type value) {
+ typename enable_if<typename gtl_and<y_r_xl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ xl(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
     return set(rectangle, HORIZONTAL, LOW, value);
   }
 
   struct y_r_xh : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if< typename gtl_and<y_r_xh, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_r_xh, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        typename rectangle_coordinate_type<rectangle_type>::type>::type
   xh(const rectangle_type& rectangle) {
     return get(rectangle, HORIZONTAL, HIGH);
@@ -256,32 +257,32 @@
   struct y_r_xh2 : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_xh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
- xh(rectangle_type& rectangle, typename rectangle_traits<rectangle_type>::coordinate_type value) {
+ typename enable_if<typename gtl_and<y_r_xh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ xh(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
     return set(rectangle, HORIZONTAL, HIGH, value);
   }
 
   struct y_r_yl : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if< typename gtl_and<y_r_yl, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_r_yl, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        typename rectangle_coordinate_type<rectangle_type>::type>::type
   yl(const rectangle_type& rectangle) {
     return get(rectangle, VERTICAL, LOW);
   }
-
+
   struct y_r_yl2 : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_yl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
- yl(rectangle_type& rectangle, typename rectangle_traits<rectangle_type>::coordinate_type value) {
+ typename enable_if<typename gtl_and<y_r_yl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ yl(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
     return set(rectangle, VERTICAL, LOW, value);
   }
 
   struct y_r_yh : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if< typename gtl_and<y_r_yh, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_r_yh, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        typename rectangle_coordinate_type<rectangle_type>::type>::type
   yh(const rectangle_type& rectangle) {
     return get(rectangle, VERTICAL, HIGH);
@@ -290,45 +291,45 @@
   struct y_r_yh2 : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_yh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
- yh(rectangle_type& rectangle, typename rectangle_traits<rectangle_type>::coordinate_type value) {
+ typename enable_if<typename gtl_and<y_r_yh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ yh(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
     return set(rectangle, VERTICAL, HIGH, value);
   }
 
   struct y_r_ll : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_ll, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> >::type
+ typename enable_if<typename gtl_and<y_r_ll, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> >::type
   ll(const rectangle_type& rectangle) {
- return point_data<typename rectangle_traits<rectangle_type>::coordinate_type> (xl(rectangle), yl(rectangle));
+ return point_data<typename rectangle_coordinate_type<rectangle_type>::type> (xl(rectangle), yl(rectangle));
   }
 
   struct y_r_lr : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_lr, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> >::type
+ typename enable_if<typename gtl_and<y_r_lr, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> >::type
   lr(const rectangle_type& rectangle) {
- return point_data<typename rectangle_traits<rectangle_type>::coordinate_type> (xh(rectangle), yl(rectangle));
+ return point_data<typename rectangle_coordinate_type<rectangle_type>::type> (xh(rectangle), yl(rectangle));
   }
 
   struct y_r_ul : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_ul, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> >::type
+ typename enable_if<typename gtl_and<y_r_ul, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> >::type
   ul(const rectangle_type& rectangle) {
- return point_data<typename rectangle_traits<rectangle_type>::coordinate_type> (xl(rectangle), yh(rectangle));
+ return point_data<typename rectangle_coordinate_type<rectangle_type>::type> (xl(rectangle), yh(rectangle));
   }
 
   struct y_r_ur : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_ur, typename gtl_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> >::type
+ typename enable_if<typename gtl_and<y_r_ur, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> >::type
   ur(const rectangle_type& rectangle) {
- return point_data<typename rectangle_traits<rectangle_type>::coordinate_type> (xh(rectangle), yh(rectangle));
+ return point_data<typename rectangle_coordinate_type<rectangle_type>::type> (xh(rectangle), yh(rectangle));
   }
 
   struct y_r_contains : gtl_yes {};
@@ -336,8 +337,8 @@
   template <typename rectangle_type, typename rectangle_type_2>
   typename enable_if< typename gtl_and_3<y_r_contains, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                                          typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
- contains(const rectangle_type& rectangle, const rectangle_type_2 rectangle_contained,
+ bool>::type
+ contains(const rectangle_type& rectangle, const rectangle_type_2 rectangle_contained,
            bool consider_touch = true) {
     return contains(horizontal(rectangle), horizontal(rectangle_contained), consider_touch) &&
       contains(vertical(rectangle), vertical(rectangle_contained), consider_touch);
@@ -347,8 +348,8 @@
 
   template <typename rectangle_type, typename point_type>
   typename enable_if< typename gtl_and_3<y_r_contains2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type, bool>::type
- contains(const rectangle_type& rectangle, const point_type point_contained,
+ typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type, bool>::type
+ contains(const rectangle_type& rectangle, const point_type point_contained,
            bool consider_touch = true) {
     return contains(horizontal(rectangle), x(point_contained), consider_touch) &&
       contains(vertical(rectangle), y(point_contained), consider_touch);
@@ -359,30 +360,31 @@
   // set all four coordinates based upon two points
   template <typename rectangle_type, typename point_type_1, typename point_type_2>
   typename enable_if< typename gtl_and_4< y_r_set_points,
- typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
                        rectangle_type>::type &
   set_points(rectangle_type& rectangle, const point_type_1& p1,
              const point_type_2& p2) {
- typedef typename rectangle_traits<rectangle_type>::coordinate_type Unit;
+ typedef typename rectangle_coordinate_type<rectangle_type>::type Unit;
     Unit x1(x(p1));
     Unit x2(x(p2));
     Unit y1(y(p1));
     Unit y2(y(p2));
- horizontal(rectangle, construct<typename rectangle_traits<rectangle_type>::interval_type>(x1, x2));
- vertical(rectangle, construct<typename rectangle_traits<rectangle_type>::interval_type>(y1, y2));
+ horizontal(rectangle, construct<typename rectangle_interval_type<rectangle_type>::type>(x1, x2));
+ vertical(rectangle, construct<typename rectangle_interval_type<rectangle_type>::type>(y1, y2));
     return rectangle;
   }
-
+
+ struct y_r_move : gtl_yes {};
+
   // move rectangle by delta in orient
   template <typename rectangle_type>
- rectangle_type&
- move(rectangle_type& rectangle, orientation_2d orient,
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::coordinate_difference delta,
- typename enable_if<typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type * = 0
- ) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = get(rectangle, orient);
+ typename enable_if< typename gtl_and<y_r_move, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ rectangle_type>::type &
+ move(rectangle_type& rectangle, orientation_2d orient,
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::coordinate_difference delta) {
+ typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
     move(ivl, delta);
     set(rectangle, orient, ivl);
     return rectangle;
@@ -394,18 +396,18 @@
   template <typename rectangle_type_1, typename rectangle_type_2>
   typename enable_if<
     typename gtl_and_3< y_r_convolve,
- typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
- typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
+ typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
+ typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
     rectangle_type_1>::type &
   convolve(rectangle_type_1& rectangle,
            const rectangle_type_2& convolution_rectangle) {
- typename rectangle_traits<rectangle_type_1>::interval_type ivl = horizontal(rectangle);
+ typename rectangle_interval_type<rectangle_type_1>::type ivl = horizontal(rectangle);
     horizontal(rectangle, convolve(ivl, horizontal(convolution_rectangle)));
     ivl = vertical(rectangle);
     vertical(rectangle, convolve(ivl, vertical(convolution_rectangle)));
     return rectangle;
   }
-
+
   struct y_r_deconvolve : gtl_yes {};
 
   // deconvolve this with b
@@ -415,13 +417,13 @@
     typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
                        rectangle_type_1>::type &
   deconvolve(rectangle_type_1& rectangle, const rectangle_type_2& convolution_rectangle) {
- typename rectangle_traits<rectangle_type_1>::interval_type ivl = horizontal(rectangle);
+ typename rectangle_interval_type<rectangle_type_1>::type ivl = horizontal(rectangle);
     horizontal(rectangle, deconvolve(ivl, horizontal(convolution_rectangle)));
     ivl = vertical(rectangle);
     vertical(rectangle, deconvolve(ivl, vertical(convolution_rectangle)));
     return rectangle;
   }
-
+
   struct y_r_reconvolve : gtl_yes {};
 
   // reflectedConvolve this with b
@@ -431,13 +433,13 @@
                       typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
     rectangle_type_1>::type &
   reflected_convolve(rectangle_type_1& rectangle, const rectangle_type_2& convolution_rectangle) {
- typename rectangle_traits<rectangle_type_1>::interval_type ivl = horizontal(rectangle);
+ typename rectangle_interval_type<rectangle_type_1>::type ivl = horizontal(rectangle);
     horizontal(rectangle, reflected_convolve(ivl, horizontal(convolution_rectangle)));
     ivl = vertical(rectangle);
     vertical(rectangle, reflected_convolve(ivl, vertical(convolution_rectangle)));
     return rectangle;
   }
-
+
   struct y_r_redeconvolve : gtl_yes {};
 
   // reflectedDeconvolve this with b
@@ -448,13 +450,13 @@
                       typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
     rectangle_type_1>::type &
   reflected_deconvolve(rectangle_type_1& rectangle, const rectangle_type_2& convolution_rectangle) {
- typename rectangle_traits<rectangle_type_1>::interval_type ivl = horizontal(rectangle);
+ typename rectangle_interval_type<rectangle_type_1>::type ivl = horizontal(rectangle);
     horizontal(rectangle, reflected_deconvolve(ivl, horizontal(convolution_rectangle)));
     ivl = vertical(rectangle);
     vertical(rectangle, reflected_deconvolve(ivl, vertical(convolution_rectangle)));
     return rectangle;
   }
-
+
   struct y_r_convolve2 : gtl_yes {};
 
   // convolve with point
@@ -463,7 +465,7 @@
                                          typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                        rectangle_type>::type &
   convolve(rectangle_type& rectangle, const point_type& convolution_point) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = horizontal(rectangle);
+ typename rectangle_interval_type<rectangle_type>::type ivl = horizontal(rectangle);
     horizontal(rectangle, convolve(ivl, x(convolution_point)));
     ivl = vertical(rectangle);
     vertical(rectangle, convolve(ivl, y(convolution_point)));
@@ -474,11 +476,11 @@
 
   // deconvolve with point
   template <typename rectangle_type, typename point_type>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_r_deconvolve2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                       typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type, rectangle_type>::type &
   deconvolve(rectangle_type& rectangle, const point_type& convolution_point) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = horizontal(rectangle);
+ typename rectangle_interval_type<rectangle_type>::type ivl = horizontal(rectangle);
     horizontal(rectangle, deconvolve(ivl, x(convolution_point)));
     ivl = vertical(rectangle);
     vertical(rectangle, deconvolve(ivl, y(convolution_point)));
@@ -489,7 +491,7 @@
 
   // get the magnitude of the interval range depending on orient
   template <typename rectangle_type>
- typename enable_if< typename gtl_and<y_r_delta, typename gtl_if<typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_r_delta, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        typename rectangle_difference_type<rectangle_type>::type>::type
   delta(const rectangle_type& rectangle, orientation_2d orient) {
     return delta(get(rectangle, orient));
@@ -500,9 +502,9 @@
   // get the area of the rectangle
   template <typename rectangle_type>
   typename enable_if< typename gtl_and<y_r_area, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::manhattan_area_type>::type
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::manhattan_area_type>::type
   area(const rectangle_type& rectangle) {
- typedef typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::manhattan_area_type area_type;
+ typedef typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::manhattan_area_type area_type;
     return (area_type)delta(rectangle, HORIZONTAL) * (area_type)delta(rectangle, VERTICAL);
   }
 
@@ -510,8 +512,8 @@
 
   // returns the orientation of the longest side
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_go, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- orientation_2d>::type
+ typename enable_if<typename gtl_and<y_r_go, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ orientation_2d>::type
   guess_orientation(const rectangle_type& rectangle) {
     return delta(rectangle, HORIZONTAL) >= delta(rectangle, VERTICAL) ?
       HORIZONTAL : VERTICAL;
@@ -521,18 +523,19 @@
 
   // get the half perimeter of the rectangle
   template <typename rectangle_type>
- typename enable_if< typename gtl_and<y_r_half_p, typename gtl_if<typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_r_half_p, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                        typename rectangle_difference_type<rectangle_type>::type>::type
   half_perimeter(const rectangle_type& rectangle) {
     return delta(rectangle, HORIZONTAL) + delta(rectangle, VERTICAL);
   }
-
+
+ struct y_r_perimeter : gtl_yes {};
+
   // get the perimeter of the rectangle
   template <typename rectangle_type>
- typename rectangle_difference_type<rectangle_type>::type
- perimeter(const rectangle_type& rectangle,
- typename enable_if< typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and<y_r_perimeter, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename rectangle_difference_type<rectangle_type>::type>::type
+ perimeter(const rectangle_type& rectangle) {
     return 2 * half_perimeter(rectangle);
   }
 
@@ -543,10 +546,10 @@
   // [in] considerTouch If true, return true even if b touches the boundary
   // [ret] . true if `t` intersects b
   template <typename rectangle_type_1, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_r_intersects, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                       typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   intersects(const rectangle_type_1& rectangle, const rectangle_type_2& b, bool consider_touch = true) {
     return intersects(horizontal(rectangle), horizontal(b), consider_touch) &&
       intersects(vertical(rectangle), vertical(b), consider_touch);
@@ -559,44 +562,44 @@
   // [in] considerTouch If true, return true even if p is on the foundary
   // [ret] . true if `t` contains p
   template <typename rectangle_type_1, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_r_b_intersect, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                       typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   boundaries_intersect(const rectangle_type_1& rectangle, const rectangle_type_2& b,
                        bool consider_touch = true) {
     return (intersects(rectangle, b, consider_touch) &&
             !(contains(rectangle, b, !consider_touch)) &&
             !(contains(b, rectangle, !consider_touch)));
   }
-
+
   struct y_r_b_abuts : gtl_yes {};
 
   // check if b is touching 'this' on the end specified by dir
   template <typename rectangle_type_1, typename rectangle_type_2>
   typename enable_if< typename gtl_and_3<y_r_b_abuts, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                                          typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   abuts(const rectangle_type_1& rectangle, const rectangle_type_2& b,
         direction_2d dir) {
- return
+ return
       abuts(get(rectangle, orientation_2d(dir)),
             get(b, orientation_2d(dir)),
             direction_1d(dir)) &&
       intersects(get(rectangle, orientation_2d(dir).get_perpendicular()),
                  get(b, orientation_2d(dir).get_perpendicular()), true);
   }
-
+
   struct y_r_b_abuts2 : gtl_yes {};
 
   // check if they are touching in the given orientation
   template <typename rectangle_type_1, typename rectangle_type_2>
   typename enable_if< typename gtl_and_3<y_r_b_abuts2, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                                          typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   abuts(const rectangle_type_1& rectangle, const rectangle_type_2& b,
         orientation_2d orient) {
- return
+ return
       abuts(get(rectangle, orient), get(b, orient)) &&
       intersects(get(rectangle, orient.get_perpendicular()),
                  get(b, orient.get_perpendicular()), true);
@@ -608,7 +611,7 @@
   template <typename rectangle_type_1, typename rectangle_type_2>
   typename enable_if< typename gtl_and_3<y_r_b_abuts3, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                                          typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   abuts(const rectangle_type_1& rectangle, const rectangle_type_2& b) {
     return abuts(rectangle, b, HORIZONTAL) || abuts(rectangle, b, VERTICAL);
   }
@@ -617,13 +620,13 @@
 
   // intersect rectangle with interval on orient
   template <typename rectangle_type, typename interval_type>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_r_b_intersect2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                       typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
- bool>::type
+ bool>::type
   intersect(rectangle_type& rectangle, const interval_type& b,
             orientation_2d orient, bool consider_touch = true) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = get(rectangle, orient);
+ typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
     if(intersect(ivl, b, consider_touch)) {
       set(rectangle, orient, ivl);
       return true;
@@ -637,7 +640,7 @@
   template <typename rectangle_type_1, typename rectangle_type_2>
   typename enable_if< typename gtl_and_3<y_r_b_intersect3, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                                          typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   intersect(rectangle_type_1& rectangle, const rectangle_type_2& b, bool consider_touch = true) {
     if(intersects(rectangle, b)) {
       intersect(rectangle, horizontal(b), HORIZONTAL, consider_touch);
@@ -656,7 +659,7 @@
     typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
                        rectangle_type_1>::type &
   generalized_intersect(rectangle_type_1& rectangle, const rectangle_type_2& b) {
- typename rectangle_traits<rectangle_type_1>::interval_type ivl = get(rectangle, HORIZONTAL);
+ typename rectangle_interval_type<rectangle_type_1>::type ivl = get(rectangle, HORIZONTAL);
     generalized_intersect(ivl, horizontal(b));
     horizontal(rectangle, ivl);
     ivl = vertical(rectangle);
@@ -669,11 +672,11 @@
 
   // bloat the interval specified by orient by bloating
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_bloat, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_bloat, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                       rectangle_type>::type &
- bloat(rectangle_type& rectangle, orientation_2d orient,
- typename rectangle_traits<rectangle_type>::coordinate_type bloating) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = get(rectangle, orient);
+ bloat(rectangle_type& rectangle, orientation_2d orient,
+ typename rectangle_coordinate_type<rectangle_type>::type bloating) {
+ typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
     bloat(ivl, bloating);
     set(rectangle, orient, ivl);
     return rectangle;
@@ -683,10 +686,10 @@
 
   // bloat the Rectangle by bloating
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_bloat2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_bloat2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                       rectangle_type>::type &
   bloat(rectangle_type& rectangle,
- typename rectangle_traits<rectangle_type>::coordinate_type bloating) {
+ typename rectangle_coordinate_type<rectangle_type>::type bloating) {
     bloat(rectangle, HORIZONTAL, bloating);
     return bloat(rectangle, VERTICAL, bloating);
   }
@@ -695,11 +698,11 @@
 
   // bloat the interval cooresponding to orient by bloating in dir direction
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_bloat3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_bloat3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                       rectangle_type>::type &
   bloat(rectangle_type& rectangle, direction_2d dir,
- typename rectangle_traits<rectangle_type>::coordinate_type bloating) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = get(rectangle, orientation_2d(dir));
+ typename rectangle_coordinate_type<rectangle_type>::type bloating) {
+ typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orientation_2d(dir));
     bloat(ivl, direction_1d(dir), bloating);
     set(rectangle, orientation_2d(dir), ivl);
     return rectangle;
@@ -709,10 +712,10 @@
 
   // shrink the interval specified by orient by bloating
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_shrink, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_shrink, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                       rectangle_type>::type &
- shrink(rectangle_type& rectangle, orientation_2d orient,
- typename rectangle_traits<rectangle_type>::coordinate_type shrinking) {
+ shrink(rectangle_type& rectangle, orientation_2d orient,
+ typename rectangle_coordinate_type<rectangle_type>::type shrinking) {
     return bloat(rectangle, orient, -shrinking);
   }
 
@@ -720,10 +723,10 @@
 
   // shrink the Rectangle by bloating
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_shrink2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_shrink2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                       rectangle_type>::type &
- shrink(rectangle_type& rectangle,
- typename rectangle_traits<rectangle_type>::coordinate_type shrinking) {
+ shrink(rectangle_type& rectangle,
+ typename rectangle_coordinate_type<rectangle_type>::type shrinking) {
     return bloat(rectangle, -shrinking);
   }
 
@@ -731,10 +734,10 @@
 
   // shrink the interval cooresponding to orient by bloating in dir direction
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_shrink3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_shrink3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                       rectangle_type>::type &
   shrink(rectangle_type& rectangle, direction_2d dir,
- typename rectangle_traits<rectangle_type>::coordinate_type shrinking) {
+ typename rectangle_coordinate_type<rectangle_type>::type shrinking) {
     return bloat(rectangle, dir, -shrinking);
   }
 
@@ -742,13 +745,13 @@
 
   // encompass interval on orient
   template <typename rectangle_type, typename interval_type>
- typename enable_if<
- typename gtl_and_3<y_r_encompass, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
- typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
- bool>::type
- encompass(rectangle_type& rectangle, const interval_type& b,
- orientation_2d orient) {
- typename rectangle_traits<rectangle_type>::interval_type ivl = get(rectangle, orient);
+ typename enable_if<typename gtl_and_3<
+ y_r_encompass,
+ typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
+ typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
+ bool>::type
+ encompass(rectangle_type& rectangle, const interval_type& b, orientation_2d orient) {
+ typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
     if(encompass(ivl, b)) {
       set(rectangle, orient, ivl);
       return true;
@@ -760,12 +763,12 @@
 
   // enlarge rectangle to encompass the Rectangle b
   template <typename rectangle_type_1, typename rectangle_type_2>
- bool
- encompass(rectangle_type_1& rectangle, const rectangle_type_2& b,
- typename enable_if< typename gtl_and_3<y_r_encompass2,
- typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
- typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type >::type>::type * = 0
- ) {
+ typename enable_if< typename gtl_and_3<
+ y_r_encompass2,
+ typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
+ typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type >::type,
+ bool>::type
+ encompass(rectangle_type_1& rectangle, const rectangle_type_2& b) {
     //note that operator | is intentional because both should be called regardless
     return encompass(rectangle, horizontal(b), HORIZONTAL) |
       encompass(rectangle, vertical(b), VERTICAL);
@@ -775,16 +778,13 @@
 
   // enlarge rectangle to encompass the point b
   template <typename rectangle_type_1, typename point_type>
- typename enable_if<
- typename gtl_and_3<y_r_encompass3, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- bool>::type
- encompass(rectangle_type_1& rectangle, const point_type& b,
- typename enable_if<
- typename gtl_and< typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type>::type * = 0
- ) {
- typename rectangle_traits<rectangle_type_1>::interval_type hivl, vivl;
+ typename enable_if<typename gtl_and_3<
+ y_r_encompass3,
+ typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ bool>::type
+ encompass(rectangle_type_1& rectangle, const point_type& b) {
+ typename rectangle_interval_type<rectangle_type_1>::type hivl, vivl;
     hivl = horizontal(rectangle);
     vivl = vertical(rectangle);
     //note that operator | is intentional because both should be called regardless
@@ -803,7 +803,7 @@
   typename enable_if<
     typename gtl_and_3<y_r_center, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type,
                       typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- bool>::type
+ bool>::type
   center(point_type& center_point, const rectangle_type& rectangle) {
     center_point = construct<point_type>(center(horizontal(rectangle)),
                                          center(vertical(rectangle)));
@@ -816,9 +816,9 @@
   typename enable_if<
     typename gtl_and_3<y_r_get_corner, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type,
                       typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- bool>::type
+ bool>::type
   get_corner(point_type& corner_point, const rectangle_type& rectangle, direction_2d direction_facing, direction_1d direction_turning) {
- typedef typename rectangle_traits<rectangle_type>::coordinate_type Unit;
+ typedef typename rectangle_coordinate_type<rectangle_type>::type Unit;
     Unit u1 = get(rectangle, direction_facing);
     Unit u2 = get(rectangle, direction_facing.turn(direction_turning));
     if(orientation_2d(direction_facing).to_int()) std::swap(u1, u2);
@@ -829,8 +829,8 @@
   struct y_r_get_half : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_get_half, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- rectangle_type>::type
+ typename enable_if<typename gtl_and<y_r_get_half, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ rectangle_type>::type
   get_half(const rectangle_type& rectangle, direction_2d dir) {
     rectangle_type retval(rectangle);
     set(retval, orientation_2d(dir), get_half(get(rectangle, orientation_2d(dir)), direction_1d(dir)));
@@ -842,10 +842,10 @@
   template <typename rectangle_type_1, typename rectangle_type_2>
   typename enable_if< typename gtl_and_3<y_r_join_with, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                                          typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
   join_with(rectangle_type_1& rectangle, const rectangle_type_2& b) {
- typedef typename rectangle_traits<rectangle_type_1>::interval_type Interval1;
- typedef typename rectangle_traits<rectangle_type_2>::interval_type Interval2;
+ typedef typename rectangle_interval_type<rectangle_type_1>::type Interval1;
+ typedef typename rectangle_interval_type<rectangle_type_2>::type Interval2;
     Interval1 hi1 = get(rectangle, HORIZONTAL);
     Interval1 vi1 = get(rectangle, VERTICAL);
     Interval2 hi2 = get(b, HORIZONTAL), vi2 = get(b, VERTICAL);
@@ -860,7 +860,7 @@
     }
     return false;
   }
-
+
   struct y_r_eda2 : gtl_yes {};
 
   template <typename rectangle_type, typename point_type>
@@ -875,8 +875,8 @@
   struct y_r_eda : gtl_yes {};
 
   template <typename rectangle_type, typename rectangle_type_2>
- typename enable_if<
- typename gtl_and_3<y_r_eda,
+ typename enable_if<
+ typename gtl_and_3<y_r_eda,
       typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                        typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
     typename rectangle_difference_type<rectangle_type>::type>::type
@@ -887,12 +887,12 @@
   struct y_r_sed : gtl_yes {};
 
   template <typename rectangle_type, typename point_type>
- typename enable_if< typename gtl_if< typename gtl_and_3<y_r_sed,
+ typename enable_if< typename gtl_and_3<y_r_sed,
     typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
                        typename rectangle_difference_type<rectangle_type>::type>::type
   square_euclidean_distance(rectangle_type& lvalue, const point_type& rvalue) {
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::coordinate_difference xdist, ydist;
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::coordinate_difference xdist, ydist;
     xdist = euclidean_distance(lvalue, rvalue, HORIZONTAL);
     ydist = euclidean_distance(lvalue, rvalue, VERTICAL);
     return (xdist * xdist) + (ydist * ydist);
@@ -901,12 +901,12 @@
   struct y_r_sed2 : gtl_yes {};
 
   template <typename rectangle_type, typename rectangle_type_2>
- typename enable_if<
- typename gtl_and_3<y_r_sed2, typename is_rectangle_concept< typename geometry_concept<rectangle_type>::type>::type,
- typename is_rectangle_concept< typename geometry_concept<rectangle_type_2>::type>::type>::type,
+ typename enable_if<
+ typename gtl_and_3<y_r_sed2, typename is_rectangle_concept< typename geometry_concept<rectangle_type>::type>::type,
+ typename is_rectangle_concept< typename geometry_concept<rectangle_type_2>::type>::type>::type,
     typename rectangle_difference_type<rectangle_type>::type>::type
   square_euclidean_distance(const rectangle_type& lvalue, const rectangle_type_2& rvalue) {
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::coordinate_difference xdist, ydist;
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::coordinate_difference xdist, ydist;
     xdist = euclidean_distance(lvalue, rvalue, HORIZONTAL);
     ydist = euclidean_distance(lvalue, rvalue, VERTICAL);
     return (xdist * xdist) + (ydist * ydist);
@@ -917,10 +917,9 @@
   template <typename rectangle_type, typename point_type>
   typename enable_if< typename gtl_and_3<y_r_edist, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                                                           typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename rectangle_distance_type<rectangle_type>::type>::type
+ typename rectangle_distance_type<rectangle_type>::type>::type
   euclidean_distance(rectangle_type& lvalue, const point_type& rvalue) {
- return sqrt((double)
- (square_euclidean_distance(lvalue, rvalue)));
+ return std::sqrt((double)(square_euclidean_distance(lvalue, rvalue)));
   }
 
   struct y_r_edist2 : gtl_yes {};
@@ -928,21 +927,21 @@
   template <typename rectangle_type, typename rectangle_type_2>
   typename enable_if< typename gtl_and_3<y_r_edist2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                                                           typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- typename rectangle_distance_type<rectangle_type>::type>::type
+ typename rectangle_distance_type<rectangle_type>::type>::type
   euclidean_distance(const rectangle_type& lvalue, const rectangle_type_2& rvalue) {
     double val = (int)square_euclidean_distance(lvalue, rvalue);
- return sqrt(val);
+ return std::sqrt(val);
   }
 
   struct y_r_mdist : gtl_yes {};
 
   template <typename rectangle_type, typename point_type>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_r_mdist, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                                        typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
     typename rectangle_difference_type<rectangle_type>::type>::type
   manhattan_distance(rectangle_type& lvalue, const point_type& rvalue) {
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::coordinate_difference xdist, ydist;
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::coordinate_difference xdist, ydist;
     xdist = euclidean_distance(lvalue, rvalue, HORIZONTAL);
     ydist = euclidean_distance(lvalue, rvalue, VERTICAL);
     return xdist + ydist;
@@ -951,12 +950,12 @@
   struct y_r_mdist2 : gtl_yes {};
 
   template <typename rectangle_type, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
     typename gtl_and_3<y_r_mdist2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
                                        typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
     typename rectangle_difference_type<rectangle_type>::type>::type
   manhattan_distance(const rectangle_type& lvalue, const rectangle_type_2& rvalue) {
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::coordinate_difference xdist, ydist;
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::coordinate_difference xdist, ydist;
     xdist = euclidean_distance(lvalue, rvalue, HORIZONTAL);
     ydist = euclidean_distance(lvalue, rvalue, VERTICAL);
     return xdist + ydist;
@@ -965,22 +964,22 @@
   struct y_r_scale_up : gtl_yes {};
 
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_scale_up, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_scale_up, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                      rectangle_type>::type &
- scale_up(rectangle_type& rectangle,
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::unsigned_area_type factor) {
+ scale_up(rectangle_type& rectangle,
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::unsigned_area_type factor) {
     horizontal(rectangle, scale_up(horizontal(rectangle), factor));
     vertical(rectangle, scale_up(vertical(rectangle), factor));
     return rectangle;
   }
-
+
   struct y_r_scale_down : gtl_yes {};
-
+
   template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_scale_down, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_scale_down, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                      rectangle_type>::type &
- scale_down(rectangle_type& rectangle,
- typename coordinate_traits<typename rectangle_traits<rectangle_type>::coordinate_type>::unsigned_area_type factor) {
+ scale_down(rectangle_type& rectangle,
+ typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::unsigned_area_type factor) {
     horizontal(rectangle, scale_down(horizontal(rectangle), factor));
     vertical(rectangle, scale_down(vertical(rectangle), factor));
     return rectangle;
@@ -989,31 +988,31 @@
   struct y_r_scale : gtl_yes {};
 
   template <typename rectangle_type, typename scaling_type>
- typename enable_if<typename gtl_and<y_r_scale, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_scale, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                      rectangle_type>::type &
   scale(rectangle_type& rectangle, const scaling_type& scaling) {
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> llp(xl(rectangle), yl(rectangle));
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> urp(xl(rectangle), yl(rectangle));
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> llp(xl(rectangle), yl(rectangle));
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> urp(xl(rectangle), yl(rectangle));
     scale(llp, scaling);
     scale(urp, scaling);
     set_points(rectangle, llp, urp);
     return rectangle;
   }
-
+
   struct y_r_transform : gtl_yes {};
-
+
   template <typename rectangle_type, typename transformation_type>
- typename enable_if<typename gtl_and<y_r_transform, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_transform, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
                      rectangle_type>::type &
   transform(rectangle_type& rectangle, const transformation_type& transformation) {
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> llp(xl(rectangle), yl(rectangle));
- point_data<typename rectangle_traits<rectangle_type>::coordinate_type> urp(xh(rectangle), yh(rectangle));
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> llp(xl(rectangle), yl(rectangle));
+ point_data<typename rectangle_coordinate_type<rectangle_type>::type> urp(xh(rectangle), yh(rectangle));
     transform(llp, transformation);
     transform(urp, transformation);
     set_points(rectangle, llp, urp);
     return rectangle;
   }
-
+
   template <typename rectangle_type_1, typename rectangle_type_2>
   class less_rectangle_concept {
   private:
@@ -1023,12 +1022,12 @@
     typename enable_if<
       typename gtl_and< typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
                         typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
     operator () (const rectangle_type_1& a,
                  const rectangle_type_2& b) const {
- typedef typename rectangle_traits<rectangle_type_1>::coordinate_type Unit;
- Unit vl1 = get(get(a, orient_), LOW);
- Unit vl2 = get(get(b, orient_), LOW);
+ typedef typename rectangle_coordinate_type<rectangle_type_1>::type Unit;
+ Unit vl1 = get(get(a, orient_), LOW);
+ Unit vl2 = get(get(b, orient_), LOW);
       if(vl1 > vl2) return false;
       if(vl1 == vl2) {
         orientation_2d perp = orient_.get_perpendicular();
@@ -1036,8 +1035,8 @@
         Unit hl2 = get(get(b, perp), LOW);
         if(hl1 > hl2) return false;
         if(hl1 == hl2) {
- Unit vh1 = get(get(a, orient_), HIGH);
- Unit vh2 = get(get(b, orient_), HIGH);
+ Unit vh1 = get(get(a, orient_), HIGH);
+ Unit vh2 = get(get(b, orient_), HIGH);
           if(vh1 > vh2) return false;
           if(vh1 == vh2) {
             Unit hh1 = get(get(a, perp), HIGH);
@@ -1048,7 +1047,7 @@
       }
       return true;
     }
-
+
   };
 
   template <typename T>
@@ -1063,7 +1062,7 @@
     assign(*this, rvalue);
     return *this;
   }
-
+
   template <class T>
   template <class T2>
   bool rectangle_data<T>::operator==(const T2& rvalue) const {
@@ -1077,4 +1076,3 @@
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/rectangle_data.hpp
==============================================================================
--- branches/release/boost/polygon/rectangle_data.hpp (original)
+++ branches/release/boost/polygon/rectangle_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -52,13 +52,12 @@
     return ranges_[orientation_2d(dir).to_int()].set(direction_1d(dir), value);
   }
   template <typename interval_type_1>
- inline void set(orientation_2d orient, const interval_type_1& interval);
+ inline void set(orientation_2d orient, const interval_type_1& interval);
 private:
- interval_data<coordinate_type> ranges_[2];
+ interval_data<coordinate_type> ranges_[2];
 };
 
 
 }
 }
 #endif
-

Modified: branches/release/boost/polygon/rectangle_traits.hpp
==============================================================================
--- branches/release/boost/polygon/rectangle_traits.hpp (original)
+++ branches/release/boost/polygon/rectangle_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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).
@@ -35,4 +35,3 @@
 }
 }
 #endif
-

Added: branches/release/boost/polygon/segment_concept.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/segment_concept.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,754 @@
+/*
+ Copyright 2008 Intel Corporation
+
+ Use, modification and distribution are 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).
+*/
+#ifndef BOOST_POLYGON_SEGMENT_CONCEPT_HPP
+#define BOOST_POLYGON_SEGMENT_CONCEPT_HPP
+
+#include "isotropy.hpp"
+#include "segment_data.hpp"
+#include "segment_traits.hpp"
+#include "rectangle_concept.hpp"
+
+namespace boost {
+namespace polygon {
+struct segment_concept {};
+
+template <typename Segment>
+struct is_segment_concept {
+ typedef gtl_no type;
+};
+
+template <>
+struct is_segment_concept<segment_concept> {
+ typedef gtl_yes type;
+};
+
+template <typename Segment>
+struct is_mutable_segment_concept {
+ typedef gtl_no type;
+};
+
+template <>
+struct is_mutable_segment_concept<segment_concept> {
+ typedef gtl_yes type;
+};
+
+template <typename Segment, typename CT>
+struct segment_distance_type_by_concept {
+ typedef void type;
+};
+
+template <typename Segment>
+struct segment_distance_type_by_concept<Segment, gtl_yes> {
+ typedef typename coordinate_traits<
+ typename segment_traits<Segment>::coordinate_type
+ >::coordinate_distance type;
+};
+
+template <typename Segment>
+struct segment_distance_type {
+ typedef typename segment_distance_type_by_concept<
+ Segment,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type type;
+};
+
+template <typename Segment, typename CT>
+struct segment_point_type_by_concept {
+ typedef void type;
+};
+
+template <typename Segment>
+struct segment_point_type_by_concept<Segment, gtl_yes> {
+ typedef typename segment_traits<Segment>::point_type type;
+};
+
+template <typename Segment>
+struct segment_point_type {
+ typedef typename segment_point_type_by_concept<
+ Segment,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type type;
+};
+
+template <typename Segment, typename CT>
+struct segment_coordinate_type_by_concept {
+ typedef void type;
+};
+
+template <typename Segment>
+struct segment_coordinate_type_by_concept<Segment, gtl_yes> {
+ typedef typename segment_traits<Segment>::coordinate_type type;
+};
+
+template <typename Segment>
+struct segment_coordinate_type {
+ typedef typename segment_coordinate_type_by_concept<
+ Segment,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type type;
+};
+
+struct y_s_get : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_get,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ typename segment_point_type<Segment>::type
+>::type
+get(const Segment& segment, direction_1d dir) {
+ return segment_traits<Segment>::get(segment, dir);
+}
+
+struct y_s_set : gtl_yes {};
+
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_set,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ void
+>::type
+set(Segment& segment, direction_1d dir, const Point& point) {
+ segment_mutable_traits<Segment>::set(segment, dir, point);
+}
+
+struct y_s_construct : gtl_yes {};
+
+template <typename Segment, typename Point1, typename Point2>
+typename enable_if<
+ typename gtl_and_4<
+ y_s_construct,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point1>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point2>::type
+ >::type
+ >::type,
+ Segment
+>::type
+construct(const Point1& low, const Point2& high) {
+ return segment_mutable_traits<Segment>::construct(low, high);
+}
+
+struct y_s_copy_construct : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_copy_construct,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ Segment1
+>::type
+copy_construct(const Segment2& segment) {
+ return construct<Segment1>(get(segment, LOW), get(segment, HIGH));
+}
+
+struct y_s_assign : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_assign,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ Segment1
+>::type &
+assign(Segment1& segment1, const Segment2& segment2) {
+ return segment1 = copy_construct<Segment1>(segment2);
+}
+
+struct y_s_equivalence : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_equivalence,
+ typename is_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ bool
+>::type
+equivalence(const Segment1& segment1, const Segment2& segment2) {
+ return get(segment1, LOW) == get(segment2, LOW) &&
+ get(segment1, HIGH) == get(segment2, HIGH);
+}
+
+struct y_s_low : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_low,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ typename segment_point_type<Segment>::type
+>::type
+low(const Segment& segment) {
+ return get(segment, LOW);
+}
+
+struct y_s_high : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_high,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ typename segment_point_type<Segment>::type
+>::type
+high(const Segment& segment) {
+ return get(segment, HIGH);
+}
+
+struct y_s_center : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_center,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ typename segment_point_type<Segment>::type
+>::type
+center(const Segment& segment) {
+ return construct<typename segment_point_type<Segment>::type>(
+ (x(high(segment)) + x(low(segment)))/2,
+ (y(high(segment)) + y(low(segment)))/2);
+}
+
+struct y_s_low2 : gtl_yes {};
+
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_low2,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ void
+>::type
+low(Segment& segment, const Point& point) {
+ set(segment, LOW, point);
+}
+
+struct y_s_high2 : gtl_yes {};
+
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_high2,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ void
+>::type
+high(Segment& segment, const Point& point) {
+ set(segment, HIGH, point);
+}
+
+struct y_s_orientation1 : gtl_yes {};
+
+// -1 for CW, 0 for collinear and 1 for CCW.
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_orientation1,
+ typename is_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ int
+>::type
+orientation(const Segment1& segment1, const Segment2& segment2) {
+ typedef typename coordinate_traits<
+ typename segment_traits<Segment1>::coordinate_type
+ >::manhattan_area_type int_x2;
+ typedef typename coordinate_traits<
+ typename segment_traits<Segment1>::coordinate_type
+ >::unsigned_area_type uint_x2;
+ int_x2 a1 = (int_x2)x(high(segment1)) - (int_x2)x(low(segment1));
+ int_x2 b1 = (int_x2)y(high(segment1)) - (int_x2)y(low(segment1));
+ int_x2 a2 = (int_x2)x(high(segment2)) - (int_x2)x(low(segment2));
+ int_x2 b2 = (int_x2)y(high(segment2)) - (int_x2)y(low(segment2));
+
+ int sign1 = 0;
+ int sign2 = 0;
+ if (a1 && b2)
+ sign1 = ((a1 > 0) ^ (b2 > 0)) ? -1 : 1;
+ if (a2 && b1)
+ sign2 = ((a2 > 0) ^ (b1 > 0)) ? -1 : 1;
+
+ if (sign1 != sign2)
+ return (sign1 < sign2) ? -1 : 1;
+ uint_x2 a3 = (uint_x2)(a1 < 0 ? -a1 : a1) * (uint_x2)(b2 < 0 ? -b2 : b2);
+ uint_x2 b3 = (uint_x2)(b1 < 0 ? -b1 : b1) * (uint_x2)(a2 < 0 ? -a2 : a2);
+ if (a3 == b3)
+ return 0;
+ return ((a3 < b3) ^ (sign1 == 1)) ? 1 : -1;
+}
+
+struct y_s_orientation2 : gtl_yes {};
+
+// -1 for right, 0 for collinear and 1 for left.
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_orientation2,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ int
+>::type
+orientation(const Segment& segment, const Point& point) {
+ Segment segment2 = construct<Segment>(high(segment), point);
+ return orientation(segment, segment2);
+}
+
+struct y_s_contains : gtl_yes {};
+
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_contains,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ bool
+>::type
+contains(const Segment& segment,
+ const Point& point,
+ bool consider_touch = true ) {
+ if (orientation(segment, point))
+ return false;
+ rectangle_data<typename segment_coordinate_type<Segment>::type> rect;
+ set_points(rect, low(segment), high(segment));
+ if (!contains(rect, point, true))
+ return false;
+ if (!consider_touch &&
+ (equivalence(low(segment), point) ||
+ equivalence(high(segment), point)))
+ return false;
+ return true;
+}
+
+struct y_s_contains2 : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_contains2,
+ typename is_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ bool
+>::type
+contains(const Segment1& segment1,
+ const Segment2& segment2,
+ bool consider_touch = true) {
+ return contains(segment1, get(segment2, LOW), consider_touch) &&
+ contains(segment1, get(segment2, HIGH), consider_touch);
+}
+
+struct y_s_length : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_length,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ typename segment_distance_type<Segment>::type
+>::type
+length(const Segment& segment) {
+ return euclidean_distance(low(segment), high(segment));
+}
+
+struct y_s_scale_up : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_scale_up,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ Segment
+>::type &
+scale_up(Segment& segment,
+ typename coordinate_traits<
+ typename segment_coordinate_type<Segment>::type
+ >::unsigned_area_type factor) {
+ typename segment_point_type<Segment>::type l = low(segment);
+ typename segment_point_type<Segment>::type h = high(segment);
+ low(segment, scale_up(l, factor));
+ high(segment, scale_up(h, factor));
+ return segment;
+}
+
+struct y_s_scale_down : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_scale_down,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ Segment
+>::type &
+scale_down(Segment& segment,
+ typename coordinate_traits<
+ typename segment_coordinate_type<Segment>::type
+ >::unsigned_area_type factor) {
+ typename segment_point_type<Segment>::type l = low(segment);
+ typename segment_point_type<Segment>::type h = high(segment);
+ low(segment, scale_down(l, factor));
+ high(segment, scale_down(h, factor));
+ return segment;
+}
+
+struct y_s_scale : gtl_yes {};
+
+template <typename Segment, typename Scale>
+typename enable_if<
+ typename gtl_and<
+ y_s_scale,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ Segment
+>::type &
+scale(Segment& segment, const Scale& sc) {
+ typename segment_point_type<Segment>::type l = low(segment);
+ typename segment_point_type<Segment>::type h = high(segment);
+ low(segment, scale(l, sc));
+ high(segment, scale(h, sc));
+ return segment;
+}
+
+struct y_s_transform : gtl_yes {};
+
+template <typename Segment, typename Transform>
+typename enable_if<
+ typename gtl_and<
+ y_s_transform,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ Segment
+>::type &
+transform(Segment& segment, const Transform& tr) {
+ typename segment_point_type<Segment>::type l = low(segment);
+ typename segment_point_type<Segment>::type h = high(segment);
+ low(segment, transform(l, tr));
+ high(segment, transform(h, tr));
+ return segment;
+}
+
+struct y_s_move : gtl_yes {};
+
+template <typename Segment>
+typename enable_if<
+ typename gtl_and<
+ y_s_move,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ Segment
+>::type &
+move(Segment& segment, orientation_2d orient,
+ typename segment_coordinate_type<Segment>::type displacement) {
+ typename segment_point_type<Segment>::type l = low(segment);
+ typename segment_point_type<Segment>::type h = high(segment);
+ low(segment, move(l, orient, displacement));
+ high(segment, move(h, orient, displacement));
+ return segment;
+}
+
+struct y_s_convolve : gtl_yes {};
+
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_convolve,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ Segment
+>::type &
+convolve(Segment& segment, const Point& point) {
+ typename segment_point_type<Segment>::type l = low(segment);
+ typename segment_point_type<Segment>::type h = high(segment);
+ low(segment, convolve(l, point));
+ high(segment, convolve(h, point));
+ return segment;
+}
+
+struct y_s_deconvolve : gtl_yes {};
+
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_deconvolve,
+ typename is_mutable_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ Segment
+>::type &
+deconvolve(Segment& segment, const Point& point) {
+ typename segment_point_type<Segment>::type l = low(segment);
+ typename segment_point_type<Segment>::type h = high(segment);
+ low(segment, deconvolve(l, point));
+ high(segment, deconvolve(h, point));
+ return segment;
+}
+
+struct y_s_abuts1 : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_abuts1,
+ typename is_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ bool
+>::type
+abuts(const Segment1& segment1, const Segment2& segment2, direction_1d dir) {
+ return dir.to_int() ? equivalence(low(segment2) , high(segment1)) :
+ equivalence(low(segment1) , high(segment2));
+}
+
+struct y_s_abuts2 : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_abuts2,
+ typename is_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ bool
+>::type
+abuts(const Segment1& segment1, const Segment2& segment2) {
+ return abuts(segment1, segment2, HIGH) || abuts(segment1, segment2, LOW);
+}
+
+struct y_s_e_intersects : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_e_intersects,
+ typename is_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ bool
+>::type
+intersects(const Segment1& segment1, const Segment2& segment2,
+ bool consider_touch = true) {
+ rectangle_data<typename segment_coordinate_type<Segment1>::type> rect1, rect2;
+ set_points(rect1, low(segment1), high(segment1));
+ set_points(rect2, low(segment2), high(segment2));
+ // Check if axis-parallel rectangles containing segments intersect.
+ if (!intersects(rect1, rect2, true))
+ return false;
+ int or1_1 = orientation(segment1, low(segment2));
+ int or1_2 = orientation(segment1, high(segment2));
+ if (or1_1 * or1_2 > 0)
+ return false;
+ int or2_1 = orientation(segment2, low(segment1));
+ int or2_2 = orientation(segment2, high(segment1));
+ if (or2_1 * or2_2 > 0)
+ return false;
+ if (consider_touch || (or1_1 && or1_2) || (or2_1 && or2_2))
+ return true;
+ if (or1_1 || or1_2)
+ return false;
+ return intersects(vertical(rect1), vertical(rect2), false) ||
+ intersects(horizontal(rect1), horizontal(rect2), false);
+}
+
+struct y_s_e_dist : gtl_yes {};
+
+template <typename Segment, typename Point>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_e_dist,
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type,
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ typename segment_distance_type<Segment>::type
+>::type
+euclidean_distance(const Segment& segment, const Point& point) {
+ typedef typename segment_distance_type<Segment>::type Unit;
+ Unit x1 = x(low(segment));
+ Unit y1 = y(low(segment));
+ Unit x2 = x(high(segment));
+ Unit y2 = y(high(segment));
+ Unit X = x(point);
+ Unit Y = y(point);
+ Unit A = X - x1;
+ Unit B = Y - y1;
+ Unit C = x2 - x1;
+ Unit D = y2 - y1;
+ Unit param = (A * C + B * D);
+ Unit length_sq = C * C + D * D;
+ if (param > length_sq) {
+ return euclidean_distance(high(segment), point);
+ } else if (param < 0.0) {
+ return euclidean_distance(low(segment), point);
+ }
+ if (length_sq == 0.0)
+ return 0.0;
+ Unit denom = std::sqrt(length_sq);
+ Unit result = (A * D - C * B) / denom;
+ return (result < 0.0) ? -result : result;
+}
+
+struct y_s_e_dist2 : gtl_yes {};
+
+template <typename Segment1, typename Segment2>
+typename enable_if<
+ typename gtl_and_3<
+ y_s_e_dist2,
+ typename is_segment_concept<
+ typename geometry_concept<Segment1>::type
+ >::type,
+ typename is_segment_concept<
+ typename geometry_concept<Segment2>::type
+ >::type
+ >::type,
+ typename segment_distance_type<Segment1>::type
+>::type
+euclidean_distance(const Segment1& segment1, const Segment2& segment2) {
+ if (intersects(segment1, segment2))
+ return 0.0;
+ typename segment_distance_type<Segment1>::type
+ result1 = euclidean_distance(segment1, low(segment2)),
+ result2 = euclidean_distance(segment1, high(segment2)),
+ result3 = euclidean_distance(segment2, low(segment1)),
+ result4 = euclidean_distance(segment2, high(segment1));
+ if (result2 < result1)
+ result1 = result2;
+ if (result4 < result3)
+ result3 = result4;
+ return (result1 < result3) ? result1 : result3;
+}
+
+template <class T>
+template <class Segment>
+segment_data<T>& segment_data<T>::operator=(const Segment& rvalue) {
+ assign(*this, rvalue);
+ return *this;
+}
+
+template <typename T>
+struct geometry_concept<segment_data<T> > {
+ typedef segment_concept type;
+};
+}
+}
+#endif

Added: branches/release/boost/polygon/segment_data.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/segment_data.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,108 @@
+/*
+ Copyright 2008 Intel Corporation
+
+ Use, modification and distribution are 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).
+*/
+#ifndef BOOST_POLYGON_SEGMENT_DATA_HPP
+#define BOOST_POLYGON_SEGMENT_DATA_HPP
+
+#include "isotropy.hpp"
+
+namespace boost {
+namespace polygon {
+template <typename T>
+class segment_data {
+ public:
+ typedef T coordinate_type;
+ typedef point_data<T> point_type;
+
+ inline segment_data()
+#ifndef BOOST_POLYGON_MSVC
+ :points_()
+#endif
+ {}
+
+ inline segment_data(const point_type& low, const point_type& high)
+#ifndef BOOST_POLYGON_MSVC
+ :points_()
+#endif
+ {
+ points_[LOW] = low;
+ points_[HIGH] = high;
+ }
+
+ inline segment_data(const segment_data& that)
+#ifndef BOOST_POLYGON_MSVC
+ :points_()
+#endif
+ {
+ (*this) = that;
+ }
+
+ inline segment_data& operator=(const segment_data& that) {
+ points_[0] = that.points_[0];
+ points_[1] = that.points_[1];
+ return *this;
+ }
+
+ template <typename Segment>
+ inline segment_data& operator=(const Segment& that);
+
+ inline point_type get(direction_1d dir) const {
+ return points_[dir.to_int()];
+ }
+
+ inline void set(direction_1d dir, const point_type& point) {
+ points_[dir.to_int()] = point;
+ }
+
+ inline point_type low() const { return points_[0]; }
+
+ inline segment_data& low(const point_type& point) {
+ points_[0] = point;
+ return *this;
+ }
+
+ inline point_type high() const {return points_[1]; }
+
+ inline segment_data& high(const point_type& point) {
+ points_[1] = point;
+ return *this;
+ }
+
+ inline bool operator==(const segment_data& that) const {
+ return low() == that.low() && high() == that.high();
+ }
+
+ inline bool operator!=(const segment_data& that) const {
+ return low() != that.low() || high() != that.high();
+ }
+
+ inline bool operator<(const segment_data& that) const {
+ if (points_[0] < that.points_[0])
+ return true;
+ if (points_[0] > that.points_[0])
+ return false;
+ return points_[1] < that.points_[1];
+ }
+
+ inline bool operator<=(const segment_data& that) const {
+ return !(that < *this);
+ }
+
+ inline bool operator>(const segment_data& that) const {
+ return that < *this;
+ }
+
+ inline bool operator>=(const segment_data& that) const {
+ return !((*this) < that);
+ }
+
+ private:
+ point_type points_[2];
+};
+}
+}
+#endif

Added: branches/release/boost/polygon/segment_traits.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/segment_traits.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,38 @@
+/*
+ Copyright 2008 Intel Corporation
+
+ Use, modification and distribution are 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).
+*/
+#ifndef BOOST_POLYGON_SEGMENT_TRAITS_HPP
+#define BOOST_POLYGON_SEGMENT_TRAITS_HPP
+namespace boost {
+namespace polygon {
+ template <typename Segment>
+ struct segment_traits {
+ typedef typename Segment::coordinate_type coordinate_type;
+ typedef typename Segment::point_type point_type;
+
+ static inline point_type get(const Segment& segment, direction_1d dir) {
+ return segment.get(dir);
+ }
+ };
+
+ template <typename Segment>
+ struct segment_mutable_traits {
+ typedef typename segment_traits<Segment>::point_type point_type;
+
+ static inline void set(
+ Segment& segment, direction_1d dir, const point_type& point) {
+ segment.set(dir, point);
+ }
+
+ static inline Segment construct(
+ const point_type& low, const point_type& high) {
+ return Segment(low, high);
+ }
+ };
+}
+}
+#endif

Added: branches/release/boost/polygon/segment_utils.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/segment_utils.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,159 @@
+/*
+ Copyright 2012 Lucanus Simonson
+
+ Use, modification and distribution are 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).
+*/
+
+#ifndef BOOST_POLYGON_SEGMENT_UTILS_HPP
+#define BOOST_POLYGON_SEGMENT_UTILS_HPP
+
+#include <set>
+#include <vector>
+#include <utility>
+
+namespace boost {
+namespace polygon {
+
+template <typename Segment, typename SegmentIterator>
+typename enable_if<
+ typename gtl_and<
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type
+ >::type,
+ void
+>::type
+intersect_segments(
+ std::vector<std::pair<std::size_t, Segment> >& result,
+ SegmentIterator first, SegmentIterator last) {
+ typedef typename segment_traits<Segment>::coordinate_type Unit;
+ typedef typename scanline_base<Unit>::Point Point;
+ typedef typename scanline_base<Unit>::half_edge half_edge;
+ typedef int segment_id;
+ std::vector<std::pair<half_edge, segment_id> > half_edges;
+ std::vector<std::pair<half_edge, segment_id> > half_edges_out;
+ segment_id id_in = 0;
+ half_edges.reserve(std::distance(first, last));
+ for (; first != last; ++first) {
+ Point l, h;
+ assign(l, low(*first));
+ assign(h, high(*first));
+ half_edges.push_back(std::make_pair(half_edge(l, h), id_in++));
+ }
+ half_edges_out.reserve(half_edges.size());
+ // Apparently no need to pre-sort data when calling validate_scan.
+ if (half_edges.size() != 0) {
+ line_intersection<Unit>::validate_scan(
+ half_edges_out, half_edges.begin(), half_edges.end());
+ }
+
+ result.reserve(result.size() + half_edges_out.size());
+ for (std::size_t i = 0; i < half_edges_out.size(); ++i) {
+ std::size_t id = (std::size_t)(half_edges_out[i].second);
+ Point l = half_edges_out[i].first.first;
+ Point h = half_edges_out[i].first.second;
+ result.push_back(std::make_pair(id, construct<Segment>(l, h)));
+ }
+}
+
+template <typename SegmentContainer, typename SegmentIterator>
+typename enable_if<
+ typename gtl_and<
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<
+ typename SegmentContainer::value_type
+ >::type
+ >::type
+ >::type
+ >::type,
+ void
+>::type
+intersect_segments(
+ SegmentContainer& result,
+ SegmentIterator first,
+ SegmentIterator last) {
+ typedef typename SegmentContainer::value_type segment_type;
+ typedef typename segment_traits<segment_type>::coordinate_type Unit;
+ typedef typename scanline_base<Unit>::Point Point;
+ typedef typename scanline_base<Unit>::half_edge half_edge;
+ typedef int segment_id;
+ std::vector<std::pair<half_edge, segment_id> > half_edges;
+ std::vector<std::pair<half_edge, segment_id> > half_edges_out;
+ segment_id id_in = 0;
+ half_edges.reserve(std::distance(first, last));
+ for (; first != last; ++first) {
+ Point l, h;
+ assign(l, low(*first));
+ assign(h, high(*first));
+ half_edges.push_back(std::make_pair(half_edge(l, h), id_in++));
+ }
+ half_edges_out.reserve(half_edges.size());
+ // Apparently no need to pre-sort data when calling validate_scan.
+ if (half_edges.size() != 0) {
+ line_intersection<Unit>::validate_scan(
+ half_edges_out, half_edges.begin(), half_edges.end());
+ }
+
+ result.reserve(result.size() + half_edges_out.size());
+ for (std::size_t i = 0; i < half_edges_out.size(); ++i) {
+ Point l = half_edges_out[i].first.first;
+ Point h = half_edges_out[i].first.second;
+ result.push_back(construct<segment_type>(l, h));
+ }
+}
+
+template <typename Rectangle, typename SegmentIterator>
+typename enable_if<
+ typename gtl_and<
+ typename gtl_if<
+ typename is_rectangle_concept<
+ typename geometry_concept<Rectangle>::type
+ >::type
+ >::type,
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type
+ >::type,
+ bool
+>::type
+envelope_segments(
+ Rectangle& rect,
+ SegmentIterator first,
+ SegmentIterator last) {
+ for (SegmentIterator it = first; it != last; ++it) {
+ if (it == first) {
+ set_points(rect, low(*it), high(*it));
+ } else {
+ encompass(rect, low(*it));
+ encompass(rect, high(*it));
+ }
+ }
+ return first != last;
+}
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_SEGMENT_UTILS_HPP

Modified: branches/release/boost/polygon/transform.hpp
==============================================================================
--- branches/release/boost/polygon/transform.hpp (original)
+++ branches/release/boost/polygon/transform.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,6 +1,6 @@
 /*
     Copyright 2008 Intel Corporation
-
+
     Use, modification and distribution are 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).
@@ -22,7 +22,7 @@
 // positive proximal direction to.
 // The zero position bit (LSB) indicates whether the horizontal axis flips
 // when transformed.
-// The 1st postion bit indicates whether the vertical axis flips when
+// The 1st postion bit indicates whether the vertical axis flips when
 // transformed.
 // The 2nd position bit indicates whether the horizontal and vertical axis
 // swap positions when transformed.
@@ -39,110 +39,110 @@
 // meaning of the 2nd position bit to mean that the horizontal and vertical are
 // swapped in their new positions.
 // Enum Values:
-// 000000 EAST NORTH UP
-// 000001 WEST NORTH UP
-// 000010 EAST SOUTH UP
-// 000011 WEST SOUTH UP
-// 000100 NORTH EAST UP
-// 000101 SOUTH EAST UP
-// 000110 NORTH WEST UP
-// 000111 SOUTH WEST UP
-// 001000 EAST NORTH DOWN
-// 001001 WEST NORTH DOWN
-// 001010 EAST SOUTH DOWN
-// 001011 WEST SOUTH DOWN
-// 001100 NORTH EAST DOWN
-// 001101 SOUTH EAST DOWN
-// 001110 NORTH WEST DOWN
-// 001111 SOUTH WEST DOWN
-// 010000 UP NORTH EAST
-// 010001 DOWN NORTH EAST
-// 010010 UP SOUTH EAST
-// 010011 DOWN SOUTH EAST
-// 010100 NORTH UP EAST
-// 010101 SOUTH UP EAST
-// 010110 NORTH DOWN EAST
-// 010111 SOUTH DOWN EAST
-// 011000 UP NORTH WEST
-// 011001 DOWN NORTH WEST
-// 011010 UP SOUTH WEST
-// 011011 DOWN SOUTH WEST
-// 011100 NORTH UP WEST
-// 011101 SOUTH UP WEST
-// 011110 NORTH DOWN WEST
-// 011111 SOUTH DOWN WEST
-// 100000 EAST UP NORTH
-// 100001 WEST UP NORTH
-// 100010 EAST DOWN NORTH
-// 100011 WEST DOWN NORTH
-// 100100 UP EAST NORTH
-// 100101 DOWN EAST NORTH
-// 100110 UP WEST NORTH
-// 100111 DOWN WEST NORTH
-// 101000 EAST UP SOUTH
-// 101001 WEST UP SOUTH
-// 101010 EAST DOWN SOUTH
-// 101011 WEST DOWN SOUTH
-// 101100 UP EAST SOUTH
-// 101101 DOWN EAST SOUTH
-// 101110 UP WEST SOUTH
-// 101111 DOWN WEST SOUTH
+// 000000 EAST NORTH UP
+// 000001 WEST NORTH UP
+// 000010 EAST SOUTH UP
+// 000011 WEST SOUTH UP
+// 000100 NORTH EAST UP
+// 000101 SOUTH EAST UP
+// 000110 NORTH WEST UP
+// 000111 SOUTH WEST UP
+// 001000 EAST NORTH DOWN
+// 001001 WEST NORTH DOWN
+// 001010 EAST SOUTH DOWN
+// 001011 WEST SOUTH DOWN
+// 001100 NORTH EAST DOWN
+// 001101 SOUTH EAST DOWN
+// 001110 NORTH WEST DOWN
+// 001111 SOUTH WEST DOWN
+// 010000 UP NORTH EAST
+// 010001 DOWN NORTH EAST
+// 010010 UP SOUTH EAST
+// 010011 DOWN SOUTH EAST
+// 010100 NORTH UP EAST
+// 010101 SOUTH UP EAST
+// 010110 NORTH DOWN EAST
+// 010111 SOUTH DOWN EAST
+// 011000 UP NORTH WEST
+// 011001 DOWN NORTH WEST
+// 011010 UP SOUTH WEST
+// 011011 DOWN SOUTH WEST
+// 011100 NORTH UP WEST
+// 011101 SOUTH UP WEST
+// 011110 NORTH DOWN WEST
+// 011111 SOUTH DOWN WEST
+// 100000 EAST UP NORTH
+// 100001 WEST UP NORTH
+// 100010 EAST DOWN NORTH
+// 100011 WEST DOWN NORTH
+// 100100 UP EAST NORTH
+// 100101 DOWN EAST NORTH
+// 100110 UP WEST NORTH
+// 100111 DOWN WEST NORTH
+// 101000 EAST UP SOUTH
+// 101001 WEST UP SOUTH
+// 101010 EAST DOWN SOUTH
+// 101011 WEST DOWN SOUTH
+// 101100 UP EAST SOUTH
+// 101101 DOWN EAST SOUTH
+// 101110 UP WEST SOUTH
+// 101111 DOWN WEST SOUTH
 class axis_transformation {
 public:
   // Enum Names and values
   // NULL_TRANSFORM = 0, BEGIN_TRANSFORM = 0,
- // ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
+ // ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
   // WNU = 1, WEST_NORTH_UP = 1, WN = 1, WEST_NORTH = 1, FLIP_X = 1,
   // ESU = 2, EAST_SOUTH_UP = 2, ES = 2, EAST_SOUTH = 2, FLIP_Y = 2,
- // WSU = 3, WEST_SOUTH_UP = 3, WS = 3, WEST_SOUTH = 3,
+ // WSU = 3, WEST_SOUTH_UP = 3, WS = 3, WEST_SOUTH = 3,
   // NEU = 4, NORTH_EAST_UP = 4, NE = 4, NORTH_EAST = 4, SWAP_XY = 4,
- // SEU = 5, SOUTH_EAST_UP = 5, SE = 5, SOUTH_EAST = 5,
- // NWU = 6, NORTH_WEST_UP = 6, NW = 6, NORTH_WEST = 6,
- // SWU = 7, SOUTH_WEST_UP = 7, SW = 7, SOUTH_WEST = 7,
+ // SEU = 5, SOUTH_EAST_UP = 5, SE = 5, SOUTH_EAST = 5,
+ // NWU = 6, NORTH_WEST_UP = 6, NW = 6, NORTH_WEST = 6,
+ // SWU = 7, SOUTH_WEST_UP = 7, SW = 7, SOUTH_WEST = 7,
   // END_2D_TRANSFORM = 7,
- // END = 8, EAST_NORTH_DOWN = 8,
- // WND = 9, WEST_NORTH_DOWN = 9,
- // ESD = 10, EAST_SOUTH_DOWN = 10,
- // WSD = 11, WEST_SOUTH_DOWN = 11,
- // NED = 12, NORTH_EAST_DOWN = 12,
- // SED = 13, SOUTH_EAST_DOWN = 13,
- // NWD = 14, NORTH_WEST_DOWN = 14,
- // SWD = 15, SOUTH_WEST_DOWN = 15,
- // UNE = 16, UP_NORTH_EAST = 16,
- // DNE = 17, DOWN_NORTH_EAST = 17,
- // USE = 18, UP_SOUTH_EAST = 18,
- // DSE = 19, DOWN_SOUTH_EAST = 19,
- // NUE = 20, NORTH_UP_EAST = 20,
- // SUE = 21, SOUTH_UP_EAST = 21,
- // NDE = 22, NORTH_DOWN_EAST = 22,
- // SDE = 23, SOUTH_DOWN_EAST = 23,
- // UNW = 24, UP_NORTH_WEST = 24,
- // DNW = 25, DOWN_NORTH_WEST = 25,
- // USW = 26, UP_SOUTH_WEST = 26,
- // DSW = 27, DOWN_SOUTH_WEST = 27,
- // NUW = 28, NORTH_UP_WEST = 28,
- // SUW = 29, SOUTH_UP_WEST = 29,
- // NDW = 30, NORTH_DOWN_WEST = 30,
- // SDW = 31, SOUTH_DOWN_WEST = 31,
- // EUN = 32, EAST_UP_NORTH = 32,
- // WUN = 33, WEST_UP_NORTH = 33,
- // EDN = 34, EAST_DOWN_NORTH = 34,
- // WDN = 35, WEST_DOWN_NORTH = 35,
- // UEN = 36, UP_EAST_NORTH = 36,
- // DEN = 37, DOWN_EAST_NORTH = 37,
- // UWN = 38, UP_WEST_NORTH = 38,
- // DWN = 39, DOWN_WEST_NORTH = 39,
- // EUS = 40, EAST_UP_SOUTH = 40,
- // WUS = 41, WEST_UP_SOUTH = 41,
- // EDS = 42, EAST_DOWN_SOUTH = 42,
- // WDS = 43, WEST_DOWN_SOUTH = 43,
- // UES = 44, UP_EAST_SOUTH = 44,
- // DES = 45, DOWN_EAST_SOUTH = 45,
- // UWS = 46, UP_WEST_SOUTH = 46,
- // DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
+ // END = 8, EAST_NORTH_DOWN = 8,
+ // WND = 9, WEST_NORTH_DOWN = 9,
+ // ESD = 10, EAST_SOUTH_DOWN = 10,
+ // WSD = 11, WEST_SOUTH_DOWN = 11,
+ // NED = 12, NORTH_EAST_DOWN = 12,
+ // SED = 13, SOUTH_EAST_DOWN = 13,
+ // NWD = 14, NORTH_WEST_DOWN = 14,
+ // SWD = 15, SOUTH_WEST_DOWN = 15,
+ // UNE = 16, UP_NORTH_EAST = 16,
+ // DNE = 17, DOWN_NORTH_EAST = 17,
+ // USE = 18, UP_SOUTH_EAST = 18,
+ // DSE = 19, DOWN_SOUTH_EAST = 19,
+ // NUE = 20, NORTH_UP_EAST = 20,
+ // SUE = 21, SOUTH_UP_EAST = 21,
+ // NDE = 22, NORTH_DOWN_EAST = 22,
+ // SDE = 23, SOUTH_DOWN_EAST = 23,
+ // UNW = 24, UP_NORTH_WEST = 24,
+ // DNW = 25, DOWN_NORTH_WEST = 25,
+ // USW = 26, UP_SOUTH_WEST = 26,
+ // DSW = 27, DOWN_SOUTH_WEST = 27,
+ // NUW = 28, NORTH_UP_WEST = 28,
+ // SUW = 29, SOUTH_UP_WEST = 29,
+ // NDW = 30, NORTH_DOWN_WEST = 30,
+ // SDW = 31, SOUTH_DOWN_WEST = 31,
+ // EUN = 32, EAST_UP_NORTH = 32,
+ // WUN = 33, WEST_UP_NORTH = 33,
+ // EDN = 34, EAST_DOWN_NORTH = 34,
+ // WDN = 35, WEST_DOWN_NORTH = 35,
+ // UEN = 36, UP_EAST_NORTH = 36,
+ // DEN = 37, DOWN_EAST_NORTH = 37,
+ // UWN = 38, UP_WEST_NORTH = 38,
+ // DWN = 39, DOWN_WEST_NORTH = 39,
+ // EUS = 40, EAST_UP_SOUTH = 40,
+ // WUS = 41, WEST_UP_SOUTH = 41,
+ // EDS = 42, EAST_DOWN_SOUTH = 42,
+ // WDS = 43, WEST_DOWN_SOUTH = 43,
+ // UES = 44, UP_EAST_SOUTH = 44,
+ // DES = 45, DOWN_EAST_SOUTH = 45,
+ // UWS = 46, UP_WEST_SOUTH = 46,
+ // DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
   enum ATR {
     NULL_TRANSFORM = 0, BEGIN_TRANSFORM = 0,
- ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
+ ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
     WNU = 1, WEST_NORTH_UP = 1, WN = 1, WEST_NORTH = 1, FLIP_X = 1,
     ESU = 2, EAST_SOUTH_UP = 2, ES = 2, EAST_SOUTH = 2, FLIP_Y = 2,
     WSU = 3, WEST_SOUTH_UP = 3, WS = 3, WEST_SOUTH = 3, FLIP_XY = 3,
@@ -151,47 +151,47 @@
     NWU = 6, NORTH_WEST_UP = 6, NW = 6, NORTH_WEST = 6, ROTATE_RIGHT = 6,
     SWU = 7, SOUTH_WEST_UP = 7, SW = 7, SOUTH_WEST = 7, FLIP_SWAP_XY = 7, END_2D_TRANSFORM = 7,
     END = 8, EAST_NORTH_DOWN = 8, FLIP_Z = 8,
- WND = 9, WEST_NORTH_DOWN = 9,
- ESD = 10, EAST_SOUTH_DOWN = 10,
- WSD = 11, WEST_SOUTH_DOWN = 11,
- NED = 12, NORTH_EAST_DOWN = 12,
- SED = 13, SOUTH_EAST_DOWN = 13,
- NWD = 14, NORTH_WEST_DOWN = 14,
- SWD = 15, SOUTH_WEST_DOWN = 15,
- UNE = 16, UP_NORTH_EAST = 16,
- DNE = 17, DOWN_NORTH_EAST = 17,
- USE = 18, UP_SOUTH_EAST = 18,
- DSE = 19, DOWN_SOUTH_EAST = 19,
- NUE = 20, NORTH_UP_EAST = 20,
- SUE = 21, SOUTH_UP_EAST = 21,
- NDE = 22, NORTH_DOWN_EAST = 22,
- SDE = 23, SOUTH_DOWN_EAST = 23,
- UNW = 24, UP_NORTH_WEST = 24,
- DNW = 25, DOWN_NORTH_WEST = 25,
- USW = 26, UP_SOUTH_WEST = 26,
- DSW = 27, DOWN_SOUTH_WEST = 27,
- NUW = 28, NORTH_UP_WEST = 28,
- SUW = 29, SOUTH_UP_WEST = 29,
- NDW = 30, NORTH_DOWN_WEST = 30,
- SDW = 31, SOUTH_DOWN_WEST = 31,
- EUN = 32, EAST_UP_NORTH = 32,
- WUN = 33, WEST_UP_NORTH = 33,
- EDN = 34, EAST_DOWN_NORTH = 34,
- WDN = 35, WEST_DOWN_NORTH = 35,
- UEN = 36, UP_EAST_NORTH = 36,
- DEN = 37, DOWN_EAST_NORTH = 37,
- UWN = 38, UP_WEST_NORTH = 38,
- DWN = 39, DOWN_WEST_NORTH = 39,
- EUS = 40, EAST_UP_SOUTH = 40,
- WUS = 41, WEST_UP_SOUTH = 41,
- EDS = 42, EAST_DOWN_SOUTH = 42,
- WDS = 43, WEST_DOWN_SOUTH = 43,
- UES = 44, UP_EAST_SOUTH = 44,
- DES = 45, DOWN_EAST_SOUTH = 45,
- UWS = 46, UP_WEST_SOUTH = 46,
- DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
+ WND = 9, WEST_NORTH_DOWN = 9,
+ ESD = 10, EAST_SOUTH_DOWN = 10,
+ WSD = 11, WEST_SOUTH_DOWN = 11,
+ NED = 12, NORTH_EAST_DOWN = 12,
+ SED = 13, SOUTH_EAST_DOWN = 13,
+ NWD = 14, NORTH_WEST_DOWN = 14,
+ SWD = 15, SOUTH_WEST_DOWN = 15,
+ UNE = 16, UP_NORTH_EAST = 16,
+ DNE = 17, DOWN_NORTH_EAST = 17,
+ USE = 18, UP_SOUTH_EAST = 18,
+ DSE = 19, DOWN_SOUTH_EAST = 19,
+ NUE = 20, NORTH_UP_EAST = 20,
+ SUE = 21, SOUTH_UP_EAST = 21,
+ NDE = 22, NORTH_DOWN_EAST = 22,
+ SDE = 23, SOUTH_DOWN_EAST = 23,
+ UNW = 24, UP_NORTH_WEST = 24,
+ DNW = 25, DOWN_NORTH_WEST = 25,
+ USW = 26, UP_SOUTH_WEST = 26,
+ DSW = 27, DOWN_SOUTH_WEST = 27,
+ NUW = 28, NORTH_UP_WEST = 28,
+ SUW = 29, SOUTH_UP_WEST = 29,
+ NDW = 30, NORTH_DOWN_WEST = 30,
+ SDW = 31, SOUTH_DOWN_WEST = 31,
+ EUN = 32, EAST_UP_NORTH = 32,
+ WUN = 33, WEST_UP_NORTH = 33,
+ EDN = 34, EAST_DOWN_NORTH = 34,
+ WDN = 35, WEST_DOWN_NORTH = 35,
+ UEN = 36, UP_EAST_NORTH = 36,
+ DEN = 37, DOWN_EAST_NORTH = 37,
+ UWN = 38, UP_WEST_NORTH = 38,
+ DWN = 39, DOWN_WEST_NORTH = 39,
+ EUS = 40, EAST_UP_SOUTH = 40,
+ WUS = 41, WEST_UP_SOUTH = 41,
+ EDS = 42, EAST_DOWN_SOUTH = 42,
+ WDS = 43, WEST_DOWN_SOUTH = 43,
+ UES = 44, UP_EAST_SOUTH = 44,
+ DES = 45, DOWN_EAST_SOUTH = 45,
+ UWS = 46, UP_WEST_SOUTH = 46,
+ DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
   };
-
+
   // Individual axis enum values indicate which axis an implicit individual
   // axis will be mapped to.
   // The value of the enum paired with an axis provides the information
@@ -224,10 +224,10 @@
   explicit axis_transformation(const orientation_2d& orient);
   explicit axis_transformation(const direction_2d& dir);
 
- // assignment operator
+ // assignment operator
   axis_transformation& operator=(const axis_transformation& a);
 
- // assignment operator
+ // assignment operator
   axis_transformation& operator=(const ATR& atr);
 
   // equivalence operator
@@ -239,7 +239,7 @@
   // ordering
   bool operator<(const axis_transformation& a) const;
 
- // concatenation operator
+ // concatenation operator
   axis_transformation operator+(const axis_transformation& a) const;
 
   // concatenate this with that
@@ -255,7 +255,7 @@
                              direction_2d& vertical_dir) const {
     bool bit2 = (atr_ & 4) != 0;
     bool bit1 = (atr_ & 2) != 0;
- bool bit0 = (atr_ & 1) != 0;
+ bool bit0 = (atr_ & 1) != 0;
     vertical_dir = direction_2d((direction_2d_enum)(((int)(!bit2) << 1) + !bit1));
     horizontal_dir = direction_2d((direction_2d_enum)(((int)(bit2) << 1) + !bit0));
   }
@@ -270,19 +270,19 @@
     bool bit3 = (atr_ & 8) != 0;
     bool bit2 = (atr_ & 4) != 0;
     bool bit1 = (atr_ & 2) != 0;
- bool bit0 = (atr_ & 1) != 0;
+ bool bit0 = (atr_ & 1) != 0;
     proximal_dir = direction_3d((direction_2d_enum)((((int)(!bit4 & !bit5)) << 2) +
- ((int)(bit5) << 1) +
+ ((int)(bit5) << 1) +
                                                     !bit3));
     vertical_dir = direction_3d((direction_2d_enum)((((int)((bit4 & bit2) | (bit5 & !bit2))) << 2)+
- ((int)(!bit5 & !bit2) << 1) +
+ ((int)(!bit5 & !bit2) << 1) +
                                                     !bit1));
- horizontal_dir = direction_3d((direction_2d_enum)((((int)((bit5 & bit2) |
+ horizontal_dir = direction_3d((direction_2d_enum)((((int)((bit5 & bit2) |
                                                               (bit4 & !bit2))) << 2) +
- ((int)(bit2 & !bit5) << 1) +
+ ((int)(bit2 & !bit5) << 1) +
                                                       !bit0));
   }
-
+
   // combine_axis_arrays concatenates this_array and that_array overwriting
   // the result into this_array
   static void combine_axis_arrays (INDIVIDUAL_AXIS this_array[],
@@ -293,7 +293,7 @@
   void write_back_axis_array(const INDIVIDUAL_AXIS this_array[]);
 
   // behavior is deterministic but undefined in the case where illegal
- // combinations of directions are passed in.
+ // combinations of directions are passed in.
   axis_transformation& set_directions(const direction_2d& horizontal_dir,
                                  const direction_2d& vertical_dir);
   // behavior is deterministic but undefined in the case where illegal
@@ -341,31 +341,31 @@
 public:
   inline anisotropic_scale_factor()
 #ifndef BOOST_POLYGON_MSVC
- : scale_()
+ : scale_()
 #endif
   {
     scale_[0] = 1;
     scale_[1] = 1;
     scale_[2] = 1;
- }
+ }
   inline anisotropic_scale_factor(scale_factor_type xscale, scale_factor_type yscale)
 #ifndef BOOST_POLYGON_MSVC
- : scale_()
-#endif
+ : scale_()
+#endif
   {
     scale_[0] = xscale;
     scale_[1] = yscale;
     scale_[2] = 1;
- }
- inline anisotropic_scale_factor(scale_factor_type xscale, scale_factor_type yscale, scale_factor_type zscale)
+ }
+ inline anisotropic_scale_factor(scale_factor_type xscale, scale_factor_type yscale, scale_factor_type zscale)
 #ifndef BOOST_POLYGON_MSVC
- : scale_()
-#endif
+ : scale_()
+#endif
   {
     scale_[0] = xscale;
     scale_[1] = yscale;
     scale_[2] = zscale;
- }
+ }
 
   // get a component of the anisotropic_scale_factor by orientation
   scale_factor_type get(orientation_3d orient) const;
@@ -400,7 +400,7 @@
   void scale(coordinate_type& x, coordinate_type& y, coordinate_type& z) const;
 
   // invert this scale factor to give the reverse scale factor
- anisotropic_scale_factor& invert();
+ anisotropic_scale_factor& invert();
 
 private:
   scale_factor_type scale_[3];
@@ -428,16 +428,16 @@
   transformation(axis_transformation atr, const point_type& referencePt, const point_type& destinationPt);
   transformation(const transformation& tr);
 
- // equivalence operator
+ // equivalence operator
   bool operator==(const transformation& tr) const;
 
- // inequivalence operator
+ // inequivalence operator
   bool operator!=(const transformation& tr) const;
 
   // ordering
   bool operator<(const transformation& tr) const;
 
- // concatenation operator
+ // concatenation operator
   transformation operator+(const transformation& tr) const;
 
   // concatenate this with that
@@ -465,7 +465,7 @@
 
   // invert this transformation
   transformation& invert();
-
+
   // get the inverse of this transformation
   transformation inverse() const;
 
@@ -498,4 +498,3 @@
 }
 #include "detail/transform_detail.hpp"
 #endif
-

Added: branches/release/boost/polygon/voronoi.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/voronoi.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,155 @@
+// Boost.Polygon library voronoi.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_VORONOI
+#define BOOST_POLYGON_VORONOI
+
+#include "isotropy.hpp"
+#include "point_concept.hpp"
+#include "segment_concept.hpp"
+
+#include "voronoi_builder.hpp"
+#include "voronoi_diagram.hpp"
+
+// Public methods to compute Voronoi diagram.
+// Coordinates of the points and of the endpoints of the segments should belong
+// to the 32-bit signed integer range [-2^31, 2^31-1]. To use wider input
+// coordinate range voronoi_builder configuration via coordinate type traits is
+// is required.
+// Complexity - O(N*logN), memory usage - O(N), N - number of input objects.
+namespace boost {
+namespace polygon {
+
+template <typename Point, typename VB>
+typename enable_if<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<Point>::type
+ >::type
+ >::type,
+ std::size_t
+>::type
+insert(const Point& point, VB* vb) {
+ return vb->insert_point(x(point), y(point));
+}
+
+template <typename PointIterator, typename VB>
+typename enable_if<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<PointIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ void
+>::type
+insert(PointIterator first, const PointIterator last, VB* vb) {
+ for (PointIterator it = first; it != last; ++it) {
+ insert(*it, vb);
+ }
+}
+
+template <typename Segment, typename VB>
+typename enable_if<
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<Segment>::type
+ >::type
+ >::type,
+ std::size_t
+>::type
+insert(const Segment& segment, VB* vb) {
+ return vb->insert_segment(
+ x(low(segment)), y(low(segment)),
+ x(high(segment)), y(high(segment)));
+}
+
+template <typename SegmentIterator, typename VB>
+typename enable_if<
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ void
+>::type
+insert(SegmentIterator first, SegmentIterator last, VB* vb) {
+ for (SegmentIterator it = first; it != last; ++it) {
+ insert(*it, vb);
+ }
+}
+
+template <typename PointIterator, typename VD>
+typename enable_if<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<PointIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ void
+>::type
+construct_voronoi(PointIterator first, PointIterator last, VD* vd) {
+ default_voronoi_builder builder;
+ insert(first, last, &builder);
+ builder.construct(vd);
+}
+
+template <typename SegmentIterator, typename VD>
+typename enable_if<
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ void
+>::type
+construct_voronoi(SegmentIterator first, SegmentIterator last, VD* vd) {
+ default_voronoi_builder builder;
+ insert(first, last, &builder);
+ builder.construct(vd);
+}
+
+template <typename PointIterator, typename SegmentIterator, typename VD>
+typename enable_if<
+ typename gtl_and<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<PointIterator>::value_type
+ >::type
+ >::type
+ >::type,
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept<
+ typename std::iterator_traits<SegmentIterator>::value_type
+ >::type
+ >::type
+ >::type
+ >::type,
+ void
+>::type
+construct_voronoi(PointIterator p_first, PointIterator p_last,
+ SegmentIterator s_first, SegmentIterator s_last, VD* vd) {
+ default_voronoi_builder builder;
+ insert(p_first, p_last, &builder);
+ insert(s_first, s_last, &builder);
+ builder.construct(vd);
+}
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_VORONOI

Added: branches/release/boost/polygon/voronoi_builder.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/voronoi_builder.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,517 @@
+// Boost.Polygon library voronoi_builder.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_VORONOI_BUILDER
+#define BOOST_POLYGON_VORONOI_BUILDER
+
+#include <algorithm>
+#include <map>
+#include <queue>
+#include <utility>
+#include <vector>
+
+#include "detail/voronoi_ctypes.hpp"
+#include "detail/voronoi_predicates.hpp"
+#include "detail/voronoi_structures.hpp"
+
+#include "voronoi_geometry_type.hpp"
+
+namespace boost {
+namespace polygon {
+// GENERAL INFO:
+// The sweepline algorithm implementation to compute Voronoi diagram of
+// points and non-intersecting segments (except endpoints).
+// Complexity - O(N*logN), memory usage - O(N), where N is the total number
+// of input geometries. Input geometries should have integer coordinate type.
+//
+// IMPLEMENTATION DETAILS:
+// Each input point creates one site event. Each input segment creates three
+// site events: two for its endpoints and one for the segment itself (this is
+// made to simplify output construction). All the site events are constructed
+// and sorted at the algorithm initialization step. Priority queue is used to
+// dynamically hold circle events. At each step of the algorithm execution the
+// leftmost event is retrieved by comparing the current site event and the
+// topmost element from the circle event queue. STL map (red-black tree)
+// container was chosen to hold state of the beach line. The keys of the map
+// correspond to the neighboring sites that form a bisector and values map to
+// the corresponding Voronoi edges in the output data structure.
+template <typename T,
+ typename CTT = detail::voronoi_ctype_traits<T>,
+ typename VP = detail::voronoi_predicates<CTT> >
+class voronoi_builder {
+ public:
+ typedef typename CTT::int_type int_type;
+ typedef typename CTT::fpt_type fpt_type;
+
+ voronoi_builder() : index_(0) {}
+
+ // Each point creates a single site event.
+ std::size_t insert_point(const int_type& x, const int_type& y) {
+ site_events_.push_back(site_event_type(x, y));
+ site_events_.back().initial_index(index_);
+ site_events_.back().source_category(SOURCE_CATEGORY_SINGLE_POINT);
+ return index_++;
+ }
+
+ // Each segment creates three site events that correspond to:
+ // 1) the start point of the segment;
+ // 2) the end point of the segment;
+ // 3) the segment itself defined by its start point.
+ std::size_t insert_segment(
+ const int_type& x1, const int_type& y1,
+ const int_type& x2, const int_type& y2) {
+ // Set up start point site.
+ point_type p1(x1, y1);
+ site_events_.push_back(site_event_type(p1));
+ site_events_.back().initial_index(index_);
+ site_events_.back().source_category(SOURCE_CATEGORY_SEGMENT_START_POINT);
+
+ // Set up end point site.
+ point_type p2(x2, y2);
+ site_events_.push_back(site_event_type(p2));
+ site_events_.back().initial_index(index_);
+ site_events_.back().source_category(SOURCE_CATEGORY_SEGMENT_END_POINT);
+
+ // Set up segment site.
+ if (point_comparison_(p1, p2)) {
+ site_events_.push_back(site_event_type(p1, p2));
+ site_events_.back().source_category(SOURCE_CATEGORY_INITIAL_SEGMENT);
+ } else {
+ site_events_.push_back(site_event_type(p2, p1));
+ site_events_.back().source_category(SOURCE_CATEGORY_REVERSE_SEGMENT);
+ }
+ site_events_.back().initial_index(index_);
+ return index_++;
+ }
+
+ // Run sweepline algorithm and fill output data structure.
+ template <typename OUTPUT>
+ void construct(OUTPUT* output) {
+ // Init structures.
+ output->_reserve(site_events_.size());
+ init_sites_queue();
+ init_beach_line(output);
+
+ // The algorithm stops when there are no events to process.
+ event_comparison_predicate event_comparison;
+ while (!circle_events_.empty() ||
+ !(site_event_iterator_ == site_events_.end())) {
+ if (circle_events_.empty()) {
+ process_site_event(output);
+ } else if (site_event_iterator_ == site_events_.end()) {
+ process_circle_event(output);
+ } else {
+ if (event_comparison(*site_event_iterator_,
+ circle_events_.top().first)) {
+ process_site_event(output);
+ } else {
+ process_circle_event(output);
+ }
+ }
+ while (!circle_events_.empty() &&
+ !circle_events_.top().first.is_active()) {
+ circle_events_.pop();
+ }
+ }
+ beach_line_.clear();
+
+ // Finish construction.
+ output->_build();
+ }
+
+ void clear() {
+ index_ = 0;
+ site_events_.clear();
+ }
+
+ private:
+ typedef detail::point_2d<int_type> point_type;
+ typedef detail::site_event<int_type> site_event_type;
+ typedef typename std::vector<site_event_type>::const_iterator
+ site_event_iterator_type;
+ typedef detail::circle_event<fpt_type> circle_event_type;
+ typedef typename VP::template point_comparison_predicate<point_type>
+ point_comparison_predicate;
+ typedef typename VP::
+ template event_comparison_predicate<site_event_type, circle_event_type>
+ event_comparison_predicate;
+ typedef typename VP::
+ template circle_formation_predicate<site_event_type, circle_event_type>
+ circle_formation_predicate_type;
+ typedef void edge_type;
+ typedef detail::beach_line_node_key<site_event_type> key_type;
+ typedef detail::beach_line_node_data<edge_type, circle_event_type>
+ value_type;
+ typedef typename VP::template node_comparison_predicate<key_type>
+ node_comparer_type;
+ typedef std::map< key_type, value_type, node_comparer_type > beach_line_type;
+ typedef typename beach_line_type::iterator beach_line_iterator;
+ typedef std::pair<circle_event_type, beach_line_iterator> event_type;
+ typedef struct {
+ bool operator()(const event_type& lhs, const event_type& rhs) const {
+ return predicate(rhs.first, lhs.first);
+ }
+ event_comparison_predicate predicate;
+ } event_comparison_type;
+ typedef detail::ordered_queue<event_type, event_comparison_type>
+ circle_event_queue_type;
+ typedef std::pair<point_type, beach_line_iterator> end_point_type;
+
+ void init_sites_queue() {
+ // Sort site events.
+ std::sort(site_events_.begin(), site_events_.end(),
+ event_comparison_predicate());
+
+ // Remove duplicates.
+ site_events_.erase(std::unique(
+ site_events_.begin(), site_events_.end()), site_events_.end());
+
+ // Index sites.
+ for (std::size_t cur = 0; cur < site_events_.size(); ++cur) {
+ site_events_[cur].sorted_index(cur);
+ }
+
+ // Init site iterator.
+ site_event_iterator_ = site_events_.begin();
+ }
+
+ template <typename OUTPUT>
+ void init_beach_line(OUTPUT* output) {
+ if (site_events_.empty())
+ return;
+ if (site_events_.size() == 1) {
+ // Handle single site event case.
+ output->_process_single_site(site_events_[0]);
+ ++site_event_iterator_;
+ } else {
+ int skip = 0;
+
+ while (site_event_iterator_ != site_events_.end() &&
+ VP::is_vertical(site_event_iterator_->point0(),
+ site_events_.begin()->point0()) &&
+ VP::is_vertical(*site_event_iterator_)) {
+ ++site_event_iterator_;
+ ++skip;
+ }
+
+ if (skip == 1) {
+ // Init beach line with the first two sites.
+ init_beach_line_default(output);
+ } else {
+ // Init beach line with collinear vertical sites.
+ init_beach_line_collinear_sites(output);
+ }
+ }
+ }
+
+ // Init beach line with the two first sites.
+ // The first site is always a point.
+ template <typename OUTPUT>
+ void init_beach_line_default(OUTPUT* output) {
+ // Get the first and the second site event.
+ site_event_iterator_type it_first = site_events_.begin();
+ site_event_iterator_type it_second = site_events_.begin();
+ ++it_second;
+ insert_new_arc(
+ *it_first, *it_first, *it_second, beach_line_.end(), output);
+ // The second site was already processed. Move the iterator.
+ ++site_event_iterator_;
+ }
+
+ // Init beach line with collinear sites.
+ template <typename OUTPUT>
+ void init_beach_line_collinear_sites(OUTPUT* output) {
+ site_event_iterator_type it_first = site_events_.begin();
+ site_event_iterator_type it_second = site_events_.begin();
+ ++it_second;
+ while (it_second != site_event_iterator_) {
+ // Create a new beach line node.
+ key_type new_node(*it_first, *it_second);
+
+ // Update the output.
+ edge_type* edge = output->_insert_new_edge(*it_first, *it_second).first;
+
+ // Insert a new bisector into the beach line.
+ beach_line_.insert(beach_line_.end(),
+ std::pair<key_type, value_type>(new_node, value_type(edge)));
+
+ // Update iterators.
+ ++it_first;
+ ++it_second;
+ }
+ }
+
+ void deactivate_circle_event(value_type* value) {
+ if (value->circle_event()) {
+ value->circle_event()->deactivate();
+ value->circle_event(NULL);
+ }
+ }
+
+ template <typename OUTPUT>
+ void process_site_event(OUTPUT* output) {
+ // Get next site event to process.
+ site_event_type site_event = *site_event_iterator_;
+
+ // Move site iterator.
+ site_event_iterator_type last = site_event_iterator_ + 1;
+
+ // If a new site is an end point of some segment,
+ // remove temporary nodes from the beach line data structure.
+ if (!site_event.is_segment()) {
+ while (!end_points_.empty() &&
+ end_points_.top().first == site_event.point0()) {
+ beach_line_iterator b_it = end_points_.top().second;
+ end_points_.pop();
+ beach_line_.erase(b_it);
+ }
+ } else {
+ while (last != site_events_.end() &&
+ last->is_segment() && last->point0() == site_event.point0())
+ ++last;
+ }
+
+ // Find the node in the binary search tree with left arc
+ // lying above the new site point.
+ key_type new_key(*site_event_iterator_);
+ beach_line_iterator right_it = beach_line_.lower_bound(new_key);
+
+ for (; site_event_iterator_ != last; ++site_event_iterator_) {
+ site_event = *site_event_iterator_;
+ beach_line_iterator left_it = right_it;
+
+ // Do further processing depending on the above node position.
+ // For any two neighboring nodes the second site of the first node
+ // is the same as the first site of the second node.
+ if (right_it == beach_line_.end()) {
+ // The above arc corresponds to the second arc of the last node.
+ // Move the iterator to the last node.
+ --left_it;
+
+ // Get the second site of the last node
+ const site_event_type& site_arc = left_it->first.right_site();
+
+ // Insert new nodes into the beach line. Update the output.
+ right_it = insert_new_arc(
+ site_arc, site_arc, site_event, right_it, output);
+
+ // Add a candidate circle to the circle event queue.
+ // There could be only one new circle event formed by
+ // a new bisector and the one on the left.
+ activate_circle_event(left_it->first.left_site(),
+ left_it->first.right_site(),
+ site_event, right_it);
+ } else if (right_it == beach_line_.begin()) {
+ // The above arc corresponds to the first site of the first node.
+ const site_event_type& site_arc = right_it->first.left_site();
+
+ // Insert new nodes into the beach line. Update the output.
+ left_it = insert_new_arc(
+ site_arc, site_arc, site_event, right_it, output);
+
+ // If the site event is a segment, update its direction.
+ if (site_event.is_segment()) {
+ site_event.inverse();
+ }
+
+ // Add a candidate circle to the circle event queue.
+ // There could be only one new circle event formed by
+ // a new bisector and the one on the right.
+ activate_circle_event(site_event, right_it->first.left_site(),
+ right_it->first.right_site(), right_it);
+ right_it = left_it;
+ } else {
+ // The above arc corresponds neither to the first,
+ // nor to the last site in the beach line.
+ const site_event_type& site_arc2 = right_it->first.left_site();
+ const site_event_type& site3 = right_it->first.right_site();
+
+ // Remove the candidate circle from the event queue.
+ deactivate_circle_event(&right_it->second);
+ --left_it;
+ const site_event_type& site_arc1 = left_it->first.right_site();
+ const site_event_type& site1 = left_it->first.left_site();
+
+ // Insert new nodes into the beach line. Update the output.
+ beach_line_iterator new_node_it =
+ insert_new_arc(site_arc1, site_arc2, site_event, right_it, output);
+
+ // Add candidate circles to the circle event queue.
+ // There could be up to two circle events formed by
+ // a new bisector and the one on the left or right.
+ activate_circle_event(site1, site_arc1, site_event, new_node_it);
+
+ // If the site event is a segment, update its direction.
+ if (site_event.is_segment()) {
+ site_event.inverse();
+ }
+ activate_circle_event(site_event, site_arc2, site3, right_it);
+ right_it = new_node_it;
+ }
+ }
+ }
+
+ // In general case circle event is made of the three consecutive sites
+ // that form two bisectors in the beach line data structure.
+ // Let circle event sites be A, B, C, two bisectors that define
+ // circle event are (A, B), (B, C). During circle event processing
+ // we remove (A, B), (B, C) and insert (A, C). As beach line comparison
+ // works correctly only if one of the nodes is a new one we remove
+ // (B, C) bisector and change (A, B) bisector to the (A, C). That's
+ // why we use const_cast there and take all the responsibility that
+ // map data structure keeps correct ordering.
+ template <typename OUTPUT>
+ void process_circle_event(OUTPUT* output) {
+ // Get the topmost circle event.
+ const event_type& e = circle_events_.top();
+ const circle_event_type& circle_event = e.first;
+ beach_line_iterator it_first = e.second;
+ beach_line_iterator it_last = it_first;
+
+ // Get the C site.
+ site_event_type site3 = it_first->first.right_site();
+
+ // Get the half-edge corresponding to the second bisector - (B, C).
+ edge_type* bisector2 = it_first->second.edge();
+
+ // Get the half-edge corresponding to the first bisector - (A, B).
+ --it_first;
+ edge_type* bisector1 = it_first->second.edge();
+
+ // Get the A site.
+ site_event_type site1 = it_first->first.left_site();
+
+ if (!site1.is_segment() && site3.is_segment() &&
+ site3.point1(true) == site1.point0()) {
+ site3.inverse();
+ }
+
+ // Change the (A, B) bisector node to the (A, C) bisector node.
+ const_cast<key_type&>(it_first->first).right_site(site3);
+
+ // Insert the new bisector into the beach line.
+ it_first->second.edge(output->_insert_new_edge(
+ site1, site3, circle_event, bisector1, bisector2).first);
+
+ // Remove the (B, C) bisector node from the beach line.
+ beach_line_.erase(it_last);
+ it_last = it_first;
+
+ // Pop the topmost circle event from the event queue.
+ circle_events_.pop();
+
+ // Check new triplets formed by the neighboring arcs
+ // to the left for potential circle events.
+ if (it_first != beach_line_.begin()) {
+ deactivate_circle_event(&it_first->second);
+ --it_first;
+ const site_event_type& site_l1 = it_first->first.left_site();
+ activate_circle_event(site_l1, site1, site3, it_last);
+ }
+
+ // Check the new triplet formed by the neighboring arcs
+ // to the right for potential circle events.
+ ++it_last;
+ if (it_last != beach_line_.end()) {
+ deactivate_circle_event(&it_last->second);
+ const site_event_type& site_r1 = it_last->first.right_site();
+ activate_circle_event(site1, site3, site_r1, it_last);
+ }
+ }
+
+ // Insert new nodes into the beach line. Update the output.
+ template <typename OUTPUT>
+ beach_line_iterator insert_new_arc(
+ const site_event_type& site_arc1, const site_event_type &site_arc2,
+ const site_event_type& site_event, beach_line_iterator position,
+ OUTPUT* output) {
+ // Create two new bisectors with opposite directions.
+ key_type new_left_node(site_arc1, site_event);
+ key_type new_right_node(site_event, site_arc2);
+
+ // Set correct orientation for the first site of the second node.
+ if (site_event.is_segment()) {
+ new_right_node.left_site().inverse();
+ }
+
+ // Update the output.
+ std::pair<edge_type*, edge_type*> edges =
+ output->_insert_new_edge(site_arc2, site_event);
+ position = beach_line_.insert(position,
+ typename beach_line_type::value_type(
+ new_right_node, value_type(edges.second)));
+
+ if (site_event.is_segment()) {
+ // Update the beach line with temporary bisector, that will
+ // disappear after processing site event corresponding to the
+ // second endpoint of the segment site.
+ key_type new_node(site_event, site_event);
+ new_node.right_site().inverse();
+ position = beach_line_.insert(position,
+ typename beach_line_type::value_type(new_node, value_type(NULL)));
+
+ // Update the data structure that holds temporary bisectors.
+ end_points_.push(std::make_pair(site_event.point1(), position));
+ }
+
+ position = beach_line_.insert(position,
+ typename beach_line_type::value_type(
+ new_left_node, value_type(edges.first)));
+
+ return position;
+ }
+
+ // Add a new circle event to the event queue.
+ // bisector_node corresponds to the (site2, site3) bisector.
+ void activate_circle_event(const site_event_type& site1,
+ const site_event_type& site2,
+ const site_event_type& site3,
+ beach_line_iterator bisector_node) {
+ circle_event_type c_event;
+ // Check if the three input sites create a circle event.
+ if (circle_formation_predicate_(site1, site2, site3, c_event)) {
+ // Add the new circle event to the circle events queue.
+ // Update bisector's circle event iterator to point to the
+ // new circle event in the circle event queue.
+ event_type& e = circle_events_.push(
+ std::pair<circle_event_type, beach_line_iterator>(
+ c_event, bisector_node));
+ bisector_node->second.circle_event(&e.first);
+ }
+ }
+
+ private:
+ point_comparison_predicate point_comparison_;
+ struct end_point_comparison {
+ bool operator() (const end_point_type& end1,
+ const end_point_type& end2) const {
+ return point_comparison(end2.first, end1.first);
+ }
+ point_comparison_predicate point_comparison;
+ };
+
+ std::vector<site_event_type> site_events_;
+ site_event_iterator_type site_event_iterator_;
+ std::priority_queue< end_point_type, std::vector<end_point_type>,
+ end_point_comparison > end_points_;
+ circle_event_queue_type circle_events_;
+ beach_line_type beach_line_;
+ circle_formation_predicate_type circle_formation_predicate_;
+ std::size_t index_;
+
+ // Disallow copy constructor and operator=
+ voronoi_builder(const voronoi_builder&);
+ void operator=(const voronoi_builder&);
+};
+
+typedef voronoi_builder<detail::int32> default_voronoi_builder;
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_VORONOI_BUILDER

Added: branches/release/boost/polygon/voronoi_diagram.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/voronoi_diagram.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,620 @@
+// Boost.Polygon library voronoi_diagram.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_VORONOI_DIAGRAM
+#define BOOST_POLYGON_VORONOI_DIAGRAM
+
+#include <vector>
+#include <utility>
+
+#include "detail/voronoi_ctypes.hpp"
+#include "detail/voronoi_structures.hpp"
+
+#include "voronoi_geometry_type.hpp"
+
+namespace boost {
+namespace polygon {
+
+// Forward declarations.
+template <typename T>
+class voronoi_edge;
+
+// Represents Voronoi cell.
+// Data members:
+// 1) index of the source within the initial input set
+// 2) pointer to the incident edge
+// 3) mutable color member
+// Cell may contain point or segment site inside.
+template <typename T>
+class voronoi_cell {
+ public:
+ typedef T coordinate_type;
+ typedef std::size_t color_type;
+ typedef voronoi_edge<coordinate_type> voronoi_edge_type;
+ typedef std::size_t source_index_type;
+ typedef SourceCategory source_category_type;
+
+ voronoi_cell(source_index_type source_index,
+ source_category_type source_category) :
+ source_index_(source_index),
+ incident_edge_(NULL),
+ color_(source_category) {}
+
+ // Returns true if the cell contains point site, false else.
+ bool contains_point() const {
+ source_category_type source_category = this->source_category();
+ return belongs(source_category, GEOMETRY_CATEGORY_POINT);
+ }
+
+ // Returns true if the cell contains segment site, false else.
+ bool contains_segment() const {
+ source_category_type source_category = this->source_category();
+ return belongs(source_category, GEOMETRY_CATEGORY_SEGMENT);
+ }
+
+ source_index_type source_index() const {
+ return source_index_;
+ }
+
+ source_category_type source_category() const {
+ return static_cast<source_category_type>(color_ & SOURCE_CATEGORY_BITMASK);
+ }
+
+ // Degenerate cells don't have any incident edges.
+ bool is_degenerate() const { return incident_edge_ == NULL; }
+
+ voronoi_edge_type* incident_edge() { return incident_edge_; }
+ const voronoi_edge_type* incident_edge() const { return incident_edge_; }
+ void incident_edge(voronoi_edge_type* e) { incident_edge_ = e; }
+
+ color_type color() const { return color_ >> BITS_SHIFT; }
+ void color(color_type color) const {
+ color_ &= BITS_MASK;
+ color_ |= color << BITS_SHIFT;
+ }
+
+ private:
+ // 5 color bits are reserved.
+ enum Bits {
+ BITS_SHIFT = 0x5,
+ BITS_MASK = 0x1F
+ };
+
+ source_index_type source_index_;
+ voronoi_edge_type* incident_edge_;
+ mutable color_type color_;
+};
+
+// Represents Voronoi vertex.
+// Data members:
+// 1) vertex coordinates
+// 2) pointer to the incident edge
+// 3) mutable color member
+template <typename T>
+class voronoi_vertex {
+ public:
+ typedef T coordinate_type;
+ typedef std::size_t color_type;
+ typedef voronoi_edge<coordinate_type> voronoi_edge_type;
+
+ voronoi_vertex(const coordinate_type& x, const coordinate_type& y) :
+ x_(x),
+ y_(y),
+ incident_edge_(NULL),
+ color_(0) {}
+
+ const coordinate_type& x() const { return x_; }
+ const coordinate_type& y() const { return y_; }
+
+ bool is_degenerate() const { return incident_edge_ == NULL; }
+
+ voronoi_edge_type* incident_edge() { return incident_edge_; }
+ const voronoi_edge_type* incident_edge() const { return incident_edge_; }
+ void incident_edge(voronoi_edge_type* e) { incident_edge_ = e; }
+
+ color_type color() const { return color_ >> BITS_SHIFT; }
+ void color(color_type color) const {
+ color_ &= BITS_MASK;
+ color_ |= color << BITS_SHIFT;
+ }
+
+ private:
+ // 5 color bits are reserved.
+ enum Bits {
+ BITS_SHIFT = 0x5,
+ BITS_MASK = 0x1F
+ };
+
+ coordinate_type x_;
+ coordinate_type y_;
+ voronoi_edge_type* incident_edge_;
+ mutable color_type color_;
+};
+
+// Half-edge data structure. Represents Voronoi edge.
+// Data members:
+// 1) pointer to the corresponding cell
+// 2) pointer to the vertex that is the starting
+// point of the half-edge
+// 3) pointer to the twin edge
+// 4) pointer to the CCW next edge
+// 5) pointer to the CCW prev edge
+// 6) mutable color member
+template <typename T>
+class voronoi_edge {
+ public:
+ typedef T coordinate_type;
+ typedef voronoi_cell<coordinate_type> voronoi_cell_type;
+ typedef voronoi_vertex<coordinate_type> voronoi_vertex_type;
+ typedef voronoi_edge<coordinate_type> voronoi_edge_type;
+ typedef std::size_t color_type;
+
+ voronoi_edge(bool is_linear, bool is_primary) :
+ cell_(NULL),
+ vertex_(NULL),
+ twin_(NULL),
+ next_(NULL),
+ prev_(NULL),
+ color_(0) {
+ if (is_linear)
+ color_ |= BIT_IS_LINEAR;
+ if (is_primary)
+ color_ |= BIT_IS_PRIMARY;
+ }
+
+ voronoi_cell_type* cell() { return cell_; }
+ const voronoi_cell_type* cell() const { return cell_; }
+ void cell(voronoi_cell_type* c) { cell_ = c; }
+
+ voronoi_vertex_type* vertex0() { return vertex_; }
+ const voronoi_vertex_type* vertex0() const { return vertex_; }
+ void vertex0(voronoi_vertex_type* v) { vertex_ = v; }
+
+ voronoi_vertex_type* vertex1() { return twin_->vertex0(); }
+ const voronoi_vertex_type* vertex1() const { return twin_->vertex0(); }
+
+ voronoi_edge_type* twin() { return twin_; }
+ const voronoi_edge_type* twin() const { return twin_; }
+ void twin(voronoi_edge_type* e) { twin_ = e; }
+
+ voronoi_edge_type* next() { return next_; }
+ const voronoi_edge_type* next() const { return next_; }
+ void next(voronoi_edge_type* e) { next_ = e; }
+
+ voronoi_edge_type* prev() { return prev_; }
+ const voronoi_edge_type* prev() const { return prev_; }
+ void prev(voronoi_edge_type* e) { prev_ = e; }
+
+ // Returns a pointer to the rotation next edge
+ // over the starting point of the half-edge.
+ voronoi_edge_type* rot_next() { return prev_->twin(); }
+ const voronoi_edge_type* rot_next() const { return prev_->twin(); }
+
+ // Returns a pointer to the rotation prev edge
+ // over the starting point of the half-edge.
+ voronoi_edge_type* rot_prev() { return twin_->next(); }
+ const voronoi_edge_type* rot_prev() const { return twin_->next(); }
+
+ // Returns true if the edge is finite (segment, parabolic arc).
+ // Returns false if the edge is infinite (ray, line).
+ bool is_finite() const { return vertex0() && vertex1(); }
+
+ // Returns true if the edge is infinite (ray, line).
+ // Returns false if the edge is finite (segment, parabolic arc).
+ bool is_infinite() const { return !vertex0() || !vertex1(); }
+
+ // Returns true if the edge is linear (segment, ray, line).
+ // Returns false if the edge is curved (parabolic arc).
+ bool is_linear() const {
+ return (color_ & BIT_IS_LINEAR) ? true : false;
+ }
+
+ // Returns true if the edge is curved (parabolic arc).
+ // Returns false if the edge is linear (segment, ray, line).
+ bool is_curved() const {
+ return (color_ & BIT_IS_LINEAR) ? false : true;
+ }
+
+ // Returns false if edge goes through the endpoint of the segment.
+ // Returns true else.
+ bool is_primary() const {
+ return (color_ & BIT_IS_PRIMARY) ? true : false;
+ }
+
+ // Returns true if edge goes through the endpoint of the segment.
+ // Returns false else.
+ bool is_secondary() const {
+ return (color_ & BIT_IS_PRIMARY) ? false : true;
+ }
+
+ color_type color() const { return color_ >> BITS_SHIFT; }
+ void color(color_type color) const {
+ color_ &= BITS_MASK;
+ color_ |= color << BITS_SHIFT;
+ }
+
+ private:
+ // 5 color bits are reserved.
+ enum Bits {
+ BIT_IS_LINEAR = 0x1, // linear is opposite to curved
+ BIT_IS_PRIMARY = 0x2, // primary is opposite to secondary
+
+ BITS_SHIFT = 0x5,
+ BITS_MASK = 0x1F
+ };
+
+ voronoi_cell_type* cell_;
+ voronoi_vertex_type* vertex_;
+ voronoi_edge_type* twin_;
+ voronoi_edge_type* next_;
+ voronoi_edge_type* prev_;
+ mutable color_type color_;
+};
+
+template <typename T>
+struct voronoi_diagram_traits {
+ typedef T coordinate_type;
+ typedef voronoi_cell<coordinate_type> cell_type;
+ typedef voronoi_vertex<coordinate_type> vertex_type;
+ typedef voronoi_edge<coordinate_type> edge_type;
+ typedef class {
+ public:
+ enum { ULPS = 128 };
+ bool operator()(const vertex_type& v1, const vertex_type& v2) const {
+ return (ulp_cmp(v1.x(), v2.x(), ULPS) ==
+ detail::ulp_comparison<T>::EQUAL) &&
+ (ulp_cmp(v1.y(), v2.y(), ULPS) ==
+ detail::ulp_comparison<T>::EQUAL);
+ }
+ private:
+ typename detail::ulp_comparison<T> ulp_cmp;
+ } vertex_equality_predicate_type;
+};
+
+// Voronoi output data structure.
+// CCW ordering is used on the faces perimeter and around the vertices.
+template <typename T, typename TRAITS = voronoi_diagram_traits<T> >
+class voronoi_diagram {
+ public:
+ typedef typename TRAITS::coordinate_type coordinate_type;
+ typedef typename TRAITS::cell_type cell_type;
+ typedef typename TRAITS::vertex_type vertex_type;
+ typedef typename TRAITS::edge_type edge_type;
+
+ typedef std::vector<cell_type> cell_container_type;
+ typedef typename cell_container_type::const_iterator const_cell_iterator;
+
+ typedef std::vector<vertex_type> vertex_container_type;
+ typedef typename vertex_container_type::const_iterator const_vertex_iterator;
+
+ typedef std::vector<edge_type> edge_container_type;
+ typedef typename edge_container_type::const_iterator const_edge_iterator;
+
+ voronoi_diagram() {}
+
+ void clear() {
+ cells_.clear();
+ vertices_.clear();
+ edges_.clear();
+ }
+
+ const cell_container_type& cells() const {
+ return cells_;
+ }
+
+ const vertex_container_type& vertices() const {
+ return vertices_;
+ }
+
+ const edge_container_type& edges() const {
+ return edges_;
+ }
+
+ std::size_t num_cells() const {
+ return cells_.size();
+ }
+
+ std::size_t num_edges() const {
+ return edges_.size();
+ }
+
+ std::size_t num_vertices() const {
+ return vertices_.size();
+ }
+
+ void _reserve(int num_sites) {
+ cells_.reserve(num_sites);
+ vertices_.reserve(num_sites << 1);
+ edges_.reserve((num_sites << 2) + (num_sites << 1));
+ }
+
+ template <typename CT>
+ void _process_single_site(const detail::site_event<CT>& site) {
+ cells_.push_back(cell_type(site.initial_index(), site.source_category()));
+ }
+
+ // Insert a new half-edge into the output data structure.
+ // Takes as input left and right sites that form a new bisector.
+ // Returns a pair of pointers to a new half-edges.
+ template <typename CT>
+ std::pair<void*, void*> _insert_new_edge(
+ const detail::site_event<CT>& site1,
+ const detail::site_event<CT>& site2) {
+ // Get sites' indexes.
+ int site_index1 = site1.sorted_index();
+ int site_index2 = site2.sorted_index();
+
+ bool is_linear = is_linear_edge(site1, site2);
+ bool is_primary = is_primary_edge(site1, site2);
+
+ // Create a new half-edge that belongs to the first site.
+ edges_.push_back(edge_type(is_linear, is_primary));
+ edge_type& edge1 = edges_.back();
+
+ // Create a new half-edge that belongs to the second site.
+ edges_.push_back(edge_type(is_linear, is_primary));
+ edge_type& edge2 = edges_.back();
+
+ // Add the initial cell during the first edge insertion.
+ if (cells_.empty()) {
+ cells_.push_back(cell_type(
+ site1.initial_index(), site1.source_category()));
+ }
+
+ // The second site represents a new site during site event
+ // processing. Add a new cell to the cell records.
+ cells_.push_back(cell_type(
+ site2.initial_index(), site2.source_category()));
+
+ // Set up pointers to cells.
+ edge1.cell(&cells_[site_index1]);
+ edge2.cell(&cells_[site_index2]);
+
+ // Set up twin pointers.
+ edge1.twin(&edge2);
+ edge2.twin(&edge1);
+
+ // Return a pointer to the new half-edge.
+ return std::make_pair(&edge1, &edge2);
+ }
+
+ // Insert a new half-edge into the output data structure with the
+ // start at the point where two previously added half-edges intersect.
+ // Takes as input two sites that create a new bisector, circle event
+ // that corresponds to the intersection point of the two old half-edges,
+ // pointers to those half-edges. Half-edges' direction goes out of the
+ // new Voronoi vertex point. Returns a pair of pointers to a new half-edges.
+ template <typename CT1, typename CT2>
+ std::pair<void*, void*> _insert_new_edge(
+ const detail::site_event<CT1>& site1,
+ const detail::site_event<CT1>& site3,
+ const detail::circle_event<CT2>& circle,
+ void* data12, void* data23) {
+ edge_type* edge12 = static_cast<edge_type*>(data12);
+ edge_type* edge23 = static_cast<edge_type*>(data23);
+
+ // Add a new Voronoi vertex.
+ vertices_.push_back(vertex_type(circle.x(), circle.y()));
+ vertex_type& new_vertex = vertices_.back();
+
+ // Update vertex pointers of the old edges.
+ edge12->vertex0(&new_vertex);
+ edge23->vertex0(&new_vertex);
+
+ bool is_linear = is_linear_edge(site1, site3);
+ bool is_primary = is_primary_edge(site1, site3);
+
+ // Add a new half-edge.
+ edges_.push_back(edge_type(is_linear, is_primary));
+ edge_type& new_edge1 = edges_.back();
+ new_edge1.cell(&cells_[site1.sorted_index()]);
+
+ // Add a new half-edge.
+ edges_.push_back(edge_type(is_linear, is_primary));
+ edge_type& new_edge2 = edges_.back();
+ new_edge2.cell(&cells_[site3.sorted_index()]);
+
+ // Update twin pointers.
+ new_edge1.twin(&new_edge2);
+ new_edge2.twin(&new_edge1);
+
+ // Update vertex pointer.
+ new_edge2.vertex0(&new_vertex);
+
+ // Update Voronoi prev/next pointers.
+ edge12->prev(&new_edge1);
+ new_edge1.next(edge12);
+ edge12->twin()->next(edge23);
+ edge23->prev(edge12->twin());
+ edge23->twin()->next(&new_edge2);
+ new_edge2.prev(edge23->twin());
+
+ // Return a pointer to the new half-edge.
+ return std::make_pair(&new_edge1, &new_edge2);
+ }
+
+ void _build() {
+ // Remove degenerate edges.
+ edge_iterator last_edge = edges_.begin();
+ for (edge_iterator it = edges_.begin(); it != edges_.end(); it += 2) {
+ const vertex_type* v1 = it->vertex0();
+ const vertex_type* v2 = it->vertex1();
+ if (v1 && v2 && vertex_equality_predicate_(*v1, *v2)) {
+ remove_edge(&(*it));
+ } else {
+ if (it != last_edge) {
+ edge_type* e1 = &(*last_edge = *it);
+ edge_type* e2 = &(*(last_edge + 1) = *(it + 1));
+ e1->twin(e2);
+ e2->twin(e1);
+ if (e1->prev()) {
+ e1->prev()->next(e1);
+ e2->next()->prev(e2);
+ }
+ if (e2->prev()) {
+ e1->next()->prev(e1);
+ e2->prev()->next(e2);
+ }
+ }
+ last_edge += 2;
+ }
+ }
+ edges_.erase(last_edge, edges_.end());
+
+ // Set up incident edge pointers for cells and vertices.
+ for (edge_iterator it = edges_.begin(); it != edges_.end(); ++it) {
+ it->cell()->incident_edge(&(*it));
+ if (it->vertex0()) {
+ it->vertex0()->incident_edge(&(*it));
+ }
+ }
+
+ // Remove degenerate vertices.
+ vertex_iterator last_vertex = vertices_.begin();
+ for (vertex_iterator it = vertices_.begin(); it != vertices_.end(); ++it) {
+ if (it->incident_edge()) {
+ if (it != last_vertex) {
+ *last_vertex = *it;
+ vertex_type* v = &(*last_vertex);
+ edge_type* e = v->incident_edge();
+ do {
+ e->vertex0(v);
+ e = e->rot_next();
+ } while (e != v->incident_edge());
+ }
+ ++last_vertex;
+ }
+ }
+ vertices_.erase(last_vertex, vertices_.end());
+
+ // Set up next/prev pointers for infinite edges.
+ if (vertices_.empty()) {
+ if (!edges_.empty()) {
+ // Update prev/next pointers for the line edges.
+ edge_iterator edge_it = edges_.begin();
+ edge_type* edge1 = &(*edge_it);
+ edge1->next(edge1);
+ edge1->prev(edge1);
+ ++edge_it;
+ edge1 = &(*edge_it);
+ ++edge_it;
+
+ while (edge_it != edges_.end()) {
+ edge_type* edge2 = &(*edge_it);
+ ++edge_it;
+
+ edge1->next(edge2);
+ edge1->prev(edge2);
+ edge2->next(edge1);
+ edge2->prev(edge1);
+
+ edge1 = &(*edge_it);
+ ++edge_it;
+ }
+
+ edge1->next(edge1);
+ edge1->prev(edge1);
+ }
+ } else {
+ // Update prev/next pointers for the ray edges.
+ for (cell_iterator cell_it = cells_.begin();
+ cell_it != cells_.end(); ++cell_it) {
+ if (cell_it->is_degenerate())
+ continue;
+ // Move to the previous edge while
+ // it is possible in the CW direction.
+ edge_type* left_edge = cell_it->incident_edge();
+ while (left_edge->prev() != NULL) {
+ left_edge = left_edge->prev();
+ // Terminate if this is not a boundary cell.
+ if (left_edge == cell_it->incident_edge())
+ break;
+ }
+
+ if (left_edge->prev() != NULL)
+ continue;
+
+ edge_type* right_edge = cell_it->incident_edge();
+ while (right_edge->next() != NULL)
+ right_edge = right_edge->next();
+ left_edge->prev(right_edge);
+ right_edge->next(left_edge);
+ }
+ }
+ }
+
+ private:
+ typedef typename cell_container_type::iterator cell_iterator;
+ typedef typename vertex_container_type::iterator vertex_iterator;
+ typedef typename edge_container_type::iterator edge_iterator;
+ typedef typename TRAITS::vertex_equality_predicate_type
+ vertex_equality_predicate_type;
+
+ template <typename SEvent>
+ bool is_primary_edge(const SEvent& site1, const SEvent& site2) const {
+ bool flag1 = site1.is_segment();
+ bool flag2 = site2.is_segment();
+ if (flag1 && !flag2) {
+ return (site1.point0() != site2.point0()) &&
+ (site1.point1() != site2.point0());
+ }
+ if (!flag1 && flag2) {
+ return (site2.point0() != site1.point0()) &&
+ (site2.point1() != site1.point0());
+ }
+ return true;
+ }
+
+ template <typename SEvent>
+ bool is_linear_edge(const SEvent& site1, const SEvent& site2) const {
+ if (!is_primary_edge(site1, site2)) {
+ return true;
+ }
+ return !(site1.is_segment() ^ site2.is_segment());
+ }
+
+ // Remove degenerate edge.
+ void remove_edge(edge_type* edge) {
+ // Update the endpoints of the incident edges to the second vertex.
+ vertex_type* vertex = edge->vertex0();
+ edge_type* updated_edge = edge->twin()->rot_next();
+ while (updated_edge != edge->twin()) {
+ updated_edge->vertex0(vertex);
+ updated_edge = updated_edge->rot_next();
+ }
+
+ edge_type* edge1 = edge;
+ edge_type* edge2 = edge->twin();
+
+ edge_type* edge1_rot_prev = edge1->rot_prev();
+ edge_type* edge1_rot_next = edge1->rot_next();
+
+ edge_type* edge2_rot_prev = edge2->rot_prev();
+ edge_type* edge2_rot_next = edge2->rot_next();
+
+ // Update prev/next pointers for the incident edges.
+ edge1_rot_next->twin()->next(edge2_rot_prev);
+ edge2_rot_prev->prev(edge1_rot_next->twin());
+ edge1_rot_prev->prev(edge2_rot_next->twin());
+ edge2_rot_next->twin()->next(edge1_rot_prev);
+ }
+
+ cell_container_type cells_;
+ vertex_container_type vertices_;
+ edge_container_type edges_;
+ vertex_equality_predicate_type vertex_equality_predicate_;
+
+ // Disallow copy constructor and operator=
+ voronoi_diagram(const voronoi_diagram&);
+ void operator=(const voronoi_diagram&);
+};
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_VORONOI_DIAGRAM

Added: branches/release/boost/polygon/voronoi_geometry_type.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/polygon/voronoi_geometry_type.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,46 @@
+// Boost.Polygon library voronoi_geometry_type.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_VORONOI_GEOMETRY_TYPE
+#define BOOST_POLYGON_VORONOI_GEOMETRY_TYPE
+
+namespace boost {
+namespace polygon {
+// Represents topology type of the voronoi site.
+enum GeometryCategory {
+ GEOMETRY_CATEGORY_POINT = 0x0,
+ GEOMETRY_CATEGORY_SEGMENT = 0x1
+};
+
+// Represents category of the input source that forms Voronoi cell.
+enum SourceCategory {
+ // Point subtypes.
+ SOURCE_CATEGORY_SINGLE_POINT = 0x0,
+ SOURCE_CATEGORY_SEGMENT_START_POINT = 0x1,
+ SOURCE_CATEGORY_SEGMENT_END_POINT = 0x2,
+
+ // Segment subtypes.
+ SOURCE_CATEGORY_INITIAL_SEGMENT = 0x8,
+ SOURCE_CATEGORY_REVERSE_SEGMENT = 0x9,
+
+ SOURCE_CATEGORY_GEOMETRY_SHIFT = 0x3,
+ SOURCE_CATEGORY_BITMASK = 0x1F
+};
+
+bool belongs(
+ SourceCategory source_category,
+ GeometryCategory geometry_category) {
+ return (static_cast<std::size_t>(source_category) >>
+ SOURCE_CATEGORY_GEOMETRY_SHIFT) ==
+ static_cast<std::size_t>(geometry_category);
+}
+} // polygon
+} // boost
+
+#endif // BOOST_POLYGON_VORONOI_GEOMETRY_TYPE

Modified: branches/release/libs/libraries.htm
==============================================================================
--- branches/release/libs/libraries.htm (original)
+++ branches/release/libs/libraries.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -241,8 +241,9 @@
     <li>pointer container
     - Containers for storing heap-allocated polymorphic objects to ease
       OO-programming, from Thorsten Ottosen. </li>
- <li>polygon - Booleans/clipping, resizing/offsetting and more for planar polygons with integral coordinates, from
- Lucanus Simonson.</li>
+ <li>polygon - Voronoi diagram construction and
+ booleans/clipping, resizing/offsetting and more for planar polygons with integral coordinates,
+ from Lucanus Simonson, Andrii Sydorchuk.</li>
     <li>pool - Memory pool management, from
       Steve Cleary.</li>
     <li>preprocessor - Preprocessor

Modified: branches/release/libs/maintainers.txt
==============================================================================
--- branches/release/libs/maintainers.txt (original)
+++ branches/release/libs/maintainers.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -71,7 +71,7 @@
 operators Daniel Frey <d.frey -at- gmx.de>
 parameter David Abrahams <dave -at- boost-consulting.com>, Daniel Wallin <daniel -at- boostpro.com>
 phoenix Joel de Guzman <joel -at- boost-consulting.com>, Thomas Heller <thom.heller -at- gmail.com>
-polygon Lucanus Simonson <lucanus.j.simonson -at- intel.com>
+polygon Lucanus Simonson <lucanus.j.simonson -at- intel.com>, Andrii Sydorchuk <sydorchuk.andriy -at- gmail.com>
 pool Stephen Cleary <scleary -at- jerviswebb.com>
 preprocessor Paul Mensonides <pmenso57 -at- comcast.net>
 program_options Vladimir Prus <ghost -at- cs.msu.su>

Added: branches/release/libs/polygon/benchmark/Jamfile.v2
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/Jamfile.v2 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,39 @@
+# Copyright Andrii Sydorchuk 2010-2012.
+# Distributed under 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)
+
+import testing ;
+
+project voronoi-benchmark
+ :
+ requirements
+ <include>$(CGAL_ROOT)/include
+ <include>$(SHULL_ROOT)
+ <toolset>msvc:<include>$(CGAL_ROOT)/auxiliary/gmp/include
+ <toolset>msvc:<library>$(CGAL_ROOT)/lib/libCGAL-vc90-mt-4.0.lib
+ <toolset>msvc:<library>$(CGAL_ROOT)/lib/libCGAL_Core-vc90-mt-4.0.lib
+ <toolset>msvc:<library>$(CGAL_ROOT)/auxiliary/gmp/lib/libgmp-10.lib
+ <toolset>msvc:<library>$(CGAL_ROOT)/auxiliary/gmp/lib/libmpfr-4.lib
+ <toolset>msvc:<library>$(BOOST_ROOT)/libs/thread/build//boost_thread
+ <toolset>msvc:<library>$(BOOST_ROOT)/libs/test/build//boost_unit_test_framework
+ <toolset>gcc:<library>$(CGAL_ROOT)/lib/libCGAL.so
+ <toolset>gcc:<library>$(CGAL_ROOT)/lib/libCGAL_Core.so
+ <toolset>gcc:<library>$(SHULL_ROOT)/s_hull.so
+ <toolset>gcc:<library>$(BOOST_ROOT)/libs/test/build//boost_unit_test_framework
+ ;
+
+alias "benchmark-general"
+ :
+ [ run voronoi_benchmark.cpp ]
+ ;
+
+alias "benchmark-points"
+ :
+ [ run voronoi_benchmark_points.cpp ]
+ ;
+
+alias "benchmark-segments"
+ :
+ [ run voronoi_benchmark_segments.cpp ]
+ ;

Added: branches/release/libs/polygon/benchmark/benchmark_results/benchmark_points.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/benchmark_results/benchmark_points.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,60 @@
+System: CPU i5-7600 2.8 GHz, 4Gb RAM.
+OS: Windows 7 Professional 32 bit.
+Compiler: MSVC-9.0.
+
+Boost.Polygon Voronoi of Points:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.000027 |
+| 100 | 10000 | 0.000392 |
+| 1000 | 1000 | 0.004541 |
+| 10000 | 100 | 0.047540 |
+| 100000 | 10 | 0.530200 |
+| 1000000 | 1 | 5.882000 |
+
+CGAL Triangulation of Points:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.000116 |
+| 100 | 10000 | 0.002649 |
+| 1000 | 1000 | 0.039140 |
+| 10000 | 100 | 0.684090 |
+| 100000 | 10 | 16.904600 |
+| 1000000 | 1 | 566.056000 |
+
+S-Hull Triangulation of Points:
+| 10 | 100000 | 0.000043 |
+| 100 | 10000 | 0.000521 |
+| 1000 | 1000 | 0.007125 |
+| 10000 | 100 | 0.091640 |
+| 100000 | 10 | 1.218000 |
+| 1000000 | 1 | 15.394000 |
+
+System: CPU i5-7600 2.8 GHz, 4Gb RAM.
+OS: Ubuntu 11.10 64 bit.
+Compiler: gcc 4.6.1.
+
+Boost.Polygon Voronoi of Points:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.000013 |
+| 100 | 10000 | 0.000192 |
+| 1000 | 1000 | 0.002130 |
+| 10000 | 100 | 0.022900 |
+| 100000 | 10 | 0.274000 |
+| 1000000 | 1 | 3.290000 |
+
+CGAL Triangulation of Points:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.000052 |
+| 100 | 10000 | 0.001150 |
+| 1000 | 1000 | 0.016680 |
+| 10000 | 100 | 0.297900 |
+| 100000 | 10 | 8.047000 |
+| 1000000 | 1 | 315.740000 |
+
+S-Hull Triangulation of Points:
+| 10 | 100000 | 0.000012 |
+| 100 | 10000 | 0.000139 |
+| 1000 | 1000 | 0.002010 |
+| 10000 | 100 | 0.028300 |
+| 100000 | 10 | 0.432000 |
+| 1000000 | 1 | 6.350000 |
+

Added: branches/release/libs/polygon/benchmark/benchmark_results/benchmark_segments.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/benchmark_results/benchmark_segments.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,44 @@
+System: CPU i5-7600 2.8 GHz, 4Gb RAM.
+OS: Windows 7 Professional 32 bit.
+Compiler: MSVC-9.0.
+
+Boost.Polygon Voronoi of Segments:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.000290 |
+| 100 | 10000 | 0.003655 |
+| 1000 | 1000 | 0.038158 |
+| 10000 | 100 | 0.389470 |
+| 100000 | 10 | 4.031300 |
+| 1000000 | 1 | 40.912000 |
+
+CGAL Triangulation of Segments:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.001047 |
+| 100 | 10000 | 0.014812 |
+| 1000 | 1000 | 0.177315 |
+| 10000 | 100 | 2.561340 |
+| 100000 | 10 | 49.314600 |
+| 1000000 | 1 | 1640.830000 |
+
+System: CPU i5-7600 2.8 GHz, 4Gb RAM.
+OS: Ubuntu 11.10 64 bit.
+Compiler: gcc 4.6.1.
+
+Boost.Polygon Voronoi of Segments:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.000165 |
+| 100 | 10000 | 0.002006 |
+| 1000 | 1000 | 0.020440 |
+| 10000 | 100 | 0.209700 |
+| 100000 | 10 | 2.228000 |
+| 1000000 | 1 | 22.250000 |
+
+CGAL Triangulation of Segments:
+| Number of points | Number of tests | Time per one test |
+| 10 | 100000 | 0.000483 |
+| 100 | 10000 | 0.007006 |
+| 1000 | 1000 | 0.084000 |
+| 10000 | 100 | 1.191900 |
+| 100000 | 10 | 23.538000 |
+| 1000000 | 1 | 856.650000 |
+

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_10.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_100.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_1000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_10000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_100000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_1000000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_all.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_points_memory.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_10.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_100.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_1000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_10000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_100000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_1000000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_all.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/benchmark_results/plots/benchmark_segments_memory.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/benchmark/input_data/voronoi_point.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/input_data/voronoi_point.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,10001 @@
+10000
+-1901163173 -797183991
+1072538781 2038566753
+-1722099487 2031547532
+-1500282383 -1246565046
+-1533785272 -41239070
+1577075827 -78210248
+-1102193165 244389016
+530954850 58192926
+-1261330763 69171810
+-1306794927 259316249
+403175311 -1077123435
+426126601 -2100971833
+-2139884750 325575595
+-1661445746 479738928
+2116797514 1964838271
+1168122864 169246856
+-177635709 -2118406464
+59092446 -941898791
+-1746533660 1634170612
+-1844027101 1691580855
+954482790 -2033451287
+1052573310 -678601803
+-899861567 1023180380
+1839138703 -1247183390
+-230606913 1027627479
+1597786564 776752486
+295512346 -1614652009
+710238273 1160791766
+6269997 832929268
+-1339156185 1025118479
+1340643437 1299176876
+700453225 -1989191690
+-1349301462 -1021264476
+800302101 -1638627234
+-1102125324 -1922304558
+-1681577042 -1646753081
+-1375491576 1873771789
+192794234 1384679003
+1001337608 -1027787262
+-808297724 218075712
+-1564536813 -621518211
+-916152412 2082092279
+1845343876 -1912357572
+547516807 803945681
+754673669 -705242851
+-706237956 354737508
+466851611 2012923271
+1217350015 1952408450
+842212720 -1515373126
+-1353827043 -1654014041
+-505102299 -1928059273
+1983454679 748799938
+345373202 945208299
+-136755580 494582433
+-1527969343 -197389551
+1738712516 1301383829
+-1252030420 357671661
+-1843819984 1238141935
+1306785789 -964306446
+1052139237 -638735686
+-2124765692 776132039
+-1838545493 -614850178
+-165444477 -1607941657
+-106850613 1507299019
+578481769 124926251
+2124305214 -2096435197
+1689864674 1754240714
+81576947 -970762633
+-1585074153 -1905955994
+1773007096 -1925229085
+-2138058716 -632884665
+-1108403020 -1770496081
+-1814467658 -654139631
+-1664276877 -1774620494
+-1827107716 2037090397
+-162914878 648905475
+1129581726 357665942
+1254638875 -250811995
+1412689776 1053766545
+2020349395 -1161539412
+-594233272 -1694048696
+-929431994 -661893617
+1823890393 -2116522354
+61666661 954777997
+521459593 1153825647
+838071470 -1046269160
+175799525 1935759389
+2097851509 -74070491
+-623069170 1121236284
+-1308426882 784874833
+1759830598 1563201328
+1436115709 1940492304
+-1506206446 493415253
+581939505 -1535810742
+691104126 -1662057554
+1078865446 772303351
+-1239415888 211974514
+-2120773905 -634218051
+499931141 -542763880
+1905751147 -1211021147
+-1679925364 711853754
+-1915052958 -1529731008
+107928040 1301484570
+-1249905397 1490401626
+1011013213 -2042622173
+509762090 1529334998
+-1199804963 1296037639
+-982582953 -911388850
+-1287953346 -837851908
+788332905 -498242496
+-485962700 -1765344131
+1119836441 -1719531138
+2138314375 -2060924655
+1751718732 -744192613
+-60325638 -1807331708
+1808623439 863289820
+1946739554 1748371283
+-787992055 1009249517
+-1678571644 1082190096
+-1583797830 -141975953
+1287019851 2119124338
+79068230 -1228378990
+-1950932300 59309620
+1657150125 336720040
+-682184474 1853329423
+-543193283 1802132126
+1413673963 -1298722211
+-1896558785 675170212
+-1072507908 406847410
+1951540296 -192269484
+1572745544 311159715
+-1988023285 -271180513
+-1238632495 -1418563758
+1737892412 1058529
+488824291 1420600179
+1994561889 -1126228829
+35774456 -106841514
+1590668523 -700366584
+710594513 241214568
+1163150024 -1390230566
+1694060915 1185229629
+1273122848 -1350743459
+-309910062 -1844920978
+-838857196 -1224968724
+-1694829549 -38875197
+-374371035 -58865889
+-882311593 -658445678
+1646932569 -1866494927
+181103285 -489997954
+-1700781154 783037602
+-529085584 814846051
+-2043986558 1008821295
+-417716912 -813743516
+2066323455 -1094474141
+1947505191 -1976260924
+180390564 -1300788208
+633577629 -577152987
+-1927803378 1768824722
+802577466 -1038806291
+-213868743 -1151410603
+-1165996733 262293498
+289402562 -661007203
+735198031 -1289171067
+-574789350 -768813340
+1568144854 -706601756
+1331630016 734392962
+-126493586 624057542
+1583328231 -1330778133
+1415367625 137012765
+-1405811491 756314065
+-2060099605 -98830877
+145901505 676467954
+-810687287 1255559991
+-472348786 -1764207339
+-1689036859 99717550
+1797645844 1666589077
+-1429540280 -1763343873
+-355798611 602821363
+-1919219987 312718403
+-580672633 -939157780
+-338823957 1229072681
+-1369896274 -610685798
+-252917642 489400275
+-1202864513 870528273
+-867365019 2030036207
+-395976310 1079595991
+1751463105 -1416025908
+-536736748 1612333403
+1963784343 -866889871
+1555891403 372761082
+-1645133683 -1819453242
+-799113651 -1040024774
+2085697559 -2065168699
+1365864314 -515659124
+-312509359 -1097578501
+-1449599877 -355647384
+1109330417 659005365
+2031191692 849335973
+-1709074322 -1191476096
+414703299 -320183848
+-484850439 373262601
+-427846100 1579843811
+214921674 -1122120946
+2059012310 174939087
+721793841 -142531754
+-73958202 1558382214
+-923278980 -1121996456
+-491302555 1549146899
+937168377 -750914534
+-2062573877 -65050
+-2078733429 -934080282
+812784384 -641132310
+130499436 441106038
+982269560 -1277070118
+143533253 1964966422
+-1579253373 541897201
+-548748267 56390423
+-1000185536 601215905
+547987285 368659482
+-1568242145 539386559
+1533420648 -1893355000
+-1061420216 -770391458
+1351745449 1071620562
+772539467 -87733530
+1095029215 -295825048
+-1104713822 980787111
+-402178176 180133683
+-87724492 2084015454
+-465048108 1972832424
+1014569295 -1580115071
+-1608001062 1603446489
+1490265848 2001621132
+-1682590015 1065735990
+244667177 -542248298
+-500522556 -828654878
+1903657582 264085928
+-298959569 -659322997
+-1444563850 -710650076
+1877901567 1574914371
+-401283961 1644426163
+-860433050 -592860905
+1155492893 -16009401
+389268912 810923383
+-610172036 -490584634
+418188500 -1523182490
+-64704951 -2061568286
+-377130554 609180383
+311984829 1831696049
+748541720 -1956947018
+-1086427848 -1964996727
+794652339 2103431649
+-1843280189 -389471683
+386628013 -1456573114
+-54005612 -1384491184
+-1996911836 745704099
+-236598823 789846274
+-1839426052 -1262651085
+1546919300 -418542895
+-1711105004 -579493163
+1699344788 667542268
+-951880116 -1009717111
+1582993476 -181312468
+-141692335 104431378
+-135991166 1216750172
+428972915 355320246
+148114153 294686755
+-1247719495 -73967835
+-1567122657 1891390767
+-2068951607 1701860873
+954989048 1852918165
+1910112944 -142861662
+671585808 -844739541
+-424595914 -731723196
+-1746177713 718795934
+488996068 -1474968781
+550657206 -192773748
+-1170780301 -624157347
+-624751639 -2135659991
+-1465113398 106140691
+-1960607086 -1897731148
+1217617815 1529420960
+-766287364 -369616215
+-1388404657 -1692711996
+-1494705897 1076749749
+1865753258 -56242651
+-503828153 -1721172385
+968634499 409738094
+137749223 -1808721764
+549783200 -1595492157
+-1136633191 -1837600654
+-1292764942 462586994
+340217772 1344907407
+-422494652 1283055500
+116237892 1337837032
+-1371171908 -103186897
+1948117481 -670868257
+-1549018782 -1411740450
+1589626229 -2145956312
+-608056711 -1732722658
+105087506 217685359
+1965426864 1121382773
+713929602 -11507906
+-1820131323 -1747317183
+1132683396 -812985964
+-1722886981 -733312617
+-1652192107 854383194
+-2032814625 232799022
+-2003494404 471295099
+-979092031 1736668487
+-1704350728 -1299939568
+-1432695160 1552515252
+514015890 266393190
+338389119 1932150807
+-1943223200 1986237244
+364460421 1921077881
+1375922810 1913893698
+-1411941707 -3777360
+-1412387489 159682536
+1473039835 898630667
+1948201809 100703752
+-1919714935 -855998956
+-1619467405 -1417058590
+-1601661500 2066931948
+-1687741646 458119424
+-1635549406 1572324960
+-2107800755 1431882283
+549991626 -530653
+-859513316 -242140569
+-1592665662 1231749361
+-2009052379 -366166142
+-1403722045 1411373893
+1943773802 -922000741
+49088507 516195751
+555750684 -1181082443
+-233050826 -1379291551
+930588171 -1518470196
+-913218677 1423447355
+-1941849036 714940631
+-622604803 1203047653
+51776507 -1211698451
+-27566204 207290373
+707307453 -1561002893
+-839394293 -1575976368
+-1589609094 -930048167
+1857445999 18607743
+1496210481 -756126547
+682629567 1119839749
+2119155830 2116350794
+36886130 -522565353
+-67253884 -1148961987
+1774461376 1631411057
+-282137351 -419032165
+1871536055 -1448476842
+1363108749 486959927
+-1992860114 -1024791090
+388398617 -360044669
+1544863831 1943103074
+964376190 106057477
+1828365088 1566813183
+1703834828 2859603
+-1380063605 1305390991
+-342456799 -1722248377
+1822239838 -1213657544
+317882232 460911073
+-2086549215 1284706390
+1186138780 118083920
+1625325811 2099925680
+1311451765 -458604979
+826918712 1673402260
+1450376156 -1834765432
+1167164817 2113367376
+1140424140 953431617
+959190113 384340388
+-1378573393 -1834950799
+-851440686 -950026275
+613573842 183662332
+-1032892484 -141948964
+26429497 1483982628
+-2105544929 -1849983792
+1400139429 -778350011
+-1512376055 1619562328
+34934426 597125261
+1469975897 -60107338
+383030189 321187247
+2085296263 -402743289
+933729589 896229917
+1009654420 115180643
+-325900197 -582834351
+1903203394 -937832359
+1574071778 2081311626
+459389863 928550946
+-1437683824 -371914142
+-1092807811 -926762733
+-1020782439 -1912953090
+1065143168 -1051481294
+-1025820038 -1199186937
+2114886190 -783771297
+-864543976 1415183045
+-407130487 1226832492
+1654656205 1474060295
+-275127970 1148072391
+1001055618 760189300
+-1022963514 1039173112
+-1309506963 -2142265766
+-1512953492 2127490371
+1992549527 -1977755538
+826049182 1087000798
+-198495682 1204578187
+-1849583411 688130410
+413423406 -1055214603
+453646427 -1053261222
+-33843269 1299675872
+-1484114741 -83777592
+-1669189246 -1000300207
+-908456567 981814954
+450241889 496954157
+-1718348213 30140166
+1946039878 -99050225
+-1536854088 -125177648
+1748048703 -789694423
+-1396895665 1762346041
+-858113112 -1963803482
+1777647221 500253517
+-1440874896 1852223386
+175887845 742739529
+-2124484112 1322449392
+1136014522 -1099248030
+-244555402 101748502
+1438832079 189340292
+-1323901384 758465272
+506429723 -1128363997
+1296109151 1372792742
+335919454 59664576
+132326313 2017666520
+1249449311 -2113325720
+1981224730 987733256
+-1874285006 1558909813
+1593158661 467788942
+-1824368991 1743927726
+-635284823 467329723
+551597105 -2106948583
+-1165695152 -58711748
+-1081300344 115005302
+1530902579 -307810478
+1883738388 -1960771407
+-1692238813 1915857680
+-155258731 792892897
+-1941377781 916634345
+-730038381 1874213271
+-1820760063 -161644773
+1945907978 -1605824783
+-138262711 -1744593558
+953199478 2101543170
+454035865 552156920
+2135173428 -1273496584
+-917296326 -310091448
+-389016067 829870928
+-1097566504 -585553022
+112098314 -1018515896
+1841907618 478237753
+-597446572 -681925336
+1147175455 1386791586
+-1277058502 -1024090997
+450875192 230036247
+-991341744 -1316662647
+-744386917 1299352912
+437548180 125318934
+1982559667 -44183934
+527179214 1295514480
+168466510 -1885774886
+-1864640620 423944844
+1110771421 -1815415331
+-932796361 -602571803
+591091466 757549049
+-1717284933 -1656288785
+447753731 -537594623
+1232114953 -1726143743
+912518935 -16835697
+-948589149 -1120733628
+-1899972725 -350868056
+257289389 -1375211114
+1133696384 2075149141
+-485446835 -1181566062
+-236566301 1363092395
+1836329265 104558336
+324524409 402768098
+1547993062 -1547264436
+-712408549 980726699
+-405036778 193968659
+513760995 -79522830
+-1424764849 477644197
+1786249360 -1297678299
+-115617203 30110687
+1257206255 -645026438
+-1281790064 2122651073
+516727663 1710719608
+-1408442994 313539517
+-207097498 1976593604
+930225585 -1960598242
+2078877779 -650972816
+619490269 -949811428
+1025738235 824950437
+534016760 -131893965
+971576238 -1726388104
+-388088651 -1377805333
+-722863805 -1791742259
+977301845 845066179
+1877620695 1277416229
+835096684 -532033862
+195545095 -498246707
+2037751494 -840905079
+1129922493 1313888044
+349899486 -78007894
+703502646 -941778118
+912210534 -813969526
+1114534678 546982105
+-716235508 1701768146
+-1983153820 771854968
+-1548341038 574240077
+1895686485 -972788834
+541179350 -1958833601
+490348339 -210124500
+-909009754 1267193889
+-1621114271 818111470
+-250003863 1926346972
+-1780619173 -2002534213
+-284141276 1415970568
+210461267 -1405490789
+-838124951 1340397896
+1682132464 506090642
+-1507577009 996826812
+-487816215 955093195
+1142638420 1369546849
+-1112519469 -1770946765
+-1798811566 -1594992831
+920460358 -1122006520
+-1391368254 -423337581
+1001384892 265819661
+-636725227 1369094538
+128631566 278597146
+2114987486 893710100
+442153463 -468888171
+900396459 -1629078366
+-2117931037 333202289
+297045891 -1296732755
+2125948616 2003593706
+1979659703 -1757859569
+-1032634626 -1773609656
+-761679777 -888601645
+983255094 387744613
+-1298429197 -1397366956
+1392930798 459727364
+1234817130 -1751664687
+222558038 -1295749754
+-366863814 -707357177
+-298432854 1050220154
+2040250099 235779551
+146355335 476164935
+-1515203596 1770385934
+-406764527 -1248386176
+1299540444 405468328
+1341037154 -1738780064
+961098682 -174693098
+-1392701123 1790620332
+22374512 2134035431
+1114477686 1153574015
+-1339495922 -622679243
+1812084065 -2146290028
+-1134799132 1224530716
+1902566265 2085505168
+-103527492 -504598100
+-527527712 1454026437
+-342886137 -1372045257
+-1584113019 -974439057
+442567720 -395614679
+-1897855609 -631893220
+-965320043 722806637
+-1248816204 -1677336509
+-320569039 1117899471
+-1180106321 480869322
+-463959939 1519842813
+1299016650 1357243782
+-1063995674 1589602091
+1695013653 677954492
+-675087485 -404070919
+-170070332 -1856987227
+-822144243 1639075177
+-872609511 -624081065
+1875217521 2044201340
+-248901635 2073777098
+40524694 873868071
+2100649595 1012247611
+-1501841302 -185692419
+-518979637 32980940
+1498562114 -1585944219
+-914608656 -1260823604
+1039737614 1301535339
+641181282 647044542
+-2003965410 -275579916
+-1355868191 -1912551297
+1029819672 -1978779081
+-396258216 -817003043
+772539121 1091297560
+1959443035 -263767710
+1435844702 835996941
+-24703833 1235082867
+874769097 -1942530329
+1307377028 1901793965
+139953704 -2117563382
+-92849202 -1678365068
+-992448193 -1805760039
+302340880 860178944
+-1614241596 -1063931300
+-1066977639 2139895351
+593585671 -1938618211
+-2078539950 -1041038331
+1602552792 -2093705757
+568909885 223019564
+979335087 1527957080
+-1410675387 -1885310343
+-1326193230 532461043
+-229271264 1031465172
+47156505 -1255536199
+1425570095 -2132317352
+-1077875409 1270408121
+-865776454 922374570
+1991832759 -2044595912
+-1894830227 -1766621388
+-787445264 -1973838009
+734894529 966476333
+-1778537855 -1919144045
+454799610 1397976468
+546659315 282019590
+1044719303 1129742944
+-779999543 -1318325742
+1075877587 -982379697
+-1386037993 2049269330
+-1998615970 -539180307
+1853010770 638258737
+-1901283408 -347728837
+1235725476 1530133294
+1098917240 1492769271
+-981018312 -1448717938
+-1256996240 583341214
+-637863974 636239050
+-1228095766 -485671168
+-147771508 -96262131
+1829009710 1567724299
+496720218 30840598
+-1865884404 -1722535048
+478364879 1635016796
+830747412 325716876
+-412913283 -37632305
+-542611919 -1139490972
+861638393 355798384
+468685018 538688934
+-1060769674 -937684640
+-126070766 1971903365
+-476758151 2064371989
+-1229723019 -2118350063
+1305761636 -1679708185
+-920625099 -1939999114
+230874750 -1191686217
+-641309641 1480591215
+-1990430288 -454665154
+2074412230 1572885389
+-1621260711 1719575665
+1679507169 2035548622
+265219331 688513909
+-368181161 1426713688
+-310945134 1830455217
+1667210413 -1686486093
+811749952 -2070334555
+50802924 1638944856
+219529671 262345690
+2022538251 1712608640
+2132515468 1454717822
+300267003 996620889
+1866569094 1795721817
+1624867395 -1057600756
+82569162 -2104923677
+1843629688 -996565009
+2056144854 2076976074
+-232560079 1486861106
+-2090667063 1202527372
+24332246 952247388
+1518189219 1379544341
+-1198138023 -351653016
+-503930472 -1868065928
+-280203377 -883149994
+1663546558 1597802531
+312446333 -1209744882
+-611714120 1005880311
+469422634 442537516
+-1028171030 -1396913669
+-711770975 -528241376
+-1169572957 -481623064
+730452078 1060671154
+227659917 1457514290
+1833027809 539519287
+1782865458 40695551
+-529374212 714992401
+1979509958 1476199433
+-1775446676 -1561786342
+1562036604 -1711847518
+472942306 1974000497
+-1448866404 -263087436
+-2067468781 1389639477
+1232646634 805504556
+1873530425 -1639813926
+-1325516315 635519148
+2018725110 1062143666
+-854010312 2095045600
+1891878485 1066682671
+-277179807 1371085871
+1615303730 1442762056
+803782616 1491071300
+-1933306305 1871890622
+202398474 -645260617
+-721941665 1925982316
+1081268714 140538093
+-1558566108 1844134146
+1869736878 -2096504653
+-2063937495 1971796924
+-177534887 -1239186303
+1246047268 1607127803
+-1291781323 783378886
+-668554191 -1477814606
+-725850787 -229966886
+67052802 -1651665846
+808870618 -818683237
+1911693195 -1332460060
+2002345655 2012155586
+1514081427 -1565104530
+-1873274794 772168079
+-776885977 -1441386414
+-141870348 -652628467
+574433228 592525481
+-1559702421 1833432685
+1722033780 -149197815
+-1732088021 1069453942
+-628535063 -1325095948
+2057810430 -2053011372
+-1249473469 -562015311
+-1869532159 1249247689
+2002213944 -719953798
+-1876148222 675182239
+1147917049 -863736680
+1086815646 987491576
+1919420283 -1571832924
+-1517832102 -976136700
+-711949544 1588008042
+1398903971 -983086925
+1805052744 -1064410670
+-1059158347 1065930884
+-1839097659 -141973712
+-743098561 1256660337
+408908223 -271842045
+1600427129 -1974392888
+-1535913866 -1263276445
+-1990968971 -121114639
+880675086 -2042481386
+1796068184 -241175483
+-1893177701 1309968130
+101966380 -1844221665
+-2022800020 -1485326845
+1767839190 -943540964
+-539712832 -485360305
+1354418076 1000524087
+1470373675 -1749596557
+-772757089 -349627418
+-195304588 -828738603
+-1719952266 653452838
+-1110380786 -1477882045
+1660701243 2006772381
+1078645198 -1871608338
+555282107 929611365
+-329620369 -406478313
+-1570085127 507414012
+1860446119 2019771029
+1497527008 -41589536
+-1743233590 -110411269
+-920557288 -2112846472
+-82983282 -593030543
+-1926094389 526998850
+-1991258778 1523976324
+-1185787071 -357842343
+373756379 395374988
+744802312 1156732634
+2088245322 -942774522
+120606 1106364195
+-1662340091 1305818783
+-320052373 1067560495
+1703925127 -966533396
+-1710584335 1240766896
+-1524060104 1722455456
+1983034994 1889277953
+1682485951 1027077607
+-430655579 1947478074
+-1616961904 -1667388894
+124508217 -237049888
+692133355 3322149
+930628187 -1908704427
+-1951099862 88112098
+-620786548 1827316483
+-132876226 -1206378649
+1881921913 -1870030952
+-457191408 -1666697365
+-855987678 855930698
+-1538791223 2086779743
+646992316 -1546996701
+-434858393 -558461769
+936858898 1484904769
+1803336533 -1951449714
+-893710953 1831759368
+-825119276 40096480
+-470892339 -1930830616
+-1672912270 -1224106662
+-873823546 -1983297149
+-1164970841 -1637368213
+1602052651 248778848
+-1188021078 -921599948
+-1578303249 -1060970529
+-398033145 750662728
+-1502938384 270364163
+1537399727 -1928538932
+1490893258 1440377564
+1680106108 1855833790
+1157739852 1132295415
+-1193261325 -34821498
+45579446 331388875
+500686048 979500533
+857116961 -1762514269
+-2136390715 492566528
+1696710365 -680482459
+1039811104 1748211680
+1407110139 -1355844278
+-1156907626 -1101740369
+1822471712 1142633986
+-1983708301 309910039
+-648200923 -1230559775
+-1687473122 -640328988
+-541518756 -990962193
+-1283802682 1290256967
+-1773872181 -1034465411
+-270535007 565902582
+38170773 316809045
+-531169032 -2084856979
+-1656860208 118804140
+2046920483 316805477
+89110254 402040709
+-1827911191 -422503943
+-1228111635 1722602703
+-1988435878 -1189945802
+-75227268 -1380553169
+260296214 -1926320021
+702759876 2053012039
+-1472571321 -683453224
+1506451206 -844829387
+-1226578653 -1569942866
+490295903 655726631
+1757805328 -475503002
+1077076343 -434080194
+1207840943 376599713
+163553541 -413163167
+1652577848 -2078586643
+-1527281497 1682882541
+-503476128 -1533130065
+-22335774 220015630
+-1463525620 1948922654
+-1387861650 512071353
+-1858383419 669792091
+-1307333312 -1576873626
+-1110381632 -1923281974
+1489164041 977966850
+107123926 456886094
+-512137248 -1668781044
+-542324725 138314661
+-572426907 -218253448
+1297446538 51343227
+2101428900 977823102
+1448701525 553608288
+-1221878978 1337362631
+504447085 -1289093998
+-1399019810 455478418
+-2089871701 -337445695
+-1382116499 603289176
+-587344309 -1714894789
+1495539687 -812345007
+654514963 1212721643
+1330869400 1026704350
+1857750584 -415344679
+1170323119 309100685
+1356540141 -532148477
+-504614927 -1322343507
+-427057639 -709238642
+1059436788 1243617941
+-1291778016 -1515088078
+598134010 1952301848
+1083822053 -1381958211
+-577220135 372721116
+-464390237 -1983214107
+356079929 -1279277408
+-1726333459 -1147057140
+1516235179 -1926000012
+595656338 -545096133
+1280441998 1716687719
+225143763 401614007
+534645117 1064291799
+816713388 -447521804
+367093078 109767123
+-453558559 239315401
+-1515963124 981856502
+-574245446 78927294
+649035281 1653875946
+1103978275 1365854411
+1079697720 524183819
+-819036358 -529129074
+-1332837594 -1984098581
+-1973712822 -1531116798
+1112271124 643307200
+-789503879 -1382632899
+341290032 2012013282
+-999753924 630098473
+892058030 -1012974523
+-783290717 -199702706
+-1223543003 1213832447
+-1195206871 1576688466
+-992651423 -405719234
+-2053833877 -1822479235
+-629518005 150383627
+1424345385 1573386051
+-2009983501 -801135400
+-82660237 22482621
+111484101 -1596064304
+-646476652 1540333441
+702823860 906411910
+1885079674 622381792
+731804146 232677863
+-2097455491 1262620407
+2012276990 2117678251
+1754419672 -1639977803
+461658547 -1195339547
+-136362838 1158636666
+942297579 1891239568
+1658354312 -1904754835
+-1023557500 2080189117
+-516492590 -328604056
+1612066833 1387815117
+-683781273 447441160
+1321632297 12544255
+-1231929822 1634184766
+-834102553 1074753420
+-2145498838 1815629840
+941143860 -960344921
+-478992685 -943383663
+-2119528593 1444986236
+100729823 1742503565
+1145845180 -243061624
+360121902 1720393457
+1878602594 4458979
+-1089931369 -1199136631
+-952420434 81590894
+1721261648 -448453634
+-1824442441 397153516
+259294889 982534957
+-383689102 389358745
+688954799 378533341
+-1837703963 -2044645519
+-71575683 1418424089
+-1868879980 486523610
+-1905942553 -131288777
+146581621 -203344556
+1264728605 -1121757858
+-1094313058 -245354349
+819800004 1098007645
+2039612049 2071436122
+-617566842 1816660287
+221014467 -1536905806
+433530003 -822014869
+-811266996 38633702
+183700592 1115043259
+415281035 -115851121
+404120551 -1109272981
+1218513585 -423745477
+2092228062 256284317
+-1558751814 -1719247935
+710681928 -860921801
+-102633208 1707619453
+-919074418 1236705144
+1044383795 -1939801653
+945556268 -921125085
+1286818827 -207943952
+1306422946 -1198972372
+-1070597006 -319494174
+529664312 -768176207
+-2076490409 725651068
+-1110707428 444944454
+-229983347 756062602
+-291663413 -168914749
+-1265817305 -1680790041
+-1512484106 742975815
+1527876230 328377946
+-404379589 -528598985
+1370119933 969100428
+-1407508406 -196010456
+1000872927 -1121578119
+-223772357 -856391057
+-129146648 -146516436
+-452923106 1358238388
+38348228 153769595
+-1270932538 -1150610159
+214264389 933057181
+1832682888 568692499
+280801541 -1407810559
+1418068710 -706879532
+1932445410 -1765486044
+-1433478461 2074128238
+2131449258 -1013388923
+1540894445 -2031030020
+-2108689601 -731716680
+1879263342 1767729840
+740806054 -1872251025
+955335973 1141923349
+1604836730 732564493
+-411151062 1020658255
+1498111077 1166256179
+-801901555 -1851468789
+1763158387 -948309824
+1532786539 1788220229
+416005781 -1931502081
+-1578964211 401565388
+-450370370 1504776328
+1591643302 1293474608
+57087678 -1201592554
+100146696 305289192
+5196750 1868910565
+-305939714 -2101435663
+60794352 -2140836164
+58692915 -2079322276
+1683714322 1695529645
+-1013770155 -1532053347
+-2042992794 722950585
+1370533167 1305914704
+60640013 1156223085
+1055984998 1360276890
+367901995 2042112700
+908381827 1571146766
+-1070917368 -298097114
+426912336 -1931102295
+-317050145 213289127
+-211024294 1067901432
+1594927761 107489781
+-581372766 677141886
+1850834022 -642685567
+367267138 1766469915
+-1696001652 -2007337036
+668397274 1353419974
+772475764 44699372
+-1248065726 426576247
+536217169 1932035045
+1220242183 784224943
+1792758820 -86303200
+1209052295 -32877849
+695301040 734537954
+-1466111752 -470291895
+1580174206 -410620181
+-928874273 337746970
+-258186339 -772474458
+1250610931 1291883925
+1385348791 -1329427878
+-1158476568 887385094
+1986041232 1591489164
+660284742 28728757
+317600913 2114929783
+147179290 355291062
+1370806384 -797050565
+1639869926 -984816204
+1004299398 -1817999802
+709422366 -551058461
+556867383 -1699707738
+154071859 399305658
+-558047040 -1906033221
+-1818912914 1183106823
+265748500 1668156753
+1249114101 686008352
+-61664891 1388456347
+-783818178 -1386254010
+2031014878 -1797158786
+-1605100242 1542635697
+-1056760457 1896193156
+-1026912871 2032757402
+100908514 -1309130114
+-871433416 683415915
+1221552369 1717492285
+178381090 1320729238
+-1709374389 1216428113
+-125095648 51418846
+1823096654 399018221
+364835351 -704557769
+1159607956 -1761965694
+140685943 -929803430
+1750968695 -222813391
+-1994111703 103300609
+-1543933170 -2112816435
+-1952578248 642285516
+1046618408 -927757687
+-207510742 266987516
+-1845759182 -977984729
+23555760 -1556674676
+-980936744 383465635
+922287259 -835911515
+1730716431 -1546743605
+-422022765 1543665030
+1756200156 2000825587
+-820964095 -737702445
+1137055578 -181111269
+552975788 -1379652906
+-1237053575 -1515996293
+143313975 1869743975
+-1253983956 503721724
+-424318180 -2054913313
+1764699038 -1537683911
+-1394613766 -2124828493
+-632750765 802229624
+-1809323984 -989418519
+-833227833 327044392
+-772304030 -373489954
+-1548494392 204290869
+-270862256 1911113220
+-451008662 -1645875630
+-1529676414 -442977036
+1464354130 631690440
+-464245395 -1542349141
+1121511457 493543798
+-1713819422 -1368061618
+-52048636 1824737098
+784826023 284034070
+-2126863179 661333461
+2092341403 1927447945
+-1833241952 -667823448
+1036008933 -175500135
+2045639224 556319100
+1385143733 2111016993
+267258421 1154431601
+-21629263 -374181615
+1947163131 -318975231
+-946715036 1328753453
+-1780787663 -490202258
+-530164896 615153978
+-1478381754 301626801
+-1617376580 360675697
+673908162 -2106389230
+1993114083 258229197
+2035338137 -1827285071
+1388307823 -932307106
+16859521 178260160
+-333967834 2008070733
+-449778515 259621938
+-744733328 -779111748
+18361184 83465068
+-940679045 -727818254
+1341904419 -1758354788
+-358871215 52103792
+2035056418 1274518839
+-170674212 419426020
+1768112150 -212442022
+-1989446493 -258980031
+1899645387 786882479
+-1846793473 -1918693916
+220264845 1786322236
+-483064526 1745617268
+317157319 -354514878
+-325961138 1922878527
+-1520436189 -531115811
+-1979044260 -1964186340
+-147052085 997634834
+-1502970493 -1848186412
+-550339805 -75310919
+-1584431526 1224365679
+1108516970 -1228552040
+1562659096 -1562756141
+2123521779 1877425581
+-1369747622 1302191583
+41753 -266448631
+-1083318294 -72500673
+-554111228 -1525363781
+-2078013096 -392028908
+2056256521 1092211357
+460697916 -62818493
+-951555883 -805932014
+1869419744 -2134618893
+3357469 -266455382
+-200745074 -727314079
+1645636307 756941195
+-781965764 -916247870
+-937353785 -113647692
+-1294355124 1785565366
+-358115023 2041545713
+414856731 599411496
+1763139380 -1709019826
+-1451396622 -2119575016
+-845767446 -520690099
+-836435450 976318685
+331945717 -331281258
+-216975396 -1836190844
+1438401820 1150240261
+385831234 67049898
+1162998704 -74538416
+-1567056264 -1565156895
+-917306453 -1962260568
+500559685 1293617597
+-1178541490 1925251411
+2133030260 1388683417
+415657706 1285174037
+1777477176 1824856783
+462261728 -1902632065
+-109009777 -1056428874
+-117981747 1402570557
+-588766975 216588038
+-1423792350 -1206406844
+-1545054804 -356155101
+-1856078235 -1716928915
+1212090731 1692195254
+-1678323453 -356135048
+1292046055 1644994642
+1373602728 1848156167
+-477564820 -1712413486
+2054564316 -1666191713
+13824239 -247853785
+-1412311328 534284096
+914993235 -1808445457
+1237375560 2129357517
+1854458620 2135352118
+-1270756632 980411376
+2107878899 532414465
+1365597607 -1570642332
+300952820 586416901
+-939530169 -831581401
+1801498470 364754526
+-1770844473 -1093062297
+1534503920 1084510958
+-1867430263 1167997129
+744585398 316824746
+-297849073 -167545628
+270459816 1200505756
+-1341745190 1264962437
+-1223687598 -896248355
+856115047 -1697253
+-1506814398 397258524
+-142052144 -1169624027
+-637287369 774725688
+896327046 609801822
+-1332426432 1505324544
+-1051287845 1530345727
+353775403 -254444913
+160099211 -702458552
+1323416540 -1493896018
+-689028847 929460483
+1996023034 -1340298052
+763311321 -1640849903
+-1417360047 -768840960
+1714534968 -1219888223
+-974627943 224754004
+647058213 -1508599543
+699122434 -404819089
+1916976924 -1355166704
+-91425913 -701049214
+-317021880 -1535264391
+1732480737 -707675541
+1431206406 460836484
+1455329326 610580735
+-1716384592 -751363024
+-1705062628 -1375364201
+-1691457476 -531045724
+660072343 2047486764
+120142480 -1365977952
+1063479274 -1802962226
+1667257016 403939225
+-1018348105 602813065
+1459553093 1744251460
+34859580 891052242
+664253192 28429655
+671480666 -1232649344
+-1893393164 1126639636
+-1780657214 357916156
+503620561 -1835864841
+1353043697 -55694292
+112377646 -143656599
+1876032517 -92258336
+1436235637 -1384589388
+1889784789 -28020575
+-510057659 315765154
+-1465917396 1648144508
+-252959873 -934218883
+1809007761 -1267519218
+1369082545 -581620192
+-838323243 642017783
+-1871241277 1327800791
+-1419296125 1261859279
+1396462655 -1786093357
+785256261 -44547164
+444055023 -1324354049
+-235516964 1356499810
+-1016907019 -13280420
+1616127513 1065545357
+-1690609716 -512300865
+-1400517954 -887614539
+-72917133 91939980
+1230026877 -2064045890
+-1904250933 2049154573
+-2053421858 -203416478
+1032759033 -1913971770
+-1246549312 -244682045
+-257827208 1977089721
+-1618411315 438525125
+-1514509472 205271919
+1200318052 1419752883
+113504615 198460972
+2130973062 -185803019
+236600350 1150804286
+1362778966 1253040685
+352864992 -399570959
+-605926767 1864811404
+386746077 -1918943043
+488526784 1543424212
+855036565 -360117699
+1618563495 855318833
+1081269228 788879285
+-1780758398 -2045918467
+271978661 -1263707584
+-690502488 1330712818
+757652417 2033761218
+1370012844 1072195719
+895406948 1728671761
+2143545258 1187282755
+-1868716397 1832856337
+1132038754 1308867052
+1778010078 187501157
+1001313931 246481000
+-1770066348 -267671214
+-1776296994 2044263588
+1640360936 948888066
+1426126962 -922572762
+-676406682 -708348927
+-749079866 296386209
+-761756458 288589609
+-1966166298 -1982253792
+827822953 1788021112
+-770807870 -943711732
+-195011082 2128512201
+1550174916 -1170128342
+916869163 -1382493303
+-929009397 -1504064272
+365424414 282367353
+1080816070 2014683605
+454433280 -127010728
+1972427024 -1226313455
+-1573086645 -75696011
+-784862655 -2126079294
+-623236802 1663180888
+1241160526 1337183631
+208077758 331081255
+-758067957 1027042709
+1471690727 245558757
+-1878320059 840962860
+-507963504 296164504
+1628557447 -1963946144
+1778021917 672414268
+-2112122038 2129501920
+1646312354 -1673743559
+-549378987 2074870679
+-394174291 -400091239
+1833837089 2003006686
+799672252 -296134930
+-1734199727 943045894
+-2143406531 1576732978
+-1357671021 -1348569323
+1661977418 456624926
+1983351381 -1419589111
+1016453846 1080526677
+-1431068791 -1952069330
+1365973696 371246042
+602856123 -1168898620
+172340373 1983053580
+1225914702 1955787300
+1151330592 2085911755
+-784602833 -1596775027
+-1470275785 2067302920
+-1117602804 643231486
+-2046037223 -1857134937
+2012418181 1714647512
+-668205550 1936078081
+-709518030 1029693075
+814692363 -242135079
+1837687149 -1320445370
+-1862892733 -359382774
+-2084221291 -1096121441
+738431169 899131687
+1004735056 1032019447
+-1450613486 -1093434575
+-1627492642 -807111136
+1458307115 1255216729
+-89168694 1843866258
+982959439 -2058705294
+1124796244 -276072343
+1362438158 -1173315453
+366567504 1363967544
+-1458683310 -893157731
+-1264615752 -481907404
+-1739470489 -194831629
+-55821409 -1022079950
+452390845 -22596092
+631698013 -290639966
+-466689028 -582723561
+2024925330 1278389455
+707104337 -1059323463
+2050783805 -1350840350
+2020637398 584485336
+143705475 -1058525481
+-1980994756 -74682296
+1041352983 -125258452
+-887096938 1007006970
+-1985020932 1451212960
+912973059 158056441
+798486261 245695624
+-828736693 1176146952
+1270330525 -919253439
+1334138191 -1671410698
+355976026 2091414608
+612762049 -1838608042
+-1580692869 -1110319660
+-1589115531 -1889367929
+-252954909 1226891386
+2145056186 1556524047
+1050540890 -2093065523
+1056346113 -1604329822
+-1673553378 96756623
+1054807382 -1961836532
+-399209922 -610379427
+-1689300326 -413304771
+-2108637788 -244919809
+-134071448 1366802034
+1100992848 -1346750714
+947096238 -2140794255
+1679329335 320056772
+1084955385 460914770
+1428759255 -2130105809
+532601985 -69014304
+506085422 -1949499654
+-1630636701 845704500
+-28090263 895367792
+-1818025379 334763486
+1007522227 770179664
+-1451277475 -1524595885
+34702837 1935036258
+-1474100472 -1476743157
+-2124619057 429040348
+1824924638 -1532010062
+-1727656461 -55294146
+90367699 -1578878823
+-1531073736 -1477289953
+-318728974 1461957101
+44342466 -1630555975
+-1383886320 2099615932
+1081183461 -813137777
+-685282916 988287024
+-898996905 964629648
+1629045111 -1737517737
+969779763 -2053239022
+314603525 1932240309
+49089212 -177994041
+435931188 -949436650
+287919034 2049270758
+43954079 928921301
+-1648275000 1473075628
+1695390118 -734726993
+-1533105326 768775642
+-520946698 865425111
+-10263410 966085145
+-1111585444 -1790763368
+1419382460 384749747
+1028707388 -1166439644
+-423835505 -1903400778
+-766955049 1187535362
+1047628773 -318504129
+-1223618183 817628850
+2043906088 -717934055
+-1876343211 1276841267
+38051082 466352702
+218205993 298838065
+-1016628669 1832940647
+1853688984 -1063011176
+77500676 1200505906
+-561581170 -1438704436
+1852128002 -993992913
+727936708 -1317787067
+-469225360 1272983912
+1516924332 1293277223
+-1454990385 -812660872
+1435271952 119442015
+1865044947 1344665891
+-593163119 1125498245
+147404529 797712560
+108896820 1013024622
+148924488 2096495502
+978457386 1612087336
+663725475 -1704787490
+1356742334 573413296
+735151615 1705434770
+-1583482491 966426641
+-83814433 -1617709164
+-714226310 -597240025
+-759803190 -870924485
+-1071714374 -2088390521
+-939851953 257539717
+378075916 -541689527
+1834450340 -141346882
+349462534 -295809418
+-1367587657 -1516970668
+-376560716 694146263
+1648360258 1423797584
+983443647 -1304197353
+-407181057 -2066831905
+-530462270 1335004942
+147421592 -982779657
+-392046059 -1026243421
+1890776410 261258322
+53246881 1655533547
+1971950043 -1077799216
+375171380 -2062261718
+-1456427666 -1825341837
+275200660 -1103920384
+-1555867075 1100839097
+908832482 -1977948690
+660682655 -199102426
+-1042221970 -1537482021
+199248550 249534536
+-1125426346 404268753
+1011717231 1077490435
+784992230 547166131
+-391646312 -681932686
+-1780931517 -2115849826
+1893268157 1146122728
+-1982738237 -302406568
+-693526343 241475906
+-853490901 401724073
+1072392 345563996
+728678098 -994040640
+-1981422354 -770638163
+1238718878 114461690
+-1732697023 -39382612
+-615362764 1185104644
+917852852 1563351824
+-60750939 688473893
+-1178473633 -1606790545
+796559626 -515783824
+-1440221225 1797341726
+-1931237122 -2132294845
+38127149 -1144788880
+-1015915487 490424894
+570892062 1841003856
+-140931227 -1107911614
+-935607721 -520437111
+-1937867499 1806670765
+893799048 -2075884502
+1212042748 -807766856
+-974211188 -1279280112
+-1332751599 1917474001
+-1160404478 1504980408
+-751799651 -1626093314
+1473838547 739580128
+-1381060811 526378740
+1313853900 -1325882842
+-1305678958 -1757705624
+-791409447 -1007819008
+-1599660029 274526593
+104399489 959678458
+895736203 1939569348
+-1561501992 467059566
+1226836024 1266148040
+-1686156522 1370413817
+619560786 -518873468
+1928663995 1285967858
+831056234 1880105478
+-1358705195 -1542715205
+1486687355 -1032283953
+-2041644318 433829162
+-633400497 -1884361270
+864704075 -1616405956
+1378191852 1026773643
+753112111 1199138281
+-732074000 -1226002511
+-1313091887 -2124311788
+636860648 -898928604
+-1758498925 -774562365
+-254097941 1274052751
+-1793275322 -563645196
+1416040000 1596279516
+202737265 798115992
+-590351497 -1061626749
+7690217 -928567050
+846889239 672528489
+-2063681687 513240733
+-553889345 80383597
+881328102 1778406181
+-1951680850 -1033641088
+1282526276 -686588407
+-2078985227 -1079775279
+707008620 -63936970
+-561287883 -160590780
+1403733627 1111990934
+560246179 -170085614
+-1696987747 709959134
+975045825 -789128451
+-941111687 -1860671775
+867899302 1742746429
+2105272498 925914726
+-1793917501 -1258294720
+1169837293 -1812318140
+1382517469 -477479745
+96081825 527867518
+-877302572 -63980651
+-685062404 109371406
+-1991260109 -1393148483
+-1215258984 -1157022773
+-704359079 -1900254506
+1603012539 -988098948
+-962878992 1984551977
+-1038307881 2074335396
+2130686590 -1702463821
+1068238294 -311482972
+-361871618 1290324695
+-140655268 39867934
+1824401362 1976774020
+-1175647362 88458054
+-1358983140 683995299
+-1874578847 950048998
+632489993 247697542
+-151182571 -813621396
+-237064686 860338964
+1054989361 -451365583
+807693685 -230216218
+280764501 93373762
+940485603 314566254
+801251249 -1330019277
+-698962823 -665539499
+-939096977 1408208512
+-28805803 -1134746553
+-350425450 1009277061
+-256484809 -1306868319
+-1960207202 -871992760
+179911889 -1595639767
+1821998530 -1666497605
+1617975768 -1043458414
+1085222005 721610810
+-66418923 -405279425
+920688040 1689366435
+893845452 1978543691
+-832923089 1647078006
+1637017238 -368514265
+-1445432901 -2043175821
+1111496031 -1698145397
+1841929935 -194234191
+684863620 808882810
+-261264220 684550765
+1249873116 655217460
+-718122241 299299491
+-1637893871 -617313064
+-1806414743 -1846928507
+-2000710950 369441497
+-481543796 -73199709
+-322904062 -1860244893
+1106772239 2017406504
+326543497 892349388
+1327179229 -1446347524
+-1375412520 -974295871
+1289326419 -824866880
+55428324 -167552079
+-575380239 -2019646036
+727428237 -807024479
+884812221 1861746074
+1027145878 231445006
+1945805276 -606860821
+-709482337 -1850110862
+-25175687 1227051252
+174393606 857550765
+940436503 -1275073409
+558184913 -1028988243
+1556927025 1244488300
+496940433 2065790818
+-2138498827 -2072165387
+328609064 630856094
+-2067753535 -1677964789
+1578864698 1034931915
+1141205810 7977276
+1746680014 -728212884
+-171277472 1327770370
+-1201712006 -130265366
+-724836842 422853576
+-1725816653 1522861091
+-401571283 -1695617290
+1765343580 1249011584
+-1044973093 269593636
+-1650340086 -985247831
+542631360 -2104301481
+1695641552 1595189693
+-101284238 1744073502
+684059089 282517599
+-2126548317 -1546741305
+1356023014 257771138
+-1068245006 86652130
+164071526 -780191598
+-859581527 -728916049
+-731473973 1671486060
+-534564949 1157333442
+-528018284 756131344
+178424469 1882510572
+-1665544526 -324671564
+-42750395 61506790
+454987712 818102119
+1907265885 -1748211405
+1491454076 -36644990
+-1587902562 -1152761659
+-2080206848 -2125424874
+-879296529 -516736956
+-81406321 324019305
+-2061636507 -1886975358
+485068989 184696528
+864510993 -622645483
+-935714499 1600309799
+493832903 -2060420639
+853289236 1559145777
+-146608092 1330519167
+811162687 -584196666
+1420037077 2105800732
+-682612901 2069715817
+-598087648 -668060652
+112582947 1474783677
+975139265 -919597814
+1752205787 2087525569
+1938251695 174763708
+-565961268 -1983852956
+2102069326 -1449185860
+-1856011933 -1267481852
+-679256442 1463291277
+1500307369 1757808052
+-441284830 -1362239271
+116789790 -1655916386
+-741672422 -1087241889
+315845131 364229261
+-24513999 -392384218
+-989496830 -2131543026
+-211363249 -497029050
+-1097289219 -749420722
+1753194524 750879893
+-1671175662 -1139016979
+-1624464860 2133524170
+-1741003127 2122044753
+2015758946 -588951637
+444998820 422391742
+-306955749 -293377009
+-671063033 -360571825
+-581561719 -1379744912
+179866584 87120960
+-357025806 -1328224693
+-1140715811 -1087233383
+-1469382695 1735678416
+1002191284 1410165777
+-2134349347 -813527488
+-827747803 -1030368788
+1185791981 -1330104065
+740558921 -471424830
+-1078794135 -1437798600
+901771985 -1510472634
+-2027437445 1303921488
+-648030764 -2013301122
+1309598614 1607382569
+-1817755630 1450633933
+2040128159 1274891364
+-1593004197 -1604101950
+-1852901169 1208008604
+1112935423 1039013773
+-1195852585 -827296516
+1094028346 16177818
+2012408768 -1128908086
+-1233928519 -734219486
+1610706561 -1125033382
+-2030183897 -394353353
+-983051191 599125201
+-1259994029 -558410781
+-1979569717 686909083
+-460888131 17250960
+-691646921 1573487773
+-1115329948 -1127007434
+431399040 -1374890055
+656278570 1911971619
+-728834357 -1433505530
+-430488370 -508766742
+1220314681 1772306513
+-796412655 409595395
+268885678 -369625719
+-1933633655 -1878084219
+-279591904 -1678672311
+1323733067 -1147034713
+1208356419 -794066055
+1271037088 -2097031691
+224716843 -1163343023
+1301151878 -405745993
+-876741115 -318871059
+855051151 -1917018062
+-1572868407 -512040829
+-835886430 -1211054436
+885218281 -2008099532
+-1577424635 -696003999
+1769911163 2027440504
+-1994027282 -992947782
+1302368408 484464972
+-251779183 195427413
+1107152870 -2099494105
+729028600 1727255487
+972250018 -371417937
+-941314200 -689924581
+-492610140 826641619
+-1828402878 1147019595
+1549384808 918581360
+-1646462455 2024314283
+1590215198 1365893215
+1322311522 967533496
+-815011902 61436422
+1393626729 814152584
+54872865 1812889341
+1444926227 787823106
+286839024 -1898070596
+-1004431780 -834640089
+1496982008 1569801548
+1187745713 633579172
+-379258408 -739734035
+-1814546058 950484817
+-921346026 -1283558171
+1394532314 -1756825691
+-1444653174 1602608887
+1230939001 -2055781700
+-1357756481 195203037
+417344641 669004059
+1620689252 207728399
+-1538021206 -1925802733
+-105755746 -1404319239
+-174890161 520824977
+-1758768503 -265594630
+-485214000 2136494174
+-1380184833 1281351859
+831953643 1414338436
+2006564923 -1802937537
+1347233466 707587849
+-43016701 -1167710954
+-2007021552 -1896591455
+-696343904 423114434
+1471046937 520607336
+-1979165316 -1871997012
+-526757541 209882796
+1441764165 1499920591
+1187437275 -1470592704
+-1344449009 -263208171
+1239085193 -1797971094
+-538055145 -1324157927
+-1456150260 -856727814
+1640027601 1706619743
+-1899094600 -99816730
+1413350209 1297528693
+-502557411 1308842033
+-229957934 -382447116
+-168830907 1573440790
+837667446 -1123363642
+1025708770 -1533922953
+-2027354370 -605729925
+1891412963 132024014
+1402782394 -1194458827
+-208484730 -115492631
+902697650 1646550788
+2001391919 826741257
+1159122091 -1229465385
+434966845 479250128
+547448122 345240324
+-1529196498 -312000016
+954358245 -75370715
+-1784675584 -327938905
+158967169 414294094
+-694482987 1509802179
+1627316570 1638256650
+652404136 473461994
+1517175813 1185329443
+-1168110462 -2019804230
+1742996651 558525502
+2128992586 1556024704
+-651004876 -1582694012
+809229872 1326154296
+404089024 418109226
+241396766 -421262540
+2103530328 -700215012
+54643117 -2048284762
+2100966603 131354015
+-477917790 -596202225
+-934526476 78879989
+-1456022833 -587022188
+569850165 -1578680794
+-1277715717 978325879
+600028941 -1283506060
+1129804078 -1390765461
+800993059 1244410819
+-295455988 -72791368
+13772591 -48864139
+863783681 866864646
+1461050195 725126522
+-1738920391 855858573
+1706425164 1448003452
+-805092704 -221828121
+1935539385 1133660212
+1102833124 -2046261652
+-318329347 -329042567
+1944842458 89651733
+1215906481 531327437
+-39237370 -455845673
+371503000 -2112812597
+301870105 -1769825613
+898489298 -1551976420
+834041132 -1397168585
+1086050202 775045658
+-531571721 -532016192
+-2094386479 2129136599
+-908618291 -200276548
+1802810173 -949554091
+-849203261 -624823410
+-1448784408 1504217107
+1990649132 -1433187487
+-2067284226 1207525983
+-2094290903 -1706146015
+-1219587364 -2067980919
+-1140439135 -1180985036
+-1842561249 1953766856
+1313333572 -344514416
+1963531105 -684884035
+624707604 -744306514
+-1125003409 -1707938278
+-387844057 1262648564
+-1151909400 192418365
+-693591955 855583691
+1327122694 -1114366688
+955504139 1954801895
+-1542990713 -1005288515
+718337074 1878502112
+1746605143 -1332854319
+-65384043 -1612052124
+-1970470558 -1089369753
+364257889 670464691
+1262268490 -1705089024
+-1884249811 1718308737
+-540456055 550486581
+1440772283 -1066161175
+-2030589666 -2079550434
+-1424077519 1837622706
+-1825657817 -753115807
+-68350725 -284732447
+-734538672 639609709
+-794197277 1632526584
+1253463809 -108005105
+-878842359 1855887516
+978577469 632766991
+-2029052252 2000286878
+-679484201 822005631
+-217001975 -1680496298
+739450806 1688283683
+1209721405 651625197
+-458282526 -1840985214
+-1820381498 -1164316081
+-2027903733 1737373336
+985456386 -49728916
+-1628723110 1317592053
+1905999819 -645361513
+674536635 475529182
+-1388167461 -822765662
+-844457116 -1693131276
+1855443237 1506112848
+-1446988932 -216158143
+681638594 -1365017328
+610600506 -1359245910
+1710695696 590062659
+1007091266 -1533350103
+-845857758 1156125749
+800755990 -159431288
+1523375003 603211559
+-881935759 1942684029
+1070670070 208895837
+1589545713 -1779950997
+-258448759 -1023280321
+571647985 164128589
+1727847436 1314894966
+-886006277 -2104518220
+1352771508 -1109816159
+-168416008 -298130138
+-1554545947 2063093289
+2061375846 857640710
+-1979242392 1229633493
+2012437610 538277114
+702453926 614320328
+1675650625 1483165588
+-2041289135 1604361059
+1511319288 415482343
+2117515086 -130471937
+-271725583 -720849341
+-1339777855 1539523751
+-1798996246 521566206
+183672312 1096493058
+-301981917 -368250946
+869409007 2032549015
+-1167496279 79596949
+1407473886 787536881
+-1296884603 755282112
+187786093 -127883298
+73874167 -792917039
+-832793720 -681390310
+-509438960 -1277505052
+1203337001 1187737156
+-845236814 1122545068
+1488319833 1136137904
+1212398950 -1634007663
+-1125254948 1475090556
+1087922940 -836143626
+-1136973664 -1604607127
+-1630446558 844688376
+991242196 -128421196
+1173228205 -1362625672
+-1430494934 -1985385852
+1194908806 -282731326
+275211243 -1060007370
+-245459470 285764270
+-1400138584 1015699071
+922789003 -2105526228
+1821404256 971940754
+-2039522007 -1524887732
+-1708645166 434000315
+-1545034502 -1710852750
+-1322503002 -962251467
+48030853 1196308787
+1133344222 -1815788638
+1004892394 -1773749922
+-2116303865 -657955891
+-1763961488 -454026121
+1699788750 -1953226959
+-1783847092 917471686
+-215551399 604867942
+2113517746 -588737808
+-270960183 1463189118
+681727342 -1998248501
+-1532477331 113122379
+-83450982 1823019170
+-953336191 -1635975498
+1022688074 1149640206
+-1652422714 -1242375761
+-1318289011 1252791092
+358235268 82497991
+-948648616 1835366897
+1910415113 1082825444
+-764894238 1880111075
+1010842772 174414339
+-1724400745 -1389871564
+286141392 -656458370
+-1905128531 -991927944
+371967217 -1192519800
+-612677431 -2058059241
+-947023009 362127010
+-330515307 732269089
+-2074237423 1567146690
+-1766034779 -1412919154
+187168429 523823308
+1213140917 1866589602
+555440809 -202155194
+-1224018025 -1123689434
+289935123 -1731949323
+-902499161 176710760
+-1000759443 -1035162867
+-1142664373 -1693284188
+482655180 -857869867
+-226041399 -1945985427
+54999782 1398481638
+-79629689 -16097882
+-835886513 1886340290
+1707463677 -1097383436
+-163455056 -2129318779
+1756696891 -141344012
+1988901669 -1733386562
+1007185112 -2126969745
+1481980941 -478615234
+104909461 -173834794
+644499767 -1996824820
+-2041008881 74594407
+225248489 656094109
+1420806814 -2027392526
+1042015777 -1705667914
+776313855 588281900
+1622586160 -812211865
+1836393036 606358139
+996911218 107081221
+-109774375 -1390384082
+1229324778 -1536087876
+1291406287 -1367010776
+-1169879784 -2132478127
+1695515014 1612958808
+1806725237 -1445492492
+10736844 1317456182
+1846304683 -402400580
+617623935 -1722934953
+1196734215 1186050551
+-1663453651 -2073629261
+-1179548943 -76833871
+769206701 -2136991816
+-1125564966 -1548901739
+-802999593 -1951821037
+1638898455 1093421003
+1718054441 -616947272
+1244173664 1921528362
+-178722968 740211092
+-330448059 -1591006485
+-1154820891 -1616543044
+-501659803 1770466271
+-254779812 -1312559287
+-829773738 -501481034
+1169058616 -1751383258
+-1039711336 1580907020
+98156534 -1291857530
+-466797800 1699971825
+-783361510 1410319929
+1885640023 -1519137315
+1615282307 -1381449603
+-389739349 -1452640860
+-366467239 -1728666702
+-1996585554 299174559
+-801303888 2133118850
+-226891255 -1876522839
+-1106848012 -1101693232
+1792529755 507923998
+1984106195 1057446192
+-1803510325 -1714794155
+405633875 -1358425648
+2144883458 -1213160280
+38070996 -1366694259
+-966030426 701457449
+-1862966750 1550273123
+-1892092305 1248546806
+-1122718293 1053428657
+-967463820 -1269183235
+-1696522583 -1330619482
+1043330713 618862515
+37114564 1056557496
+1380614055 1622122198
+-94353743 -244171347
+272565282 -176836601
+-1600248251 879871358
+297479570 -1622684942
+-282813446 -338142894
+1922804272 -1759638744
+618559309 -380082993
+1015390328 -1060040558
+721491583 -2018815756
+902944979 313904518
+-928313938 2000690098
+-1744860860 405670056
+875908856 282275065
+-825025186 -456359369
+127657569 394386202
+-244890140 571109315
+1617863535 -616538232
+1193853663 -1209951240
+1179621262 432734869
+1513363218 455337464
+-38149179 -126810988
+280311812 2081081541
+1883139718 -345649676
+514374032 1590011131
+-992838382 1965873236
+-1066943125 681851071
+1199361734 -1586057376
+12813651 172566764
+1718556172 -1391402066
+-196947227 -225216156
+413375010 -1371649316
+-2097164850 2133694043
+1120379333 -1174461004
+-1368659132 1161005005
+-1914336504 -205529352
+1639137352 -984632154
+1747880938 812809315
+-1645668718 1098170624
+-1490032324 191996877
+-1700891254 -293772947
+-1914470904 -532677506
+601652993 -371897094
+-1613028551 -1969810522
+-1894423896 1613137720
+893035675 1596667582
+143957154 -1920583338
+-802715991 1787202185
+-1816150636 -747687166
+1922025023 1248851161
+-1871207194 867448094
+-1433210630 -2132008749
+1683200298 -1219634198
+-779282006 1803730642
+674534923 1960747717
+1345082545 -1927272464
+-455094749 -284867980
+-443508198 -1459384496
+-1850448352 -1846790690
+731923637 -141091623
+1967375963 1086168132
+-463194738 1588018313
+922368384 -1517227251
+554627530 -187489983
+-1875676515 2073543850
+784895150 361570206
+55522084 -1695135657
+-1556759495 1635862266
+-1034470211 2132720750
+940335173 -874569552
+-2099212997 -1995056955
+-1067912063 -516069885
+506375039 196386799
+-1895347563 1736962917
+1095941725 -291953277
+-322497335 258170420
+-1419288679 -828209568
+1486212581 -1847043818
+-449461395 1807554945
+-1926452498 1675967781
+931818267 880060011
+223171751 -1334191621
+1133783309 620237833
+961357550 205533203
+-873135729 1896021234
+87917373 913140247
+-1990676665 -42943093
+871438667 -898564519
+973902685 686705922
+-440023154 -965592830
+332522759 1756104674
+-185754243 1060843211
+1350766851 -1913657906
+-822346640 235748577
+-1683937969 854325863
+-2066541720 1549774038
+1811716924 -1422121798
+1890323459 -1101479838
+-2137397847 -1169315458
+1963139575 -23432852
+-1628187431 710401343
+-1244579250 664630723
+-1276090935 -1768007832
+-565458824 -1463452186
+668310338 677641533
+-1983573387 1735047028
+-1319638740 741724753
+-1629037866 -7577144
+-2060598807 -997785433
+1147887456 188316143
+230950172 747631250
+-1250393787 -1669493621
+1800845616 950602849
+1730805063 -912652173
+-799130329 794633290
+-403776375 1881713487
+-87350446 -1524110406
+-1495987376 -649689953
+1405470514 2065744781
+-365624198 754643425
+9455506 -2097213854
+1410365217 -2049358581
+730078930 -697518149
+1205721695 -547605113
+-40300967 -259707400
+567682671 -224168352
+739995716 -2119360941
+1569446726 -1914716174
+-882112818 -1175340437
+-1340154127 -1306930001
+182957140 -895938058
+1116979196 -442589577
+1579188981 1570751451
+-1982181908 561719383
+-75774032 -506884512
+-1034265611 366076363
+46897487 -1914248606
+915674669 -780790485
+-473793419 1383323764
+-1031740313 -139561511
+726589845 -1581253904
+245588822 -280220916
+606826849 2090347177
+408931774 -1447184475
+-1022134711 199181269
+-1794255970 -932304631
+1778413655 1300550505
+-225412115 -1505769531
+-1858587413 1461650474
+-290384196 52006883
+979619908 -1845396729
+2064105535 490849638
+-1305177946 -744890645
+1691412346 1612951669
+-700108390 1091336040
+193429467 135142514
+-1444737643 1008637699
+1056995735 -2112833295
+-239576163 460205551
+2032938655 -391451440
+-109714912 1563648167
+-1016801785 -162845560
+1769514160 1564606160
+300355517 1786562694
+-1296988525 790774177
+-859352901 -1323483759
+1290330354 -712231582
+-576624685 -1666644479
+-772139161 1664655705
+653839506 -569516491
+-667957612 -923759661
+-1832955096 -334192948
+1091956806 1355846704
+-434736540 1617762698
+1491911478 238184966
+-927936059 -581239816
+-865861286 -1202592093
+-1443703690 -1352660858
+-1115984455 -534241181
+-409069293 -1495090964
+854291810 410502339
+-1147507849 1529919070
+-1752723225 -1379217649
+-254785567 1498995887
+8437155 -178982873
+1563752255 257790013
+-604387638 1134523569
+625286315 -1228508304
+-1119294737 1582863692
+-1206952318 580766764
+1109211320 -1146874172
+1686970947 -1662905759
+-1389744916 -587160713
+1799500154 488496891
+280426165 -1296081090
+-419241629 1204110011
+495260898 470509615
+704765711 200090789
+-984839417 132892040
+278009489 -1334156944
+-1300177808 -2021875784
+335163650 525897887
+105415106 1256628934
+-2037221731 295185389
+-2027250059 8223923
+-1206686364 1391114013
+1007854171 -71086940
+1558304556 1690065344
+-1823736780 -650729737
+-713315078 1532304329
+315532950 1639555884
+392041818 1703844239
+-2019438089 -444711035
+-17525581 682687269
+2027165698 -322540560
+-502453520 425174010
+1713688742 1479876549
+-34198107 874062481
+-921410281 -872829775
+1341137926 230821759
+330017109 812200832
+-1904679729 825529389
+-364095855 1966008668
+887103782 -2093309725
+1106102631 1363694936
+1317164381 -1523006561
+865954748 -1144748546
+13102668 319956195
+1699446693 -158205291
+125146037 1964201966
+1017103128 -640450668
+-661797677 66007050
+-1320086695 -763479950
+472129135 535621882
+116060218 -1808654525
+-794491538 -1565680591
+-1601561815 817867794
+602921991 -1218698660
+1281621959 -1193965761
+-2045251276 561917987
+-1165768343 1675966240
+728609192 -1433961690
+-162534443 -62502075
+1493550682 -95976233
+1829797944 1608886702
+677064302 1369943373
+-987278443 -514833780
+1572542886 -505731438
+227424562 1134947246
+1740804694 837223560
+39506301 -369037181
+1423797463 -539390164
+2079383565 -979195997
+-35732879 -1970526532
+-1260104117 1056184464
+2043423408 744626985
+1757601134 -1383341003
+-947750633 -1728622466
+-2057577220 624874003
+-484417821 -31085046
+-1331470674 -1155306685
+-1895909434 -371148151
+1730142458 -1846298284
+1441698707 905369452
+-2065917875 -275452560
+1977885031 -213556033
+-194653347 379059664
+2032143351 -1319435703
+-971546951 -182273570
+-1205178631 -853707965
+648388617 101768094
+1769347508 1241019338
+-752634487 -734833348
+-363247891 -1388755389
+-1122675368 1888513109
+1184072706 1997160338
+1718120083 -646911424
+723816171 341983515
+1281125946 907284112
+1021199208 -1128712883
+1371118975 517931995
+-891723458 2098400805
+-1818641049 -417398634
+658533818 116769240
+1374215501 1655072455
+-1259172907 -1576681465
+-1071675838 -1820900043
+707480718 -1791393597
+421063518 1495426956
+128018523 221586473
+1223687621 -1214214558
+14365475 1164831857
+-152198428 1467726410
+-1261475287 -1584426118
+1635299388 -1981679242
+73215017 -965623976
+-1153190659 1567911282
+1836255303 -256390512
+1266989716 416096032
+-1688075766 1064070675
+-1582096791 1692021545
+-1801734361 -1491328439
+-1774426178 60416332
+-978158928 -41433280
+-1433030363 783463939
+-586682331 -1935276513
+-1834072278 1359385173
+-1801396651 462840525
+593233466 -839153956
+174251998 -2030346371
+1217458828 -1962591389
+746527371 -42923877
+-1389285120 1530381669
+-1695489501 1083809001
+111160802 -1310665860
+168978812 1008887462
+1429794345 -1024733677
+408777038 439194294
+-460939661 -341157321
+-260524875 -2056900630
+299552753 563191462
+-592147763 1130741349
+1728972076 1217754435
+-1003818258 -687911673
+-2015674260 -461777623
+1833705113 -592593528
+1799028886 -673174283
+758524345 2144921695
+-170591459 -493016466
+-756944453 -1928711186
+-1552797859 -1905993969
+176841679 -765253947
+-19129248 1306597214
+-984132265 -1762967983
+-423805930 2060968160
+-324587105 1474428718
+314289365 -1789778215
+861298430 422593897
+1727574326 -1332890533
+87999808 151314283
+-324593511 387918257
+198737444 -353011984
+-572000287 -212224654
+-1386745633 567385082
+1381760446 -186867916
+-1259157272 1000989704
+-1570246796 -1267267254
+1161947091 -1657297258
+-1550886817 456271675
+-112095439 -850468692
+-64453927 -73066578
+215005303 154827534
+-1458386946 -1418196777
+-1269162405 1577104946
+-1277072145 -772355616
+2055430703 895211439
+-354194124 -2004343078
+2002217513 -2054282795
+1543080050 1733237170
+1682759715 -452531232
+-623096182 -478937510
+-41216146 2011573852
+1384544918 1357066872
+967393007 -620625923
+-108911809 1974368102
+587001596 -1760148994
+1636595864 758853596
+-406862107 -1750518437
+-573176693 -295107738
+1380946474 109970386
+-121412164 139810956
+263301169 -410543033
+-870705489 -1753399169
+1164150786 210547571
+-1312736113 -1921229077
+-225846688 800218585
+1943231803 1227900771
+478189638 -1710649718
+-879608115 32775760
+132895321 1120694499
+1435563141 -840772307
+1298498981 -366656588
+-5609924 1992617856
+1578056936 2066078739
+-617138273 587022261
+-223311526 1437021733
+1617223291 1192448778
+683435421 -1247188834
+449743215 14354544
+1575834269 -1302889531
+-2131811312 1663976498
+-2018672122 -1876593128
+-599180228 1197312882
+671311512 -2058761033
+-2023517274 1498471618
+23816314 -72304867
+-1379558480 1857200767
+-1477821607 1592600845
+684520895 -1309632313
+1512474925 1648793019
+-443803817 1268692572
+-1973390445 1580434404
+717353113 337737809
+1118704452 -118886692
+-1739211060 -1476765243
+-1631663875 -1990953703
+-1492337360 498342160
+791297395 1095859550
+1449194732 973808552
+-1798474684 -1738662083
+382480483 1988773995
+1091629340 -531361646
+-1188645873 -867105390
+136708506 601596512
+-1419499423 -1276908347
+882650571 1006918882
+-83800648 -456245596
+1014914208 -560319782
+1057545866 218109466
+-467526677 1676113632
+-1306294634 -62160942
+-1593796168 2075077232
+-1916931300 1983342415
+-1639105325 606418010
+580285867 -788867412
+-1843188987 2005946160
+-1514788789 -194772234
+-500478994 786957385
+782698772 -456257616
+374342877 958241096
+5300575 96412100
+445119027 2050237133
+-1351431889 -18449911
+-1064848916 -103610781
+622330845 -255338164
+1264090123 234897273
+150190582 -888675672
+-486222563 -1701609642
+-1824616787 1756177850
+516506131 -1785724810
+-546979553 -832339746
+-1191309886 1253688249
+601218964 -1349404670
+-765381700 -641150140
+-558771923 -937503378
+491693386 1704632198
+502663579 992998129
+2143891151 1264551632
+-1631527512 81749573
+-267891034 -847483537
+-1669451857 -1740173415
+-827421346 -1783846464
+-494449578 1025348606
+-1974454440 1819327577
+338850429 -1301938721
+1199170550 -103326485
+1777970818 -1513349929
+-148838577 -558159004
+-970525810 237330672
+98294136 953338059
+626130101 -410990430
+2038968683 414087600
+265689416 -1893908387
+-1123760788 -331288554
+-935145711 2026621910
+2040303193 -1771541787
+-920543651 -1260898001
+312055404 -1104252829
+835545509 265397465
+2137830488 1883972775
+2142782348 644580933
+1182831522 -1828996091
+741271647 -676099533
+1467539003 1454169640
+239502494 1733562482
+-2130944298 1135183362
+1576545354 -1557477110
+-965881724 -352965114
+-421026115 1330663690
+1317362310 -252892916
+-645931377 -1418908914
+-1763660718 -15404620
+1851401821 920744194
+-1064554250 1002328299
+1250155634 -1398855677
+134395495 -2142433668
+-124907578 36417636
+1215641811 -2069161932
+1074496557 -1467829401
+-170329563 -821551113
+1933475220 40724430
+-884846021 450238265
+1460330240 -1097164147
+1268765495 1975150476
+413314819 -1069887912
+-1667815644 -1170752493
+-535236594 1642160042
+-757381351 6889755
+1391428634 241582098
+-797038477 -146669211
+-1586815111 -1123813134
+-1497919780 815217190
+337262614 -1287751216
+-1917183278 -669741772
+-179514568 576783209
+1001184548 -436094293
+901671490 -456137613
+-227738350 -1161734705
+-271175755 -147128599
+-795021776 491585464
+1496089704 -117036808
+-1442616575 253191528
+-1633017685 1919870145
+282243834 -2145677485
+-133103808 -1003294062
+1443496870 -284948802
+-240450772 -1606954414
+-2016789426 1621861276
+-1542381476 -1939014646
+863199783 -805460042
+426551730 -594317050
+-537093765 -2101429879
+-718651384 -1588288147
+144676658 -152174355
+1287745812 1124722077
+1975253092 -1877372773
+-1625949142 250306713
+2066151937 -1424153304
+-1496638101 -958714826
+-1510441505 652150246
+-1479146036 2029136638
+-1304962177 -225598531
+31275817 -885389371
+-1916744688 -849367096
+-475598165 -515925448
+1159502275 1249143648
+-1017839781 -189196208
+-1993299074 -175943094
+1325142051 -1451738396
+174046425 -8829686
+94331929 -2094639152
+-1769232508 -486018653
+-1927668612 -2054868967
+-1009650038 -596312615
+1629693909 104955256
+417472952 -1870143982
+-1305721380 -250379869
+138809730 1713028881
+414370630 1109567787
+851736397 -1138919582
+-368083217 -1550638816
+-542937308 737084221
+1048179619 1100358132
+657114587 1462553831
+-817202441 2122786264
+-1585891862 99423213
+-360474908 1867990916
+1663548708 1075357600
+302464973 757669431
+1683225807 -1649999641
+748583806 359452028
+-1694356737 514463950
+-457892962 1456699049
+-1638317054 -225421524
+-1588176264 1488623576
+-299350617 -559209884
+-1770595342 -851314316
+-1395283928 892442971
+424625534 400038700
+-1234909978 -351679198
+1920189663 593960130
+1457619315 1845597197
+-1236488977 -1643083274
+-21925854 -344891677
+-1680125664 1541882500
+1013247107 2027291829
+2110395106 -1631988212
+-1733207907 -1303693391
+-1591264041 912382649
+-1467153702 1831508104
+-1509716197 -2139582867
+1269951494 -661786843
+574100327 1541419398
+-1366143285 -1072821816
+-723122434 -1921124631
+-26447642 -274513678
+1130921524 -92306592
+765838786 1417333205
+198926431 -770834181
+156800639 -364215495
+564811817 -1353577363
+-1074753866 -351992563
+-434031319 -624314799
+-1671227498 -1624860976
+-1099643232 2022139959
+-146330926 526312974
+-386484871 1676314194
+586646394 363000977
+-1752895951 1334183300
+-237469281 -1230767224
+-1299971868 474218639
+-449262878 1831129168
+-258653842 -887092911
+46439057 1302863127
+-1160761758 191778932
+-442003159 853314244
+404299562 1928726130
+1627799944 791122941
+-1722541667 536013488
+1224308414 -2048032759
+-447855743 496390691
+-302556520 842068774
+-565472865 -1608775582
+-675320547 -1008279605
+-1357860502 -1430135505
+-1762211858 -146100990
+573808589 1552454700
+2005072330 -1750877693
+-850428248 -2082737209
+828028265 -1388621227
+-387820247 -592524927
+1749470927 973182941
+46278598 -451539304
+-16066493 992007556
+176308356 -893795863
+-1953544544 1663552548
+1101387441 829813615
+-1327374790 1643109708
+2144676735 -1205274686
+-659539644 -468975252
+1347930980 -1078165818
+586594450 -1624307056
+-1133781341 -382504377
+-1714447059 -812163342
+-813654031 1811380674
+250666895 -349987897
+647531020 -733359518
+846014741 -1991963632
+-1602918963 -872272071
+1853508062 -783269434
+-1484401690 1983806214
+1153362655 -381315007
+1487164514 -341576970
+-764181341 121814155
+-1227602003 1675331788
+-1759875091 1151853803
+1214855218 -345211552
+260016866 -1408955970
+816331666 410488652
+1316681720 -1062379864
+1598961624 -472832184
+-85679409 1066149102
+447695075 -431859586
+-1114171490 -1109356982
+554567617 -1988233099
+1421243400 -930238067
+-1533851235 1865275999
+1156191759 -1340703641
+-1951401496 444927977
+550528554 -1780937674
+141030085 -2065722538
+-2030606756 729749717
+1537428008 -45499258
+-1283076755 -700421215
+1832330189 -1340138451
+1176826207 1707892869
+-789430749 -1441821604
+-719381161 -1919770489
+1533069204 -1400901547
+-1438596972 -100947659
+90760571 959945528
+-150213772 -856568729
+1280427178 -360538316
+-1318941171 488271300
+-754799986 536842946
+50697851 1889748468
+2005887672 -2008612252
+-616524084 -672371861
+-1471362971 -1701170489
+1096515968 -564089464
+14532132 -35543504
+-2088936199 -1391300122
+114079333 1025815505
+1569492633 769558944
+1375328949 -860471349
+795068541 -1621170595
+1579040614 992630764
+1353884416 -1521190163
+-1263931575 -506455916
+1097796502 -627501726
+902238156 1460346667
+-324611733 -1442900399
+-767711804 -2078081137
+591354579 1983505022
+809432868 1097597892
+-1848836655 544196571
+-868148702 -553607011
+-1906517254 -718034829
+-645749128 73143603
+567114202 -1660441080
+-506392536 1043470932
+509276604 1534385825
+-726604255 2056192572
+231465688 -1077562459
+-889204460 -513864879
+-1665484976 -857067923
+-1615252849 290228429
+-1519954511 285339668
+-1064854697 1489884648
+113805305 2130991882
+180953038 1065329354
+-748434636 298975479
+-192580135 1403052356
+269615120 -1789327090
+-497879578 948872632
+-820958930 -240019189
+-786883838 66219196
+-645097487 -1273857173
+246113147 798930107
+-1104781313 -309601603
+967188474 -2110936007
+-657786349 -1324450461
+-1995459157 458049279
+2040834712 161608016
+902816502 1509962348
+278781455 265128098
+1011409449 -413164262
+-1332432346 562329459
+-942385880 1185104557
+-1216159090 -997744956
+-1286802960 -1820604091
+-683545538 -466718410
+660490886 -1403427940
+1309209620 231697874
+-446739940 -547209562
+-2008198873 -1832015477
+1370453631 942668357
+-1235599367 2073040339
+-773291766 201558001
+456493337 -967083184
+-261812765 1188139858
+-477658408 1586832202
+1645697496 1496695788
+629926500 -1381675800
+896209579 2050244356
+8798712 69084282
+905824906 676631397
+1680253803 -742596398
+-1471460336 -1737098816
+-913554667 -1854783730
+-458829672 -1280952642
+1841914682 1485213970
+-1488099200 -298323910
+2029925295 -548970970
+-1557124225 554757231
+289623058 2145693362
+1167263687 73974889
+-1752680832 -1941724494
+1496162725 -1780245875
+1961952061 -818454295
+1950376155 130371031
+1319965196 46057990
+124889344 -952286502
+-1582375628 703630796
+-691126950 1425928879
+965543820 -659690798
+1855854115 -276551865
+-1611787770 1424489925
+-190671664 -689246891
+992621441 -1392583156
+1654964616 116714255
+-885667495 -679438054
+-1690499162 -1240583079
+1290245181 -2010393912
+-1783982321 123607648
+-1205594112 -289952540
+1000677071 1327937498
+-1985154196 1183898222
+1030689085 749193043
+-781116834 -109448406
+383130044 1088630057
+-66048515 -981924886
+-1819972220 224962783
+-197104954 1656936507
+-658572228 -441658513
+-77450805 998505241
+-1153186217 640060648
+-1723766033 15847144
+-1837800439 140378594
+2040763488 844625228
+-192280136 -834052387
+-1631084934 -287126289
+413012645 518422355
+-1110643173 -686111248
+107536198 2115401353
+1590277723 -331129041
+250247088 1743468218
+-2043356956 1579129086
+-1527967389 1958063910
+1297866394 1131744930
+1150842211 -2110095157
+1305443217 124080798
+98822002 -845032103
+827016784 294146878
+1562507965 1517469055
+1422404845 815178043
+-1923136974 377168523
+90228526 -1399365309
+-872876536 -103824753
+440613264 405355105
+374613636 1038672161
+-1523210392 -1276686416
+-1030850921 1840582773
+873196227 2126886956
+-1342725085 607686394
+1497427956 -1847366199
+-1030621821 1011144348
+-719137536 -701081159
+-1081957818 -1458876431
+224004919 -917641125
+547838381 1598956528
+1224573662 1375603601
+1927993469 2003925783
+1983308624 429632915
+1169609941 416518975
+-1335850383 884241527
+-1393881200 966658145
+1166302790 -2116815252
+2104654888 1390196938
+-1136969166 1468022593
+1500882076 348851997
+-808148994 -484485214
+1460076812 -447419864
+-1331159633 1676370760
+1672060612 -978352183
+-122280922 -538849973
+1999833030 2021726420
+446704286 -377375589
+1908269522 387532995
+499091264 1377215195
+-1692943999 -1899541781
+350887177 -1287739641
+941783020 -204824148
+-533608273 1089275191
+-442401793 916192248
+1095144419 -1260335487
+632059987 -23741071
+465701359 -819358833
+-2038700065 321694383
+743025782 317456993
+703060714 -492903313
+-308515469 1643266611
+1267408022 -795249823
+867512147 615628418
+773807581 -1316110932
+1446748234 348015541
+-1331123530 1162510740
+2064165018 473061782
+1307140233 534699630
+735475971 -1178533127
+-1978107218 -252439576
+398017697 -2049573823
+1946629950 1828648751
+-722923966 -920461842
+717311087 -268828162
+-1162585791 -604180681
+-1830662541 -1209387271
+516211341 692919179
+614638114 307349344
+-1624870504 1368136495
+-2055813479 1826782014
+-2063693933 661743383
+-1582756091 2108107447
+360633728 1534523023
+-2094417886 967629574
+-1814250598 526106460
+1865056493 213508135
+-976512788 646550261
+-1318705189 -1713730729
+2027944012 1186518268
+1417799458 1596259842
+-100892614 2028912235
+327512771 -443741244
+-714435674 -46649704
+-234534717 336476368
+796211448 -465709555
+-713507846 1821477229
+-1939002416 1953372415
+417159320 -2116194257
+987736550 22833911
+1950235340 877887846
+810165232 -1314200191
+1165124502 -1259617075
+-1680108600 125803819
+1724497877 1644663878
+-301232038 1686687021
+2123576186 -1628504102
+-1822767079 -738843312
+-111913106 -797113904
+1231853831 1502188216
+-1951555146 248851806
+1595329796 -453528575
+1288477203 698635533
+-253351162 707224906
+-772123447 -619759921
+861016582 -1877672944
+-75958081 1907832388
+1387664766 -1968117038
+871290858 -478606060
+1091457216 -1423552725
+-148441678 416479721
+-1845606378 1035210839
+1491255932 777585605
+1187057155 -1885828666
+-451209786 -1735455791
+1873179344 1459013212
+-1603257357 1034245122
+328870979 229768774
+-320697220 1969655147
+523615872 -665784868
+2033786621 -1154188549
+1738148592 -785503203
+1222481384 -443139426
+1836789856 583588325
+308287224 -1039389089
+1055545322 -1051389258
+2132770713 949267469
+267704328 -355869755
+-317342538 -42353553
+-1670435626 -540538648
+1560627988 1340544935
+2121116642 1524768159
+-929693629 -441159965
+-1132835592 -275451629
+-1654104617 -1712814821
+-1933388495 -1589984101
+-1730470441 1588510430
+1687765477 1442829026
+-1374220905 1560255902
+-1481711638 -646338511
+159389826 2101467786
+881786572 -1050667619
+1100818823 834234501
+-1177950530 1078182660
+-1265065012 -1327757293
+-1173122390 1072785785
+946471224 170501279
+1159466747 2065851642
+-1222581861 1341258416
+-171002391 1673004357
+1477849773 -610601287
+2034618083 1008479865
+-491370836 -1687247092
+-1022392612 1436176014
+-680105919 -1507408795
+-17413295 -1470733571
+1834784733 -1149840469
+-2001444 -1650460444
+-809074693 198311377
+2123325573 2052836667
+-1299723308 -963542975
+-543492757 -150156473
+1047303784 -883636726
+574192274 1102422675
+643210282 -1641667479
+-1107706783 1844867656
+-681732347 -655320807
+171034684 -169683138
+1502205742 -2099512408
+-714257552 -1047184456
+530421452 624397722
+1641841229 1498917064
+-1912530071 696932205
+36270287 1751374928
+1715831470 -588434693
+1466179324 -1674661516
+-96910837 1243724114
+-181123367 -285701913
+-1372006623 -500561369
+1677056004 1794415769
+1210561583 114798731
+742433197 -364983339
+1541453759 519127679
+1829063209 -1810152291
+-576080401 -822939270
+-501857393 1012704150
+1122337465 -1204302778
+1266690908 -256000285
+1746035219 1607338201
+-1742978932 1122382444
+905644366 -1884080359
+-1734347656 -1780416390
+-654309435 -214799068
+-707529225 -189079225
+-593451857 -1435720541
+-581232924 -450643761
+488966685 -1965164144
+-2141769338 2000138486
+14650814 -360375534
+-2135717134 769362282
+508149163 -1049500623
+-1853615058 -1140578055
+1281690428 1726549507
+-1972838483 265242908
+1258694009 -146227650
+-1414504193 -494444738
+-861453416 534799326
+-1755972728 2041536533
+438657513 815363905
+-1393664917 -1812577233
+894829423 1193007316
+885500024 464776953
+-1940931207 1931882825
+2030363557 -397712192
+-555595883 -465863782
+1731874776 -335749245
+-1638566469 -145326251
+152224677 245449894
+1751231634 -1965265064
+-861862889 21207875
+-1625657973 1319788956
+-45955701 -1903875314
+2062437874 -492622956
+1572382020 -2143129577
+1654399461 460484031
+-484530735 -2143957392
+1967640902 -1120172792
+799989745 1409493611
+1558453483 -2069124845
+799612853 -409367007
+-145573544 -1621349687
+447307439 98433594
+572944994 -932900787
+1934600075 -1111930528
+1276394348 -1941670337
+-356345990 -392098955
+-516373110 -2003289787
+663206935 414571353
+1236605662 -522580057
+-1755403916 878157612
+1406905173 -799472483
+-2137613655 1749962488
+203043386 890980021
+-28309040 657326198
+-1321829985 263419031
+12563480 519699645
+852099587 -1412011840
+-1848351713 -399838067
+352734599 1278662139
+-1112691739 -1097021513
+69957191 -1827352852
+1471058908 -1269698693
+902725409 -1714216663
+1716651084 949032033
+-255632518 1488606658
+2055391461 915335163
+-1265952435 389462445
+1582202416 803532512
+-1697639896 -226684855
+2023090871 -603431192
+2130969466 -795914588
+-1907031922 -679865252
+-620894440 -952625808
+-1801928035 -1493378690
+-1228828483 -753712137
+-1488920171 122303178
+-1441192755 1115427361
+-1743759991 -447223976
+175567112 1601843715
+145220240 -1928537865
+1443392078 -400815574
+1335176436 1201419208
+-899128788 1756408857
+-2147398672 163565885
+546680899 -952161948
+1205913764 413762541
+405169438 956527650
+443192081 598407831
+966732372 742132455
+-392868057 496667976
+1767817413 -210331640
+-831402109 -587599198
+-412062126 -654782241
+-1174188128 210022327
+1104080073 1218043863
+1729477360 1023050476
+-892719194 1790215397
+1260370466 987632667
+-904031033 407687484
+1462015699 2051929253
+-1155814680 80145700
+-1116526657 -866241355
+22683002 1121568115
+-2139286943 2079221039
+-1352626588 1845882711
+1947752848 -1487287976
+209971112 502652949
+1783553460 1507025266
+-859431346 -20320473
+-1648587571 1492779380
+757752050 225192618
+-1744303006 -1220755876
+1614681355 -1263155325
+292694242 -757346546
+733859750 282475415
+579950653 -1096511221
+-1959406614 -450845642
+1264472417 -1466804625
+773538334 1868775070
+1704600349 408257389
+73987761 -1561429113
+2001590110 -905615069
+-675897227 -869678996
+18897463 -1411926528
+-988090566 1257473906
+-1948427359 -1182971767
+672272524 107722114
+116690196 740881728
+-1059044066 1609233947
+344460103 924721805
+1210015766 570296738
+-203299725 -367843284
+345827556 -61889007
+-1433564267 1200370115
+-396826687 207226367
+1884010432 1258089459
+-1581715875 372783345
+353153801 -212593950
+151678288 -1676472010
+1659835284 -229686802
+-1926258734 1824142326
+1798680775 -519269822
+2125160596 1564484886
+1020278553 1110047789
+-554355865 2035375080
+1263552392 -970016425
+-1657102793 -760156686
+1439823895 1025084625
+-1066116611 -208146528
+2147470279 -704888677
+-101373428 -1874970741
+511635629 -909564471
+1619192199 -273773512
+-1566748270 -2039464394
+64166164 -1160499406
+-1219374455 -694975016
+1341462321 -1933134420
+153064912 -875019693
+380517302 -733325814
+-1162342137 1315342474
+806867108 -684278619
+895196813 -1811782056
+-2140145753 -1234545495
+1381151561 1784799433
+-749002894 -53054168
+-961643633 -122180710
+967027508 2133787862
+-1159868449 -1678506061
+-780967420 -1054985354
+-2050757032 -78126332
+-587927949 1296960706
+-1456942304 1857448619
+-1326205778 -1737061223
+2050047794 -1795810045
+2072441826 -862020602
+567258370 -1206524934
+1029476653 -951496031
+1998586944 52286602
+852375228 2267489
+946990985 479986488
+1866960701 -62385462
+-14267180 -1218844649
+-1473756042 -1231037157
+-52562617 148416082
+-364498402 -1875917140
+471873753 -1434478370
+-1387851025 -680245799
+-2002838709 -1421692296
+1135337425 -158855376
+1037090944 -298453622
+861508242 -1265068918
+470637281 -112931034
+-615647292 -2042512513
+-892965216 -1659738186
+-1666372320 -1520386385
+-750475490 300327099
+-254260036 -934561187
+-1269311541 -184835829
+1155288337 -146440053
+546977162 452515233
+-221532855 552161868
+2089474934 1235734491
+1483466398 2127548826
+1256065528 2110027378
+1591288816 593074871
+-427338721 -920465561
+445546274 -1800882984
+1048559937 -721522018
+-881405183 708918528
+-1417880321 -1780506892
+-1629892453 -406046978
+-1664748156 -1008020069
+1602427510 -1804854215
+886378111 1246404441
+761548407 938231630
+971583467 -498086068
+-1785793972 -2081508503
+-1571500593 -2099894554
+-716226372 1869494506
+-728481420 -470789792
+-1354902839 -1210058114
+383537429 1538939446
+-87989872 1111102277
+-617698785 1064200435
+-550322746 1386633366
+-1203073047 -324935938
+1606122566 1069207024
+251572557 506042803
+-1549817327 874908089
+487855377 1257979672
+-169588126 -1407104961
+-529081490 1215169406
+-1818940659 -696724264
+458626553 1547652815
+-1777659106 2000884804
+-1166213788 -91677318
+-1298647623 1333072254
+1135306982 -2099479627
+1768119011 -1590912698
+-113230886 1381880308
+1437282466 1851603672
+-2137188672 -1441213639
+-785518031 -1048022516
+-338044578 -22343971
+-338074090 -1080348814
+-1861080185 1060841076
+108962547 -26302843
+-1697555860 118127034
+439376241 161913089
+1509253706 780030613
+1588627211 1955626952
+-1493279611 1066400667
+1538941498 233696808
+-696585735 -391805437
+-2104060045 1105326593
+-629029798 -400262863
+1636041687 1880719211
+1773420713 892521510
+-256290712 -890171896
+-1563176017 99954573
+1011161951 1697741350
+-1253470853 -1647412382
+913524916 1198122453
+1811085811 -351679933
+1301981783 638516894
+2009756554 -425936907
+341736607 233339025
+-1088006360 707026040
+-1922956836 -521624135
+1246447166 185292007
+-821231368 213459261
+1928462149 -1702168670
+-620899071 -782315737
+-231871833 -607718128
+-908362884 -1598648208
+342168501 552354048
+-2030413957 964733643
+1534535089 -1674002650
+-2087040576 -1169831769
+675145200 -544033731
+762532826 97960775
+-1344307354 1191320619
+-698370284 1772074313
+-213422581 1870975638
+36087294 -1557566034
+581847067 2072663078
+1380586159 -675760097
+806729896 -713278027
+625102314 -1512487585
+-2028500839 -1431763594
+1691603528 675500292
+577755441 1643075432
+-914588515 502900598
+-38739587 116573229
+1548121486 346303007
+810020797 1391071184
+936447912 467891475
+816122875 -453092357
+57230096 -1902820162
+775918626 -896030267
+2043182688 -1679411488
+-141673968 -1471070276
+-242135392 -470307049
+-371795873 785429651
+957321351 311929331
+515703509 1738021107
+2113000816 982055679
+1295910333 -1872219560
+-1761302886 -927215553
+222200482 -585212410
+1416026691 1982452945
+-1397070216 -1238226181
+-298249746 -928578013
+1456980450 610451809
+-1974993574 1009581719
+1834520720 -1066219365
+953649920 -1970289227
+1000138471 -2066017389
+-87294519 -36222069
+1598509219 1030484063
+1552308938 1760637965
+757161390 -1561072267
+1205400848 -612877232
+-1921633685 -1838177363
+1326124570 -905370075
+502685355 2049683849
+-959369120 -1237111021
+1374973881 -2071212012
+215656281 33238728
+-1244615331 -1416882564
+1759595993 690509297
+-658426742 -1709025030
+-2088601967 -95950812
+898020791 -151514355
+922135796 240472261
+-890359613 1546738042
+-1911197363 -1100046908
+1446152275 785839201
+2024624980 307469791
+514326651 -455366309
+-2019058496 -1184579651
+300541507 848927286
+-810679360 -144488927
+-532329111 -1541732359
+2130556950 -2050321516
+1317407495 -1206994813
+110393563 -1298013754
+151687676 -1864891352
+-727569066 1063236257
+-1336219461 134987581
+-879306726 566041285
+22663543 391325225
+466482417 -518016881
+1326419727 -1076495679
+1744136657 -896234002
+-342527523 -1271544061
+493679467 -2131414855
+-780583538 -1169261167
+-796048954 194739991
+-1279171655 -2007638871
+506467411 1438394150
+-1953120319 -1742737685
+-1770654919 1109727480
+-29982341 825805175
+2138853699 -247425535
+623403493 -732771616
+1197993662 -515383644
+-1272129239 475380699
+-712516798 1722025647
+-1586112337 1743525806
+1699803531 -1616098399
+1222473244 -1178968697
+1482258422 879644050
+-792935896 1608645462
+-700080107 -733398370
+177595094 -715831791
+-1140173134 -226144123
+1534022207 1855050795
+1470656910 1612647022
+-1690124722 -737971258
+238423748 -189313460
+1615463062 454161300
+1053031417 -146957266
+1246639351 733302156
+248498998 -1813383138
+-495758091 -2060343171
+-1198729405 1446593417
+1568169082 -695874738
+-1007311745 -1218690051
+1803241706 -1060917450
+-1996024819 -676267364
+917603678 146089453
+-20628072 1675693263
+1318223331 1479166807
+-1054584472 -822497577
+-64909366 -51794621
+-478820817 -125807276
+428956720 -815327316
+-789773913 1959035597
+1164823208 -70888612
+1191784846 -16289427
+566597957 2041890391
+628160278 -1830845587
+-1244625562 -1610438341
+1857093313 1174288453
+1039283108 1321917156
+742180086 429437412
+-876212160 178531260
+-1806991287 2078074144
+849995487 301450497
+1974234327 -1185731445
+-1817198924 453349020
+-1127821783 -10208059
+-851393695 -1880750979
+-133938957 -580230817
+-643907988 1328832215
+-1356355967 689978080
+574449263 -2007909411
+13292441 1316691127
+524233104 1356488716
+-378603963 1069163597
+1061853180 725078090
+-1474068319 -1095797185
+1909225531 2087010952
+-1556595390 -765225128
+1498305969 2135978521
+312578746 -2103224077
+1667409776 203659481
+-633077381 -1155864229
+-957233186 1333548582
+861994404 -1987581028
+-901624896 -114287765
+-223676029 938651272
+-134020012 2036246585
+-57364185 -1208063002
+-1180747628 1198871116
+-707754851 -1362111570
+-608946384 -1917316110
+-335076125 428741025
+114955353 1885846423
+1404693396 1453543454
+-967748914 1305411357
+-2026467428 510815024
+1906988264 1046653713
+-471471293 -487938277
+1961655129 -923705498
+257760031 383961422
+-1296224326 249116783
+-518649750 67651807
+122921008 1238492924
+-1163719826 1812053953
+-1930835367 -618433294
+-1330080503 1557073966
+-1637367116 2125628883
+-15567926 755829093
+1682548056 -1432310674
+-1159292258 -697832954
+445864245 -1797348766
+779769118 2106809594
+1455884090 -367273407
+-900418992 148808412
+-854634321 2001515477
+-1133629466 -334619138
+924623532 -686887377
+-1515834134 1745885951
+-1970883776 -1928728327
+1737164128 1310183662
+389617092 -1942560697
+-152233545 416793350
+829882888 1571084567
+-1109680329 1217435945
+1394392005 1921210908
+-180516541 -130598624
+1036551266 -1434271839
+-640122577 2075021352
+-694230678 -1393241086
+-2124481247 -1218090380
+-89752437 -2147423950
+692603085 1726024938
+327053125 -1730301131
+-591173292 -730370389
+-1654644418 1351534375
+1722633509 956567503
+-345092723 1180746951
+563332389 -164662858
+-1475983241 -1720167937
+982741501 -135830266
+-1876187438 293978712
+295814813 -2025869960
+-1301458448 -2111721290
+505831257 131409362
+-1709892724 1754434870
+77243626 -1563739733
+187180005 -1297424748
+-1712696052 337307322
+-1245493669 -905723058
+-218929714 1273473660
+725263567 -1928540208
+232600536 992506460
+1855792011 733444304
+160873698 -2079808107
+1978934609 58346110
+319512382 -1894275200
+453811390 -2117299340
+-1730986509 1841515651
+1883763297 -205415652
+-443814361 -1276735536
+1359031292 -467123986
+179355499 1297792562
+-1447260667 -1019156047
+-229843510 -210824871
+-511831963 2127784796
+-370731714 -1483373252
+-1109671806 1941300707
+-1152026012 65943777
+-779391664 1623898258
+1498104056 -1351329648
+947427442 -1311612720
+-848692400 -1047196901
+-1415946903 -16583209
+1686393195 736071199
+-1467900364 805714828
+96356663 357162612
+-1868370012 1838320019
+-1993902969 1260031221
+-1863665086 918180584
+-156428627 50852145
+914575682 -88762559
+-1153346148 274169722
+-1786028143 -840005555
+1628132658 669826106
+1024528906 -709849459
+1604019714 1194933568
+-173974722 -1256978741
+1632592597 139125078
+1653042427 1036465428
+-2110033211 884125712
+-756598006 -1538793143
+1548472413 1542271200
+879920013 573355819
+2006687404 -1527936327
+-97349817 150629017
+-338103175 1462693584
+282210367 1167597550
+2119508482 -1912614928
+1066268196 1485682701
+1434157737 -1476463649
+1337562405 -2088253524
+-1380240977 -95535057
+-431417598 -838140993
+-1460191569 40657667
+-838952558 201140912
+418508953 1375568675
+-1214026192 -1520752239
+-348764212 246806819
+1758578280 392685745
+1872561992 -94440323
+1527335446 -354142980
+775593248 -1825235574
+561877104 1390783366
+1158421832 -1861570420
+2016692689 -1710270657
+66491423 1181160233
+-2036190436 725939508
+805765088 -1354917537
+-1736153145 2126077355
+1025230119 -889403610
+985463116 2108633918
+1587480638 -1699707260
+1270983683 729730066
+-2101896927 -645192201
+-1467624635 -796515249
+1012639165 1364983433
+1491937789 -1939694592
+-435469650 353859310
+-1898416720 1930767584
+1060889268 -899172658
+1454983330 -323178719
+479617771 1798339156
+-684732088 696460960
+-1625167198 633182771
+1638239288 -2019023374
+-1472163933 59012673
+1615986410 -286779484
+-998138987 -1136958950
+-1637380644 855792841
+-304392907 868951476
+657261022 881542416
+-64083107 -1321472644
+442329333 -2015931175
+-1716696556 1937252746
+-800724849 -1836761420
+459385690 1840909237
+-81190732 1253791746
+-137614053 -1138248574
+522440119 -1126923895
+-729690340 117616519
+-1274090434 455861717
+1483380182 -335181215
+1076071957 1037467377
+-744610043 -828840551
+-1327101714 1333750164
+-225879905 -711276456
+747080991 1516604641
+-392291507 836991545
+1743289641 -1898747970
+1045008857 1837277849
+-1524789684 663763957
+-1836780703 -1468898537
+-338310311 204442396
+-2005493604 -247873136
+980591350 -1006968431
+1716472137 -1363784520
+-626022846 166257110
+421736874 1970833838
+1476312133 -753430181
+1512359086 974539461
+680135078 1712907847
+422955929 -172281426
+-651534514 -1092478759
+-175595958 1863794127
+942486287 1333632309
+-1977606271 -1197396960
+1309893079 -87717999
+-571178886 -1007630547
+1590947433 1394508965
+-384737766 -1632425614
+139953816 311164873
+1062502852 -387399103
+-1835417251 1338169383
+1132127340 1083223096
+-1135400901 1917812709
+-1838386700 268186570
+-311126361 -1758910861
+-91796537 1734884764
+-1270136371 -1735551849
+-1507036866 405356964
+-75687063 -2139454662
+-1438326678 -257672198
+202041695 1698257343
+916100036 2136157026
+-1903999862 -912363566
+1579342515 -124262133
+-373917781 1154588277
+-1211782301 1997367654
+-1515550446 1884310804
+328728713 885891856
+2026658383 317862423
+-1048002615 -1882285617
+-524493335 -2061326212
+-1174472081 -509648772
+-1919739318 -1306370797
+-297390984 866803495
+-739528357 -1542762540
+-1444779962 -1768708198
+914832112 36798686
+1461358126 -412473342
+-1299145691 -187190060
+-733236253 -1270733375
+926638886 -1955434019
+-2001306826 949630642
+729636557 -1288139783
+41355965 -993157261
+-627972242 -755102491
+-1384530782 -1276479119
+229988849 -1651657319
+331726024 -1981260425
+-1733490910 -1843135784
+-1912704845 -1748182002
+-1794673567 1625483045
+-1531259851 -1871414684
+1331042951 407358608
+1197790387 1040434548
+325674643 -1690834796
+2013672119 368586841
+-819422749 335038235
+-747732406 -1563241762
+1215642187 -1916697685
+-258165308 434255119
+-1990763778 1295648510
+-512600433 2034380106
+1759105344 -1168093010
+2024492526 -1477505571
+-736914819 -558151982
+-274997954 656768807
+-1616233190 -1268241293
+-1546391132 1918122723
+-79250398 296234910
+147921860 -1161370683
+1586582735 -989923465
+-832056333 1632696798
+-188485996 -232837203
+511472574 472259201
+272598631 1139283956
+-282910684 -274960179
+1407524440 1035227100
+1877765984 1836951196
+-918112617 1349144406
+-101634846 1439224741
+1736735254 -1954961828
+1698631580 1754424162
+-1492520973 2116846075
+1565145233 -1672236657
+-936742513 1960302622
+-723669064 -1496845364
+1075794428 -93577600
+-899464706 1777744299
+770946220 715590897
+-806939263 1885584132
+-890096774 -691392448
+-1461165110 -286897219
+1568377815 1022299601
+-802354371 1568397712
+-1460801941 122977682
+657160344 -1319086074
+69042776 -2006476645
+212051467 -866694642
+-721969554 -1425414819
+1072207795 -1322221362
+-1516888923 93337922
+573806942 -1419360856
+-113154890 -85431827
+27854983 703923006
+1318218461 -2043249975
+35220639 318700685
+-373777981 -1741982423
+76180597 898824520
+-1548518396 1569547116
+-2041622402 1187133306
+-1120070027 319169210
+321288724 650815705
+-46259366 -394423228
+756256732 275523720
+-683852956 -2054387178
+-1830302855 2018301050
+-1049013188 -1810192768
+-1258254680 -614720011
+828297937 -1799332418
+-1771611483 2104427547
+304011268 -1539101125
+-1499266568 -775911931
+-1248428549 -1153019849
+2065926724 -768689704
+-1482929110 1963996779
+290677179 994202780
+1654058029 -757861613
+-1803087272 -1470689194
+-114291404 1341698917
+1161246988 -1480847202
+-1141148595 -1462401551
+-679355290 1835972755
+1351615815 226082769
+25632160 1927923331
+-2044391729 -206061081
+-1873356100 901017222
+-1514605674 -576946431
+1785252388 -401635011
+-956343085 -2016489908
+-1624449572 594975014
+-1793933848 -782379866
+1684083676 -638264333
+-317532245 1387769132
+1842242415 960344753
+-110159118 1255273463
+1064153358 -334915078
+126091397 2072247239
+-529669307 900548207
+-1751260005 -379057225
+-1938355412 1693388971
+-169636928 789727781
+1087967464 1703212332
+1191934336 116851495
+-830822733 -813023051
+783748655 649304256
+-600309340 361332229
+859094796 -1663977892
+-1448503145 -497878546
+-1322340084 1262889964
+1419119762 -2090732863
+661563908 1278078333
+-1536174001 -1608618451
+521238114 128170564
+330815958 1752467829
+-493773650 -703786082
+-1335800322 614203901
+1361125696 -591602263
+934356464 1891042626
+481627746 -1873396840
+48499265 -1515476270
+-1743152973 -399999651
+1467081942 -961307138
+-900674297 392575496
+-72804209 590987167
+1355032835 -1462101397
+723946973 -2077470433
+1882553684 1371590996
+-1887990619 -707936591
+-1767837171 1113341347
+-2094930023 -189528072
+-1844363272 589180333
+-577564736 1067818534
+1406532254 1331958337
+645234490 2089394829
+-799802027 -2128333172
+128519340 1720804894
+1991735832 -859048351
+-2026768941 1518574804
+1069503695 -1115372364
+1156351763 -909488237
+166978829 1576281912
+-1081177621 1335154556
+1638072883 -579949041
+1200197822 -1066055940
+1710835173 -1071778262
+-1740670622 -407335007
+-2084862243 1053359186
+1859759965 -1329625966
+-366062250 -1540948947
+-2121481270 379631245
+1867742781 -2031122249
+-1158675752 -112342218
+1488114125 1390753325
+431063672 1636499769
+2013501830 -1839767985
+1421701710 243712155
+-2066658416 606356846
+55236241 -1955998758
+-1079956481 409400478
+-2066539124 -107529659
+-105226505 1819105981
+-1253752516 -1463551132
+1198497423 -1368960452
+1816612327 -1174682444
+-415605906 65369166
+1186061006 -778868156
+-756795563 827083536
+-1920579077 440478933
+439350949 -375695563
+-1905358312 2064853912
+-698168499 993103677
+-487727703 -1776876131
+127231473 2009809902
+-894710903 2002857612
+-1304176110 1625125457
+-618323867 -709652526
+260364797 -1077878046
+-2006451359 1923792044
+896259860 1889910597
+841809973 216837184
+1233609163 885800124
+-1426147760 1827243700
+-1077649233 -2109550967
+4827667 1489486487
+-1111157303 18632336
+-978216364 -433630254
+1336953422 -1402575714
+184711188 1721107458
+-1431696805 1773944050
+1778853341 436347309
+421959233 -1587062967
+843116996 2041924372
+-1101347245 1354273446
+1587968788 -661708634
+1088933715 964149376
+-2060793499 -629528744
+-341654899 -829001564
+2130188608 -1099760652
+464934227 -831741972
+-1412513372 52117844
+-831874857 -734834132
+-943296596 -72522983
+-279661700 2130232172
+146619770 2142899429
+-832515074 -397786585
+-1149538808 -1033294490
+-150560014 -1805812549
+187209269 -1529118299
+-585923828 -1203089993
+167004992 2105687349
+-1044154819 -971246563
+-136499481 -1254936695
+1557758388 1991739482
+982502329 -284820094
+1267745458 -767628860
+1576410015 -1248756212
+2020083468 -1116496978
+1844549950 1393946253
+-323498406 -1949537491
+793216861 384601269
+-1427181484 -107210060
+-1502008863 359230108
+171285968 -1679600589
+1066549587 538935545
+1325263813 -425983069
+376145321 2122096838
+-326069497 309318899
+2036972529 -947477312
+1720967860 1071201464
+-1967460521 111711720
+-1414480454 -2039802323
+-623475773 1438757774
+96155708 494241370
+790152148 467904203
+-445262272 -854810303
+1804249629 -1055094750
+-1299144925 1316947342
+813687554 -2017803229
+87596548 1707522866
+-2041170078 -1509388212
+456098537 -925651542
+-1024508983 1980113002
+1662413875 797010057
+-1140685245 -1223105448
+-769477 -1052425502
+319320923 -2123169624
+-1116667912 -1225649362
+653279091 155465968
+-116760757 -94365326
+407481437 1893080460
+-1450703056 1541672015
+284106563 1985795937
+-9685563 -1973556801
+-686701750 -2044164018
+-1746926390 -699592842
+-1646960529 377278448
+613648550 -2055236037
+1926569004 -616069282
+1775550046 450088003
+1730911653 467146062
+-1840697957 1212429584
+-1780991061 62377979
+197637157 -698298459
+-1377104934 -438741420
+379356695 -705009698
+-467841690 -1847542983
+-677018643 204651867
+-1963933434 -403367979
+-265283993 862506004
+1595958813 -18070704
+462147568 -1270264496
+1106015439 -1783001276
+-2075073608 966943753
+728727740 1346543326
+134773462 305281942
+-1306474362 706509543
+1389863052 618511602
+-426703484 769706615
+740908718 -1358490384
+1115247008 1143991740
+-212879797 99750491
+-1720231119 143503971
+-784603867 -464121234
+172458006 788205182
+1172186709 2098393099
+514688420 -542833506
+1376135220 -1843578259
+-2015977037 1731896176
+-1065687119 -1590701991
+-315053208 -949485135
+-2117194819 -427935045
+-1461528032 -1662833828
+-1459333634 -671514111
+-1410527923 -652589646
+1076452744 -874370838
+-1736064247 -1943653490
+-1439328458 -1342539735
+-697619037 -108183942
+-1973372698 -1867597081
+-1104791234 -1930419554
+948952340 -717470230
+-149868469 1973269218
+1317371132 -543538953
+502274331 -1319385186
+-401494522 1643210808
+-906387417 -1026714534
+1779012775 554160642
+-836920754 -1022203936
+-1787638987 -1386092958
+135436365 1937490230
+-525970103 1152274227
+-1064581644 -1599235323
+-1406318341 -948584249
+2058393867 -754462811
+210403586 1955834885
+1831050944 568328629
+-389728881 -330743908
+1260352159 1640400195
+1662045450 -1545608608
+-739095371 1165692870
+728646291 -1313639957
+-620758441 71434701
+1425327369 716398648
+40938125 1524164800
+343208477 431364310
+26365051 -1443641781
+-1401463980 911334059
+-2107526811 1509128018
+-250439173 1637985314
+-413028030 -1231504320
+110157228 -1204254211
+583125314 -2044667709
+1503459796 -266629770
+1594658440 -1542556866
+-497296048 -1504756804
+750783026 -1903532597
+-1212037003 -1330080145
+1478239909 -517124831
+-1116587712 -2055845206
+-327153064 1105382328
+381790590 -991676323
+1268786219 808229664
+943054722 -1479967838
+-5434429 277317990
+1338286647 -1751525455
+-1598843882 52386071
+1107172141 -1003145832
+1035512426 1871055041
+1819196884 351633592
+-1844250486 996197374
+-1784634283 2107091469
+-21390940 -1934045945
+-1537215187 1469812384
+-1535804264 890259298
+1515467006 1009320746
+2028413052 80434853
+1358409214 -649891014
+274872160 -1424476634
+-1254918281 -2060043828
+-1274478350 -546663586
+-1178703941 530683914
+-863076541 585553433
+-813902609 -1894522709
+1065128151 -1294712739
+-1932171288 1921994660
+-1603550268 -358387638
+-1991622511 -1977924028
+-1012274761 1513959211
+-770762114 777981926
+-1794859976 1115018786
+158333873 1037318931
+2044627997 -526673575
+689650181 -711438738
+961361310 1783183569
+1469776963 1850881612
+-941101978 -1951609117
+1922682465 -1434101592
+776137871 1290792819
+1471787588 857375770
+1074057809 -447343397
+1655598706 -363582543
+1707666170 -2089635457
+311504703 -178251284
+70850975 -13488552
+1201578527 -1787592729
+341351765 833596769
+-311349910 1856024497
+-948926668 1230300556
+-216171385 1684066211
+309988438 1296818903
+888813887 1150323044
+-567765379 1613425719
+1642681568 15914049
+-737613743 1304968402
+1326309219 1568760293
+1329641349 -856297156
+-656378353 469693292
+1448180065 1594651037
+1897405427 2128402535
+-951085381 1357563705
+-1439887746 -702026492
+-1496165762 -564099743
+604162147 -1465066714
+1817110902 -1962699792
+1261983779 -1852641934
+-1792881965 1669605379
+384905762 844947723
+1117608806 685907464
+1985825183 1136938486
+-1703671855 -540133386
+-956762474 -1302767170
+-1848438292 -83536925
+-308290277 1463793303
+-1357288190 -1303409076
+-726409148 -1482881090
+1577197863 313613561
+627765245 369884537
+1288977550 1115917570
+-332525902 203969901
+1687114942 -630356003
+1101295293 1747855248
+59153033 -660666072
+630715309 -1022897557
+1940712086 1037067790
+-68889545 2125883430
+371225179 -1878682252
+-621173597 -1864275220
+-1674056572 -820876448
+-728837951 -2107383465
+879292832 1271195688
+1203854328 1036288796
+974187299 -2004029250
+1427201265 -1448263826
+1599282860 1930456965
+514199942 -1650092870
+-915060703 -2033146983
+692800936 1884205192
+-1009519736 -1526870118
+-1376204002 -141559232
+1406703849 121525012
+-378489095 1128973198
+152681995 746761064
+-723072186 -1877272114
+-1827984381 -695733483
+2109660240 1377153709
+2091951161 1653126840
+-1348435782 1292142688
+-1121933784 -1262668173
+-322519177 1151470252
+-1862570204 538697050
+-218991842 383099722
+-1301135546 -1724923985
+949308592 2045737991
+1614063041 -1429323888
+-789306125 88711743
+2075787196 -1665704913
+762398227 138016976
+415052998 2054849992
+2130045978 1845538886
+-28284397 -1413376443
+1738489568 1365674185
+-227489241 1457556618
+-1474217461 409064740
+1626298095 -1754685609
+466618326 -263955183
+380310510 -770662476
+-238421104 -2051773871
+111634066 2038460688
+879763151 -1314764340
+1473261482 938329786
+876012973 -501060379
+-1805929498 73035553
+40489288 389509634
+1563024173 -425270569
+-1339996552 625529801
+374262687 1255553436
+-1425831043 1506402562
+890246133 -879358258
+-2057232066 759624002
+1275537608 446993917
+-1961851793 -296421687
+104462212 -392069377
+-809260231 865720031
+133845837 -1850185074
+78028609 1667309283
+297385202 -353185474
+631627474 2121880396
+1514652685 -1141800418
+382470754 678061881
+2081989261 618080085
+889124736 -1540659766
+125305762 621652725
+2072648304 448303945
+166614523 -702860944
+-1689996816 -2075528557
+2128104902 -103648774
+117883543 -263165872
+-1611679870 -1054029854
+2008752470 -1871268812
+-930086540 -293068372
+1180414849 694395735
+-1856799726 958793229
+407186210 -362472965
+889913202 -1673251150
+1095450143 1180393014
+-1715185586 1818812597
+-2015492188 -1904303333
+-871602752 -1417698547
+-1311388039 -1153321862
+-1595191994 -1924533645
+1411407401 432455590
+-2131601566 1577705880
+710751959 397700514
+1096421676 1586331458
+210392079 -996433914
+2130317643 -1076604308
+1805201400 -384410165
+-124278366 -1840952027
+-1778320375 1241229914
+-1137717408 1071182412
+-329811118 502779947
+-366354535 -1623334495
+-2062165425 -402586739
+-1644775590 683943640
+-221258080 946380175
+1802531158 -805113897
+-943551283 1904718109
+-711498226 1606978449
+-1141840292 -905641778
+1452701085 1581490949
+-803911464 -1602538070
+2124318466 578963886
+-1584760660 753859417
+422421543 -1451102630
+-2001706149 -1557705357
+-1823481309 -2020131952
+1188379220 1785004093
+-883972852 -2099857750
+-2085719523 961230557
+-320242218 781841786
+1155220108 -915728858
+-1004129524 1765007749
+388286292 -1871115562
+1618021434 1548566651
+-2112942675 41767160
+-1719597020 -1307368778
+-833917162 -1084529903
+-1784335526 2108100933
+688789208 -2105926299
+-1500215250 2099417822
+-681707347 1971461614
+-2019366358 1636250256
+-1918460980 1214334782
+1934155125 1635862135
+487966884 -219503466
+323069399 -404726355
+1431980110 -1313645791
+-1769255316 -1224233044
+2114279209 1446932852
+1778426250 -768468397
+323286149 -1713332554
+-1763334352 -472699950
+-1783051400 621450212
+-1074956523 -603752403
+-222218277 -333174947
+-316111028 1908332458
+350413686 1914540815
+1376028700 -856008968
+248051492 2053680781
+-448131554 -941423006
+-1668340410 -1739703740
+-761083358 2069159167
+-147659318 -1164746483
+577946475 1675743637
+-890361028 1815434726
+-1990835082 -286993621
+-533403039 2071856946
+-566990935 -1154746902
+933365251 -359190084
+-1092609124 -812918283
+-2025768181 151652563
+1434737828 -153855194
+1396769948 1745567494
+-1882398610 -1525184077
+695817027 -477591640
+-1707087594 -985470488
+209713812 -582973264
+1689313890 1207340497
+-1464291746 -1768183565
+-45673153 631357006
+-1529074273 -907668322
+-540988151 1137124498
+1600556441 -1590692812
+533355654 -420292053
+-1824631385 2017787345
+359445356 679154831
+-101457374 -1337832659
+1738565178 -1986692514
+823508363 824979517
+1169197617 1289630674
+1250390963 -290281309
+1259708114 -951607506
+340522474 524423966
+-182088677 -241933940
+-1878705225 -1108094117
+-1816520981 -117637908
+1787266767 -74132495
+-941540211 1267712662
+-740405740 -1075050338
+999764078 1548846333
+630989637 -1759923420
+-450058573 -1534704501
+836349261 -1176236185
+1356484083 -1776401026
+113058337 2020058597
+1838564236 -1440363205
+-501520497 248122606
+129830705 -1250628286
+-936206259 -1286143225
+2105050723 827502650
+2024813749 113191432
+-1763708968 226712213
+1947695594 -1661724573
+1937137131 -544906127
+1821887414 1340305077
+2108070024 -1464311938
+1070727714 -54244922
+-1571416622 -1559740167
+-1245306986 1273608227
+-36093706 264763585
+674139406 695944436
+1221657989 -2010787932
+1213108349 -230303801
+-1933369619 -1148723467
+-2029426978 -1968151618
+1931917340 -561503647
+1303116851 1341685782
+1329934762 1719432168
+-2077936445 -1143863927
+700317158 1116123779
+-2109782186 -554806956
+-1068873653 1411213034
+1616192867 -1078275153
+-1355181250 -400906101
+2027063096 -1200977190
+1628068114 -496047306
+-317690895 -2054023616
+-908380047 -774499383
+-1170135478 1588475075
+1162995988 2004807033
+471954839 -1711016477
+-1489864838 -234201894
+-1522905997 -615416935
+1784681048 -23542501
+-301172834 1281710657
+-914129206 1469578779
+860306363 -2142161946
+2003079769 1513515658
+860019645 -377747559
+-1537710412 -1004340638
+1858011555 1958785485
+-2090073628 2088041233
+-1743152823 -1834985818
+-1554187755 -2071195964
+154880938 1480516358
+1389086617 -153833755
+769656071 658486083
+1871085236 -677087703
+1326228627 1382753640
+-312579726 -1660028026
+-1625454141 1069125336
+-1842621019 1249709021
+548723623 -364221727
+-1454074221 -514252077
+-619199691 -1199987949
+386715096 2003866029
+1460900456 629671082
+-491197838 -1710499583
+-782336085 -221046436
+580597425 -1865048820
+-22147493 2142806927
+-1022726446 1126348130
+-883665864 -1109746490
+718030111 -1304079524
+873445785 1797728485
+-1675082559 710808323
+-711209622 810970349
+-946709564 -1074016550
+501745052 -174437110
+-853461506 1278193531
+-1167833574 -1526592436
+-1696309353 -2075589163
+338401992 -1257504605
+275594068 -822596319
+999242536 -1171703282
+-1016598839 -1098002598
+-196822648 638411702
+1394615355 -149735669
+1736117649 -1198030136
+-345302905 -353799407
+-961332072 -643290103
+-1554655182 -1370122843
+91096423 -467788206
+1989027986 -1160151654
+1178230807 1252725306
+1921417819 1021467432
+-975808760 -1437133173
+-2053110849 2130928499
+821036220 -344250413
+-1817699116 -1218789614
+-165130913 238559905
+1158168632 -148503747
+1664294133 -1632885542
+1585293071 486124308
+-128818796 2123617217
+-396230529 -948230055
+-1629239500 738024937
+-1347320899 838921593
+-1555754383 -497472902
+9834919 -1355888408
+-1029027916 71669899
+-134624055 721784575
+927927659 1522718455
+-451509772 -2115574683
+-601217980 -1038161836
+-1006941006 640686595
+-1354978883 1731875480
+-2109089535 1984336325
+-919880638 -493208750
+985550668 -392154179
+-402066716 785527725
+1471973786 -1462783464
+37330968 -812766557
+-1262063848 -302392189
+-1821703199 -2051835852
+1999973381 -500052531
+156714510 1544698139
+-1909653336 1456875880
+-501021978 1824058370
+177369766 -825564836
+-88921035 -625243011
+401868010 1379697516
+-257475377 1249924659
+-913005221 1493609879
+-433894999 536266992
+-1187356854 -1185719388
+-908897269 1802405688
+-270621771 -1472155023
+-1085195189 98946139
+1870143814 -1577551266
+-1780015744 1279363053
+1797213469 -140613825
+-1956782003 1761739439
+-1787836579 -1791175392
+-1571708769 686961420
+-1069262609 -755969828
+-661122701 945720877
+732896930 1929073106
+-19743068 -1372609758
+-308222686 -1207044004
+-730829062 1702425172
+1046910859 -1974620079
+790508377 899450954
+1165644810 -2090928574
+1593753003 -466401188
+347408164 120675606
+751627912 -1480555239
+-191959082 1785222313
+-902384838 -671221663
+-716847484 -806133300
+-1040054511 78262496
+-2133225685 -1848912875
+2076613686 2091643484
+1479859582 -966240738
+1700447356 -786214316
+1002649338 -1658452642
+1024317572 -1535090240
+-29500231 -845159950
+291785863 1472974029
+-980083516 -450642089
+735592161 1344895472
+-1729682096 -1684156953
+-1066612778 -269508954
+-361748021 611138422
+383479463 -1579415893
+2085020453 -1759147470
+-1364192686 -1513557070
+1094165077 924018090
+-835269519 540874309
+-613839746 830326537
+1096454430 -1987647408
+-93004364 -812244084
+717626615 2030033837
+-352832468 -674899931
+-1235595093 1788130405
+-2032362643 2117794590
+-583652576 -1206937375
+6406109 -2138491995
+-1276487306 629581540
+-1973223244 -1227127278
+-1220622801 -78929986
+-15576624 1514693867
+-332538617 1863308290
+460051384 -373120653
+303510202 -273479422
+1261329598 682735166
+2041532226 495114334
+-60444024 -940494820
+1988618062 -1876685211
+873193071 1395073548
+-24234558 1466198146
+982244771 -660351316
+709543537 -1407601416
+1080990171 -2007498702
+-1522192566 1701616804
+998253960 1237804386
+-1945755955 -809713336
+850815894 -737582222
+-905096367 -1711766747
+-1088676105 -275089196
+-918929716 -1931527401
+462420608 1843551784
+-2024327693 -2003590788
+-1021158015 -1224420556
+1352741088 620155187
+-423264708 1818265790
+440501617 782737667
+2116405551 584812601
+1550212210 1743301022
+216077868 -1989788904
+346261292 -1613655527
+-1355477728 -1733849750
+-3651972 -143560866
+2026440614 29695779
+821140841 -1459897638
+-1202871271 1204077696
+442769181 -1772937943
+2124887767 1071905313
+-505037219 -277920853
+-1473144261 -1621541699
+-17430203 -1315509782
+-1350718008 512358349
+-1383129596 1843776193
+1211136670 263915430
+1170381969 -620010879
+1836281322 12265610
+-865722035 1726842090
+1689079468 1445723905
+237841352 -2100798948
+-206592155 2147129879
+1280614541 -445087733
+-2019698860 1974133337
+555197726 -1819303446
+-430009452 -147043496
+-1372920972 -921541239
+1822272057 1660686855
+83874911 2126568421
+1062660819 1848783270
+1604349766 -836554724
+-1164181496 1949148336
+-826413967 1087674482
+1694933611 -1148614848
+-1874715204 23277473
+-1157488495 1898489064
+-222847478 -1736602209
+-1776683627 -1856336843
+-2032894900 -1531544984
+1690431029 -295511777
+1026894290 769828833
+-1117919736 615555629
+-708994072 173203089
+-208492946 148519749
+-635763071 -1740248042
+-944049429 960819829
+1613666258 -2140866379
+1455901093 1455097100
+-1323931893 -2145718376
+730676637 803804672
+-366482403 1445956037
+-744150192 -236616183
+-1064705792 -919240873
+-530216601 930603345
+-6677286 920560039
+-826876607 -1795184028
+29756262 675257641
+1888462075 -1101864880
+1063028829 1398260855
+-1848916362 -1989046464
+54473573 1170212968
+228479401 -1498843631
+-1235909447 -2083322471
+867503795 -626858021
+947323747 -33836492
+1000499767 -1545187199
+-828011055 361494476
+643095079 -2009020070
+1087794948 -1134146933
+1792392653 -1388905383
+-788928421 1190794468
+-1519009360 1959295732
+-2093331996 677328056
+1235937303 1549845168
+1034997468 2124887089
+-1051829772 877384058
+83237107 470717584
+-1197089022 298414720
+903203079 -1120708859
+-1067559221 39093767
+-1691298094 -1805462357
+700345890 -1989000673
+508127106 -1903778678
+433113480 -311051560
+1337540965 1771494274
+-1799404492 1754740153
+-82598833 -454239482
+1966066895 -1839718207
+1182981371 616051015
+1987520126 -1876422453
+-690888295 794192659
+776255408 1186620726
+-1217554409 -992741783
+2051955598 -1768679534
+997130767 -1081880719
+713450033 -1726050181
+189071308 1868412276
+-720307716 -1443708015
+1294661891 92301789
+177826450 549634543
+1585889520 -1524518705
+-720369768 -1674004757
+-1971395048 44208900
+1547896535 1391243564
+-590111947 -2096162739
+1014196445 834710341
+-202739979 964053612
+429611959 1892213917
+863933736 -965130393
+1363444748 -634866592
+-1283586269 2074272591
+-1482513773 -2856466
+-1956820655 58514672
+1267082230 291485879
+-1658270286 809110475
+418411938 -1829622970
+-2138819097 1241251645
+1490108541 1297714262
+8205972 316103179
+1457606859 578951705
+538421525 1337668633
+-936756535 479277452
+-977619868 -1033788830
+1430305048 4612505
+712412435 -200454127
+1466363396 -56898843
+1005159701 771714320
+2131601322 -1555754960
+1934143242 -1071567822
+1988815925 -243821402
+894110595 -1596838136
+-2132445629 -1582342245
+1832046505 88062696
+-162167091 -1992247652
+1236675835 -472276573
+325821727 533937915
+-565932949 -989321512
+-1134135939 -1021403438
+-626834675 -1066068789
+1026617764 -102833931
+-1555658139 -844992257
+1428946992 822070185
+-1868932519 579303359
+139378757 333653273
+-196840005 -982031699
+-54976294 -423475191
+1456842101 -1377252943
+858996244 -1116419325
+-280241242 -1249402267
+1241080381 42945970
+309941080 750799232
+-1388378235 -965319732
+-377516701 1374151470
+308857974 34547031
+341517460 -247549682
+-37468079 1496343751
+2008798482 536618975
+-1185572060 -1434236650
+215333821 492471454
+-1587709118 -2103324434
+1754444908 -771104335
+150698196 1552011737
+516629208 890732784
+-1507175963 509305011
+1791090830 -618014926
+-1858375390 -1920135874
+2068080147 -1095301812
+-579979919 1104550093
+-875819275 -1479367107
+-571472732 -1993408237
+-457661836 -163353327
+-1215721731 -36077553
+973864726 431071226
+1364700728 -2105595980
+-1161796562 766979252
+477826639 -2054015191
+1768378820 -1337518751
+1069143058 -1789337075
+-1907765037 -1700288130
+1052023785 -1944318406
+411200724 -643243679
+-776626487 716885624
+-1993253471 -1896013655
+1815093261 1756420250
+1635002614 1528416977
+969194159 -1449158374
+22187352 636375191
+-1669150889 823767418
+-1311148305 1742406572
+-802090203 -493867244
+350358820 672726918
+455677928 -1778380549
+42091110 2069019870
+-781661526 -435034960
+1152928899 1986924011
+-463570130 1423117873
+-1805972852 -101052982
+2137211080 -22677589
+1232866506 264934227
+-1363031761 1776505269
+-321854901 -1514071908
+1783378552 1703785505
+1520803510 1062439231
+13170923 -866543308
+-1229115283 1037903373
+-1823105070 -1434569969
+626761704 752143225
+-1370641437 1018911709
+1791842242 1340658764
+-43007648 -1749646007
+1602755619 795508587
+-2005493542 -779957148
+820497719 1044258698
+489314902 -406736046
+1346986128 921783322
+-1523414731 1772158573
+-143120485 -2136983365
+-1382353658 1790593522
+-1008786020 189159613
+-1939350651 -1181881727
+-576700010 1296196249
+503641088 1010550535
+-1961597270 1256045163
+646241212 -545025776
+-72949842 -1626486285
+-310215094 1449136804
+608760756 1227433282
+218339275 137276906
+-1526858379 1022625057
+-117967041 1637909329
+-762392623 1943279133
+-86245234 -1071177788
+-1302340552 368356363
+-823012004 -1455289476
+-670493822 -371836782
+754459898 273695955
+278681123 -1366187482
+1714351293 1370727022
+1542597494 1488204102
+692338923 -1993401849
+430176723 484298867
+-1230247171 -1004907745
+2016090989 1690255956
+227254335 1485803976
+-65270466 -1959248835
+769230183 -1589459590
+-2124454545 -2031994877
+636298996 -1100594939
+1633447338 -474026713
+1412282089 -1997966700
+-790467178 -1951134541
+200503929 175995425
+-1605150012 470843407
+639936346 2062279558
+-1063727459 -1746905340
+2063276251 -1641554916
+296879360 1479724323
+-889306724 -1542240325
+914090080 -1080382313
+1562085245 1695159201
+-1266494565 928547605
+-668058017 -2113338288
+-2079131114 1871077499
+1232366794 -1647816833
+-424496799 466932683
+-820706979 63916064
+1454195986 1594204998
+-2044681174 -936438008
+1517317370 1297618796
+-646243679 1453112356
+-293235800 359296295
+-1723450087 205633894
+982632320 963476565
+912281077 218654951
+1114410224 -1679211068
+-1924857707 -1359036097
+1017382101 1823970754
+958480334 -1476635306
+-1099323130 -1416314067
+-1065116292 -1673238363
+201268902 -1168268769
+-168034875 -342860508
+-217222975 -36224526
+-1051821424 -1616531133
+-992985782 755519262
+368164729 304875289
+976483827 1217253174
+-1074540321 58796520
+822107687 661330673
+-1573179133 497506665
+-1292967267 -477273705
+1553475725 -900796372
+-283021984 -510662248
+-231826540 1800883537
+1841517407 46659228
+-184680990 97386543
+-1599170238 470474154
+1308761197 -443896316
+-1182975938 2090414853
+-458205928 -1327313198
+1231108903 -947758205
+-1023329596 -819169166
+-631567711 1655925533
+-477543861 663037756
+-1191878739 -2147158062
+821729956 -1367916671
+-793312373 1148954890
+-1055696381 1196374867
+602830092 -644201584
+-961410310 -1981005544
+-1250172097 1000818275
+-1835075477 1913817645
+-729796102 639889876
+761129267 -500686345
+-1313387650 -1342732000
+-852739224 -1481299460
+-1836897398 554486809
+821394742 318284950
+1731314116 -669431676
+-424134970 -1261632762
+-1386579452 -1907441771
+1816212486 -1282834744
+2026469820 -577377844
+-589842515 -498658260
+-747084952 1253396129
+858841206 996604397
+985700969 844906818
+798233443 421686394
+1025704262 1231955193
+1950762054 1917964210
+863992813 -1094902836
+-1243455768 1184079918
+-1428246203 7034049
+-714654138 -677478699
+1918276095 345899327
+1057543314 -1201551334
+456513948 -171028506
+728273569 1719443751
+1345683611 1974060367
+448265604 -216489575
+-127639941 -2050600016
+-1956493851 -2025398196
+332349292 -968543411
+-1737492362 1520400314
+827500054 -618477395
+1622772658 676485668
+904097714 1491518385
+-1971030180 2124145333
+828730935 1326392711
+2006508697 1824537480
+1037306716 980377967
+1153696505 520465604
+1154180181 538576538
+-1236983779 -677262951
+-1597479555 -1649373698
+-1892223772 660627509
+1449746283 1718120268
+203355134 186316314
+-526469429 1109734802
+1718649134 1519973104
+1646265212 -731456343
+997410676 -279620309
+1071501521 -1337550554
+-432691173 -2032740342
+-1494798173 1933261885
+-221100539 874193736
+-539893001 1123872794
+-134895899 205211831
+1679747560 -1859990975
+1176119736 743188794
+542184426 842881767
+-628831344 -1215566848
+-1451957856 -374708225
+-390658406 -1870444787
+19424639 -809914603
+1865154088 1642469460
+1871836763 1397771756
+-878347560 945393838
+-531633997 729496863
+1671263505 -1495269473
+2061171832 972149035
+1795756363 -2085070669
+1769381123 1490212861
+1586625604 693963522
+-1968776125 -1455656583
+-1754161794 -86888959
+1031834786 1848911603
+1503628278 -1787621095
+640313277 333996578
+1987997926 1369781349
+-1599853918 -1985800832
+-1584778494 -358825552
+-1511644703 -1135979423
+1479891288 1917870476
+-1518773302 2072187372
+-2035019098 296346093
+-1496486393 -1924503403
+341401970 1359216883
+-783078314 -193406064
+-2091576148 -1482899211
+415498065 -467008744
+-608365113 -1622559005
+-517395838 331136635
+1338607351 222914194
+776586248 87193897
+885403164 12464292
+-1261303609 -372536027
+-1418384569 2077333596
+2099984118 511413535
+665593089 278523947
+678051045 -356099825
+-818113146 -787617661
+1675455646 -1584218761
+16773991 -1525631247
+-841634679 961939515
+-243223141 320805881
+-87035707 866074791
+1129840849 1086417255
+-583799097 -1390505412
+1212707737 634335214
+-1930630822 898374218
+161252443 1735514524
+1996982893 -1113772724
+-1303756740 1948897889
+132504557 -467710519
+-2102360772 -1675990368
+-996172839 -599750341
+-1120364537 807126335
+310375786 1850509524
+1949536925 -531990028
+-2129153143 1942598528
+1343598897 -1667863643
+-1927179279 -472844684
+-1725272478 -1469089460
+539648497 -1765061504
+1258426414 220415617
+-1521299267 1190902152
+-1193629526 -423103952
+-1668550183 -1887163601
+-354006595 -462389207
+714936486 -1106507250
+-464020582 -1850382334
+303409648 1090464668
+-1178734600 -914934179
+2088659494 1072100805
+153274532 1391637893
+-1272507023 -1060343865
+-600091598 79526001
+2146542048 1772156170
+-1789284066 517286774
+-1836977698 -168631693
+-1262088447 -939271476
+831369293 585257125
+1588202686 1692826532
+332224884 2083510740
+1451805126 -2145861115
+1532674546 -1626600620
+-1462375683 -584551064
+1612272271 -1845244103
+-838151852 2053915682
+404324421 -298785136
+-1889919987 -1003452159
+223033422 1995784743
+1115106637 1331254312
+-143008703 -278618066
+-785863188 -535380701
+910112243 -1691841121
+-1270224666 1435664725
+-170304835 614496505
+1616607465 -1517401441
+-2091554841 -1078651938
+406002547 1860306745
+-506311041 1316543376
+-37477349 1712987406
+-990017956 -1163566346
+-923171310 1086996363
+-1001792112 1362720366
+-2129691758 -1212617380
+-2141890401 -1238201375
+1876019375 1718932253
+-1113597850 -63321606
+-1474255843 -960819931
+36475851 -1976271947
+1543586716 759584812
+-1884103473 419678798
+107752236 1558972736
+-908744628 -510975628
+-482036525 103580720
+1628718086 1492673314
+-970578231 -929212808
+-1705822002 534648036
+1430319158 -307633232
+140045275 -715348749
+30954748 -521737976
+-178916544 1912826569
+-1992637567 -1355060916
+-432458868 103187846
+-1481090804 1050998469
+989844790 860499138
+820402779 861021722
+119514388 1677765132
+680561904 1054630030
+1367063823 -1649767934
+-2023312671 -1751915835
+326481913 -1566071304
+-1875596855 522108288
+611234585 -1398904530
+-1858772770 960322271
+1875599396 479977381
+2020424 -2074317655
+917558066 -1493996514
+424601159 -205266748
+60884880 857289738
+-1985505261 1994786071
+-892074405 -909674123
+-536382303 -972169942
+2048683054 -964178514
+-2141194154 -46590453
+637457781 1180384202
+1377276599 355282697
+947566354 1723539104
+1426866160 391818371
+1810199337 559704094
+-579572965 -1435015124
+-824726528 -1985922330
+-1625242736 -1751528626
+-2004648352 1833259324
+863376739 300774060
+-754979055 1113602842
+-1713420825 1643652221
+-1146136931 -495770468
+1809345561 1309743545
+-963627726 -396729827
+-1384593017 -306692175
+-345892394 -194239968
+1723065309 1101157358
+313665750 -1219286161
+1350779036 1948075657
+764126248 -1745794327
+370709209 -536429293
+1362995818 1706625574
+1660285016 -178702125
+1644913656 -1428929743
+-882024238 -58816499
+-849570530 627926815
+220316439 -1517633966
+574950379 385023551
+-1029077225 -42107226
+1892798791 1172841615
+1863484812 -590977580
+912661395 58809064
+1497662911 1142661545
+306471860 935411158
+-513392279 1154360584
+831912085 1035525190
+-2127366378 -1701286970
+-1566910987 -1057962070
+-1221847074 -1596299558
+443661501 1891565764
+-1460057088 1310955783
+-1559447398 971641214
+-744436639 -571205249
+1437216238 -1265707744
+-1206696367 1376013463
+-1609236218 185447955
+-641110752 654316346
+1044337644 1061596855
+2046103843 1955928340
+617991101 473926202
+-528894517 2007647665
+350929180 -1187782896
+-858211860 -904798503
+-958034527 268772020
+-1853158021 1366912605
+-1340233642 -207668809
+-28817520 403094898
+1744155697 1129727232
+306246599 1478185861
+1538217631 1526689793
+290367101 1515457114
+-799062890 505104845
+2114538235 195137895
+-771384985 -1821238905
+1892269941 1404119813
+-1781697394 134874635
+2076879784 1695141109
+-699476789 1516236063
+-713510433 596690809
+-1381339957 -728781563
+134618028 -1637274540
+-1578021192 -1116331413
+1998734057 -525652091
+1385267652 2087712148
+-1995735445 1759289086
+1545691007 309706537
+1672352508 1006864383
+-2052763777 1934975298
+1874589843 541882191
+1331844124 249588503
+263789656 -1215597983
+-1041840070 -59921450
+-1527064884 2089823732
+-339842304 -1398817221
+-1041175051 376720858
+-1009936419 -1170396945
+-1347733006 -1025146390
+-1734973993 422343334
+1678985426 -115014175
+-92009028 1778872497
+1931431030 1637851413
+-247986544 845189673
+-1256874532 1418195614
+1128873267 -1426444905
+224761154 -848105187
+1072515439 1844575733
+10893431 875395218
+888971134 -1664099386
+783980232 1011391276
+-1690996074 -1518460808
+-2003502997 91150434
+-1641941069 -315301188
+478878403 -2042408833
+11164780 1087544093
+1826428317 2098930300
+-607498441 1883685246
+-289368454 -1708579854
+1559248535 -1419527053
+1555529346 -1614280384
+1161637094 -768237464
+-389653563 1696682668
+669608500 631135195
+1205295011 1662545324
+295657912 1601717223
+-1615745989 2071950740
+939276460 -1107566207
+803092924 -163835388
+696389734 -861260367
+585542107 606346713
+749756424 -560857537
+-62309014 -398051937
+101349438 -1693600929
+-1238684153 -1677467906
+-453942010 998387896
+-939630352 2022277732
+53311279 -869568285
+-1382048502 1146162103
+-1567525213 -1286266131
+-1016130868 -555839663
+1805773968 1374047164
+1159591892 -1788202078
+1588384834 1618139508
+-1478080232 -1468630865
+-1137329039 976013066
+-340832450 -1220719643
+1218884879 1543437605
+-1643371903 -1421339639
+-756147379 -1229781470
+-799772074 1112356671
+1066822501 -497119370
+1630082355 37322250
+1962175644 -1996319614
+-970896339 -64759761
+-1796272259 1665728382
+-8922630 -154998583
+-1019524984 499295761
+2028301550 -1828929100
+642730108 -389900899
+1631928796 -979927891
+-1662911749 128561804
+571465668 1263440374
+1898039514 -1176657422
+434319167 1348394700
+412473183 964522492
+309449125 513356268
+-1707340080 796429141
+557848397 1998581070
+-1677766075 -557551876
+811403247 -376071897
+-1979893004 1461569305
+1026828642 1323380332
+796786173 681623968
+2057511885 1679687353
+523844047 -149052726
+-1171244049 -1119366199
+-792298578 -654575050
+1195831315 1122182707
+-1862269695 -62830287
+924540563 -719462592
+1008822980 1335681981
+2057540558 -2074456950
+215762955 -1041691562
+928742920 -251446061
+-1778447133 746043902
+159848384 -459371840
+1904064505 -230431719
+-502112543 312274612
+-1994085824 1286902258
+1458240000 163755941
+1656785615 -1693135778
+-47627873 -1701520090
+110099783 -1286195231
+-2092204471 -376406976
+1601812805 232692259
+-1790953771 -1910263735
+-1207257340 1631556996
+-1248509882 -1643630936
+-1615143250 -1701390720
+240727132 -60114505
+724288861 -1761324627
+2037015861 986115110
+1445477082 2014141186
+828610116 1480458354
+1302640390 -1972902725
+1209264479 316510425
+-341518738 858740987
+-871054539 1917524857
+-1081753713 -1526035427
+-826055822 1205284267
+2082846466 1550704974
+-132291584 -1665884927
+1369154955 582973324
+316616976 -1849441125
+-1484710001 -1406743147
+-1055172780 -1026127841
+-121480319 -381554132
+-879295863 -265587108
+-1844450220 -143366478
+1537590270 209567536
+272335342 1968377033
+194341726 102820485
+733402725 -1954997516
+480104542 738121373
+-415267211 -1904756787
+1148841294 732736847
+221619744 -472191095
+71167893 1131390103
+1285801647 -1392064918
+-1762306092 -296047956
+2021876179 -1409582695
+814383494 1523404779
+-516123001 -273218429
+-754171134 -2051509912
+-1732822543 -370555884
+1808291670 2055055693
+-1142690227 1632085850
+1558887995 434364115
+2076422864 -1621212738
+274111994 -774953580
+23664446 -164730482
+-1244813448 1779693375
+-703396104 110300429
+1471473070 -101910497
+2076083442 2083788987
+-69751156 -348133239
+1368413417 262710636
+397388636 -230017420
+-272206409 -840155646
+1749334667 1613183640
+1862131685 -1138792972
+265233718 1162253656
+-831993894 -360966171
+-773977552 -577472990
+2003540241 2087006683
+-1243021596 -207684144
+1260064681 -777270968
+1043315838 94403863
+-1998185193 -1522008321
+398911315 -1121091658
+914890938 -1771114243
+-1786498517 441407784
+767249461 -1995704925
+-297452255 1131762421
+-1679396897 -999655602
+-1441126076 215394842
+2038544038 -114066360
+619327586 681132070
+2059266360 1689836122
+556324384 -1556347650
+1969331411 416082718
+69097245 290223056
+-626068050 -66445703
+1332397989 1115748147
+1378161974 -2134834168
+-1080188222 235457749
+-1734685660 1514367714
+1316236875 -1919725201
+-1083653226 -676075894
+1415215296 -1648030554
+1609838182 1978019461
+1343782175 1042821820
+1022617934 -354833373
+-197521851 1343046145
+-1751915511 773541859
+197227752 -951329200
+607876947 -1357296476
+1547412558 -1526071278
+-705128259 -1217847262
+-185063662 428178923
+1902562323 579776480
+2008098170 1069559888
+1169673611 -7850217
+529121091 -1379478256
+2007990520 -857391067
+-54490559 -85241824
+206970603 -422100818
+584846588 401423204
+2020209364 1791700532
+1266480560 1068823683
+1262386376 -1993240175
+-1033229706 -1513550593
+-150831522 -1109514699
+1845977082 -1265927692
+1177936784 233037454
+1349214476 1629196547
+666814758 214142334
+-295296220 -1854550243
+-231532752 -515826633
+22544247 853002290
+527392285 1048298548
+-80909088 -1590703063
+-275320312 1746969452
+934548822 -1338726059
+1989518232 -1024988267
+76546217 2063396435
+1908077577 1288281562
+1545728491 -323502923
+-837349083 985299877
+-966881628 1553648309
+261064724 -33110376
+-339420936 -1400318519
+1453863131 639932114
+-1315159855 482063011
+217134958 845322831
+-600213119 752398202
+873558595 1983256457
+1809023566 -496661396
+1049445624 -575195565
+-2062530886 1569593787
+-1434473508 -1891326037
+289355259 -1238584254
+-1045837043 -286901402
+457986420 1738860795
+-672617881 395811744
+624904732 538191375
+-1056845338 -509452428
+1145559772 -707784832
+-1148711770 612774921
+-1862068498 2050843670
+-2097107605 1431218654
+-670937589 -2112641169
+-1217476749 -1944864181
+-37902244 505843240
+-198199352 333669486
+-52989786 1584958754
+2020188671 918221611
+2062845179 1814128560
+-45324513 1285709354
+135574095 -1475157307
+1373935219 -2135744589
+-1544103517 274392838
+588840028 1474430586
+1484972732 1980617771
+-547153008 1967040307
+1473718745 875586722
+-1146788198 -1986420035
+-2024287892 518491797
+1440232276 -1027956742
+570323392 -1220843734
+328580136 1110345334
+-2146180643 -1051501045
+1422285748 -839714768
+1768040711 198733705
+292093995 1385339692
+-134304137 -1123621309
+752450189 -1638360901
+509524498 1261658694
+-731373319 -228977119
+2120806224 -1966692049
+-2088894073 1033531068
+6358902 -1903895093
+1239903757 251490999
+-667517411 1184596580
+-12433640 18985894
+-379541875 334469548
+-668172304 1243014393
+-669238105 -264022505
+337745396 409745752
+-500977442 1375718934
+1606090505 -911276712
+1717875096 -1996527470
+388651105 -873373368
+24982473 979493466
+-1929160312 -125211763
+601225073 33516553
+-67460959 -982039231
+-1578771177 510207698
+2110508103 -1962183549
+1557233528 698225024
+-193394207 1549254026
+-992758536 -922372707
+1166070492 -1687299118
+102042492 455982386
+-1684906493 -637331383
+-1180905146 966490788
+-885174051 -1505911664
+284480850 1690583335
+-1281290978 -20354719
+2131950768 -1038014185
+785160154 584901184
+-767854736 -890712677
+-1435886859 1113319649
+422397833 1843942040
+-366046297 -292170493
+-1356600247 -1701737611
+191006115 -1922845315
+1411394499 347592544
+-587473134 -393149863
+1861081416 1466335255
+-1469026255 -2102448958
+307089368 -1750507357
+-1111394393 2001165990
+1426242398 -1512738915
+-1827679226 -1058212133
+660574789 -1282629171
+423322840 -121531002
+1587155472 -1998170514
+412941724 -345468118
+-1791405433 1693491349
+-1842132488 676319444
+1621844412 427451974
+2108850961 1693536240
+794368708 965494321
+-664790973 1952271557
+-1453262268 -2004418266
+7094754 977235112
+417891382 -1362888657
+-1448070274 -382351124
+1558460777 1906878488
+1713865149 -1558780296
+1387953574 -1455682766
+-894856045 -2020551891
+-987680727 1863471188
+385559984 2036703154
+-363026871 -91030278
+143956770 2073311025
+-128869451 542855725
+-1237302792 -553234261
+-1775041652 -578514452
+1167006954 -203458251
+-740529373 1767504086
+-297906187 514795552
+1925292390 97898984
+-1908351635 -41693614
+-1695924724 898061467
+-1992885001 -595973634
+-334184195 -809452586
+-600682243 199128731
+1197390412 51015591
+-1391540413 -1137881075
+-2030326800 -1721441503
+-221348039 2128206481
+959726504 72267020
+1951419492 1658756549
+1103925825 56196800
+-847225882 -1344318610
+501757262 2073923127
+-1320838941 -1869534794
+162698109 -847367288
+-787464570 -1617514942
+-1523142877 -776950999
+547001309 -1835110895
+1680691080 -331801379
+1753062184 -1757219243
+1849014151 1000636112
+-1689309305 1826108793
+-490149914 -709205556
+-1989168937 1078416863
+1462136354 -354132300
+1467714451 1087245580
+294017961 -1594183619
+-1492711770 -1215358090
+657288189 366388792
+952835661 1202118682
+1890190296 586215940
+1865820048 1199481948
+30729903 489169620
+1022432632 1776170616
+-1911483774 -1178416874
+1689136809 -1747864380
+512882191 -1778598887
+688793938 -1808516519
+-166295368 556208073
+1237874284 413918902
+1817226856 1331810540
+-1807680802 1474951890
+-1154895347 1691747314
+1810255635 -1090276492
+65655649 1244393176
+-1137292767 -2021448989
+1084665581 -779636174
+-1445561957 235323821
+1441417620 -1161056565
+-1219457551 -1976809755
+647153536 -1896523119
+-1500156183 807337217
+2079322634 -1485751794
+-1758290841 -1094054131
+-1797842806 -1168976753
+2036874985 -892794424
+1083894669 399942207
+-146747563 -1611845420
+873594539 -1245847838
+-1283733797 1468021665
+-1345026501 645536175
+-416948886 336302640
+1723612150 1558951831
+801728087 488384055
+743106188 1271761160
+-2008542442 849884832
+568839984 1031559659
+559054257 -537705034
+-1107257379 -1707004904
+1397615021 -634536581
+-722130645 811500230
+2114967852 -909968673
+7884546 -1388830552
+1654018075 -703232484
+-255615075 482955774
+-1064545248 766094656
+580604228 -1348782321
+-980760715 -962035814
+780672819 -1287850156
+1764934004 -899874938
+-233880522 -1849226472
+1363596321 156982081
+872147850 1833254981
+947597760 -1038800351
+1826223098 1651793641
+279916195 2024948120
+1799113734 -1836666717
+1324589707 -2095416741
+1607187101 74064426
+-139365442 677261620
+-2106116556 -1208286498
+83451027 -1906583380
+802466876 106189169
+676679096 641206879
+118373547 -1058743613
+1398171815 -1751505250
+378865518 143666502
+1442920274 -248365618
+-1278189526 -2052858312
+1268371237 1577850155
+2075203090 2135245574
+-1256244935 -8805340
+829483173 620763421
+-2002531889 -2062787564
+1655783015 -1428197984
+-1262809202 -575043592
+-1648199375 1919579913
+252689058 1698172866
+-87754904 -1929123209
+-1666500171 -1846417920
+-503220869 1347815457
+-346575284 295587277
+-373616048 666490389
+-1701744612 1902447421
+1003404979 -1307655014
+-16413036 -764757073
+544675123 498025342
+1639448818 -108019053
+1964052581 1889357646
+-27456852 -2141695502
+-1334284980 -1137939603
+974043404 -1870305909
+1962111281 1057925572
+-882453261 -1420415907
+398882840 1949836191
+1237182625 231434391
+-315220317 2090347601
+1321793626 -382668680
+1974468257 76941763
+-242547083 -1759507202
+-2003975877 -810367740
+-961963905 -1320165640
+1865864192 -2115091281
+-1086170025 -892938729
+-966446615 1229235470
+-1531364389 -1833346810
+-902144908 738774210
+-1684690508 66409627
+-1515330770 924468736
+662744555 1071515584
+-337209869 -1099379226
+-1804314403 -590284080
+-1414161461 1440982479
+-380540642 225485452
+1097246317 -1296468011
+-732024665 1686202840
+-173156130 -94012208
+832062615 -1642903986
+-251241099 -2135151267
+-634929926 2144031349
+681720015 -916543248
+1630488868 75357799
+1205818495 -850207452
+2071926130 -1494411929
+1123894890 1509871504
+-655034720 1465289988
+1132386141 1664803016
+-215263658 1699115777
+-1032950192 1378788948
+1577048079 720876832
+1029249852 1962927256
+2063005014 -641840007
+-439353458 -535085547
+706110447 1772414632
+1315762232 914184317
+1233803431 -1170683896
+860352125 -328297357
+1331150788 -2117141261
+1023996822 462665553
+786719970 297972847
+971105040 1994974776
+-599497204 208067316
+-1433703219 -1439387476
+-1996301658 457746946
+183678765 646649311
+922366335 183343091
+-288444972 1644330255
+-1938007437 2097391170
+245527266 -293084582
+1494023346 332142190
+-817728568 -1792564494
+1530118160 1298786945
+-248088653 1048297235
+-1966832772 1019082888
+-1979261227 -131361604
+-1748475311 557752643
+506786603 620825740
+-1800368519 1224859817
+910748066 861131622
+331717046 1949982519
+407863676 -1389787459
+1774968736 -126330559
+1290165965 1081148743
+-816631922 1067926216
+-647034047 -212980274
+1196262875 -1367255070
+1581023223 380930578
+1665960323 -412290684
+989823270 -2028957889
+2075361726 1870461516
+1479065089 -2096587909
+-966093467 235908812
+1739978769 -2082004303
+-1491442581 -1647344260
+-457448643 456416066
+1259170340 -1070337445
+249773849 -520051535
+-2128839536 -171107106
+1043168836 -1409491312
+-77561657 866679857
+-878787492 206250280
+573480130 -11694076
+1344233024 346971738
+-228747916 413160053
+-2089554345 1118452210
+1449999657 1931128986
+1175232695 1319529602
+-2027596840 1764279527
+-187065632 1424276509
+-1799815943 -2104363806
+-1469657762 -1271131574
+-1533039908 -1935376922
+1031314238 490701097
+-1938213425 94989764
+-1399932287 -412327014
+-268720713 -1061983987
+-1248891158 986660964
+217530983 -1873600264
+-352877310 1105037088
+-1675584357 1628662021
+1083951621 -1223128286
+1616167713 1853767546
+611560253 735714969
+-1881624179 -741053915
+683803610 13447364
+1649361314 -628157877
+1731021514 13268989
+-1360479210 -1842850275
+-593511606 -1412336896
+405946404 -383456538
+-577083335 -581696112
+-1503226221 1276160996
+-855026298 141858174
+-459901395 -189140122
+1153934931 -1456233554
+-138644116 794804472
+-1742454048 -270798709
+1029360096 -671968123
+478157929 -1287549575
+-982742999 1710328781
+-1695681837 532547034
+415281473 -187450118
+-247800781 -99273432
+1802467499 636669960
+-1193551453 -1909138793
+-1086149603 30282867
+-2124934757 1822366363
+748452472 -1969346699
+380714352 -317921436
+-1098246953 -1860268665
+-127784796 53852358
+-1657858836 1474978590
+1645103705 1659709249
+2083993740 -860286786
+996916726 -1239595814
+-1678601372 -1998370038
+1723526040 -910910723
+-1579385840 2124038213
+-381738695 1578170094
+218337059 -1642601169
+-1842129486 -721381629
+-665877872 828895506
+-1762148221 -508376991
+-1124109584 2143080809
+-1634020562 405803249
+803328144 -1217215535
+-445578200 79346011
+-446596115 381134370
+-1137279678 -904543765
+1750474984 699821831
+547634229 -2092866077
+2024839644 -1293505427
+1571388545 -737993767
+2053292949 -556900151
+-144782914 1136895417
+609430856 1093647744
+-1270439004 185844945
+1471956380 1430288778
+422968181 -2103677160
+599001027 -1313234103
+-1676826772 -2003980821
+943811451 632340577
+1032516499 -577670048
+764236900 -1367277833
+-1995645762 -734888304
+887817713 1229085318
+-1027357052 -1041791513
+-1774817923 659969100
+-197185778 1127710075
+-504432557 -333192681
+1898862671 84295571
+-1586718770 1990612799
+-1779462554 -1309369223
+1070017570 888718728
+-2091001420 888268506
+623576352 -1887961815
+1991924467 1688803005
+-1180651224 -1271816267
+-1713183195 -1601791340
+-1599908314 1016863101
+1054128205 -1301028878
+1666802832 1222797619
+842363403 1021760438
+-1267978575 220506814
+-1216095286 -1932531596
+-1276217397 768932740
+-203329470 1371077258
+1092458754 959250687
+19772977 1149380738
+1597398729 -1025661203
+2044394824 1807214539
+-2116433237 -1288649261
+1628395175 1355005932
+1005700651 -1544020202
+1343102744 -237478170
+1081826688 182825343
+-983323957 -944787991
+456624842 453087996
+88676072 74575322
+-55403605 -1251330065
+-1931568331 6741843
+713501127 876521749
+1772974682 563609627
+473506022 910020706
+647422328 -1531886959
+1349425587 -1920596099
+-464737229 99105924
+713478169 -1947734849
+-595798826 -1700571502
+-2133203171 -112934589
+10317334 1229973238
+-799796032 -279644397
+875830863 -366695820
+1375447671 -767710911
+2120620923 -1591251105
+2145245596 154302830
+794157248 1055405001
+-729335264 -1965909173
+-196077360 1640227264
+1174780554 -871595371
+-612993125 2110155291
+762280395 1661814361
+1389048981 -758203979
+-286632831 -1546486463
+-506194413 1803417504
+940985 -2126627121
+1140898179 1075586201
+692056079 -1240468349
+1955837542 -1615446247
+-17982334 -1834646786
+-318108605 2026611158
+45451875 -488269653
+-1725926793 1782534491
+1141357235 1972118323
+-1602562238 -720616594
+-624132181 1354114895
+357401210 -417295768
+-1260898945 -1932315395
+554684988 610543519
+-60700337 906595416
+-564621652 1142251857
+-1606153565 1520426069
+-1431973162 -2109677196
+-1073807066 -172499980
+-564231229 938525129
+1047016902 1987807554
+-1371175594 2055583211
+-1489452398 120594692
+-1181859484 -2123029698
+1515520843 1032688699
+-29759725 755366937
+-308617859 -754801603
+179417326 1993702209
+-1406827468 -1307033802
+2129641867 1826858596
+-429303459 2139666179
+-151562282 -1184451554
+-469750765 -1539503626
+801660530 1834372031
+967777847 -535753864
+1156404490 -640057322
+-1389863100 -216986920
+1341381167 2011074171
+-1337240198 -1518639439
+301771206 2028316399
+-941681295 1197042194
+-1766072316 -1383644376
+87037164 -1896289037
+-916402800 -102781072
+2088914860 1439162874
+1228758155 -911932166
+19057802 574202859
+1625524247 334752836
+-630585184 1433945052
+-1836140007 -456301689
+-829903097 588801994
+372955710 -2097652480
+-1966495143 1512470993
+-1917848945 1997039017
+1001714483 -2420892
+203409528 1614232469
+1728034875 -711942502
+-454889691 2007255678
+-2057921410 102104820
+604823542 947505393
+107937894 -1311308595
+-1051310566 1136484133
+1055846287 2024353120
+876255201 1075755165
+307045736 -1328653374
+1473221439 -611977625
+-815028204 2114711723
+506115621 -1424273523
+-1850638749 -1101409096
+1936624065 -1750987845
+-1211215613 -1058155564
+1011844048 340033048
+-315527896 1450386593
+-385703164 285570623
+1436362734 779856372
+-379465727 40861571
+-1893176180 -874895892
+63767266 2129677503
+375426782 1907866972
+-984192007 -737840896
+640402385 -548003963
+191784774 -1704189269
+-726733199 1794355097
+-1788938507 696950593
+299174624 -471075003
+-619210956 1747791559
+-952030786 959687802
+482311636 1417078137
+-847114999 675893759
+-1858274193 1967166332
+1318382700 755247617
+827271745 -1773627840
+1363877739 -2123512965
+-1507687268 1939481254
+-1145934838 1824086636
+-242330114 -895397988
+-1136124474 342749655
+-63637694 -1034523625
+1387274501 2016338217
+-739983218 1899696375
+-805774384 833985660
+188105549 409523915
+1573837704 1873125521
+1344127605 -693100874
+-649832353 1849920799
+1785702808 -244659550
+-960204979 -253748913
+61849032 -1295219834
+587467499 238125070
+450435300 -243563944
+231941065 370626241
+-2115856311 -367335942
+-2130760286 2007183567
+2106350294 -1254299973
+889926378 -1127892969
+-1144629568 763251367
+-889491152 1273560644
+-551904735 -1337679331
+1580882971 -1142476145
+-158994235 -621083380
+-356900395 -1109813487
+1315015229 -772899166
+407289803 659566302
+-1768858563 -1722922934
+-29059078 1288626032
+342113059 2054918387
+-573612683 -1613933768
+1556476351 911128074
+229226246 1816391060
+-1858784951 -1592897790
+-1397074179 -1178133041
+-1651354114 1697135027
+913745129 -1295980009
+789099760 -1622312903
+1502596087 -624103343
+-1668814561 926898914
+-160644076 590124681
+-1088248906 -2132918578
+762263598 -280118479
+1160178270 1919823471
+-1509094547 -1583733689
+1428130664 757471788
+935059089 1110132768
+-1178225278 252593134
+1578131025 1500567398
+-1449204176 -317832070
+-1287924702 -551626704
+-233164258 1904646740
+-1117758901 1688654763
+79513890 374336304
+508100446 1552024830
+-51592839 1029335411
+536228858 1466647830
+946825627 -1211973481
+-1021325403 708988086
+81196936 1804615972
+-91942740 -1425628724
+-1094026656 -420613183
+1899712418 -1602404756
+776042862 -1937550019
+1982285355 -2124908112
+1133330965 1124621826
+-1860996252 475860925
+-1243811662 1055817212
+1330147329 1767189698
+359086864 -1785134581
+-997821740 1622457940
+1417553312 478434770
+1613933237 987451690
+-689551399 -1147468973
+979005263 1971924218
+-924258232 -561387751
+-2120201858 1780996582
+-420960256 577126757
+2043643284 -546314241
+-739481949 628753672
+-1483153137 -974607882
+2115230204 -1160867211
+1198558659 1774459844
+1492847627 -1109066026
+1890872531 86132223
+-365914130 -1066844104
+729953566 -887536040
+-1774536330 -1510574871
+125131076 1660094048
+198690711 620270362
+1861039919 1588415294
+605013062 -1015012621
+-495303537 568859507
+1213423355 1437609943
+1149356059 130656991
+23331752 -1118391934
+1926742713 -1185453968
+-619786836 -699474658
+-1673579564 -1399148083
+238289678 -819477625
+-566697156 1096063384
+1050036205 -1123795247
+-1796108557 1160112019
+-1855511580 2047849504
+1741330857 -173862421
+-80383272 -1967526641
+546966229 1528227025
+378914366 -956530515
+927531118 1427984049
+-562574958 60492774
+252637362 1610325399
+88589826 98985063
+2064248551 539621792
+2115992428 821315224
+757845564 -1538028904
+-1029340817 1510467271
+-740944738 -1996600665
+-1890183173 -714324653
+932265685 1347550458
+1015388195 -1558412090
+-776426506 -1349395512
+475058379 -1472556013
+1394573370 -1357164447
+1542837809 -2055230429
+269943283 1596256053
+-1731376920 -949940930
+-1482796420 -176597097
+-1950880605 376714963
+1010296369 657306760
+1919609811 -846938099
+-2064183162 -1958178184
+1700488714 -294450180
+2030817864 1725893584
+-124128303 762820596
+-226650398 -482338246
+-1552305940 -1578052003
+375560929 -147180784
+-585538162 -157261952
+172174064 -1272153856
+-2137142583 801813014
+1096506729 -1966717914
+-1129672854 -1063292163
+-1641505117 -530760111
+-1202981350 1019920315
+-421400825 -1581085558
+-1541982088 1922759341
+-2121693814 1268338168
+213743469 -1531472562
+-1080112131 -727113627
+965644748 1048067508
+-1888531665 1407747958
+538566664 -488165544
+1010813995 2034984733
+-303133484 -723451148
+1922975943 1076636418
+-2006942673 -34039634
+714362597 -1804731041
+-96423125 -440925192
+59205196 1342699047
+1616040490 2036559994
+1087750608 382451011
+1567849624 547445623
+-456329022 1615442370
+-1807559070 1974203878
+-1464182453 -1421249166
+572708743 1570777479
+-2029654928 -50662252
+-336870629 388839406
+1503056039 -1078950720
+848576154 803427377
+-2090766407 1092177978
+-174742148 1944603707
+510052787 -743482219
+-1573380919 -993823128
+-414421332 2096871801
+889095791 139604064
+1528082887 -46132678
+-514588614 -56962714
+-1879977920 -2088782444
+-1665983043 -1332950072
+-641715138 475214727
+-1990643125 -1682725615
+178398576 -1455191445
+1710771124 -2044619818
+376487953 -1717078117
+944523688 243246880
+485552323 1435627021
+-500101391 1999805398
+-1155213233 1865957089
+929419208 590885467
+892718648 1013301794
+161969328 -1958383355
+-913001268 -46336689
+-1147069504 -1574183202
+-814560849 273708555
+-1170292834 -1337308272
+-1585299749 660784180
+569405413 1651583294
+1210228764 142695343
+-1762860796 -1903257848
+533022822 208798908
+-1604365352 1390779459
+931500439 2056094432
+1273486819 -532857194
+-1964457656 -724778361
+1691282731 -1778613605
+641514206 -1891030338
+-1592924856 240139631
+-1603829237 1602058188
+-2002323089 -56142752
+-627337087 -1577879687
+853693257 1361354202
+-630052934 -1148676174
+-1801203099 -116103965
+-594080709 406274294
+-1790285068 1964570580
+1426640088 1421513563
+-1159500131 426819182
+1686719592 -1644086275
+1608378668 -438794663
+732351327 -165719915
+-476710324 1799938953
+94133073 1060971350
+-1708393120 -707035298
+1571570531 -1211777012
+-805400066 -210654091
+-374174985 -2071859681
+-58832790 -1849554901
+1929752992 -1949482038
+-86954632 -1383348766
+-1875825232 1544827702
+1651754430 718210139
+936393955 1052268883
+-667581442 199302732
+-1613356843 -1639618003
+-1938160880 1579453274
+-608456153 -929811382
+-1480526624 -853294247
+924516375 2126587688
+-58459465 1656855620
+2047228077 1210834947
+-1328893744 -1450622502
+-1859531721 -1252387906
+667645156 -1143822959
+-655935998 -1701659936
+1756209637 -1496215212
+1921423295 1052220134
+-777510551 -557963566
+-478505464 -2135559457
+1337195832 1076892251
+541049455 1013175176
+-1225041425 25564038
+78236463 -1666023957
+-256070387 -1142126736
+545296512 525516040
+-2043846669 -231328153
+138747388 -1404457978
+-1081402609 -1428796525
+-1307948073 -1942296354
+2139377833 116815962
+-1052950371 638118818
+1493775784 -1228038328
+-1534685028 470710651
+-711456167 2123654348
+-1388530942 -1199528461
+-1103532676 1928285636
+675532944 125679016
+-1754950653 -1145526725
+540444129 464067686
+272017192 -771130451
+-511943470 -2086128338
+-713019533 -1688079945
+-1969690369 -746147695
+-406046246 -1055718723
+669463280 1113591142
+-1689036171 -1211505420
+260294437 841544991
+2132221996 -2098201715
+-162157808 -597464599
+-1536071874 -690429581
+1874223798 -895665888
+-1053747485 1751627253
+2014784253 -968879432
+925975849 1576195290
+1950804346 -2142149815
+-68727343 1806697463
+-1122026937 -153231535
+527747080 -842672580
+-396400242 -1857853461
+-695360664 771372408
+16921046 760555295
+305860930 -1985383748
+-339659265 1212779979
+1840559559 -1348780661
+866865640 13025587
+-634461569 1163519843
+-731474678 -429536876
+579101102 960899000
+-1872247239 -1054116192
+-1025678576 1446862970
+313742810 -1170828216
+-309673129 -993570304
+994375525 1112778353
+-1239047321 393142746
+-763753197 -1382748955
+-1546767055 1934844048
+-1967740915 1079339005
+190044649 -271123181
+-2092351980 2015316437
+-1231384499 -1943144438
+728643350 -1978146341
+1117849561 -1808024720
+381065028 831888701
+-1009754153 196419566
+-267855366 180895366
+-2109081795 1543698145
+-1711504579 -1857323327
+143306202 -1143359559
+-22045462 -709085490
+-360900289 63276327
+87955437 -372617672
+1734434911 -423799670
+391645886 1669559799
+-446055040 156345830
+-1473511162 1690885482
+-1334674676 1872839321
+-1232620262 -244093440
+1244770269 1028650947
+1279109799 -1934032110
+-1048460792 825696771
+-1053892252 1393660400
+-178005610 -1239566198
+-1624918750 -1156838814
+-388906211 463172243
+-181681181 -1737257394
+1858148274 404696396
+1278545710 -669489026
+1687839266 181316511
+666526303 -769672381
+147805343 -1149949958
+378751283 688025256
+1255347664 389618732
+785126758 -855969227
+-651509434 -708509701
+-189480100 166204634
+-145250924 -52121266
+1285992843 -1584966378
+709958172 1951011720
+-336869220 202368349
+-797463822 368773757
+-122526798 -2031369348
+514514980 1904094345
+-1717398504 291655481
+1795198216 1496110237
+-220383665 -289489146
+285952896 1825148657
+-1542637125 -1967670932
+1044848719 -2142740193
+-1184024886 436808821
+-817342675 -936501770
+-1981002140 428359818
+-709396532 946103737
+930226268 -1509366758
+1205446834 -1765559911
+-1896695059 1738991870
+-764159766 -1525580946
+898760325 179895341
+701020587 816492361
+-1454503447 -440757034
+1956892152 632251646
+19822725 -1645563712
+1882464459 1179893895
+1006821398 -1643301214
+-16859163 680951624
+-1419608319 1497674052
+-677983207 -1149808079
+492239127 61111908
+1412593925 -718451050
+1296818461 -591115679
+-1403948408 84175777
+-2077368642 819709889
+787659990 1808329636
+1431352813 -1938079507
+-684241061 182530857
+318050046 32828951
+1200932953 413040027
+685877197 861643791
+721673380 1727497974
+856513539 159079074
+-1581093439 1504659101
+1689900256 1650642708
+1234557688 -753661123
+-2078554120 114077869
+1978888979 1726406244
+-1513244121 1179402799
+945509796 2025323107
+2362554 -1680558744
+-1996389314 1467515850
+-1876480558 1819023951
+930843206 1871947496
+1904513440 267428689
+210936443 -377417734
+-2102059691 975245217
+855231032 19857116
+212944546 -320237247
+125867490 -1141923415
+-1928735484 -1095431690
+1040139193 226209882
+-605258325 1145749905
+-1243238838 -1063448935
+-797096722 -252291661
+-937102777 94925018
+210391150 1050393964
+-1022034767 -125768847
+-1569224452 -1157378782
+1603632140 1432197134
+-536886574 1505237962
+-1916813897 417014274
+430095842 1255189115
+299807091 -911047077
+-1028352194 -1793264140
+923196398 1274928264
+-1311812708 -539157131
+-560181536 -162266045
+1272747189 -44137837
+443725040 -19525017
+1311584789 793516250
+-1253058061 -1891897661
+763818576 1740376222
+-2143605598 -1766350722
+-709396672 -173532781
+-1603418348 1617793174
+-616184730 597147683
+-1654138687 1882512785
+-282366246 378711365
+1537597554 1546728022
+253112236 1014573161
+1426440265 1854577899
+206463599 315453517
+-1471812082 800915331
+-963129960 -760446434
+-1347095605 1513467505
+1112359034 364584360
+-334413773 298772112
+-72938706 1558683013
+-1389598638 1270594866
+165416739 1812669106
+954136667 -97311088
+-1089358471 -1275958061
+-1135133366 513710004
+-1462654016 -443052394
+1076840860 1531929460
+840327299 -1808649344
+-1387699503 -1279961938
+-118350530 -1840459789
+1044618047 1886794014
+-573597563 522965105
+-1980338565 -67649743
+1693200605 609827830
+-364555753 -1953106230
+1544897628 1003146532
+245484014 -2073784500
+1156243362 -1600154106
+935265301 -1826827829
+605221868 2081112018
+2084554047 997559965
+1483612350 -689932830
+-2016623411 -1165027717
+682849191 1215125444
+-2124247728 -276852367
+-1186640637 244401381
+-1221864618 -1702798646
+1424162807 1791324133
+-1616117456 973704044
+-165343552 -939687122
+204652010 -349076745
+974770567 1612951307
+317670252 1475474300
+1401830888 -736854589
+520696051 -368750648
+-2116806871 -1068998051
+-571905091 963323737
+506140428 1331637067
+989630019 -840489950
+-1719808749 1542378647
+-248393798 -1545498223
+1921642336 1546094331
+-1062366155 -343376838
+-777069237 -1997001860
+672646272 631464948
+-1092359344 2102542108
+1764969124 108869182
+1687564213 2078861864
+-178730232 -866681339
+-108656309 91140052
+699742100 367416079
+-707569737 -2013601476
+-41679834 -1857036954
+1528724825 185509960
+-1528097525 77931350
+1460212485 -140693813
+-757897540 1848443640
+145753540 -1582972172
+555779156 -1770806458
+-262579245 2035090522
+-792926723 517174778
+-2018931653 -1244677475
+1076069524 -421483151
+-1847476869 687928119
+-1577108384 1821920159
+-948397555 -357227003
+-822610116 1840443580
+1290107325 1386708758
+891330032 448171422
+985944317 -1902173707
+229880314 1971662304
+692198819 -1263189778
+1791086293 1175235756
+-750370020 -529782180
+-89542075 64759608
+1481090179 -37184802
+-1029552568 -1085105577
+229623907 321057859
+550953931 -149759633
+-192706225 -884757199
+-112637135 -1315868050
+1047790314 -1027250209
+-1890932918 -1363311741
+-1585684338 -1066544480
+1115934048 1424693810
+-659584783 -1324394186
+-1361843042 1395357522
+932614762 -1576242029
+-1528348630 -356882193
+1764986298 1423005294
+-1584772351 1326007849
+1965595766 -488951631
+-260894569 -1496714371
+-814676921 -2118069018
+511106539 1436391945
+-1062273026 -1491196543
+-696504366 -1851181947
+2121655676 1425063809
+-1258437935 -1307962396
+1740704567 2067494904
+1479927955 -642688510
+588111506 1040463063
+-33591037 427196777
+-971606310 763090765
+1553677181 396504672
+1974490910 -845594267
+-1811981108 1003255193
+1374121098 91055868
+1431714021 405549896
+808208515 -678553906
+49304059 -85278066
+-1379485220 1763495191
+2099498130 -1684224410
+332652900 -616576290
+854459344 -2027316420
+-1652416928 478688036
+-354303226 -1994157940
+1188712088 1638827100
+1739905485 2108578525
+1520584881 1528385344
+-1443148836 927204743
+-443313457 31342465
+-715362079 -772554296
+1322429207 1915161360
+1951636557 1322790883
+-1262949507 901374853
+1282930658 -41857242
+-345673431 221140977
+-366412207 -816929699
+-1697901808 137542165
+170715434 -1689807569
+1023833344 475547228
+112075224 1562834344
+-355926631 -674151511
+-2126961555 -1276238424
+-1962422563 1525751321
+599850623 -122969618
+1327495347 -353059204
+1336814386 1613179447
+-1359072570 1423295485
+1772938045 -2045451321
+522048677 196579878
+1117663306 -1183453642
+258563528 2089595704
+179903118 2024660577
+295960658 -1014114139
+1578327919 1436251136
+2108573415 1693496474
+-2093863366 368328980
+-1560807889 1943873611
+1700476934 619207497
+-528821140 -1861713821
+409565452 -1569060526
+902367213 1083494777
+-1591602489 1250285990
+1542307677 -206879919
+548819062 323831281
+185634083 -1574647645
+1368208989 -2117085291
+-143096262 -1062002927
+-1598654285 1980633179
+1693194401 1801285306
+-421616899 1212764657
+2021485014 1102870737
+-353951621 -321948247
+269519482 285477468
+1600915796 -1466256253
+1040268384 -1887351157
+-884290187 -1976311592
+1823088509 378710363
+-298684225 -1926334171
+-1460136406 648162972
+-1471609878 -409455757
+-381164628 -919751154
+1996043523 -236324351
+1555270370 1463505454
+-1797505986 -436342822
+-1761711897 1411654567
+1358775152 -1800675379
+-1705269614 986333227
+1311905309 695384941
+-1966319082 2043345300
+-1775794678 1070434007
+1371848618 2069923762
+-292723956 -1959116396
+-1354559613 -221835004
+-323276438 2025758586
+1808201562 -228438668
+-1937122497 736225246
+-1211737322 1028296543
+396758835 -224230554
+317544277 -488347258
+2076977824 1117368605
+15791802 -1184370222
+-886087232 661696639
+1268045973 -1095087614
+-1921853282 227909546
+164130643 -369417127
+289633751 1333099698
+-1314831603 134644918
+-184808300 -1190751341
+1037800399 -2100965597
+1164945023 -881130503
+1582609082 1355013784
+-1278385010 -1277951720
+-246971724 1723709298
+867692088 2102418957
+678830518 -1156973745
+-1586277565 1575993988
+579011747 1196962077
+345933124 -1777755109
+-701186976 729009179
+1787857520 1691723626
+-1723888638 -835885743
+1509788821 781641742
+-385947706 470785992
+-624524403 1587551160
+-1127795775 -963585295
+1826626907 -1144708677
+-1875517769 670080866
+1686168552 422056588
+-491121379 909244253
+1016558862 -863959363
+1455455860 -2135210417
+1506782081 -144824462
+-1914656294 1936537079
+-1296346152 -453699029
+-532411843 -611479400
+463877254 -1793146930
+729955370 -131708395
+401757548 -1031110099
+286216310 1333409861
+980871870 544929719
+-376911572 613199972
+1971251505 1606992132
+160761679 -1659474990
+-720574924 1269213101
+487470983 1513797684
+1226678875 -338093081
+1731248830 -1787084731
+-1546334708 -1107308694
+1521579228 577031612
+2109856449 -694325339
+1011637317 2025841610
+-327568121 441103412
+-769384597 1580608377
+495380720 2052505197
+-1335106948 -583015152
+1524688777 1446801606
+279917822 -1061921175
+-278352417 615023350
+1836380201 1264790495
+1171223443 -1685474271
+167646363 1620841283
+-267742100 1965327106
+-1388642382 -1672168407
+1658361967 1467407528
+2050275408 1408448667
+639216176 1794311473
+1141977348 481694840
+-487933381 721033937
+939254918 -1872347393
+-1185511013 -1944313275
+-1599748782 549382080
+602325449 -1390886320
+-1599337239 -1505169080
+26176352 1335286419
+-218467907 2046940201
+2108096362 1770082618
+-214663445 -1416908678
+597353990 -1832993466
+951177906 271412404
+618556920 -511350490
+589452625 -566942279
+-226132814 -1593026447
+1732235370 -850393785
+897121378 -68667326
+-1162623460 311193542
+950583585 1875176745
+-519697680 1548134381
+-1838583394 948098480
+1247749060 -1121064943
+-483091140 703897084
+1266012656 -1217159805
+-514250645 1592989421
+1099004659 -1483157803
+-148662833 -212733408
+-956837535 -2029216032
+-454561552 -1280354542
+1278751846 -1948682596
+4156040 1458036233
+881312036 854773388
+-1281269457 1000845035
+-1652817918 186504454
+1480859878 1722380759
+496976176 109120885
+-883282469 -1761488124
+-694639888 1799815536
+2014296159 656608329
+1875370919 1629052039
+1547060959 -355518064
+339668378 -1459147311
+-1498086746 1944011876
+1361279550 -1961065831
+-1866433197 -859776983
+1072683323 696515068
+-2022251696 2081700573
+154438620 1980890709
+427646594 1310571658
+-1449332184 1144339092
+1781873338 133343230
+947924240 -850472367
+1513609996 -918548833
+-1011005824 -1800035335
+-33038828 -1899255204
+1492512888 127470125
+2035783410 -433512097
+1438931168 1337616337
+1528110450 234905519
+25317810 1382617678
+-155127800 307276663
+1377692858 17591682
+-476492271 1344563000
+-1390826352 -1867086899
+1198201253 -22147460
+997157228 -45682929
+266447673 833007233
+1796036722 -46037936
+-2146667381 1620202456
+1123712805 -1159240712
+-1357439917 1850491415
+-692146213 2094411015
+-977257645 -919334996
+960723242 2005667197
+399620446 -1501156002
+-1796866674 8678542
+-1938145507 -676762034
+23355537 148202889
+1356037485 -1287470379
+495785132 -1459006823
+-1103142233 -1009697163
+-2115985822 -1939048569
+788029930 61127139
+1481640960 -571521911
+-1250800493 1461335478
+-317520580 -1552814482
+-571484289 670589271
+-1981709352 1190222449
+1111025520 1759929241
+-879160714 -1032872302
+1434541897 -1299466048
+1105400765 1834482299
+-1333494643 77825650
+-1171576159 -806944113
+1065889234 1884002235
+1566213714 331805195
+-1964250890 -1128421875
+1828795336 -270536493
+-859601073 121946162
+1971744636 -1631030331
+987974856 -462904215
+1413714376 1199830820
+764251608 270614581
+-1719068473 939128728
+-1170218560 -1390636932
+-1347317209 -1263327011
+-485370959 -1139561661
+962315684 544005176
+-1435745111 -1463463824
+-116490184 -890231774
+-1751442562 -826891621
+-992451236 -1684779917
+484205908 -866892556
+-1400337920 -370048262
+-1407339515 -219239221
+2004944509 2138314716
+-76801147 643818949
+81676428 798160285
+2018506477 -530424367
+-662977646 -158013517
+573827235 1686858247
+881480226 -650248242
+1281605698 871287981
+-348875971 -623178972
+449554444 -1656994754
+-112562674 2069786854
+-57280244 -2032303641
+-1916269936 -370430896
+-1426418236 684045145
+-820413104 -364702054
+263815107 -7020053
+-559428740 -1572592149
+532777956 -1191923010
+736796024 273692508
+-597629737 115278028
+970514936 1845436526
+1963674951 1895052541
+-1595503915 -1419819850
+-530761277 -1759603686
+1578569719 -1324777147
+1612389083 -1305694363
+2091876460 -1099072914
+-77875430 -779542892
+-1745878756 1961156923
+1507336545 -2067470480
+777492078 1919754727
+-963257639 -349439372
+-322556390 -1862861851
+-183188337 -155214136
+-1594458890 1526223501
+1465413736 1368313567
+1469194775 424835783
+-415283536 -537213559
+-456400751 -1386299205
+-1387859039 -211331222
+113449376 -1943098643
+1153186936 -869092982
+185593365 728110634
+1987875763 -974502141
+-321656846 2146726625
+802001155 1838499321
+198200506 1917066543
+1054331810 90786890
+-1886963760 1140291822
+-2128284085 -806517245
+2121737431 354236
+-1685849388 -664680002
+-759649799 196061032
+1650240594 1497601538
+-205957890 -1648506920
+-1047743836 -1407488549
+123582635 -150409692
+266686077 924718153
+1290183391 -284968669
+-2078009040 952017539
+-2000977821 1712118680
+516459168 -1782702055
+-1263554505 186265679
+1447005691 208431133
+27394978 933876614
+1993381147 -141232116
+837209909 -1751672396
+-807084934 -889499579
+621076844 1359207014
+-2025385627 -2102218355
+-1841588014 -1080337827
+1451396449 -639080633
+1507822587 1744243353
+591442637 -79520876
+-2106995876 43827649
+-1451760282 -719654853
+-121666825 686661376
+691574250 -377775968
+-1240297990 1339119594
+-1794903244 -2063452973
+2136750470 372850307
+629293263 1782709008
+348997163 706609844
+151964416 -160477659
+12922009 -2122188129
+-486389219 -222067824
+-1221930663 1049553340
+920019436 -1202559939
+-1203491071 920829338
+1074783623 -546786160
+-215947192 74029176
+293734265 1158774133
+-1537524172 -166394024
+639811449 487480637
+-592660156 677928137
+1267931573 -1892549889
+655439934 1659532355
+-973766030 596385459
+1768410456 1886274382
+111390883 1725080449
+-399325929 -1399077579
+-1992871692 1668393359
+946132529 1424676082
+-1806889613 -1172397067
+-1053688888 -1183845571
+599750786 1027876353
+-1048741238 -1397027771
+253139066 -1300919828
+-249269171 1595806954
+315244743 -1947941075
+1319919382 1771036958
+1002743533 2081030471
+-1806462165 1845378544
+697740622 -1855959703
+-1215774083 -1084501777
+-716773127 1640842627
+-1572735515 -369454072
+242176650 -1020858281
+2126041035 1357407508
+189201510 2066628838
+1558694541 -2101247180
+1135064466 776537227
+-1894267443 -1651849033
+843681600 1936945813
+-204598476 1627260760
+1012273238 1027985737
+-1526735277 -86003680
+1732742878 -1140411936
+-1183037686 621501318
+1637112438 -2137094607
+-919760844 -201216744
+1174837523 680079825
+-667186215 -745783548
+-1580653593 782331839
+877544856 -104578498
+1318199386 -885694765
+2056863324 1255970367
+-79452828 1149029233
+1957885483 59917794
+692615407 -1375957137
+-32935314 388350002
+1799389072 802220326
+1814753391 -1012997158
+-781670665 -779160435
+-1896303292 1081407079
+-945908945 1012251903
+-894617441 -868456579
+-1121271320 1249414826
+-317761382 -997000007
+-1945319911 1556006074
+-1900079720 973361474
+-1570642950 -316485545
+-2079538429 1142360866
+1705944473 -1400286205
+-599146978 -1399046783
+-325423483 1213411103
+-104117170 104252101
+1804632631 -1661504341
+1533364132 -398183116
+1928895916 -1425738460
+-670668410 -1938716613
+-127568101 817012869
+1196074071 1395783100
+-1136288853 683930661
+-786405055 -333573491
+-1107605355 -1373747076
+-283008699 1024047055
+-506470234 -802419192
+-1763273725 325049537
+-961265436 -2099203613
+1094577866 221575223
+-994083238 -362528406
+-1645718693 -313474465
+986491325 689067042
+-1849188937 -194810620
+407828397 -2099357221
+1751908062 -1453979564
+457095299 -1125219895
+-2051869486 112980688
+-166231900 1040868780
+-1211309223 -1753613224
+151457897 -26953019
+1755838325 1501937684
+-83508324 134038288
+1904107586 -706823826
+1047120138 103616813
+-383657401 -1060249492
+1359053290 350537285
+1718218998 1580749253
+10362107 1945211478
+1245122125 -280413048
+479451711 -744679762
+-220956619 -1745587476
+-125704448 -1807530641
+-1769184236 -1303638994
+2039689570 2059783593
+-1287156415 -2073265135
+952847483 2039388791
+1071527090 1534608996
+-1618097950 371094377
+1905590532 1201362215
+-314665692 -2046961721
+18300355 -32891065
+-1093975926 -754945208
+32284996 1211012250
+-250055661 -828896233
+-1253114174 -228211432
+-1857241136 -2135726708
+295059040 898822363
+-1171915888 1755419671
+183888478 -781920554
+777398620 1090306021
+-896380360 196956979
+1478132591 -119203462
+-706832490 587799870
+9960986 -1756632862
+2085927843 -2013841578
+1137808462 -1748893155
+1603108264 657028895
+1948904083 -2098797894
+1660408377 -1364781752
+-409442177 1610953925
+-869664201 -1600087650
+-774054256 -78465273
+1081859122 -1339739983
+-1091304179 1464330330
+-1714067706 -638717798
+873085090 1030236039
+403259754 -613234402
+838762766 -655716959
+-2123614835 -1614830324
+-1501732737 1395492620
+839924681 -454591487
+204489226 -1647385364
+-1748483098 -1089647466
+-915341371 1006829731
+1731609656 1328093496
+2009897707 265914482
+-44690765 -2041132141
+375157510 -416894633
+-1086528265 -51238645
+181885137 2131471863
+-1562889227 1277813846
+-1237895106 86931189
+1763520503 -1786309411
+-1531141094 362210645
+807863083 655977153
+1328541972 1140982803
+-905139324 964972118
+-369731132 865696674
+-1593012248 803022281
+1365091847 501820959
+1152078912 388545252
+1062266791 652027603
+-1818090619 -2009966050
+-1197749469 2123398625
+647458034 1620661534
+-1074995164 -1093572592
+408376198 1915689208
+-1780738548 451112878
+1298708881 -86524767
+-1026891347 835863807
+1213953901 1257649031
+678061490 1007522860
+998689954 -656924071
+-1311989870 1502054252
+1266223952 -1320698975
+1360262126 -1053934540
+-206771555 599238102
+1652340333 2082561856
+-787345526 -759853086
+-1755747841 -952073930
+1508569985 -544715400
+-470080567 -2003010108
+-1271506700 -2011332960
+-634971861 -169520933
+-11230399 -396380816
+201423381 1303778793
+-1140520507 -1416073945
+-29780679 369530630
+-501594766 1880125631
+-47380112 478077136
+313201509 1499808603
+1294384646 1809144992
+377424451 -93216033
+-1742545822 -561044861
+-1388122026 1107704539
+-1095261318 1728095725
+380516841 2059025167
+-278669927 238655702
+-939588724 -822177557
+1681996406 623444031
+-644578586 2043762547
+-22475556 -646558541
+1143301149 -124007439
+-1207351770 -260695994
+-626723033 1350533427
+908634197 1422106433
+1275693104 -1091885385
+-509119784 1079096128
+-666762500 871698224
+1863641572 1030537051
+2026211010 70882600
+529969125 1472939266
+2015320972 133949308
+2137679290 -1885010796
+938570786 1777498128
+1425895515 -2061007102
+-236909554 1992112984
+1397256499 -1922852135
+-1051703852 876090639
+-406700907 -1968307159
+240099872 -1394518433
+-2117618634 -1073461891
+-2030295550 943832269
+1055608559 -727477400
+799577837 -827568115
+626215751 -726913315
+-63059881 -2142633949
+-535976112 1891821401
+-831920869 1751756303
+1136578046 -1673923220
+2083269797 -321327054
+8167233 -671325148
+1223616104 -809168379
+1639199491 1819933001
+-1504252212 -1043516852
+-289167555 1149603235
+191188248 -1672472031
+1232310765 -1989038677
+37784278 1747416029
+-1368264692 -2085254744
+1373062689 -524643396
+1144070694 1948106741
+-2061679201 2122562515
+-1659959767 1400084497
+-748735966 -1200336684
+613051855 -757643526
+750269543 -1823117622
+-386109617 -803381500
+1776656921 649282119
+-232634571 -521867924
+390805934 -1726163263
+-802842876 -942193034
+1423792497 -71992472
+1997861688 -2113603552
+-807438314 -1729021851
+-1332826142 249897620
+-296590776 -1893716946
+-1826918498 -494812860
+-761600021 1098781302
+177500216 -340156672
+-1197803181 1415381229
+1802577864 -93047218
+1739005287 -1530249920
+1483907925 -1310376560
+-657673503 -1755835308
+919334978 -525452484
+-925864233 1168605918
+-1304678857 250052490
+-1229780181 -1664242067
+1206428181 -956471907
+364624839 219633327
+-662896063 589796361
+-708146867 1609382848
+1429945803 452863636
+-1834785251 -2066245147
+-43145711 -1524387941
+661173490 -1244275973
+-1796462023 1630887017
+231774205 -220150981
+2065507893 -1523824137
+1876594433 -271185273
+-1074193965 1242556047
+-486890578 -1679428715
+-642315547 199607214
+898502438 290006637
+1843378924 -179102984
+330169068 -1435718021
+-1852191329 -959416980
+-1263894272 -586324557
+1582886512 1183439283
+-779718841 -1474294381
+-1244649246 -1494128387
+-430930144 542239034
+1893169720 -721256047
+-406881722 741428783
+-1490305890 -536893334
+673181949 -1180162278
+-1030901250 1706608709
+-1300901572 -1673680864
+2077972091 -692112381
+-862484446 1956384718
+-1691474804 855064972
+1740725650 121643914
+-542374789 1667523595
+694516397 -1122324953
+-350819584 2091630390
+1129058070 -1102052645
+-88869999 1022576123
+-83324608 -911282121
+1296263953 -1751021917
+65319273 -90087316
+-1246286739 1569010506
+1514989728 -505652183
+-923869512 -21367334
+1225175462 -184615007
+763425239 441336499
+1532545341 545970241
+-1363406628 -1917359837
+944772251 -467734060
+42610624 16678976
+-1254033516 932233801
+-979550630 -1052614488
+-1509410133 1966105437
+1880253300 -1118424220
+-1233318262 1650451624
+2137984899 -1063860860
+-824055034 833725274
+-475811475 1710199022
+1483983343 1394437849
+936422485 -283642396
+2010495996 294465676
+1056802908 1417975422
+850514787 661578402
+361737840 1128486437
+-1518529875 544296902
+-1235525797 -2107350633
+-615264590 508594697
+-1990060898 -196467666
+-149489091 2049388033
+-21487090 -564750754
+-1388594243 -541207672
+-1385175369 357703889
+2040815007 -154774071
+-1684167000 1663593799
+-589078778 -1642458384
+207665615 46105347
+-227680284 1625725200
+-798010315 -1536132378
+629032523 2010272249
+-853018304 319910579
+-1552098842 2091842643
+1388613430 587586789
+-2095726485 1538919924
+-197667126 -603307565
+1636067677 1779603608
+810010661 -1783482368
+502645066 -1179747694
+-29440011 -723179633
+-915656815 327450971
+-409286424 -73933222
+-1331963900 131851119
+296823430 1850978054
+223254831 -418851040
+980768630 493047001
+-943359101 1542259163
+-1113196129 -920968365
+1157063169 541309244
+907515454 1508161588
+-1497841360 1324656241
+1127161196 440876255
+113747007 760872255
+-1358970348 -1884520026
+665235219 748493635
+117404545 614292436
+-336209763 1069830388
+1511011675 -397910069
+-1621032434 241384241
+-1904476612 -612669454
+738099430 88878563
+-1482110714 -1195914876
+1114892849 -295903954
+-223622204 50915470
+90252478 -1751752489
+-442211768 -1893084249
+-2132672105 1239881819
+1389684040 248424131
+670379401 2135674493
+2126119492 -1223926997
+1334788792 -1767890609
+1562881527 -177034433
+2057706835 1279051511
+-1502540671 -1926453870
+280310434 579204893
+-756959234 -8531198
+787301006 -1894580042
+-386684026 1145456995
+1390342299 722775330
+-372030061 705551056
+-404111366 -1100597038
+-937755532 -1549906820
+1779222121 1369078923
+-1118787221 -1982203717
+343233758 -1829415243
+-409887733 -1742097621
+770612197 -1092031132
+201406171 -180451467
+-832958633 395842807
+-1915584942 -1330593229
+-487408845 2027663372
+1523233723 -1816240011
+165611875 -1138613224
+1895414072 -1640507284
+-154927785 -2009719975
+-1722570233 -526062027
+-1660879362 -1263326175
+1430134971 369030613
+-1607703468 1212788966
+-1643766695 1015989884
+30049742 -621645639
+-1949149866 -744694318
+1394969510 -1914797633
+-503208677 24662175
+1611324284 -122634767
+1704864929 -110644586
+-818796032 271848551
+-42426972 233309576
+586469475 -469575550
+651680856 257858674
+-1166603691 -97935432
+1851897191 -931659452
+721321746 1202257652
+-167214616 673435776
+896716072 -1079974089
+-1915469717 -1598525805
+566158709 1580321390
+760344884 -1854453585
+213658594 1353090436
+1803655470 183608396
+141263174 -1368947635
+-1005746845 -1786319660
+216006264 1935407583
+97922946 -1941408449
+1200589807 -1956253749
+-42933932 -748978743
+-1700679653 1395556153
+-2131419801 320800625
+1813503493 -877838751
+-1714396753 1416222044
+1083542999 1854244573
+14112822 -1332696279
+206526271 -589232057
+-1533171656 -1282386765
+-698401078 150044319
+1593001777 -1805822297
+1269425966 2143940754
+-2043797930 -635448446
+1311031816 717248570
+-113231274 -1171981171
+365577351 -420648659
+-420226081 -1604700228
+-1941797662 429380217
+-1378395748 937421515
+653519647 1641550950
+133493916 -1806043202
+-229638276 581286132
+-1267563232 123468576
+-1998570456 393546421
+1615386051 553210945
+486694350 1184333124
+2087184599 -1254887314
+889701159 2133065683
+-1851978134 -756952249
+1290032605 -1010082740
+1559378225 676090254
+545458041 163736081
+-1081782696 -1755861621
+-1614416186 -656646669
+-198525863 1150115857
+1404659838 -2027974068
+1874197491 604061593
+873639275 -191386671
+-1778929739 -447144011
+-1378084881 -785403023
+-415586345 -1133310406
+1517081349 1804478385
+2067906578 -1728661303
+464167286 -81722646
+-1948431365 1331070734
+-940976990 -739792490
+-817306065 -988579595
+4887772 994740333
+-1132322817 -1974971393
+-1527899066 -652352583
+-333676842 2127856548
+1455325644 1699352941
+1024453655 72063735
+-505604481 1587778883
+-959170861 827218647
+1913873670 -2011636183
+-1845180046 1935113051
+1906450963 1927766983
+-243941925 2066978224
+-1479208358 -565728696
+1335170028 -424075789
+-723399832 -1006263072
+99304755 1709638645
+-1160313363 1776984030
+1086753722 1609532710
+1323723355 -1602245748
+333647983 552946152
+123303890 -685418668
+-1752298422 342088089
+-1722670827 -687128693
+1615965489 1963671074
+-1895111676 -2033135664
+-415840787 -403588047
+-1225520790 231252402
+-781611702 -736890422
+-1382426313 50022708
+-1716728398 667031111
+-589552695 -639111354
+1303474234 -791255293
+2024698754 -1556345713
+-520623905 321449435
+1696055700 1289655041
+-1016073075 600036401
+30000217 681818240
+1481701028 -920471548
+1552455828 -164251776
+-1127398631 984356916
+1397201509 -1820957449
+1488861688 -742459389
+1398161642 281053297
+-2121552151 216074112
+-295403466 1441881357
+797546499 -693249642
+135269571 -235172751
+1800332903 1125164708
+-897245549 587206995
+733797536 -1353724604
+-838652600 -1246825906
+1530558682 -2138594825
+1803460463 288403612
+-1486507033 158152991
+1098846907 -1694104619
+-1636681217 -855776089
+152266308 -1136753897
+1419820372 473832885
+-711373289 335259215
+-58668567 1358391379
+34754755 858313605
+790104276 -1819619619
+1743030116 -816490848
+105115797 887268178
+846844455 -275129052
+-311248297 -552409413
+73786159 1787621277
+1022480068 1827136110
+-1487661151 -1492600983
+22795937 1221006081
+1285109712 -1260269772
+1295961315 532617507
+299701633 2053317396
+-1843622462 679143825
+711935 -526973363
+-2011698421 -855456339
+1644694020 -1120637344
+-1455513559 1052276429
+-2094878245 229251154
+-833334430 1683424571
+-1696113305 -1338043385
+-2076799689 1270190251
+616542148 1782850424
+1460017858 1442825219
+-375313020 -1235323494
+-40182361 -1010719558
+-2046536240 394831666
+2068610425 1331553929
+934492586 -2117636008
+812757370 -816267451
+-1602963878 -631099849
+-28830667 -1211992797
+-698130875 -1132232184
+1043475662 964847248
+-249777208 507276745
+-951128327 -1056908610
+-1079411083 1529259233
+538543154 1293748874
+694286462 1136211542
+-187425159 -1531287724
+-1627491462 500836060
+581546383 -704197661
+967781520 -279942756
+431999984 1992930389
+-1345594375 -493482967
+-1882812295 102094902
+114702928 -1014566980
+762040490 -1949222487
+2006997706 -1425765898
+-524635978 -1215692382
+1712612758 1764074367
+-46896162 1701727577
+949208134 -203583935
+2053343177 1189225061
+2122642752 1281405313
+-1270017450 -1283330039
+-2016220398 -718475472
+2007239538 -2089323197
+-335036721 -1897684917
+-1084202719 -1057642331
+902701519 696952834
+272068118 984337259
+-327756282 -1428872468
+875918610 -226136798
+480028861 -1627386169
+-461869630 608876487
+-756202277 -1786307382
+-1790323711 493135787
+-773254219 1276501138
+577611444 -1207881191
+361297128 461030524
+265872647 -503284310
+302258544 -390533575
+1056449015 -594622537
+1493272123 -315923358
+-1969237163 -1978126860
+-38702614 55644195
+1126943987 -654522676
+-219523226 272537942
+1181676984 683614847
+1233524033 -1955528268
+-895906921 -760393775
+1170187066 -1670044134
+-658031110 -766012170
+2054282475 -1129186677
+578071738 1585811138
+627256206 995333971
+1525927229 -289409048
+-2080968807 -106779915
+901468197 1445880473
+-521279659 388966562
+1745575710 2136630052
+-392547428 1953251145
+1141696186 1523839854
+435722977 -24141507
+1412805266 -1626781747
+-73636405 -1316954236
+-1759668943 37641875
+-1193384504 -373193870
+-1743811680 629198098
+1757923123 1730708398
+-160670057 14481596
+656412385 974623349
+-1277670230 -517754958
+-816069425 -502107586
+405470298 164642395
+1056504917 1678953361
+36980310 505710866
+432868275 1073963709
+-509494643 -1153750972
+2110480741 -477014564
+2036619089 1745581487
+-1693406775 -140392670
+-1874019473 -145858294
+-961776992 -883998549
+-13370661 -1389117361
+2112962055 1698877958
+673654428 2045120027
+-67965438 2097949628
+840268065 2000049367
+-1383783093 -221395892
+-1711725898 -1579031395
+1206300439 -604942338
+-214252745 1469669678
+-2044228492 -311029564
+-1531653535 -26634283
+-636871209 2099033520
+-789188815 -160186186
+2004903767 1515031497
+1314674261 1024674829
+1012884956 1188397449
+-531575344 -326100624
+-1674641593 -453909026
+-618160184 -411567945
+762880612 -1258037076
+344928988 686461096
+758819116 225134710
+712534023 1080352926
+-37358744 -134575065
+-1216705205 1020972898
+629621920 -754529452
+2039894191 -904793388
+1449324516 2060780004
+1719149922 -1061862119
+612204457 -1197981615
+1574984596 56944474
+179970583 -606411453
+937344758 -1988298845
+1826030893 1122613733
+1647912013 1547521972
+-1977644260 1432185276
+794583531 -699306106
+926214336 419025596
+2049443804 -1932661391
+-1550345327 -920138234
+950473573 -1236724742
+-2011316874 -1978512570
+-1707294767 813847156
+1146957736 182212364
+854121641 -576906549
+1651358883 -1475911935
+1390557544 166466476
+2112701491 -1351627364
+1870515129 -1446413559
+349229135 2109587659
+1910325228 683257219
+-1242772702 -854629313
+1259120074 -670838079
+522656977 1400851593
+-1245797559 -1376439083
+-1280889585 -1585902591
+-1260672212 -663784609
+-1914489782 1206524233
+-706486503 787024892
+-142539933 -34114874
+516205694 549037546
+797587252 1367924430
+582617592 365803782
+2033310513 -1698358399
+1206042178 1905607643
+-59308812 742959376
+244169355 1358988792
+-933061397 -1648568828
+1511188468 1517869867
+-601366267 846812229
+1466992465 -886680866
+-320667750 51397488
+268880748 -1415367115
+-847402625 536514803
+-281267665 607839724
+-1809733146 -1269023855
+1964209619 666617069
+1896506973 -979941702
+-1104360801 -518154476
+543264662 -592367781
+-1043569385 -704552815
+-634936833 -883565522
+882766580 362485630
+-462688981 -1871518443
+534868451 -1503376728
+-1268726980 -69916860
+1048329995 -1628589327
+1806113968 -138974691
+1392730500 -1138824922
+820740954 -1803481288
+145189597 -208735552
+991258094 -248512040
+1580649285 441137293
+-1943856301 1564349108
+-975997551 562618679
+-746946099 -1423719498
+-1042769435 -956363745
+191991016 -1867777649
+1829230296 82377119
+-30796929 -1271713201
+937304228 1550470808
+550058866 973074884
+1225966389 1264176463
+1612340089 -1973678579
+1207125457 -1270909417
+1140936286 867009473
+-765196258 2066758773
+-663376978 -647118653
+1895723362 -1895992976
+41643950 532040725
+1965536176 -529409425
+475121145 -1831673130
+-1615106427 399658487
+-1140882637 839514941
+262123090 1905471960
+2116333478 -455237691
+-400926404 -987903421
+-1478091646 -1312756334
+293877261 -1797901971
+2002299839 -1853045852
+1123595477 960054092
+-502949702 80478806
+-942304110 -1431830004
+-1985177511 -1932904098
+-1518635768 -51343839
+39007078 -44953129
+2035776627 -1796742352
+1158459178 866281735
+1900544483 1595445768
+212737034 359898068
+1928802995 89513558
+-915967525 1197126271
+-553365096 -408456364
+1061585381 1047711205
+2031226674 -1787956004
+-402910995 241075193
+1036304935 1949412082
+319631052 -1126268403
+1526699805 -2023420954
+693286903 -492568373
+1607624869 139616208
+-533668917 1229097478
+-384050240 -812002732
+-872315710 2136792129
+-831857061 1482287854
+-1044532211 -534940554
+-2009193036 316160339
+1481465203 -1143819404
+2006714539 -1264693077
+-738667847 1914241975
+-561045610 -1669715653
+-2081200434 928351975
+1125820299 -1988472698
+1565245647 -15847542
+-1448862362 622003981
+-1049228833 767543539
+626685921 1904168363
+1870396011 -1173194934
+-1070140511 1448395341
+-854002910 1526433980
+-673059425 -1439254801
+1799131834 2127260813
+-911268353 1917852429
+2034344084 642757248
+1911471480 261881246
+1074222705 -1671731974
+-1475506983 1027351464
+-487312131 624124737
+1557969357 1490402318
+-135849082 1567113649
+685072313 -915863543
+-855661730 1195301196
+-1533356224 1980623317
+-828286450 1793649965
+-166457042 1922107945
+731980802 -242842718
+-1694591931 -291847736
+725207586 1707418025
+297862328 -686749198
+126157002 -1508539807
+-767292555 -1843683742
+1088269421 -1210168009
+-301912725 2077428498
+1467331777 -1060166483
+-1433532028 2071565740
+1500104878 590235656
+1598433486 818817399
+-1215906754 1638004427
+-1589926770 101360564
+-699951050 1908847737
+-1760680862 403489902
+-1483667023 -698863046
+1969700294 1013987986
+1906279253 -1792218024
+165705396 -2048559113
+1924397574 -1983531386
+-63731037 -985912876
+898486797 -333379558
+893793983 1184216463
+2105198869 -738419287
+-696324256 646835430
+2091146865 -800956143
+-1762843732 87795708
+1572473449 735837950
+461739232 -88582209
+241806546 1020915724
+1899182978 42287688
+1893743756 1154437888
+1944865736 1994481104
+1111413630 -1360681016
+327474191 1031546652
+469600551 -429358003
+-1543982483 1707132943
+-432555439 -1858764572
+-1334562322 -80481140
+624648736 -1042671115
+-1464241632 571561693
+-446800768 -224794785
+-662389350 111056204
+-408030603 1564298377
+-2015009865 1795924174
+-44691006 -2002571691
+249716379 -1360879703
+1056044133 -186004842
+-549605414 21580060
+1454461850 -219614494
+825755332 1260983468
+-606354210 1573971666
+864295412 -408262293
+715253639 -1815935253
+1551033440 1388114586
+1376920716 -1781452787
+806965409 200890776
+-1262511108 -1353936405
+470500079 -2142001675
+-2135733924 -215937984
+414498943 569728036
+1809283276 -619389119
+-1181340288 -1939825321
+-1149899725 784342992
+-892831352 453075052
+-489704621 406528635
+1088151720 -345087672
+1293391651 593191529
+-2110402007 -2131818328
+-2127402249 2144279014
+-2055751543 1342865663
+504398255 -2097930430
+1486698600 -556255652
+988641806 -1008955392
+208809221 348297030
+796206754 -1973577570
+673710920 200226530
+-1789637430 812416199
+2097450442 -1803706122
+-597629122 -292167393
+342546861 -1547275996
+-1355701910 1572825955
+-342592323 587156441
+-789176983 1265339566
+-924129314 -346733832
+-586555519 445451393
+557596649 -2029407492
+2074542212 -1303410481
+-678144199 1996049634
+-845164777 834703523
+291822797 -2074592377
+-1502384124 46894540
+659254670 1288547648
+-183409574 -761022414
+-366812289 -1240404603
+9071409 505582868
+-964597752 -1230279923
+-1415449576 1657930383
+763569906 1484327884
+1500143497 661669017
+471750143 2114644694
+1851833462 -1180942404
+688701519 -1611507537
+590391907 696547742
+1206375919 -743840687
+523947728 -1835011698
+-605738829 -408175746
+-418717142 1916200065
+-522332793 -406874308
+-1369265131 -1030942560
+-1563515924 -1851458568
+-2131936936 1938085828
+1649269166 -1457885967
+543385403 1424265311
+1949786382 629309955
+224252224 26646178
+960722664 -204502009
+-464828595 1912607702
+2047630112 659410358
+-61029418 542856613
+-1251523066 1173102182
+115840092 87459749
+642121318 -1820441418
+-525104489 -1121394638
+-1055099081 998703346
+340714093 -2079387230
+-533825373 -2063828764
+56280276 -597688044
+-1160807910 -69583606
+-1176199733 -1614880958
+1284132896 975363640
+1718484829 1413481816
+-406567776 -553060434
+1885291781 -851798945
+623717372 503598307
+2005229190 -961718201
+-370799854 1926637187
+-894784553 -497179605
+1025585141 -560454911
+-89560044 -1671878758
+-203346162 1923963760
+1139410253 -1672935561
+-246175113 -690607805
+-26002265 1454359696
+-1762248583 -118800263
+-640014903 672310488
+-1522968184 -1968406096
+-54841683 -1664789671
+-289954309 -1848291713
+-265806864 -71371235
+2086587077 803876227
+1592107847 -1303037308
+1266605237 -1945575421
+-1803612380 -309274710
+-2117266602 -914075733
+1184585129 1646679309
+1873425281 1909497435
+2132519062 -1250783401
+1861684603 -1106962925
+776330761 659412147
+1185744345 -1105201225
+1264716471 -1441487499
+-1166175239 -13166139
+218883003 2091180948
+1416553703 -729263663
+382992105 -1178013352
+567787196 878246949
+-1272119613 1042662709
+705166154 1979688571
+2118483662 -1427100173
+-570025677 1995042349
+378542377 11697631
+707602147 -1717597800
+722858124 -1334811092
+-1377728384 -642133779
+677653626 -254724802
+-2125588184 323843525
+1311458187 304514005
+1615368669 -846321124
+-1816218674 -607417691
+-1197766045 -661473001
+213947151 -1234343778
+-1780251255 -757169240
+1872355088 120044775
+1772772074 -15421549
+-634810457 -226487637
+-141711713 -533263404
+1573273912 -10748094
+2085842754 -67170491
+1765087727 1284211130
+1119360554 -1981192225
+897964626 -937774519
+-1387493295 1456134084
+-1903234688 61785189
+1416366116 822922285
+380801981 -977437936
+1102640362 -792447346
+-1481835575 897224081
+1326669274 572762876
+770298816 1418513553
+-1666419126 -1607011372
+1151087027 -2123431078
+-671443657 -1402954543
+-1276549867 249167770
+1584604823 449951018
+-2122246733 -1318726326
+1208773874 -710924633
+227612269 495108193
+1173462810 874423044
+544124993 1294808595
+-1519116021 -1075704065
+965557915 -429231926
+-1135692672 1059610326
+-448357829 -1170912257
+-1359315581 453575531
+412329476 -1737733396
+2120842056 1708010983
+494444316 1096854062
+450910991 1839404078
+2131675694 -1722701869
+496883755 -167143304
+-369491222 -1260454451
+708242226 -1347236284
+-328394327 -1109504118
+1620335021 -1522880611
+-1923240905 1655787755
+1077352811 -961838116
+356776956 -1867643316
+-924330276 -811972324
+1441127811 1065621794
+372028565 1929534678
+771323998 933648451
+270001145 1758145769
+822747946 451746337
+-1736221649 -1865781340
+821392820 1944280111
+-164182804 977313986
+-603370649 -1515802712
+1748352914 -1525594356
+919132823 -1033964695
+-1813888538 -1550662784
+507734976 1570659405
+1533937723 1939352909
+1761885600 737009502
+-1682269264 -1933164945
+909984827 843476917
+-1353439680 535917457
+-197905180 305855052
+-356999100 -209842921
+1928643406 708408630
+-1230967744 56507700
+1466918558 -152018916
+-1162193982 528888610
+-17750207 2065829128
+-623003127 1870556444
+-1210699853 -984101501
+-946921891 -40233527
+-371682369 1113957934
+-255557727 738041232
+1962715093 2019284347
+1239518381 -1620651229
+-275884022 1734011482
+-1626435955 1435784683
+-1046572126 -1579368643
+27836477 2116078758
+82390310 734941726
+-1772110690 19721009
+1562523483 47505845
+-2055265854 1302273394
+1891306710 2045666091
+816378447 -190064013
+-802481409 1516385141
+165628115 680553339
+114083534 235061155
+443396925 906560508
+-443324564 -1970470556
+-98397653 -1723668854
+31630702 -1262642983
+-1549859580 2082249330
+-148642135 -244274123
+921037759 429002525
+-1809484339 485800427
+-1682384296 2054783601
+-300628157 163673956
+-1056596976 -116563923
+1554548993 -873093169
+-56202291 346523056
+532464838 390748549
+1319696453 264986198
+2035415667 89823011
+1230427175 1056306868
+-622075807 -1424846448
+-2003505504 -1542859024
+1747581754 77494525
+-810245326 -159525742
+183666744 1240445488
+-1246750325 1412475008
+-712025070 1079995156
+528942450 520979909
+1640389242 814393119
+-841795880 609869927
+-858313897 111035221
+1268119973 1145373843
+1184438136 1428139383
+1113749929 1521184614
+-2025240735 -888710651
+-541619909 1934179969
+-1736682663 793617686
+-646506088 1518427618
+-267674305 -1622734711
+2058196498 -1543088938
+-2048099364 1119370061
+956964296 -1880361089
+-1647344668 -579021222
+-1167674478 1603865198
+-461457684 -1602471059
+855006982 15303544
+1184820715 1947451322
+264323869 713654198
+402608931 235262058
+326274602 -960683115
+132511321 -1390802394
+1634148529 -2090302033
+1211637134 -1435249494
+906129436 946708976
+1193479324 -2040401253
+361814343 1241825736
+807404460 1681592309
+708867198 -31077895
+-1566817255 1773172184
+827699718 1434354561
+-1336372078 -651101972
+-1563624911 -466841704
+-1023054769 -1738913692
+-1625073497 -1633205032
+-313529726 -657021131
+-1320509615 -399807468
+-1216411678 -1162360338
+132951480 106684853
+7563030 810695035
+49930752 609579037
+1656523221 -82252531
+1155584758 -442446648
+-1708671597 1318512098
+2113745428 1736070982
+-2106238458 345421614
+-1632575265 -344624368
+-828496874 238104586
+1229409464 65280215
+-445537377 6990658
+-520309244 81282093
+1856096616 313383418
+-1474830559 1259173764
+-308568979 813282644
+974501716 215150379
+-546594669 -363708006
+807482604 -1656745414
+-1490860269 -1013571933
+1191408342 -648292786
+2000415804 -1023552416
+-250692343 1262073276
+1735431218 -531200198
+447458769 -364986079
+-57650737 -253737133
+875763951 -128134651
+-1597652900 229216241
+325761802 -663210265
+-824256885 1061024171
+97616772 -28970370
+1272430399 1681640710
+765750847 -1568097126
+509271084 669662659
+-1224006463 228271312
+2043855067 713804997
+901399098 -327843837
+-693829284 473745244
+1772754427 1660736451
+-1849439991 973607706
+1030337917 -310129457
+-527116201 1624474662
+-843233124 1674757171
+1756257633 1371830351
+-1139313106 -2107863309
+-1610934127 532504429
+918000257 -1426102759
+-2040619896 -1343781032
+-963915505 1522462692
+1820430094 -1616637145
+-311784600 340142614
+1083588236 -1830239844
+-2115260579 1429472385
+1085891589 2020954213
+-716650099 -1277158582
+-1129589492 -492422966
+1604531179 -1965476904
+619079125 1095565079
+-1203244319 2035667835
+2052731738 343739988
+-538120822 1827156839
+954239341 735481654
+-1168537880 -1822764914
+-2098977209 1820486860
+247551772 -531512906
+987235324 -1578001303
+846906151 -291253963
+1419594942 -1396374586
+-1850323306 -1783982829
+1619384572 1289635644
+-1378785046 338451703
+-1865977618 -595070577
+770546135 79960169
+74709172 1673255496
+313895169 -240167913
+371258008 -1325819683
+821132141 -972131978
+-199156795 -1861419583
+-1395795412 1197794113
+342354612 1893395106
+1199331600 -1706142252
+-1758403257 -280966505
+1791438338 341026717
+1002751420 -1888425665
+148551605 883985705
+-1800534367 1772494606
+846618577 1149256095
+-381886506 500402751
+919659584 470576991
+1182181947 -2097743709
+-471613430 -1442579755
+-2002471367 713044746
+-630821207 -1465206714
+1438668247 -2010482751
+-1007160722 -946200127
+-1399236880 1234889698
+-1953875796 -1401419485
+-148376996 -1090688785
+410321057 511570793
+937190353 942321291
+91084445 2128721188
+1237782077 1624290122
+-1738765920 1133390366
+1591779612 -1093324710
+523198634 48475877
+-502293926 -600959239
+1673787160 782850855
+696657472 1865897428
+-1344064237 1025072882
+-634415857 1594362072
+2030267818 615377156
+-1837595767 855057056
+353259726 836335581
+1940019949 275340322
+326177746 -210265
+-1435519354 782240455
+-1084313491 1817798449
+1513919568 -1615376760
+578856872 1773146144
+-2013219287 362247332
+885498797 1220583594
+1685314666 462671477
+-288503813 -1084128675
+958424375 212616107
+-1014167631 1213624105
+1281103623 145879970
+-1973177590 1171762977
+539398847 401080332
+-2001925879 1737025639
+1707206648 152737634
+-1488737000 1178732913
+1762857103 1286312237
+2050806700 -1005727468
+-99965324 756678377
+745922132 1892552063
+-1343621923 508756461
+-64353412 -429303736
+1871446683 1075428995
+1108264340 -1379329986
+1316900833 -590398275
+-836973620 1816412113
+1404325928 549003227
+-1641759758 -675736131
+-1759729212 -164854622
+33268947 1814785167
+-49587142 -1020326176
+-484969589 -588111390
+2127299218 -991455802
+-350228752 -21968142
+648612808 2052908279
+806985562 464482071
+998430749 -1278396859
+769962362 -1053086802
+-1098052455 1493342796
+-533404421 830573005
+-656119319 -1184936747
+1883307672 1807243030
+-2061299928 -185224929
+-1329864735 -1663783540
+1789883884 -1698038679
+775981722 -1506439178
+13593048 115907061
+1337270011 -705389237
+-723371533 -459768289
+-1709951143 1471113554
+58933608 313675715
+1312009138 -292955375
+-973805173 1958631398
+1931432642 -909020589
+456629841 -806776334
+-599654488 -532662931
+-291024893 1938733013
+-387892436 -964752953
+444403085 337992385
+1811078724 1023698967
+-1862709187 750466621
+-1661137526 -412892655
+-1512724081 1512094305
+-2140379658 -1972051458
+1874518779 752169725
+991607932 1339192800
+1748755568 -1473929663
+-2057312529 -413879899
+-833838796 556030588
+-150203012 648686656
+-970684529 -1794851100
+1817014213 2125412991
+201141856 5090273
+-1995734870 -725542352
+-1431259660 1537337168
+1062498410 -1543548269
+1725137037 1456113590
+652343370 1165086023
+648850293 -837414747
+679543379 1457862961
+1777057728 -754893460
+1453160627 42890807
+1035812347 -433645177
+1055512598 1847764914
+29200619 -2043577670
+-482825014 -2122201370
+-1430103487 1001249124
+1060071018 -816478777
+-2041257430 -963586983
+1096279435 1322754940
+791455101 -931712614
+633127399 -682037364
+2025665632 -713200885
+1149735940 -875449434
+268541286 -2076491856
+-1505867749 -836207763
+-240768999 1445102651
+578326021 -1969664430
+-1480551154 -640269323
+571235300 -1049588168
+22156150 -2050069251
+-2060825694 -1723671740
+-1498595169 -1971151961
+-1185948895 -616669748
+-1878284245 -1773237775
+-1537672467 -1842773674
+-1545066238 82668069
+538325333 -1660700675
+1647498314 936162212
+-941582362 1548646630
+-2110087926 -2141206683
+-369472652 116774534
+-1444946202 1205811311
+-416533893 -1764590525
+1649608537 -1485943746
+-1260349247 148014159
+-1957214110 1842278835
+-2109761356 1337669499
+-7993441 1496343290
+-709377782 855941123
+-1850215366 -1137310933
+-346209316 778985542
+448104513 -509374568
+1110920614 371692183
+-2031229693 1315568517
+-929009656 2063361417
+1093529716 807958383
+-1043307589 985108752
+393476688 -1472403275
+-215189873 1815498421
+-55827501 -789602301
+-576764074 323060440
+-1544901756 -1978514274
+1595033982 1898297635
+745852231 -1603889225
+1963206782 1795670523
+-1852966700 498387202
+1181599844 1213062045
+-1118874455 -427235805
+-2011988424 1746408168
+-1811706537 448776463
+1624174551 576572279
+1615760377 -1555599852
+-1318504415 355271142
+791045810 -294504727
+1076740825 1000722261
+1041917403 1385118186
+1885469661 1348521385
+-1605590007 -472317606
+1365783595 2008867318
+-42665976 -1826476928
+846828551 -1264209269
+-1197217207 -1616140621
+-553389342 -493234563
+256934323 1056042631
+1002142928 493019584
+-963660407 -1466672029
+-801931722 -561751773
+-332146423 -1357364966
+1839259810 -1167666237
+-1327727416 1624925641
+1420187486 -1874048130
+-1137808029 675059266
+-632191029 -456912279
+-208473367 1967083418
+58279300 1376547359
+-1592548177 -1089493148
+-481011558 -1306993523
+936143959 -2004420660
+-332691435 1042956467
+489108487 -83655720
+797707760 1673531680
+-776832410 2141986911
+1660588332 -2012721864
+-1151429708 1306888600
+1675667289 1773543672
+-1016875609 572662042
+556086432 988309953
+-2087737314 1105399664
+-1396651847 1455519774
+1512106608 -826178251
+282960829 425915199
+1004711510 -2136321189
+-539583190 1923458124
+1885081331 -1276698882
+1595604671 1624660600
+1807492768 -1293984287
+-1192761855 1889114273
+1180613365 1226265434
+1201476964 158544750
+-111615230 -489717632
+-332679016 -1001579510
+-1041418014 399756272
+-760414062 1515182792
+-1302464270 -155162139
+-515448758 1124224835
+-201110746 -705015430
+1710194064 -1832676744
+1875452851 -1191090533
+-1196346322 1945139248
+-1418083212 -535412285
+-1357227443 339122934
+145586300 812434169
+391340824 -1217905951
+-228879459 -401131331
+-1680799480 -295807424
+378238716 2040409206
+-547310819 1778081465
+882905658 -6168344
+1828722154 -228514623
+559547149 -1883105543
+-1496755348 1147325418
+-243219003 1906250465
+-144112328 -748708847
+1580475908 1208081818
+-599958169 -1923269497
+353726376 538118525
+-2068812950 902156392
+-637884166 1983897169
+-1848045933 -2070099231
+2007668202 1337295808
+1138725917 613891871
+-715056333 -1592173463
+-334092679 -337338558
+-330118238 -1186029064
+-1686488944 513415648
+887429082 -1378296386
+379839336 418736860
+-2134134829 -1854933367
+414893641 170114091
+-475536267 -93822240
+1293163714 330586628
+-301776756 -2006290018
+-61797415 1774210333
+299084274 347204326
+1949257320 -2006060222
+-829297000 2104452074
+-851503546 -1479310859
+1810774125 1956080501
+1422791078 195203570
+362104223 772906014
+-273487261 -724895360
+1736464283 1933772107
+-750961683 1055128902
+1302223183 860063223
+201099410 -1799133735
+-316234755 1272761757
+2102008114 -1458952635
+-67342581 2123714944
+87783131 -1811497430
+-1466933385 2057219319
+1069658407 1115048637
+1653877404 -1786437931
+-1398659144 -1421584199
+472575496 -1661151254
+964977302 -985198572
+750546374 -400119229
+231863294 1298876619
+-1395728082 258349236
+253982993 -216176539
+2146477322 -433562343
+-476733364 -2023556121
+-1424167903 -20761507
+1894630757 177993782
+19890616 96691485
+-1051517245 117190896
+-1123244833 2056134606
+94944847 1700393431
+753726878 -1353401923
+637974453 -961809379
+-1491647975 1652223346
+1263730721 -1625294262
+-877441080 -1781264041
+316458199 -1611795166
+1209951161 -1398410223
+1878665695 1233579679
+-1898651214 -1500205731
+1210741041 2035986654
+1694384777 1130960464
+1798469661 725960597
+1743121647 1902555998
+-1763286599 972344277
+-1391243117 -518641995
+-618701727 -978504535
+2005386197 -1082329729
+1112468772 -523921631
+-1088390669 -1101352012
+-1153742377 975240675
+-1596471679 1212517800
+1916958259 -2124064260
+264720454 -1449843124
+627808955 -224100545
+212140515 -1622078029
+-1612679672 -1178884779
+1110738153 416419808
+-2028399782 -1470122966
+1178022652 -534181706
+-44719433 -885735665
+937441216 2037640510
+1847692466 -925533144
+1087813460 -1133512294
+-574585648 668297147
+778826677 2120303014
+1595314161 -486417468
+114440907 858790123
+-2139939434 -1443608721
+-1601275805 -179102383
+1793579644 118809579
+247148796 1333305411
+1704244211 1741469918
+-1647254676 629764807
+1905676616 -673303631
+2074081794 -1202208253
+-201319594 -1641898611
+491696999 686274943
+377117450 923451528
+-1726021627 2083544775
+-1638118047 -1845435911
+417280462 -1450841159
+417725548 -1168370250
+-965224827 -1645581162
+-498135094 2099106580
+-299390841 216900056
+1076216442 1738437223
+1850429920 877297556
+465036701 -470430891
+-1816974856 1766904018
+-103513469 146830165
+-768422244 -717139607
+-1935065992 -171497881
+432452639 950722184
+-1883475431 -739051166
+-461224574 1795241886
+63713116 401934344
+-1977241105 -341679104
+971318700 -1149160652
+370294949 443700997
+418808294 1287246010
+-784372386 -618767756
+1267563781 2031182438
+1039977827 1632170189
+-967202827 1306161451
+1059220175 1784527774
+-1380996313 340027924
+-499024356 -673109779
+-644266080 823652088
+930495337 1333312445
+-944722049 59235161
+-1279281481 -1036465307
+1397371003 2140872647
+1876620552 -1217766616
+-870707055 1160101246
+-1210529177 904288424
+1348001264 -300343035
+-2046723957 -1841406681
+-1683053755 538738719
+-1602631640 -807212650
+-1826952052 -66348769
+-757394113 1895202834
+1649803751 -1950503682
+805521919 -1226669185
+-1241758163 621432123
+-1995493359 1381656533
+689335799 -290272691
+1911311942 1355099300
+-455611706 -1097272111
+-1748100598 672340865
+1508166310 1150494067
+-180158249 91127151
+-168389612 -1781759341
+152456683 -1381198403
+1690051733 686971616
+1927675293 -814558945
+-1237396343 1632525912
+1739449861 553991703
+758695936 593942517
+889470721 -836023744
+-1653588337 526037459
+-738616649 -1318023913
+-310881751 1744046011
+1133428893 -1613343738
+2103658725 -996698877
+-1421186719 1129128204
+1927211939 730264242
+-1096964485 1624323836
+208996624 1280483541
+-1449173040 -1241407489
+226588047 -212453122
+-302089972 -892959511
+298313483 1934126963
+-1440745489 1362939789
+-1517951772 2144860702
+1490222440 1190417839
+-617566069 412719667
+-1967383505 2057033840
+1050430939 -1035241650
+801513555 1856649742
+867372708 -825942796
+1123770393 -872618351
+614247671 1925231581
+2080877725 1801319073
+-1588279725 756457258
+-1291278799 597566976
+1623136295 -1329407136
+-1992518580 1578040057
+-1816189415 1398363750
+1303616468 -1681524862
+692283793 1902878214
+1158093964 704031269
+708583368 1830784640
+-1217771610 1770848955
+-22547367 2031530021
+1927839190 -400646071
+1842048741 -687817102
+1389756279 503629649
+813709103 1725173710
+-1515963930 -1896260610
+-510154298 -65374075
+-602811604 -1906211853
+-1326414800 -597937996
+-2041201102 1759861050
+-1685803403 1983713567
+-1842025120 36570961
+1188706246 741663828
+-1790477455 -1271526920
+591429549 1679631172
+1624132318 -1276913317
+-1011354347 -1004913239
+1981103850 446408943
+208820572 -544946859
+-1605194931 -1678681424
+-606562962 -143261050
+-2017318158 2056711676
+1557417146 1413352545
+1697652753 1923018155
+384518118 -1152027769
+-1658748627 1919281146
+1992230452 1781487727
+-547552861 2126074288
+2008988048 404635804
+-1047174537 616977580
+-488580536 827507768
+386233005 -982159586
+1473779885 155285832
+-427827536 1725123487
+1224758763 -2108424494
+1819727197 -377178152
+-1424534684 941861820
+-32292965 596414985
+-1837930170 130306276
+-1296332802 889191603
+-523319728 -590770232
+919334609 -1939649012
+-784871009 -1559503957
+-674383353 129048946
+1399717264 -646506201
+-1704187615 2086836212
+-1760816559 767774098
+1496640956 1798249702
+1782175915 -1304536906
+-1439653264 -49246801
+1668782377 -500648904
+968111339 -932127047
+-778333418 -1816345304
+1804864946 359369948
+-827807367 -301882142
+-2014123920 -799520401
+-1155243258 564567031
+-718444992 -570503675
+120888852 878110760
+-1672872686 -2021595953
+1086757889 -1470633110
+-194723319 -1352664297
+403116975 -226213782
+-338695342 -1448481705
+1617829326 -1536328433
+1668339637 -77497842
+-1324474715 -1053791859
+1629370376 -1791690919
+-2140440863 -183936151
+-2067201279 -1164207233
+-1459071543 -1659776284
+1792944454 502488213
+-175816928 -1954373758
+709740191 -897517030
+674755717 590289623
+-444461421 -288565979
+-1280464989 1071730537
+1273648357 1377797300
+492214020 1439902531
+-665812902 1285549625
+885436714 -119025140
+-1567717725 256825825
+-878432292 -1851355712
+-1785149916 -1857604797
+324120713 475362516
+-2123912891 1811801367
+392490476 1309717951
+1693716375 -776415617
+1649895639 -1101375728
+517514703 2100292389
+-205768300 -1167763648
+432575930 1838778396
+1457996189 -809013611
+1533422361 2052108292
+1703017263 -1965745509
+-1315342562 -1863696391
+612183874 744785674
+1616918661 -1576266493
+1287307158 934240096
+-1027377936 -767660529
+572269732 -174438563
+-585847224 1525271407
+-41789831 -1374285582
+1371436705 -1152105803
+1140253647 -901719441
+1035360671 1945576258
+-149771841 900486983
+331481483 -1969641925
+130688424 205133302
+1840820436 -1984860552
+1859843279 400796689
+-711987201 -777487221
+780081896 -668025684
+-1011773705 -1124166281
+754292215 -1546514148
+777523861 -330287362
+-2130213550 1643350721
+487517734 1360318112
+663699485 -229271791
+-407109495 676861831
+471811303 1593402079
+387289521 500127114
+-1059348472 -1071590125
+-642305040 -124309434
+-719523197 -1093094528
+2135103263 1470901564
+-1808989768 -2023757242
+937058919 1443787991
+-27415580 1226956565
+1687695724 1771328295
+-430032928 1178728881
+1811514890 -1542660087
+1643317429 -1755869373
+-345174443 1548151526
+-1365817848 -596681197
+-1870376931 1671186256
+2116327947 1322277950
+1352095537 -529310259
+261193663 556505828
+498750245 1742917664
+1242717549 594310939
+-428733050 -474565227
+-617943103 -300715413
+2039057394 363068864
+-101829912 1590139008
+-1850211785 -1249212154
+1644629732 -2106349847
+1817148941 -1850036804
+1359867334 1755677075
+1087181784 53970918
+-674056939 -461331937
+1499971995 1289524294
+577600670 -143493479
+-2147344042 -1591610269
+-1209245316 1035144519
+-1415577712 924653287
+-197578875 95135146
+-45463703 248328765
+208979439 1933280883
+953493350 783564890
+-1447937258 -553354878
+273102005 812048225
+-1979726896 -2006964898
+685401195 -193067580
+-1461485630 -2031646970
+1225815447 987577164
+-1533828732 -2146625638
+2049588147 -414214702
+-1010869363 -1885365127
+-1588735657 404737179
+539899022 621386407
+-615855010 380099331
+-455235899 2057102972
+-1430443944 974073802
+-2094872110 34701186
+-1264284868 1902262438
+294140758 -1379616237
+408972048 1093180811
+1757801512 -612406108
+-643444358 -970250684
+2088874307 84298572
+-1344070938 -199254859
+1543207425 1226837273
+-1801018488 1215099203
+-1104610046 -1187173651
+718848326 -1401611705
+1170620315 -1676789349
+105353146 918155683
+901827408 -1745806052
+1776318322 -1787391100
+-1016560167 1097033493
+-1043919338 1543291479
+-1250196885 1022221785
+-286015720 -1055205211
+113525977 1320545951
+-1844487662 1770679888
+-290872044 1837678737
+-1023850565 2134821034
+1167414469 77175078
+1294702810 1192263404
+-672480058 1931944339
+1619575930 1688688827
+686019609 1033481601
+-1001887773 -469260247
+-1277368916 317268548
+1255110483 -960803194
+896213559 -760139444
+476584136 938789849
+-685345424 -1811369133
+583850679 -857184852
+1739828265 321623826
+-1587268606 -939863408
+-1189692636 -23228203
+82487345 509160734
+892865335 -1266600322
+-2014535356 528986619
+-1241582236 452061139
+-399235512 -1607989622
+1089680246 -337477889
+-1280945421 -2049398738
+738718132 617770634
+1112546742 -2139493464
+-355271003 -1136522067
+1880116456 -281291769
+177143434 -310617990
+-1822132997 303085643
+366747140 1399897092
+-1484651998 -1462304179
+1136355572 -1603756712
+1274839369 -763191341
+1876902209 -74235265
+824066874 -1281104604
+1408526719 -669574734
+84413109 -258858541
+-115044206 997067420
+-1531155294 1040604949
+618076100 -1633567316
+2056104197 1228675055
+-2111902414 -514656173
+239260823 294186658
+-1743090097 1401866805
+-1157808540 -2029435328
+709477281 -1184923625
+-427638746 -97984037
+-554214377 -1946665908
+-2139301994 1405163539
+-951490726 -1151128564
+337592648 580844490
+-31271076 945976897
+1581627482 616449008
+-820903593 -886378904
+1865054690 292629516
+1271823238 -2132961603
+-29729353 635604651
+2073377261 1396239505
+-989599508 482025531
+28105921 1566026263
+-22957129 1409726590
+401123788 1844066542
+-1566753187 1776442404
+-2087500327 -1649164979
+-821494605 1873118021
+-549755071 -1954104157
+1322966524 338300923
+-1287022755 -509809669
+-392616867 289738788
+-783192214 1782798458
+-1014946487 -968816968
+632844775 987038913
+-113961353 -940582195
+-363481691 438972646
+172251636 -2091608966
+2129107050 -1878433398
+-415054129 -255212286
+-1385994530 -2133682457
+1638483385 538630542
+-127393846 827353897
+-1215702692 -885702882
+-1846282111 -868129042
+320672089 -805361811
+1773417303 -2028441280
+1707541760 -266050372
+641035648 2089508470
+-1588856152 -1939082148
+1680654855 -1189386972
+1550498717 -915678041
+1151481114 1468522509
+-588437564 -1063552117
+-1453162613 1234676105
+1043509527 1191728770
+-724631416 138546405
+100438495 -461128206
+-388817101 -1754013087
+1553658664 671023158
+1249752024 -1299766529
+2130755024 1520453225
+363384021 321399411
+2032095620 -294553552
+-1865215171 801350874
+-1183991297 1544276553
+-305996201 -1102133185
+1096812014 1763289829
+-149642341 1370879383
+718104464 834091370
+-2094944924 -222909374
+2106733752 -640749324
+-949129631 1555856343
+1671193725 1480746897
+-717567717 -206552942
+290119941 -1468458358
+-422676125 1541097933
+1422293560 373348808
+-1004063888 -271512421
+-1067198754 -446307801
+-369545603 53972157
+506906430 -1694989096
+347050033 83582536
+1718166674 1993823487
+169625464 -548855
+385061473 -1254598875
+-1486310814 -83777791
+1657151444 -855960883
+-1088414767 -1101392531
+-1952655787 751133829
+-1307067215 -1353346914
+139259463 1337704561
+-926863197 -794593188
+1106206123 116411504
+-118423620 1680385163
+-1871678110 2086533676
+-995536554 1201748033
+734235478 -1073011068
+-619131675 -2121983110
+1990741079 -1323386123
+-543567834 -791195399
+26210899 -693792545
+-843650311 -2043785636
+-1996710450 -1196896697
+-1353382453 -1822939257
+1133304810 -1771469729
+461605301 -702762036
+184762678 -423162669
+-1300568854 -261141221
+-991047456 -2030379988
+-684871460 784916120
+-2062915237 -1811139692
+-1765411675 2139710261
+-1883119150 2122485922
+561866379 -486601292
+-1332606651 764875440
+-129046051 -51782531
+801281942 168058252
+838334926 1975993095
+-1204930751 769323039
+-818103900 -1046786290
+1631264586 1510641309
+-467510155 1985829381
+874347113 345162894
+-2014206785 1953439331
+-665303574 417549739
+-2073042726 487602805
+223785357 1711557807
+438834186 -1729841871
+1536500520 -2055496587
+-1582443030 1294129730
+-1031247624 155969479
+539032826 -136343743
+1398736049 1910741278
+-912182479 1631772144
+-1817041980 -2119224796
+-338585496 -1245754256
+1580229869 1663958757
+1361881760 814817622
+667785167 -2114030756
+421291914 937473872
+-691292663 -63509151
+540732431 -337691136
+-201350683 1185439647
+1353281119 542171841
+-824030265 1913070923
+1930956976 -1682862436
+1753260964 668064561
+1724011613 1399434257
+899945451 1729163997
+1084159283 -1738958219
+643495396 1635139786
+52152640 -1486384641
+-1518381075 -452447191
+-1283331214 1167673978
+-1300837243 1870087781
+1056509777 912221895
+-1475196527 754546759
+-2046657939 1919912780
+-1934731744 -1435410308
+-1898530066 494090764
+936660736 -1096768309
+-1157213316 -698915103
+1879611897 -651271852
+1777400714 -1436506678
+1192001343 -1932625175
+735983505 79527084
+1828565797 1082126072
+-1516537306 465994126
+413717591 79315662
+53672331 812263187
+673851609 -1310384944
+-883269380 -2099257268
+-2107607952 1214125374
+-1940088119 1048735223
+865870566 1835772089
+201819197 1785803318
+-2016645345 -913359941
+-1983865721 819770965
+-832547463 1837477514
+1267897651 -1782454936
+1923711545 59539181
+616726901 -1049780280
+665054960 -1983181718
+-1042001463 -1917880630
+160367594 -270813272
+-1182621523 1797152512
+-249939068 -1167192965
+-1698441606 1006772761
+1929954607 137148320
+-644812667 1029741468
+-1650608613 -1550843855
+538808021 -595433234
+-2019536470 941193477
+-1898660206 1679479879
+-2131352800 -1400412348
+-1419963350 -1989963990
+-2049629513 321670541
+-159162204 -1839438736
+-571200157 746029171
+-1696433027 -54984763
+-93675368 1077470140
+877753460 2094956066
+-336885332 1735202678
+-664523558 -367024805
+-1859546497 -1432625460
+-1977811683 -881414431
+-252194663 1872180695
+1925031991 -703839538
+-474076008 -2123952824
+1011483449 -703852574
+1492591488 1568655267
+1075896215 620720092
+-566749586 1799621145
+1027799440 509153580
+1858047288 -566729481
+1005933748 629045506
+1330132506 -629558659
+1280543468 401474870
+-259304942 1190433453
+-1250327701 994326182
+613738515 -831784601
+-1792202022 -205902064
+1553899911 1428748134
+2001483395 -446213370
+1694973887 -389053460
+2022032299 1028702474
+1736370369 -24388593
+919083238 -1544972550
+-1329264100 1685673362
+-1806940161 1158076428
+-1896433051 -126686164
+374417278 714822110
+1858203648 -465552642
+792806289 1841813985
+1897757983 2069111889
+634411953 -457278623
+-1793046128 954523463
+61805682 -574425634
+352038488 114732074
+-1611227738 656632887
+-1679983756 1974851984
+1775076013 -1721142082
+115781606 611719372
+-150459580 -292108182
+1523175470 -1883574428
+-809026808 -1413314796
+1013664306 -1081416464
+-1916307869 -603735769
+255776341 -1954617741
+-1322192713 336325336
+-500831478 -1864597608
+1951734573 -2009784526
+2092065776 -2109684082
+-1493346705 1927408007
+-1656801590 -1736696494
+1899584525 -1629554515
+-422356817 -308564254
+860938823 -633256279
+155406986 1276294349
+372758037 1901850306
+-1655962253 1112129906
+1612242773 559536741
+-1141252989 -1625802642
+-974608811 1276958185
+-435569069 1633447816
+-1824854575 2044008130
+1436582502 -1437739200
+-2102808240 -53367658
+1350634444 1633974053
+2003412859 -637878599
+1932645965 300937323
+-774585102 -175626712
+-2107089693 1842700529
+-126425283 -22960225
+1074355418 -2139405766
+1873170900 -486335245
+975958856 288294250
+-2002603490 1474417761
+-1544658911 -2137911461
+-1976526916 746209653
+-1831576890 -1349730937
+-775479823 -1938867306
+669673671 394512152
+-576900137 2012713230
+-1816548580 -1535289559
+-1200601914 1822487179
+2017925107 -1996222403
+-1307302281 1156567198
+300960481 -2085928849
+-1916381781 -2116776043
+-1241103276 -488674187
+1011660823 827126372
+-291352114 672403542
+-1143445607 1285599961
+-2002621594 267165650
+-1336573883 1496915858
+-1291775372 1743740184
+639828598 1542281571
+-432543551 240110358
+-1509562991 -1095963562
+-771857294 1076803221
+-474133212 24980586
+1777349945 1438087100
+1817787127 -72430858
+1719515510 -443952524
+-1035358156 -955554341
+1957053267 -749994905
+733128809 670978076
+1507708916 106607715
+-418341916 -2036224232
+706069937 -406261230
+-734378486 -1449962500
+1279672444 -1037567628
+173333301 -1024800350
+1862359019 -1386304284
+144581361 -903640163
+682312167 1456696083
+-920651920 -1197157896
+1038155034 -2101239238
+-982291904 679345144
+766328497 -591688790
+739871451 -519585029
+-404387239 1322161372
+17337929 1923510202
+1141773376 -1128357414
+114801267 -732392493
+-1972119630 1177549506
+-1207533974 78818991
+-1048124624 1107482234
+-1387749174 -783361650
+1557877173 1502698520
+1746228007 -1300117690
+447456825 921036121
+654688151 -1716312939
+94363877 28726375
+-302883768 -348393766
+1356010879 -241754718
+1846318220 1034236527
+-905023990 -689356361
+149833357 -891177981
+-1783690569 1127192984
+-1950530200 1289193189
+1942939397 447972447
+1875331913 -1709802039
+416142046 -1306466513
+737593791 -1585279484
+1832951973 1782962504
+660326768 -492578741
+203997008 1341129561
+-1257932670 1962000098
+699820939 509739275
+1676689586 1975949687
+1304716131 -1006703028
+1518747040 -137665817
+-791218264 -6073336
+-2144557680 1133151419
+-2072666619 335781586
+1407990718 -2010414169
+-1962927591 -96243610
+-384146936 -1324696425
+-270950514 -1266843198
+-943482961 -288835157
+2035560647 -1683626869
+-505511662 -89543201
+1790277853 -427322119
+-1721385072 1106960998
+-1680559285 451508798
+-1150828068 -657373215
+1316883314 -108950176
+509977428 1399260741
+-1848744621 555698103
+1918511945 -119063573
+-344808139 1143160518
+-1737090340 900074785
+38803874 334051437
+-934117582 -1000971846
+-1913150800 1575000836
+1873987540 -523446087
+194553256 -549424855
+-875273354 -703354478
+-472847571 1965695846
+1564726597 419395901
+617468293 -1691972996
+1888132761 1301922602
+971069345 753840342
+-1601124968 1780507034
+-204146117 -1765938969
+-920798108 -1116217080
+-2089994029 2142649829
+632999722 -1965875819
+-1930784220 739127796
+608946170 -383705589
+655407937 -1500835169
+-1009743708 -572352625
+-1187165170 2125744402
+1738303193 -1149172678
+526237914 -727137009
+266520290 -582237614
+-629452328 342066375
+1936454852 -900024092
+433470362 682804676
+1588112931 299968975
+128175458 1431647055
+-829558224 348678982
+-418123863 1882500041
+13448653 -1218910266
+-60900583 244443125
+734372573 2073231097
+92791490 1119086893
+1957555642 -1586994352
+-802438535 -1787791349
+-1557142475 994847367
+-998738272 -464388914
+1674800235 1905151958
+935606096 726723984
+-255498772 -1088682682
+-971700289 1244627328
+1615809186 1971762362
+-1649026301 348388524
+-1473031204 -1676474342
+-1787878674 533124982
+-377645856 -807998918
+1597615280 869324311
+-997342863 1360717738
+-2013513641 1782333096
+1681693394 -938942762
+1390203305 -1900879765
+519536326 1628111834
+1599594144 -1792645425
+2115441707 669109081
+470526232 603172926
+1348786485 -1342432481
+1765536011 -1200558153
+641679137 1173538449
+-811249039 395392600
+-1692150649 1055193319
+-246851020 1178139244
+-1825561337 -2110175071
+2079191833 627330710
+1351970349 1368926958
+-2131253144 -1168829129
+676222172 -2146754889
+77964560 -981259960
+662442201 1411520369
+1628838979 -582066220
+-257368804 -1259157957
+-2139839149 1576555878
+1161171890 538475837
+-1471052663 -1397104922
+-324865972 -769984557
+1453880636 -1061429625
+1423476781 2016942803
+-196921045 -121307762
+243060694 465478462
+-142819626 1928264518
+-1947674880 686761339
+339897222 664508332
+-1468044254 -677978934
+1095169693 639939965
+1216116958 -438260404
+-471602451 -1096165242
+-949820797 -1628178081
+800862913 323212368
+-1079944795 -646966998
+-994293303 -421317642
+1535815459 -1596655262
+-109250695 -1308341378
+-2005754719 -1435853427
+-1932292824 -787935194
+-269491008 1149051147
+612817610 -672204902
+-216770624 860413304
+241791005 632420341
+-1892969748 747745633
+-793771017 58633211
+-1063345897 -638250351
+-1665439640 -957165590
+-1373989957 1168483220
+1416322801 1999666597
+887406942 -198039163
+1250157213 220061985
+-1058938528 -897110043
+1472521132 -2037943888
+-163379464 -841064413
+1973958990 700236182
+-1879771251 -1129412734
+1791582468 2060496107
+880501962 638245771
+-828833827 -872596126
+-832952696 106987052
+-1620432493 1891554876
+1401406766 -619344053
+-1119714713 2056908558
+518719653 196961978
+759801458 76914664
+2040038388 -694014566
+-1272163823 1247744835
+333948822 -2130452559
+812228231 -1103557929
+515837553 1591488902
+753128549 1875767008
+-304181696 1636210135
+-2016487528 1451225467
+242311898 493002471
+920467784 1774528131
+-460977278 1375126070
+1850458077 391724984
+-390786845 -760764535
+-1276716500 -774278781
+1363792498 -1595873350
+-1116716210 -1725898896
+-363874522 917251436
+-1499174810 1280909240
+-1716454956 542731419
+-567839113 2029566486
+1534165381 -39988994
+-673124009 -1395793427
+651437279 -9116757
+1973871741 -1726990145
+-1832881905 2060154894
+-1976835750 -609393317
+-1836654132 1036971527
+1954623967 -2005064248
+477115118 -174557524
+1793228683 -284771233
+891064014 -1595760371
+-1998690472 1337208671
+565991092 1935164563
+-256650096 -957542957
+-992616485 458317503
+552487921 -1688511628
+-991663024 915066071
+-1386140934 -400796394
+-492521855 505914917
+-1402764407 652076704
+1077779558 1138282558
+544234448 528841206
+96829490 -1607869980
+-119496055 2076841932
+-992083229 346520161
+272274886 -2064625615
+975896820 -886761959
+-717961574 -162553912
+-1264202883 1828387253
+-1163203041 878280979
+1251731214 564725635
+1971205631 275898329
+695528727 1192981042
+1594475528 139492951
+1204072056 -891823904
+1855775562 1940038023
+-195708411 41485181
+330021915 296964802
+-1022517703 787231816
+-1084383852 958705420
+362353652 -53715644
+10247882 154239862
+-1731207439 -467402030
+233480125 1762181172
+1493701526 -1615824474
+1288051327 762293840
+1323034080 974326040
+1403290934 -1206665419
+-1118363809 -1403633427
+-1334222479 -1960861315
+-366106359 -1888096668
+-76135219 -700466066
+-1288723945 -270963534
+170236927 -854149834
+-893154900 -854605512
+1947369706 964628711
+-172619768 -327216758
+-1191181756 2122561345
+-249008729 -80598873
+-954752707 -1762667337
+1244349399 1622455979
+-1358479321 1121150902
+636856208 -1928506974
+-980184829 1495125682
+-18591809 -317782893
+-408341333 1020028062
+-916664093 -1899577884
+752157712 -489993405
+-395541917 -1624562924
+-1582242938 1805473138
+1332159400 -1504982919
+-679303646 1769448229
+794548739 745517729
+350655364 -2111114207
+-1148290102 1849004399
+644652466 -2128179476
+1707434800 -1512524755
+-271119954 170585956
+-1280920218 -218918561
+-238561758 -1014719832
+2109397139 1699107957
+-655960909 109244012
+709079196 1508776807
+-1422662389 176746283
+299356167 805721529
+-239321294 1719435174
+2053453353 -910996748
+1668451744 1405799975
+-399064533 -2055219476
+1760225728 -591434018
+-1925081498 2069828494
+-724928633 -1863849714
+-618749060 -1409927801
+1409672244 -763997840
+1894584972 965658847
+-1679572434 -397627843
+-1270288803 1545571548
+-59983420 253354045
+-1091934312 -1751693037
+-1029545837 1162197407
+-60606295 -1972909681
+592677234 721715796
+1476187973 -305141384
+-1811943145 769550806
+2096872772 855049459
+-831595770 1360881561
+-991868608 -330517995
+-509037274 130400083
+1552351343 -1277554670
+-281301503 -1510967984
+1030168338 -949551421
+-2086275561 1922380735
+-319297926 1582724996
+241832225 1921307114
+-78762069 872381608
+1760899366 552783320
+-494628691 1872484822
+1859582476 2110381923
+-2121361662 281638450
+-1003267893 1417197494
+-1010411131 -2016826843
+-1304779734 56052749
+656594281 -1195561662
+-1145885546 255870437
+1709593092 -282151419
+501657983 -309227206
+-1368895375 1991345112
+-1934790092 2081605810
+559078476 1970768414
+-1396944972 1375962946
+-469801802 -84837866
+-1105237485 -2107701908
+957300965 970086016
+1811363017 -1874817474
+-841025035 1046128407
+-101655763 -765478385
+981656986 1199599551
+916698367 1786370889
+525387380 1669684251
+-781870867 460098809
+-954024713 2043988957
+848517029 909709234
+-1164802531 1795545806
+1106312348 -1913184506
+1378415570 1268491682
+-851493679 -594662840
+-566300652 -760448165
+1058709829 2087689525
+-1689626035 -4903232
+-2105278890 -242430285
+-1534315197 -138251066
+1304463406 861905952
+1040358230 1078016479
+-1963771248 820226305
+-1051145289 1806014817
+-1821840814 235803567
+-433823880 -1749704097
+1916339670 1830615164
+970995070 75886319
+-3316919 -1239930005
+-1780137130 -1277030369
+-1839078836 -1696101865
+-1182732835 1539734721
+-438308666 1638058081
+-1447043275 400714462
+-2133381036 -2105296877
+47709119 432349918
+-147365818 714877661
+-628608336 -1457414126
+-342506950 -81328756
+2116822330 -1956163642
+-65532820 852636234
+1937768042 402313705
+-533687746 366207868
+1318252007 1235385257
+-825184573 166728153
+427059838 -1208982146
+1469845069 -1763143178
+-911543621 -1692975338
+-750268113 1725806238
+1966307903 203158671
+-683720056 -1876719698
+-369454368 1142130697
+-446294751 -1348733882
+-1933523464 54402825
+505720821 -482370760
+705401249 -740201981
+1045761740 1270763003
+610989136 1877858256
+1056723396 -1861544405
+1903368693 1591112135
+-1291458640 -945287373
+2034569823 474509191
+-1989276663 656948595
+-573827682 1839058567
+-639526446 -1627296701
+1731022190 1110677628
+1952182123 2015232952
+1368495815 1924127027
+671952638 -125848922
+-993500272 -204624208
+-1503785751 -1943192494
+468553792 2058582936
+927745795 -2021111358
+1672254901 2111431890
+615755218 -1369685468
+-653243333 -1838954723
+186050826 1857933031
+263853873 -1968011227
+1697127177 583770427
+1097723674 1805945126
+1075250197 1069530723
+-1398503530 -270205857
+-1103758513 -1486397895
+-1175121905 -2040163647
+-1552552753 -498388288
+-1214318422 -999096537
+1265880247 1191864615
+-356053032 2064294697
+-710462714 -1243891289
+501177294 -1141698003
+1159545215 -1835784379
+-1764664774 -1665187674
+1315995539 -1421529170
+89466755 -1103186494
+-1552379186 1611082001
+1630094338 -166319622
+-1640967313 -1269885955
+-416192021 734766347
+-1257433605 368954093
+241444438 1505228369
+-1281110674 -1587445097
+1364303154 1112606377
+-1842443438 926299292
+-560586331 1092207578
+-754196620 -286421161
+139148859 535306659
+76506894 -1473093674
+-1944852071 1830782548
+-1320298672 -1919609459
+799243689 971988199
+205971748 -1485061923
+-1200457643 1785772137
+-2089008296 -578717802
+-1457066505 -533155948
+-1952687951 -830827325
+1458408684 -1303264734
+1176015349 -1420615854
+527153269 -704283123
+-453030159 -1946072297
+-70040061 -1155156390
+-620491551 1809898789
+24150790 -29600583
+2061278841 294651653
+-1443044736 -2101790263
+-1220785015 -862536004
+-246977011 -190046847
+1838847371 1484647466
+-1724881223 188583183
+-2086144574 -1401900120
+1892075699 -1691382341
+-1814744452 1033546256
+1186602472 507966580
+217292755 1781683442
+-670416513 -1794216941
+467281203 378324833
+65888631 878715905
+380959204 -1059479787
+-1052134513 1387460462
+1784620286 1331225652
+46558049 -1358594636
+-804729941 -1140125540
+1850105641 -254000153
+-795453341 174003686
+53868564 1085156298
+-1998564437 319180230
+913796521 -441650995
+-161675987 510434084
+-1498067872 789599691
+1859377670 158612707
+-299845948 -2048759839
+-272369793 751938647
+-731171299 1493298061
+-1824885916 -283044390
+861797829 -1053140519
+-1240739342 -654291277
+293230554 -1954518273
+-1117091685 -1920965628
+527684442 -1827055709
+556490354 -599167945
+-1715716914 -132465860
+893301356 103869204
+220188484 -1936168804
+-1370525360 -902169206
+-711740388 -1298578778
+1421641004 458907431
+878816077 -1590735980
+-216957651 131256423
+-2094918571 -551297983
+-1719578907 -134901068
+-6332413 1539917149
+1203059017 -1882599639
+234263731 438352660
+-1998285593 -1806531494
+304472939 1106534511
+737025745 1867393412
+132496228 478682105
+-351147096 -1905489172
+-1640029563 -1496647873
+63517167 -906271481
+-1279671727 1228597253
+668834581 18169098
+534815909 1848869295
+-1916687761 -521657171
+1174990970 447074068
+-1605045832 526852916
+410778996 -1538645149
+-1309846326 -1362007979
+-99336750 -268188152
+1032873397 1901330515
+-2033871023 -760512196
+-713288943 1664880020
+1441481568 -1920566699
+1534037387 1616513459
+-1516473725 885112958
+1271080264 655539909
+-795233732 346194063
+-1414046187 -870674743
+-1726325331 -675472980
+709055242 2138656974
+-815296131 -691258416
+43794240 1206639335
+-2115580426 985026596
+1649809039 1716385099
+-1238284957 -1100268102
+1505123474 -754243674
+535386782 1097503224
+1178357046 -1475329244
+839902703 1823968534
+199022090 675721331
+-1524327942 33069447
+1204755734 -748477598
+1034070636 -1181220924
+-488748153 3789741
+1711857677 -873423018
+-1667475904 1505329292
+1594496220 485234845
+1780221089 -1458606462
+383441490 1976558516
+-1656568798 983292274
+687370078 -1907250088
+-351355982 -1372284016
+-1808485147 78584151
+-328629777 160525709
+-2146636037 -2022138808
+-1340120842 375189885
+-2056951488 -657194859
+-1245257790 1982456278
+1880340505 -1710538245
+-833034918 672259743
+-347387695 -1930385039
+1721717813 1706744521
+-458631110 -1781371982
+553855406 -2378385
+-1639477015 183401705
+-1106754833 -659149319
+-1296017614 -1207002694
+-1240573705 -936817586
+-132008091 471901189
+516068176 1659517776
+-25495160 -300772260
+1160021939 -1119918307
+1731518670 1926170091
+-1654746709 1631519483
+-628015900 226109805
+1670683104 -938552689
+1584861072 339046146
+-1922625103 1672033229
+1951267680 -2126759919
+-372586431 654125071
+-594051942 1747909431
+-1346391281 -1251079426
+-1965507576 -1043209675
+-2008722097 1432426091
+-1434772993 -1503574682
+2126922426 1067375810
+1570542918 -711967882
+1859684252 -850750558
+1386987631 -337647991
+1993366468 1659936966
+1058490450 -1295581013
+-23804290 1945454478
+-1087889833 -1704413459
+1790845687 1705134114
+479855153 689350048
+-48727064 1777023629
+-1499163464 -1183917994
+-702872376 2093384498
+1766189962 1116220965
+796527367 -1023032417
+1249130706 2027666570
+-1242148888 -584998500
+-1379958865 -1486584142
+-833997147 83828099
+372233100 512161809
+-483562324 856574555
+-1404699716 -176447370
+1390497122 1625196840
+-641264619 -598203149
+-1148528082 1791922295
+-368848220 2132512699
+515171984 1663579782
+887576251 720489322
+250034355 1109721776
+-1446596581 -188577952
+-33472766 1525717382
+-1701310819 1984748099
+-466714269 1984649804
+-978238339 -880352220
+-1637796009 -2022751903
+-62270990 -1589288422
+-662194112 442284920
+1653073185 918634267
+559962469 -1850310408
+1771435110 -1617730094
+20261735 -463725633
+-267834422 1014145543
+1309676769 -2131345014
+2078030418 1362895927
+632285646 -1047315017
+446783632 211307517
+-1912792630 996172853
+-1633137271 -249676860
+365846096 -1436995793
+-596398283 -2123785303
+-1600572633 -268376147
+-2117972445 820123810
+1851924443 1088040679
+975291573 21442543
+21587009 2065376153
+1441344444 832392722
+559733168 -604502472
+-1113224705 -1434558074
+1646611693 1459829175
+1796591765 736669447
+-1851739166 -1890296110
+706281487 -1198905648
+1885587141 1763286781
+166468276 -484910254
+620591673 -1572242138
+-2041320574 -603568725
+834939072 896126825
+-531256070 555159928
+878656363 511457913
+-1635472682 1319797878
+953773624 562203336
+-1124895681 1908313360
+28091837 -305404432
+-2004298640 -498808002
+-1980716736 1213213317
+-1179646635 546489593
+743626740 873009567
+-1343112160 130939566
+-1577896429 -776209492
+1310349677 989072090
+-872858561 -2020960838
+2147119887 1229470378
+-870359560 -1239233464
+123848286 -1717934222
+-1541335562 651566511
+-69366224 1641135443
+-1341863317 1957176288
+-1038528436 493684733
+-1808868594 1386105402
+-1450862284 -420553551
+945574077 -2104856673
+-1309139797 -118444126
+399219387 -1261033656
+-151909072 -587308770
+1270089092 -1681368071
+1550296132 1007437457
+388077422 -1585027747
+-859072967 1133430070
+-2015103580 -1496332554
+-1492465199 -1026741607
+16346657 -745045497
+154381053 -69833157
+997818801 -420022171
+1031795940 -14099558
+-1396419118 -163688022
+-607694434 -738097001
+-1755159454 -997208736
+-358508174 151252825
+-1431673344 1512765875
+748439517 -930963204
+86090045 1505282996
+-121794035 2028467472
+-683951418 -595287791
+-1779434952 -1611624933
+-1840691084 1801172690
+496702184 -2038465791
+-1128203267 -1289361455
+-67692429 -1821050027
+-1449833350 318162093
+1708917863 -1360670261
+2034586430 -1351039172
+-1120798590 1451444196
+1976007795 -332030712
+294736889 -2103926666
+513061124 -601603191
+-635268352 -1808753796
+58152642 424277592
+-1575030815 -267934034
+1845826355 -1118758961
+2032092001 -1930852978
+-1117237033 -879124416
+-1743468299 -212794539
+-307273778 -387912512
+363962135 -35480975
+2020139558 -260181219
+1446971626 -793081508
+456196951 -473677764
+-1815400656 -1643291321
+1931475596 529096976
+-5724732 -1267088501
+-2126787086 -1168378195
+594579951 -490852251
+1859033123 1950304714
+679620324 -1379587761
+72449621 459525143
+1201407307 -21239688
+-659195246 -1696534091
+1406748699 -386167059
+-813498397 -203564775
+-979203929 -1922338891
+-1214025864 592466879
+-1603442986 -1342561333
+204569361 2139396751
+1355986100 1249204998
+-2028506925 760170497
+-820439711 228635729
+-992409983 1645259343
+1699927090 774418213
+1365826862 -1922377647
+-1163542484 -1946956116
+1147999006 913009849
+-2012709882 -746260583
+1597960448 1012134944
+-1618887809 -2134870994
+996298321 1069765860
+614184949 -1540266681
+1824478147 32478319
+1260237111 1254566648
+-1177333213 1180185652
+-1170737781 -452178450
+-943044218 -143900581
+-1817602569 -1960604850
+1099111161 -998009006
+286830121 -1035006295
+-200492217 191340103
+-1230773860 -1224917755
+-195680155 -1543859830
+-1873028542 1004715431
+-1841589539 118492086
+668521998 1190872296
+-1456585535 1878324909
+253292424 1553481849
+-1322334616 270917657
+-1843700026 671670643
+990677368 2086566190
+1311913235 1308680522
+-2106373619 -1490840229
+938123940 2024131416
+-193459532 733078335
+1622614283 -1494736147
+-1554981953 -1931073710
+1329810796 -1272404338
+-1423810142 1975879260
+-1606055437 -745966521
+-1610353088 147599141
+-96026047 -734713393
+-472982974 -902078039
+-1417533241 -1734281205
+-970661924 408598669
+1359884229 -234149886
+-871105994 -1207798865
+1963429150 1388135402
+-1411501783 -1045107861

Added: branches/release/libs/polygon/benchmark/input_data/voronoi_segment.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/input_data/voronoi_segment.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5915 @@
+5914
+-974944161 -1462225549 -1038624817 -1509057224
+-915606392 -1418587696 -974944161 -1462225549
+-898682283 -1406141461 -915606392 -1418587696
+-891067100 -1400541146 -898682283 -1406141461
+-810549462 -1341327310 -891067100 -1400541146
+-809534544 -1340580925 -810549462 -1341327310
+-649076248 -1222577575 -809534544 -1340580925
+-637799181 -1214284257 -649076248 -1222577575
+-621612957 -1202380674 -637799181 -1214284257
+-512886046 -1122421331 -621612957 -1202380674
+-475133347 -1094657450 -512886046 -1122421331
+-467566090 -1089092380 -475133347 -1094657450
+-370726603 -1017875222 -467566090 -1089092380
+-297755734 -964211390 -370726603 -1017875222
+-228670454 -913405076 -297755734 -964211390
+-175985832 -874660044 -228670454 -913405076
+-139031540 -847483323 -175985832 -874660044
+-118290553 -832230101 -139031540 -847483323
+-103700505 -821500369 -118290553 -832230101
+2059167 -743723177 -103700505 -821500369
+30209841 -723020764 2059167 -743723177
+52423862 -706684252 30209841 -723020764
+68447119 -694900518 52423862 -706684252
+77685909 -688106177 68447119 -694900518
+87227650 -681089043 77685909 -688106177
+87240729 -681079425 87227650 -681089043
+116618421 -659474646 87240729 -681079425
+128795136 -650519713 116618421 -659474646
+174003914 -617272524 128795136 -650519713
+174668635 -616783679 174003914 -617272524
+238137275 -570107924 174668635 -616783679
+249269848 -561920868 238137275 -570107924
+263799686 -551235416 249269848 -561920868
+276345219 -542009249 263799686 -551235416
+290797714 -531380675 276345219 -542009249
+325169335 -506103288 290797714 -531380675
+374371774 -469919103 325169335 -506103288
+399372493 -451533213 374371774 -469919103
+432873135 -426896356 399372493 -451533213
+488858857 -385723647 432873135 -426896356
+491399963 -383854881 488858857 -385723647
+644323628 -271392607 491399963 -383854881
+682298742 -243465159 644323628 -271392607
+683192809 -242807650 682298742 -243465159
+683444575 -242622497 683192809 -242807650
+689361812 -238270875 683444575 -242622497
+704016629 -227493511 689361812 -238270875
+705413580 -226466173 704016629 -227493511
+711533244 -221965684 705413580 -226466173
+793886739 -161401733 711533244 -221965684
+832522702 -132988287 793886739 -161401733
+-1783887806 296249582 -1808672228 -19822944
+-1780594780 338245126 -1783887806 296249582
+-1750460887 722538759 -1780594780 338245126
+-1748677306 745284543 -1750460887 722538759
+-1740375989 851150154 -1748677306 745284543
+-1251457156 273868793 -1215947358 299706144
+-1215947358 299706144 -1132488515 360431791
+-1132488515 360431791 -1085705634 394471571
+-1085705634 394471571 -1031887649 433630176
+-1031887649 433630176 -987743478 465750000
+-987743478 465750000 -977792174 472990687
+-977792174 472990687 -974245814 475571061
+-974245814 475571061 -955327929 489335939
+-955327929 489335939 -884935805 540554086
+-884935805 540554086 -884398703 540944887
+-884398703 540944887 -866093453 554264005
+-866093453 554264005 -856767628 561049586
+-856767628 561049586 -841752249 571974954
+-841752249 571974954 -814253044 591983703
+-814253044 591983703 -776845150 619202131
+-776845150 619202131 -757596950 633207350
+-757596950 633207350 -718716491 661497234
+-718716491 661497234 -673554360 694357738
+-673554360 694357738 -649203002 712076075
+-649203002 712076075 -616910099 735572775
+-616910099 735572775 -504225877 817563155
+-504225877 817563155 -493415141 825429176
+-493415141 825429176 -479698251 835409748
+-479698251 835409748 -460415955 849439776
+-460415955 849439776 -427930228 873076777
+-427930228 873076777 -427757773 873202257
+-427757773 873202257 -279368610 981171976
+-279368610 981171976 -257737570 996910978
+-257737570 996910978 -211687605 1030417480
+-211687605 1030417480 -117514496 1098938954
+-117514496 1098938954 -64112948 1137794555
+-64112948 1137794555 -63394440 1138317350
+-63394440 1138317350 -48647651 1149047289
+-48647651 1149047289 -44361697 1152165800
+-44361697 1152165800 23025520 1201197541
+23025520 1201197541 138910768 1285517025
+138910768 1285517025 355982459 1443460968
+355982459 1443460968 392816666 1470261974
+392816666 1470261974 438295262 1503352742
+1254444672 1473301628 1009753850 1459506392
+1336350173 1477919315 1254444672 1473301628
+1359652523 1479233061 1336350173 1477919315
+1617477729 1493768790 1359652523 1479233061
+1643202699 1495219119 1617477729 1493768790
+-1838978143 -1129228660 -1891222925 -1127796015
+-1650658806 -1134392710 -1838978143 -1129228660
+-1554022976 -1137042636 -1650658806 -1134392710
+-1523348866 -1137883774 -1554022976 -1137042636
+-1477133038 -1139151094 -1523348866 -1137883774
+-1467799718 -1139407030 -1477133038 -1139151094
+-569100327 1033813901 -572938000 1042330598
+-479698251 835409748 -569100327 1033813901
+-467401532 808120448 -479698251 835409748
+-466522027 806168620 -467401532 808120448
+-442178886 752145488 -466522027 806168620
+-433958329 733902146 -442178886 752145488
+-432489669 730642846 -433958329 733902146
+-418765513 700185728 -432489669 730642846
+-377612439 608857416 -418765513 700185728
+-355109701 558918567 -377612439 608857416
+-346816555 540514134 -355109701 558918567
+-334168609 512445379 -346816555 540514134
+-300857192 438519540 -334168609 512445379
+-283569820 400154810 -300857192 438519540
+-279449855 391011644 -283569820 400154810
+-275700213 382690309 -279449855 391011644
+-263041922 354598595 -275700213 382690309
+-259481354 346696861 -263041922 354598595
+-240644222 304892852 -259481354 346696861
+-238185642 299436687 -240644222 304892852
+-215125406 248260621 -238185642 299436687
+-203439407 222326651 -215125406 248260621
+-197562816 209285118 -203439407 222326651
+-188135354 188363373 -197562816 209285118
+-180206438 170767250 -188135354 188363373
+-176704835 162996374 -180206438 170767250
+-135110441 70688668 -176704835 162996374
+-132207420 64246185 -135110441 70688668
+-130367868 60163787 -132207420 64246185
+-108305406 11202014 -130367868 60163787
+-106637565 7500685 -108305406 11202014
+-75139838 -62400151 -106637565 7500685
+-50884193 -116229109 -75139838 -62400151
+-45411564 -128374156 -50884193 -116229109
+-25816638 -171859886 -45411564 -128374156
+-3137958 -222189191 -25816638 -171859886
+12853625 -257678260 -3137958 -222189191
+13547887 -259218991 12853625 -257678260
+15098323 -262659771 13547887 -259218991
+21080809 -275936309 15098323 -262659771
+50144200 -340434784 21080809 -275936309
+56241770 -353966718 50144200 -340434784
+94933026 -439831681 56241770 -353966718
+108454728 -469839505 94933026 -439831681
+108634529 -470238527 108454728 -469839505
+111086491 -475680004 108634529 -470238527
+150271393 -562640483 111086491 -475680004
+169644778 -605634561 150271393 -562640483
+174668635 -616783679 169644778 -605634561
+191162266 -653386909 174668635 -616783679
+211474136 -698463708 191162266 -653386909
+215543397 -707494350 211474136 -698463708
+224956510 -728384254 215543397 -707494350
+235838632 -752534231 224956510 -728384254
+265014447 -817282201 235838632 -752534231
+265576487 -818529499 265014447 -817282201
+287737604 -867710210 265576487 -818529499
+293308161 -880072581 287737604 -867710210
+302578356 -900645316 293308161 -880072581
+330746242 -963156455 302578356 -900645316
+339207147 -981933185 330746242 -963156455
+366859849 -1043301010 339207147 -981933185
+381728991 -1076299118 366859849 -1043301010
+383250032 -1079674666 381728991 -1076299118
+425581702 -1173618559 383250032 -1079674666
+506688972 -1353614592 425581702 -1173618559
+513453041 -1368625646 506688972 -1353614592
+517098866 -1376716585 513453041 -1368625646
+595067677 -1549747645 517098866 -1376716585
+669561781 -1715067513 595067677 -1549747645
+743867371 -1879969025 669561781 -1715067513
+266694561 678391819 261979416 687935316
+269165862 673389883 266694561 678391819
+282095638 647219900 269165862 673389883
+284801752 641742701 282095638 647219900
+327629867 555058211 284801752 641742701
+333032028 544124187 327629867 555058211
+368536625 472262563 333032028 544124187
+382330155 444344335 368536625 472262563
+386371851 436163905 382330155 444344335
+393068578 422609669 386371851 436163905
+418630905 370871290 393068578 422609669
+419055076 370012764 418630905 370871290
+437341709 333000453 419055076 370012764
+438402729 330852939 437341709 333000453
+472348857 262145670 438402729 330852939
+486567257 233367501 472348857 262145670
+489939957 226541125 486567257 233367501
+503815848 198456197 489939957 226541125
+552321299 100280727 503815848 198456197
+560640019 83443563 552321299 100280727
+575749530 52861777 560640019 83443563
+582775377 38641400 575749530 52861777
+610346581 -17162967 582775377 38641400
+628133987 -53164836 610346581 -17162967
+666544124 -130907299 628133987 -53164836
+685687598 -169653862 666544124 -130907299
+686885015 -172077446 685687598 -169653862
+689440316 -177249398 686885015 -172077446
+704810579 -208358949 689440316 -177249398
+711533244 -221965684 704810579 -208358949
+717434616 -233910114 711533244 -221965684
+721596891 -242334595 717434616 -233910114
+723465290 -246116252 721596891 -242334595
+725217058 -249661846 723465290 -246116252
+736130733 -271751223 725217058 -249661846
+811344220 -423983999 736130733 -271751223
+849958649 -502139950 811344220 -423983999
+855605046 -513568308 849958649 -502139950
+864384125 -531337243 855605046 -513568308
+874184216 -551172717 864384125 -531337243
+905490586 -614537092 874184216 -551172717
+979195490 -763716480 905490586 -614537092
+1006368765 -818715434 979195490 -763716480
+1028737988 -863990943 1006368765 -818715434
+1031534599 -869651310 1028737988 -863990943
+1050152606 -907334322 1031534599 -869651310
+1096174672 -1000483399 1050152606 -907334322
+1109797068 -1028055251 1096174672 -1000483399
+1188907597 -1188175675 1109797068 -1028055251
+1203586301 -1217885504 1188907597 -1188175675
+1207972326 -1226762859 1203586301 -1217885504
+1245254575 -1302222467 1207972326 -1226762859
+1342122651 -1498284323 1245254575 -1302222467
+1529449927 -1877436419 1342122651 -1498284323
+1661905242 -2145527168 1529449927 -1877436419
+-1530043239 -1276258013 -1524970410 -1288445414
+-1524970410 -1288445414 -1511364611 -1321133150
+-1511364611 -1321133150 -1493502751 -1364046012
+-1493502751 -1364046012 -1470219002 -1419984884
+-1470219002 -1419984884 -1374624200 -1649650020
+-1374624200 -1649650020 -1339488917 -1734062031
+-1339488917 -1734062031 -1324164325 -1770879144
+-1324164325 -1770879144 -1322228593 -1775529710
+-1419527418 -1881385304 -1662450753 -2104484427
+-1361069435 -1827697895 -1419527418 -1881385304
+-973103385 -1471392539 -1361069435 -1827697895
+-915606392 -1418587696 -973103385 -1471392539
+-899514389 -1403808911 -915606392 -1418587696
+-896141766 -1400711517 -899514389 -1403808911
+-824944236 -1335324195 -896141766 -1400711517
+-816035177 -1327142176 -824944236 -1335324195
+-689170179 -1210630233 -816035177 -1327142176
+-680498113 -1202665867 -689170179 -1210630233
+-650198163 -1174838601 -680498113 -1202665867
+-521991700 -1057094666 -650198163 -1174838601
+-488028472 -1025903071 -521991700 -1057094666
+-443008387 -984556934 -488028472 -1025903071
+-418018751 -961606624 -443008387 -984556934
+-385057860 -931335569 -418018751 -961606624
+-373541211 -920758757 -385057860 -931335569
+-339267362 -889281889 -373541211 -920758757
+-243685125 -801499820 -339267362 -889281889
+-172109341 -735765111 -243685125 -801499820
+-100915353 -670381042 -172109341 -735765111
+-93934253 -663969647 -100915353 -670381042
+-82268622 -653256012 -93934253 -663969647
+-79567364 -650775195 -82268622 -653256012
+-43900388 -618018889 -79567364 -650775195
+-31745214 -606855661 -43900388 -618018889
+8583463 -569818081 -31745214 -606855661
+27737924 -552226755 8583463 -569818081
+46906000 -534622927 27737924 -552226755
+51314826 -530573890 46906000 -534622927
+59609651 -522955980 51314826 -530573890
+111086491 -475680004 59609651 -522955980
+114348807 -472683916 111086491 -475680004
+115029712 -472058577 114348807 -472683916
+118439401 -468927142 115029712 -472058577
+148322477 -441482731 118439401 -468927142
+285224729 -315752643 148322477 -441482731
+294497472 -307236619 285224729 -315752643
+296927374 -305005014 294497472 -307236619
+309056640 -293865579 296927374 -305005014
+353640250 -252920298 309056640 -293865579
+357252874 -249602489 353640250 -252920298
+368210932 -239538684 357252874 -249602489
+422444580 -189730874 368210932 -239538684
+433645260 -179444246 422444580 -189730874
+477630889 -139048147 433645260 -179444246
+483988743 -133209137 477630889 -139048147
+512512207 -107013384 483988743 -133209137
+553125994 -69713960 512512207 -107013384
+570619967 -53647616 553125994 -69713960
+610346581 -17162967 570619967 -53647616
+682735100 49318152 610346581 -17162967
+773024578 132239388 682735100 49318152
+786371776 144497363 773024578 132239388
+817337032 172935641 786371776 144497363
+833102554 187414589 817337032 172935641
+839482277 193273682 833102554 187414589
+846034627 199291316 839482277 193273682
+863410696 215249378 846034627 199291316
+890170710 239825591 863410696 215249378
+940581640 286122643 890170710 239825591
+1047386985 384211938 940581640 286122643
+1077735403 412083717 1047386985 384211938
+1093055122 426153242 1077735403 412083717
+1116502666 447687305 1093055122 426153242
+1149615463 478097870 1116502666 447687305
+1171949099 498608928 1149615463 478097870
+1178868206 504963388 1171949099 498608928
+1429342826 734997559 1178868206 504963388
+1495490016 795746684 1429342826 734997559
+1514395210 813109084 1495490016 795746684
+1525463786 823274389 1514395210 813109084
+1581727981 874947039 1525463786 823274389
+1675288804 960872656 1581727981 874947039
+1954660881 1217446053 1675288804 960872656
+1970004780 1231537784 1954660881 1217446053
+-1841807027 2054792830 -1594067594 1622002104
+-1594067594 1622002104 -1424956812 1326572439
+-1424956812 1326572439 -1284686902 1081526605
+-1284686902 1081526605 -1258422764 1035644222
+-1258422764 1035644222 -1254488811 1028771766
+-1254488811 1028771766 -1239399839 1002411946
+-1239399839 1002411946 -1230888686 987543307
+-1230888686 987543307 -1192479064 920443259
+-1975973431 -1379384408 -1917486379 -1190259724
+-1917486379 -1190259724 -1702661548 -495598655
+-1702661548 -495598655 -1675411221 -407481554
+-1675411221 -407481554 -1641969443 -299343676
+-1641969443 -299343676 -1623721631 -240337254
+-1623721631 -240337254 -1584254163 -112714608
+-1584254163 -112714608 -1484040859 211336764
+-1484040859 211336764 -1475673460 238393721
+-1475673460 238393721 -1469496873 258366432
+-1469496873 258366432 -1451585677 316284367
+-1451585677 316284367 -1424810854 402863872
+-1424810854 402863872 -1423619267 406717007
+-1423619267 406717007 -1393669571 503562831
+-1393669571 503562831 -1382161046 540776986
+-1382161046 540776986 -1372663700 571487759
+-1372663700 571487759 -1370224565 579374985
+-1370224565 579374985 -1361238492 608432496
+-1361238492 608432496 -1269267021 905832943
+-1269267021 905832943 -1244465318 986032132
+-1244465318 986032132 -1239399839 1002411946
+-1239399839 1002411946 -1235304962 1015653207
+-1235304962 1015653207 -1213864696 1084982800
+-1213864696 1084982800 -1213734911 1085402475
+-1213734911 1085402475 -1193213787 1151759917
+-1193213787 1151759917 -1150872189 1288676396
+-1150872189 1288676396 -1142123619 1316965914
+-1142123619 1316965914 -1095566635 1467513335
+-94723021 1710432269 -50781240 1630514321
+-50781240 1630514321 -19253174 1573173489
+-19253174 1573173489 77135680 1397868824
+77135680 1397868824 138910768 1285517025
+138910768 1285517025 191462818 1189939381
+191462818 1189939381 206289551 1162973655
+206289551 1162973655 212363081 1151927583
+212363081 1151927583 233709142 1113105002
+233709142 1113105002 243150839 1095933167
+243150839 1095933167 243585334 1095142939
+243585334 1095142939 315869254 963678483
+315869254 963678483 326988210 943456176
+326988210 943456176 369313041 866479014
+369313041 866479014 369747460 865688928
+369747460 865688928 378274912 850179850
+378274912 850179850 381560971 844203419
+381560971 844203419 384991401 837964414
+384991401 837964414 414717390 783901062
+414717390 783901062 439306344 739180557
+439306344 739180557 450718069 718425785
+450718069 718425785 464750648 692904404
+464750648 692904404 476788154 671011510
+476788154 671011510 477628357 669483413
+477628357 669483413 535483429 564261039
+535483429 564261039 548162801 541200768
+548162801 541200768 632191050 388376625
+632191050 388376625 634394837 384368546
+634394837 384368546 635437864 382471568
+635437864 382471568 638595781 376728190
+638595781 376728190 638641085 376645795
+638641085 376645795 639548466 374995519
+639548466 374995519 674801155 310880629
+674801155 310880629 702075470 261276194
+702075470 261276194 711101352 244860610
+711101352 244860610 715407351 237029189
+715407351 237029189 738609385 194831107
+738609385 194831107 753654158 167468826
+753654158 167468826 770750466 136375369
+770750466 136375369 773024578 132239388
+773024578 132239388 797906416 86986208
+797906416 86986208 804602982 74807007
+804602982 74807007 821138265 44733899
+821138265 44733899 823102375 41161728
+823102375 41161728 840984488 8639108
+840984488 8639108 843302717 4422893
+843302717 4422893 928210208 -150000351
+928210208 -150000351 933870419 -160294709
+933870419 -160294709 951268016 -191936126
+951268016 -191936126 974971004 -235045305
+974971004 -235045305 993827484 -269340027
+993827484 -269340027 1008940624 -296826648
+1008940624 -296826648 1018358603 -313955348
+1018358603 -313955348 1056217176 -382809621
+1056217176 -382809621 1106980115 -475133367
+1106980115 -475133367 1130424818 -517772797
+1130424818 -517772797 1271902178 -775080985
+1271902178 -775080985 1288699405 -805630494
+1288699405 -805630494 1330924198 -882425714
+1330924198 -882425714 1410652056 -1027428637
+1410652056 -1027428637 1562808452 -1304159038
+1562808452 -1304159038 1627435442 -1421697658
+1627435442 -1421697658 1629878157 -1426140279
+-1677964111 530045439 -1659646703 528339135
+-1659646703 528339135 -1618898284 524543338
+-1618898284 524543338 -1577813320 520716191
+-1577813320 520716191 -1528881399 516158084
+-1528881399 516158084 -1494389352 512945081
+-1494389352 512945081 -1393669571 503562831
+-1393669571 503562831 -1286532514 493582799
+-1286532514 493582799 -1283711185 493319987
+-1283711185 493319987 -1104184994 476596761
+-1104184994 476596761 -987743478 465750000
+-987743478 465750000 -970546751 464148091
+-970546751 464148091 -963605873 463501534
+-963605873 463501534 -946386552 461897520
+-946386552 461897520 -870475710 454826272
+-870475710 454826272 -834481633 451473352
+-834481633 451473352 -820071170 450130988
+-820071170 450130988 -786506708 447004391
+-786506708 447004391 -730921043 441826475
+-730921043 441826475 -692693959 438265545
+-692693959 438265545 -566951295 426552364
+-566951295 426552364 -552507171 425206864
+-552507171 425206864 -520698361 422243810
+-520698361 422243810 -485543254 418969041
+-485543254 418969041 -410381387 411967562
+-410381387 411967562 -366301608 407861442
+-366301608 407861442 -283569820 400154810
+-283569820 400154810 -268012040 398705572
+-268012040 398705572 -245571474 396615188
+-245571474 396615188 -203690100 392713854
+-203690100 392713854 -189990197 391437680
+-189990197 391437680 -187741798 391228237
+-187741798 391228237 -179604766 390470257
+-179604766 390470257 -174492578 389994046
+-174492578 389994046 -149421318 387658608
+-149421318 387658608 -98602759 382924757
+-98602759 382924757 -45451316 377973593
+-45451316 377973593 -30498183 376580679
+-30498183 376580679 11567353 372662190
+11567353 372662190 15350326 372309798
+15350326 372309798 64889761 367695100
+64889761 367695100 84288035 365888112
+84288035 365888112 89983696 365357550
+89983696 365357550 114011375 363119323
+114011375 363119323 212328613 353960875
+212328613 353960875 283018210 347375997
+283018210 347375997 334031986 342623962
+334031986 342623962 339074526 342154239
+339074526 342154239 380750380 338272049
+380750380 338272049 437341709 333000453
+437341709 333000453 444768174 332308663
+444768174 332308663 545264630 322947217
+545264630 322947217 552114950 322309096
+552114950 322309096 577126564 319979213
+577126564 319979213 619649223 316018142
+619649223 316018142 632173595 314851472
+632173595 314851472 674801155 310880629
+674801155 310880629 885447065 291258540
+885447065 291258540 940581640 286122643
+940581640 286122643 1010998842 279563139
+1010998842 279563139 1011119742 279551877
+1011119742 279551877 1037746618 277071530
+1037746618 277071530 1040807769 276786378
+1040807769 276786378 1071548353 273922831
+1071548353 273922831 1102471971 271042234
+1102471971 271042234 1272027575 255247789
+1272027575 255247789 1300054802 252636996
+1300054802 252636996 1337864198 249114975
+1337864198 249114975 1357339651 247300798
+1357339651 247300798 1529682216 231246742
+1529682216 231246742 1549105866 229437390
+1549105866 229437390 1678621791 217372721
+1678621791 217372721 1877897362 198809802
+-724280153 -805303633 -700385611 -810515466
+-700385611 -810515466 -658545656 -819641517
+-658545656 -819641517 -551845484 -842914755
+-551845484 -842914755 -546938364 -843985086
+-546938364 -843985086 -515384604 -850867532
+-515384604 -850867532 -510128171 -852014056
+-510128171 -852014056 -483191059 -857889527
+-483191059 -857889527 -410665263 -873708715
+-410665263 -873708715 -339267362 -889281889
+-339267362 -889281889 -299532949 -897948684
+-299532949 -897948684 -228670454 -913405076
+-228670454 -913405076 -195452913 -920650423
+-195452913 -920650423 -75762666 -946757031
+-75762666 -946757031 -51434299 -952063488
+-51434299 -952063488 124113237 -990353581
+124113237 -990353581 141919122 -994237367
+141919122 -994237367 144727916 -994850016
+144727916 -994850016 184761617 -1003582091
+184761617 -1003582091 247255603 -1017213160
+247255603 -1017213160 291462957 -1026855583
+291462957 -1026855583 325950011 -1034377834
+325950011 -1034377834 330616905 -1035395768
+330616905 -1035395768 366859849 -1043301010
+366859849 -1043301010 385084227 -1047276076
+385084227 -1047276076 479651392 -1067902886
+479651392 -1067902886 607917662 -1095880080
+607917662 -1095880080 806020087 -1139089803
+806020087 -1139089803 881779556 -1155614314
+881779556 -1155614314 893402995 -1158149596
+893402995 -1158149596 1010119613 -1183607602
+1010119613 -1183607602 1177489661 -1220114038
+1177489661 -1220114038 1207972326 -1226762859
+1207972326 -1226762859 1233732538 -1232381627
+1233732538 -1232381627 1280448974 -1242571327
+1280448974 -1242571327 1376706434 -1263566821
+1376706434 -1263566821 1408401397 -1270480065
+1408401397 -1270480065 1562808452 -1304159038
+1562808452 -1304159038 1566834289 -1305037145
+-1420635840 -361967957 -1416134622 -373607351
+-1416134622 -373607351 -1393778460 -431416622
+-1393778460 -431416622 -1327246341 -603457484
+-1327246341 -603457484 -1316097638 -632286154
+-1316097638 -632286154 -1315345182 -634231878
+-1315345182 -634231878 -1289199735 -701839603
+-1289199735 -701839603 -1223757613 -871061914
+-1223757613 -871061914 -1201699946 -928099330
+-1201699946 -928099330 -1187578015 -964616265
+-1187578015 -964616265 -1145232409 -1074114874
+-1145232409 -1074114874 -1122173796 -1133740568
+-1122173796 -1133740568 -1093497210 -1207893391
+-1093497210 -1207893391 -1077540096 -1249155803
+-1077540096 -1249155803 -1074253792 -1257653632
+-1074253792 -1257653632 -1057480445 -1301026682
+-595026207 466007926 -592955936 466809664
+-592955936 466809664 -526603237 492505569
+-526603237 492505569 -509869121 498986063
+-509869121 498986063 -380566085 549060267
+-380566085 549060267 -355109701 558918567
+-355109701 558918567 -333595955 567250032
+-333595955 567250032 -317316933 573554285
+-317316933 573554285 -306348526 577801937
+-306348526 577801937 -214144547 613509071
+-214144547 613509071 -203560381 617607921
+-203560381 617607921 -173591796 629213627
+-173591796 629213627 -143642817 640811740
+-143642817 640811740 -947034 696072451
+-947034 696072451 53517266 717164427
+53517266 717164427 89219676 730990628
+89219676 730990628 99732786 735061960
+99732786 735061960 205056965 775850054
+205056965 775850054 310186759 816562871
+310186759 816562871 371984171 840494684
+371984171 840494684 381560971 844203419
+381560971 844203419 411505617 855799854
+411505617 855799854 459027519 874203300
+459027519 874203300 490900735 886546598
+490900735 886546598 528408205 901071831
+528408205 901071831 584920051 922956744
+584920051 922956744 735843539 981403736
+735843539 981403736 788821233 1001920005
+788821233 1001920005 789353949 1002126306
+789353949 1002126306 839877966 1021692358
+839877966 1021692358 979118597 1075615019
+979118597 1075615019 1023077127 1092638504
+1023077127 1092638504 1255165533 1182517617
+1255165533 1182517617 1317601206 1206696606
+1317601206 1206696606 1418651548 1245829604
+1418651548 1245829604 1421142513 1246794260
+1421142513 1246794260 1453696434 1259401170
+1453696434 1259401170 1542608344 1293833410
+-1249990843 -38058074 -1255593782 -39252799
+-1158456167 -18539963 -1249990843 -38058074
+-1131296872 -12748735 -1158456167 -18539963
+-1115100956 -9295249 -1131296872 -12748735
+-1055517329 3409880 -1115100956 -9295249
+-1054259737 3678039 -1055517329 3409880
+-1017239248 11571987 -1054259737 3678039
+-942961134 27410449 -1017239248 11571987
+-836472520 50117217 -942961134 27410449
+-790512384 59917384 -836472520 50117217
+-762903867 65804400 -790512384 59917384
+-762280924 65937231 -762903867 65804400
+-752093744 68109463 -762280924 65937231
+-717387877 75509860 -752093744 68109463
+-695196998 80241663 -717387877 75509860
+-680944613 83280726 -695196998 80241663
+-679771129 83530950 -680944613 83280726
+-634579097 93167332 -679771129 83530950
+-600058799 100528160 -634579097 93167332
+-565042625 107994725 -600058799 100528160
+-560179789 109031637 -565042625 107994725
+-543251644 112641257 -560179789 109031637
+-523271774 116901602 -543251644 112641257
+-454594328 131545824 -523271774 116901602
+-385856518 146202916 -454594328 131545824
+-338839019 156228546 -385856518 146202916
+-330671884 157970040 -338839019 156228546
+-260720743 172885854 -330671884 157970040
+-188135354 188363373 -260720743 172885854
+-156610449 195085488 -188135354 188363373
+-140523963 198515639 -156610449 195085488
+-134834704 199728771 -140523963 198515639
+-127419654 201309896 -134834704 199728771
+-97279245 207736792 -127419654 201309896
+-94979678 208227133 -97279245 207736792
+-69057135 213754646 -94979678 208227133
+-66190544 214365894 -69057135 213754646
+-29638762 222159900 -66190544 214365894
+-21770882 223837583 -29638762 222159900
+-15348415 225207057 -21770882 223837583
+-14693080 225346796 -15348415 225207057
+20205821 232788354 -14693080 225346796
+192364295 269498030 20205821 232788354
+306631956 293863539 192364295 269498030
+-828841564 902819953 -791016644 872970156
+-791016644 872970156 -721545786 818146749
+-721545786 818146749 -698096018 799641203
+-698096018 799641203 -616910099 735572775
+-616910099 735572775 -583514567 709218461
+-583514567 709218461 -545783793 679442960
+-545783793 679442960 -527232415 664803012
+-527232415 664803012 -490554785 635858608
+-490554785 635858608 -447503081 601884059
+-447503081 601884059 -380566085 549060267
+-380566085 549060267 -353250088 527503660
+-353250088 527503660 -334168609 512445379
+-334168609 512445379 -262977691 456264575
+-262977691 456264575 -225919710 427020014
+-225919710 427020014 -208880174 413573146
+-208880174 413573146 -201264134 407562896
+-201264134 407562896 -193303552 401280747
+-193303552 401280747 -185402637 395045686
+-185402637 395045686 -179604766 390470257
+-179604766 390470257 -173758609 385856721
+-173758609 385856721 -137737298 357430255
+-137737298 357430255 -99699697 327412620
+-99699697 327412620 -87182316 317534442
+-87182316 317534442 -72274251 305769641
+-72274251 305769641 -69985486 303963446
+-69985486 303963446 -67596069 302077820
+-67596069 302077820 -59214046 295463090
+-59214046 295463090 -32957965 274742922
+-32957965 274742922 -8183599 255192061
+-8183599 255192061 20205821 232788354
+20205821 232788354 28754626 226042006
+28754626 226042006 54928407 205386785
+54928407 205386785 87664008 179553260
+87664008 179553260 222142913 73428306
+222142913 73428306 224529431 71544968
+224529431 71544968 225865904 70490281
+225865904 70490281 233854294 64186188
+233854294 64186188 294091339 16649708
+294091339 16649708 329673508 -11430205
+329673508 -11430205 334306775 -15086580
+334306775 -15086580 391948771 -60575158
+391948771 -60575158 480349439 -130337155
+480349439 -130337155 483988743 -133209137
+483988743 -133209137 500158849 -145969888
+500158849 -145969888 543875961 -180469548
+543875961 -180469548 587396604 -214814163
+587396604 -214814163 589028862 -216102271
+589028862 -216102271 625763440 -245091617
+625763440 -245091617 629491517 -248033654
+629491517 -248033654 643408261 -259016148
+-1229489944 -1107894779 -1187578015 -964616265
+-1187578015 -964616265 -1168570871 -899639170
+-1168570871 -899639170 -1128381808 -762250378
+-1128381808 -762250378 -1120744975 -736143393
+-1120744975 -736143393 -1087947418 -624022921
+-1087947418 -624022921 -1059670668 -527357110
+-1059670668 -527357110 -1058175206 -522244781
+-1058175206 -522244781 -1040391433 -461449855
+-1040391433 -461449855 -1037796007 -452577230
+-1037796007 -452577230 -1023146073 -402495529
+-1288671639 1853122124 -1094851068 1632436855
+-1094851068 1632436855 -1014089584 1540481344
+-1014089584 1540481344 -935077636 1450517866
+-935077636 1450517866 -912365336 1424657503
+-912365336 1424657503 -859528933 1364497658
+-859528933 1364497658 -743465074 1232346650
+-743465074 1232346650 -641846242 1116642837
+-641846242 1116642837 -612762497 1083527910
+-612762497 1083527910 -591014755 1058765801
+-591014755 1058765801 -569100327 1033813901
+-569100327 1033813901 -453045245 901672886
+-453045245 901672886 -427930228 873076777
+-427930228 873076777 -427873531 873012222
+-427873531 873012222 -321935917 752391017
+-321935917 752391017 -307859893 736363972
+-307859893 736363972 -270823524 694194140
+-270823524 694194140 -217734790 633746988
+-217734790 633746988 -210517514 625529354
+-210517514 625529354 -203560381 617607921
+-203560381 617607921 -123711718 526691753
+-123711718 526691753 -120484330 523017030
+-120484330 523017030 -112534245 513965015
+-112534245 513965015 -106641466 507255462
+-106641466 507255462 -89072436 487251258
+-89072436 487251258 -77637137 474230958
+-77637137 474230958 -32395649 422718728
+-32395649 422718728 -14978256 402887179
+-14978256 402887179 11567353 372662190
+11567353 372662190 13527121 370430786
+13527121 370430786 21779094 361035039
+21779094 361035039 36133819 344690663
+36133819 344690663 40371427 339865698
+40371427 339865698 44074960 335648833
+44074960 335648833 44608225 335041654
+44608225 335041654 78707669 296215823
+-1866174779 1473150336 -2129814465 1723720676
+-1826001943 1434968978 -1866174779 1473150336
+-1760810088 1373008863 -1826001943 1434968978
+-1444915312 1072773864 -1760810088 1373008863
+-1342202955 975153242 -1444915312 1072773864
+-1313176800 947565993 -1342202955 975153242
+-1269267021 905832943 -1313176800 947565993
+-1044353671 692069169 -1269267021 905832943
+-991541620 641875157 -1044353671 692069169
+-901775427 556558922 -991541620 641875157
+-890860289 546184877 -901775427 556558922
+-884935805 540554086 -890860289 546184877
+-883328272 539026243 -884935805 540554086
+-849241124 506628889 -883328272 539026243
+-826233411 484761732 -849241124 506628889
+-786506708 447004391 -826233411 484761732
+-723720369 387330545 -786506708 447004391
+-723264679 386897444 -723720369 387330545
+-716882353 380831508 -723264679 386897444
+-679381903 345190058 -716882353 380831508
+-620184642 288927369 -679381903 345190058
+-573851411 244891004 -620184642 288927369
+-549051075 221320090 -573851411 244891004
+-541865855 214491061 -549051075 221320090
+-535469394 208411690 -541865855 214491061
+-518848763 192614989 -535469394 208411690
+-485137105 160574511 -518848763 192614989
+-473189332 149219022 -485137105 160574511
+-454594328 131545824 -473189332 149219022
+-386512733 66839222 -454594328 131545824
+-348364513 30582114 -386512733 66839222
+-347767651 30014840 -348364513 30582114
+-331645950 14692336 -347767651 30014840
+-306542258 -9166896 -331645950 14692336
+-252020948 -60985434 -306542258 -9166896
+-228233112 -83594042 -252020948 -60985434
+-223684819 -87916863 -228233112 -83594042
+-190571041 -119389100 -223684819 -87916863
+-178582649 -130783195 -190571041 -119389100
+-121073164 -185441776 -178582649 -130783195
+-100949656 -204567706 -121073164 -185441776
+-76520414 -227785922 -100949656 -204567706
+-38213872 -264193504 -76520414 -227785922
+-24587050 -277144806 -38213872 -264193504
+-981316 -299580339 -24587050 -277144806
+24891745 -324170801 -981316 -299580339
+47808891 -345951881 24891745 -324170801
+56241770 -353966718 47808891 -345951881
+85958638 -382210440 56241770 -353966718
+124230900 -418585439 85958638 -382210440
+148322477 -441482731 124230900 -418585439
+216540009 -506318531 148322477 -441482731
+235865895 -524686380 216540009 -506318531
+252411436 -540411713 235865895 -524686380
+263799686 -551235416 252411436 -540411713
+274688986 -561584903 263799686 -551235416
+288126576 -574356354 274688986 -561584903
+329505290 -613683812 288126576 -574356354
+451110750 -729260953 329505290 -613683812
+465143326 -742597896 451110750 -729260953
+481041698 -757708141 465143326 -742597896
+529036223 -803323446 481041698 -757708141
+721123396 -985888327 529036223 -803323446
+747530719 -1010986567 721123396 -985888327
+765957726 -1028500096 747530719 -1010986567
+847814877 -1106299362 765957726 -1028500096
+875644369 -1132749269 847814877 -1106299362
+880287871 -1137162579 875644369 -1132749269
+-1208295723 -300144205 -1209892946 -292190098
+-1203000155 -326515923 -1208295723 -300144205
+-1198975029 -346560888 -1203000155 -326515923
+-1191980077 -381395466 -1198975029 -346560888
+-1178257558 -449733054 -1191980077 -381395466
+-1176072050 -460616796 -1178257558 -449733054
+-1159865056 -541326971 -1176072050 -460616796
+-1149448813 -593199441 -1159865056 -541326971
+-1120744975 -736143393 -1149448813 -593199441
+-1099780865 -840543809 -1120744975 -736143393
+-1098917016 -844845746 -1099780865 -840543809
+-1079550965 -941287896 -1098917016 -844845746
+-1060964372 -1033848376 -1079550965 -941287896
+-1030920632 -1183464987 -1060964372 -1033848376
+-1017416875 -1250713152 -1030920632 -1183464987
+-1013331237 -1271059464 -1017416875 -1250713152
+-1010069652 -1287302022 -1013331237 -1271059464
+-994582895 -1364425449 -1010069652 -1287302022
+-986686065 -1403751340 -994582895 -1364425449
+-974944161 -1462225549 -986686065 -1403751340
+-973103385 -1471392539 -974944161 -1462225549
+-949424281 -1589313522 -973103385 -1471392539
+-931531073 -1678420972 -949424281 -1589313522
+-897168955 -1849542928 -931531073 -1678420972
+-878242435 -1943796232 -897168955 -1849542928
+-872589995 -1971945154 -878242435 -1943796232
+-1455004352 1960188019 -1353484384 1646687052
+-1353484384 1646687052 -1351849647 1641638867
+-1351849647 1641638867 -1322616332 1551364286
+-1322616332 1551364286 -1241613819 1301222699
+-1241613819 1301222699 -1193213787 1151759917
+-1193213787 1151759917 -1184670674 1125378171
+-1184670674 1125378171 -1172455690 1087657420
+-1172455690 1087657420 -1143196854 997304028
+-1143196854 997304028 -1115625150 912160623
+-1115625150 912160623 -1044353671 692069169
+-1044353671 692069169 -1026244756 636147537
+-1026244756 636147537 -986960893 514836141
+-986960893 514836141 -974245814 475571061
+-974245814 475571061 -972844264 471242975
+-972844264 471242975 -970546751 464148091
+-970546751 464148091 -966953846 453052940
+-966953846 453052940 -930189584 339522254
+-930189584 339522254 -924695285 322555462
+-924695285 322555462 -921787259 313575271
+-921787259 313575271 -919060123 305153678
+-919060123 305153678 -875130377 169495463
+-875130377 169495463 -868633279 149431957
+-868633279 149431957 -859189089 120267617
+-859189089 120267617 -858384271 117782280
+-858384271 117782280 -857480915 114992653
+-857480915 114992653 -857145917 113958155
+-857145917 113958155 -855955596 110282359
+-855955596 110282359 -836472520 50117217
+-836472520 50117217 -827484788 22362453
+-827484788 22362453 -824858688 14252869
+-824858688 14252869 -792901990 -84431714
+-792901990 -84431714 -790642712 -91408525
+-790642712 -91408525 -763381610 -175592770
+-763381610 -175592770 -738665408 -251918182
+-738665408 -251918182 -732988271 -269449589
+-732988271 -269449589 -730332486 -277650844
+-730332486 -277650844 -726385658 -289838933
+-726385658 -289838933 -701549794 -366533869
+-701549794 -366533869 -684439954 -419370283
+-684439954 -419370283 -678202772 -438631152
+-678202772 -438631152 -668132701 -469728256
+-668132701 -469728256 -666662260 -474269082
+-666662260 -474269082 -660354473 -493747982
+-660354473 -493747982 -629629174 -588629918
+-629629174 -588629918 -628771442 -591278655
+-628771442 -591278655 -613284901 -639102207
+-613284901 -639102207 -605221684 -664002003
+-605221684 -664002003 -565780907 -785797957
+-565780907 -785797957 -555943760 -816175778
+-555943760 -816175778 -555291992 -818188484
+-555291992 -818188484 -546938364 -843985086
+-546938364 -843985086 -537154496 -874198376
+-537154496 -874198376 -503659073 -977634653
+-503659073 -977634653 -488028472 -1025903071
+-488028472 -1025903071 -470692542 -1079437670
+-470692542 -1079437670 -467566090 -1089092380
+-467566090 -1089092380 -438135599 -1179975854
+-438135599 -1179975854 -406659105 -1277177531
+-406659105 -1277177531 -398715982 -1301706467
+-398715982 -1301706467 -390847682 -1326004342
+-390847682 -1326004342 -380525730 -1357879273
+-380525730 -1357879273 -372350046 -1383126373
+-372350046 -1383126373 -354243649 -1439040231
+-354243649 -1439040231 -335163710 -1497960455
+-335163710 -1497960455 -333546172 -1502955529
+-333546172 -1502955529 -231135879 -1819205882
+-231135879 -1819205882 -165855696 -2020795785
+-165855696 -2020795785 -139185614 -2103154914
+-2144955609 917228118 -2015211199 853197207
+-2015211199 853197207 -1917081590 804768700
+-1917081590 804768700 -1874311340 783660908
+-1874311340 783660908 -1750460887 722538759
+-1750460887 722538759 -1664369510 680051308
+-1664369510 680051308 -1629174303 662681919
+-1629174303 662681919 -1570834671 633890392
+-1570834671 633890392 -1548012363 622627223
+-1548012363 622627223 -1437779093 568225368
+-1437779093 568225368 -1382161046 540776986
+-1382161046 540776986 -1286532514 493582799
+-1286532514 493582799 -1280779117 490743407
+-1280779117 490743407 -1085705634 394471571
+-1085705634 394471571 -999376278 351866674
+-999376278 351866674 -972428906 338567721
+-972428906 338567721 -930027112 317641768
+-930027112 317641768 -927267699 316279955
+-927267699 316279955 -921787259 313575271
+-921787259 313575271 -804043465 255466854
+-804043465 255466854 -783640661 245397749
+-783640661 245397749 -749291562 228445928
+-749291562 228445928 -697624535 202947436
+-697624535 202947436 -695143363 201722938
+-695143363 201722938 -681655210 195066323
+-681655210 195066323 -642371818 175679350
+-642371818 175679350 -617679366 163493236
+-617679366 163493236 -561148023 135594128
+-561148023 135594128 -549811483 129999367
+-549811483 129999367 -538199830 124268833
+-538199830 124268833 -532540511 121475870
+-532540511 121475870 -523271774 116901602
+-523271774 116901602 -394713365 53456003
+-394713365 53456003 -348364513 30582114
+-348364513 30582114 -347553069 30181654
+-347553069 30181654 -326633956 19857742
+-326633956 19857742 -293763711 3635758
+-293763711 3635758 -238373781 -23700045
+-238373781 -23700045 -234013683 -25851821
+-234013683 -25851821 -201235299 -42028470
+-201235299 -42028470 -181567248 -51734963
+-181567248 -51734963 -172182412 -56366528
+-172182412 -56366528 -87931160 -97945848
+-87931160 -97945848 -50884193 -116229109
+-50884193 -116229109 -37842649 -122665317
+-37842649 -122665317 -7703487 -137539468
+-7703487 -137539468 20756695 -151585016
+20756695 -151585016 100425241 -190902698
+100425241 -190902698 111190238 -196215394
+111190238 -196215394 121387789 -201248046
+121387789 -201248046 141472285 -211160061
+141472285 -211160061 233115939 -256387648
+233115939 -256387648 239124172 -259352805
+239124172 -259352805 278646485 -278857689
+278646485 -278857689 289808927 -284366530
+289808927 -284366530 301415580 -290094596
+301415580 -290094596 309056640 -293865579
+309056640 -293865579 413265090 -345294091
+413265090 -345294091 453442107 -365122082
+453442107 -365122082 484510403 -380454775
+484510403 -380454775 491399963 -383854881
+491399963 -383854881 529560014 -402687467
+529560014 -402687467 570258380 -422772752
+570258380 -422772752 577845266 -426517000
+577845266 -426517000 586818284 -430945326
+586818284 -430945326 723520113 -498409832
+723520113 -498409832 742162789 -507610285
+838109902 -1239003195 881779556 -1155614314
+881779556 -1155614314 885998260 -1147558536
+885998260 -1147558536 920464672 -1081743600
+920464672 -1081743600 921041630 -1080641877
+921041630 -1080641877 949302708 -1026676263
+949302708 -1026676263 975910564 -975867541
+975910564 -975867541 1000776082 -928385879
+1000776082 -928385879 1004524071 -921228951
+1004524071 -921228951 1031534599 -869651310
+1031534599 -869651310 1033444165 -866004922
+1033444165 -866004922 1043809057 -846212761
+1043809057 -846212761 1054652875 -825506074
+1054652875 -825506074 1070817494 -794639114
+1070817494 -794639114 1085220389 -767136234
+-1419527418 -1881385304 -1426330346 -1916493671
+-1404476116 -1803708962 -1419527418 -1881385304
+-1374624200 -1649650020 -1404476116 -1803708962
+-1329204762 -1415250644 -1374624200 -1649650020
+-1305025922 -1290469154 -1329204762 -1415250644
+-1283412327 -1178926310 -1305025922 -1290469154
+-1241421889 -962223220 -1283412327 -1178926310
+-1223757613 -871061914 -1241421889 -962223220
+-1176523842 -627299176 -1223757613 -871061914
+-1173546229 -611932393 -1176523842 -627299176
+-1159865056 -541326971 -1173546229 -611932393
+-1147410228 -477050441 -1159865056 -541326971
+-1146533930 -472528068 -1147410228 -477050441
+-1142702469 -452754768 -1146533930 -472528068
+-1134439821 -410113122 -1142702469 -452754768
+-1099436749 -229470237 -1134439821 -410113122
+-1084085588 -150246393 -1099436749 -229470237
+-1082002861 -139497911 -1084085588 -150246393
+-1078340603 -120597831 -1082002861 -139497911
+-1070476309 -80011999 -1078340603 -120597831
+-1054259737 3678039 -1070476309 -80011999
+-1053230869 8987788 -1054259737 3678039
+-1051231087 19308207 -1053230869 8987788
+457021926 -418080138 498750615 -422216213
+498750615 -422216213 520778492 -424399577
+520778492 -424399577 566399834 -428921485
+566399834 -428921485 586818284 -430945326
+586818284 -430945326 593864624 -431643746
+-846246213 -1694528145 -808907651 -1657796683
+-808907651 -1657796683 -721439487 -1571750694
+-721439487 -1571750694 -666739754 -1517940342
+-666739754 -1517940342 -642690905 -1494282512
+-642690905 -1494282512 -630257619 -1482051383
+-630257619 -1482051383 -569637836 -1422417237
+-569637836 -1422417237 -535257212 -1388595620
+-535257212 -1388595620 -516903808 -1370540630
+-1104184994 476596761 -1172326522 454368485
+-1043783327 496300237 -1104184994 476596761
+-986960893 514836141 -1043783327 496300237
+-942510967 529336039 -986960893 514836141
+-890860289 546184877 -942510967 529336039
+-887866922 547161336 -890860289 546184877
+-866093453 554264005 -887866922 547161336
+-840235408 562699093 -866093453 554264005
+-840109026 562740319 -840235408 562699093
+-824099564 567962726 -840109026 562740319
+-751790544 591550469 -824099564 567962726
+-746764483 593190008 -751790544 591550469
+-687153714 612635487 -746764483 593190008
+-608081532 638429425 -687153714 612635487
+-561513326 653620323 -608081532 638429425
+-527232415 664803012 -561513326 653620323
+-484503501 678741504 -527232415 664803012
+-418765513 700185728 -484503501 678741504
+-409773857 703118873 -418765513 700185728
+-408249589 703616101 -409773857 703118873
+-307859893 736363972 -408249589 703616101
+-239873582 758541615 -307859893 736363972
+-238837257 758879672 -239873582 758541615
+-193997334 773506791 -238837257 758879672
+-168283057 781894980 -193997334 773506791
+-34245787 825618942 -168283057 781894980
+32640510 847437753 -34245787 825618942
+97722767 868668072 32640510 847437753
+106582745 871558263 97722767 868668072
+298445764 934145417 106582745 871558263
+326988210 943456176 298445764 934145417
+468935855 989760561 326988210 943456176
+476254290 992147889 468935855 989760561
+553694114 1017409339 476254290 992147889
+631616606 1042828240 553694114 1017409339
+636307711 1044358513 631616606 1042828240
+673983958 1056648787 636307711 1044358513
+681856294 1059216802 673983958 1056648787
+722766411 1072561989 681856294 1059216802
+744081269 1079515055 722766411 1072561989
+750506111 1081610886 744081269 1079515055
+870826577 1120860323 750506111 1081610886
+898492770 1129885243 870826577 1120860323
+978037371 1155833287 898492770 1129885243
+1304428175 1262304411 978037371 1155833287
+1374740603 1285240852 1304428175 1262304411
+1406103202 1295471566 1374740603 1285240852
+1440728902 1306766729 1406103202 1295471566
+1522906391 1333573641 1440728902 1306766729
+1639940147 1371750929 1522906391 1333573641
+352753925 311265766 350148781 310669991
+377637045 316956329 352753925 311265766
+438402729 330852939 377637045 316956329
+444768174 332308663 438402729 330852939
+499029375 344717751 444768174 332308663
+571562991 361305590 499029375 344717751
+617852687 371891661 571562991 361305590
+627658219 374134104 617852687 371891661
+630534177 374791812 627658219 374134104
+638564609 376628306 630534177 374791812
+638641085 376645795 638564609 376628306
+722196934 395754327 638641085 376645795
+952832132 448498690 722196934 395754327
+1049169811 470530320 952832132 448498690
+1138956137 491063711 1049169811 470530320
+1144521596 492336485 1138956137 491063711
+1171949099 498608928 1144521596 492336485
+1177183882 499806080 1171949099 498608928
+1257014075 518062585 1177183882 499806080
+1283432753 524104318 1257014075 518062585
+1466003358 565856706 1283432753 524104318
+1469235783 566595935 1466003358 565856706
+1583727648 592779278 1469235783 566595935
+1754305354 631788989 1583727648 592779278
+-1050082033 454348089 -1031887649 433630176
+-1031887649 433630176 -988872199 384648562
+-988872199 384648562 -948871705 339100072
+-948871705 339100072 -930027112 317641768
+-930027112 317641768 -927765241 315066180
+-927765241 315066180 -919060123 305153678
+-919060123 305153678 -833277922 207473642
+-833277922 207473642 -821846581 194456796
+-821846581 194456796 -781753556 148802941
+-781753556 148802941 -770817935 136350569
+-770817935 136350569 -762564293 126952162
+-762564293 126952162 -728932707 88655937
+-728932707 88655937 -728213509 87836987
+-728213509 87836987 -717387877 75509860
+-717387877 75509860 -704244181 60543157
+-704244181 60543157 -678543118 31277403
+-678543118 31277403 -672781588 24716760
+-672781588 24716760 -664925649 15771217
+-664925649 15771217 -663149499 13748717
+-663149499 13748717 -627416449 -26940441
+-627416449 -26940441 -590082530 -69452507
+-590082530 -69452507 -543683473 -122287028
+-543683473 -122287028 -519367236 -149975883
+-519367236 -149975883 -506091562 -165092869
+-506091562 -165092869 -463322015 -213794474
+-463322015 -213794474 -446890334 -232505199
+-446890334 -232505199 -427525114 -254556339
+-427525114 -254556339 -423283679 -259386054
+-423283679 -259386054 -410196487 -274288416
+-410196487 -274288416 -384603331 -303431295
+-384603331 -303431295 -376796545 -312320868
+-376796545 -312320868 -368961968 -321242087
+-368961968 -321242087 -341930375 -352022913
+-341930375 -352022913 -287597329 -413891853
+-287597329 -413891853 -279268002 -423376442
+-279268002 -423376442 -200348194 -513242284
+-200348194 -513242284 -181747122 -534423291
+-181747122 -534423291 -155432742 -564387427
+-155432742 -564387427 -124848891 -599213202
+-124848891 -599213202 -80681513 -649506515
+-80681513 -649506515 -79567364 -650775195
+-79567364 -650775195 -64322772 -668134184
+-64322772 -668134184 -41349872 -694293383
+-41349872 -694293383 2059167 -743723177
+2059167 -743723177 25924024 -770898045
+25924024 -770898045 54567624 -803514461
+54567624 -803514461 100017714 -855268396
+100017714 -855268396 122024772 -880327792
+122024772 -880327792 154348472 -917134729
+-1606626050 1625270102 -1594067594 1622002104
+-1594067594 1622002104 -1322616332 1551364286
+-1322616332 1551364286 -1287659828 1542267805
+-1287659828 1542267805 -1001140356 1467708894
+-1001140356 1467708894 -935077636 1450517866
+-935077636 1450517866 -929415447 1449044435
+-929415447 1449044435 -869126850 1433355965
+-869126850 1433355965 -395413473 1310084924
+-395413473 1310084924 -334926018 1294344707
+-334926018 1294344707 -254109650 1273314442
+-254109650 1273314442 -215647139 1263305618
+-215647139 1263305618 -15197607 1211144071
+-15197607 1211144071 23025520 1201197541
+23025520 1201197541 176225661 1161331365
+176225661 1161331365 182629396 1159664967
+182629396 1159664967 212363081 1151927583
+212363081 1151927583 269301421 1137110926
+269301421 1137110926 398373016 1103523549
+398373016 1103523549 421321249 1097551895
+421321249 1097551895 489074272 1079921011
+489074272 1079921011 521941871 1071368111
+521941871 1071368111 595809204 1052146143
+595809204 1052146143 631616606 1042828240
+631616606 1042828240 635258786 1041880461
+635258786 1041880461 659032191 1035694078
+659032191 1035694078 673384658 1031959239
+673384658 1031959239 699968574 1025041496
+699968574 1025041496 788821233 1001920005
+788821233 1001920005 789547095 1001731119
+789547095 1001731119 830335906 991116939
+830335906 991116939 873958380 979765375
+873958380 979765375 944493915 961410418
+944493915 961410418 964941903 956089384
+964941903 956089384 985395807 950766811
+985395807 950766811 1130482417 913011961
+1130482417 913011961 1155793669 906425395
+1155793669 906425395 1277539336 874744392
+1277539336 874744392 1282749258 873388651
+1282749258 873388651 1297904140 869445005
+1297904140 869445005 1369481878 850818843
+1369481878 850818843 1404035780 841827128
+1404035780 841827128 1514395210 813109084
+1514395210 813109084 1523345216 810780088
+1523345216 810780088 1528993600 809310249
+1528993600 809310249 1557384686 801922240
+1557384686 801922240 1586992440 794217627
+1586992440 794217627 1913549999 709239891
+1913549999 709239891 2063775811 670147704
+-365637685 -369904107 -341930375 -352022913
+-341930375 -352022913 -331063869 -343826871
+-331063869 -343826871 -310614243 -328402780
+-310614243 -328402780 -278826596 -304427006
+-278826596 -304427006 -234892364 -271289694
+-234892364 -271289694 -208514195 -251394010
+-208514195 -251394010 -188541355 -236329532
+-188541355 -236329532 -155065467 -211080407
+-155065467 -211080407 -140065074 -199766388
+-140065074 -199766388 -121073164 -185441776
+-121073164 -185441776 -78152255 -153068761
+-78152255 -153068761 -45411564 -128374156
+-45411564 -128374156 -37842649 -122665317
+-37842649 -122665317 -13506992 -104310193
+-13506992 -104310193 14667139 -83059908
+14667139 -83059908 25664909 -74764860
+25664909 -74764860 97875901 -20299855
+97875901 -20299855 152973370 21257308
+152973370 21257308 221682343 73080922
+221682343 73080922 222142913 73428306
+222142913 73428306 226819765 76955812
+226819765 76955812 356914812 175079758
+356914812 175079758 390232894 200209859
+390232894 200209859 410108120 215200711
+410108120 215200711 433058922 232511310
+433058922 232511310 472348857 262145670
+472348857 262145670 550002939 320716115
+550002939 320716115 552114950 322309096
+552114950 322309096 587560958 349044180
+587560958 349044180 617852687 371891661
+617852687 371891661 621424851 374585958
+621424851 374585958 634394837 384368546
+634394837 384368546 640625467 389067986
+640625467 389067986 643007527 390864651
+643007527 390864651 643891615 391531473
+643891615 391531473 968220733 636156101
+968220733 636156101 999980862 660111119
+999980862 660111119 1131683822 759447830
+1131683822 759447830 1147072114 771054420
+1147072114 771054420 1215493548 822661158
+1215493548 822661158 1281242196 872251952
+1281242196 872251952 1282749258 873388651
+1282749258 873388651 1304566272 889844093
+1304566272 889844093 1379306698 946216919
+1379306698 946216919 1474318016 1017879027
+1474318016 1017879027 1475959291 1019116955
+1475959291 1019116955 1968680212 1390750786
+1968680212 1390750786 1983104618 1401630367
+-931531073 -1678420972 -1167896817 -1832483812
+-826071673 -1609682692 -931531073 -1678420972
+-730788025 -1547576952 -826071673 -1609682692
+-697066583 -1525597366 -730788025 -1547576952
+-642786434 -1490217646 -697066583 -1525597366
+-630257619 -1482051383 -642786434 -1490217646
+-549372297 -1429330450 -630257619 -1482051383
+-484248919 -1386883129 -549372297 -1429330450
+-476708690 -1381968419 -484248919 -1386883129
+-464506427 -1374015002 -476708690 -1381968419
+-390847682 -1326004342 -464506427 -1374015002
+-357959867 -1304568113 -390847682 -1326004342
+-342655693 -1294592876 -357959867 -1304568113
+-104257471 -1139205269 -342655693 -1294592876
+-51979474 -1105130548 -104257471 -1139205269
+11044870 -1064051375 -51979474 -1105130548
+124113237 -990353581 11044870 -1064051375
+139490336 -980330811 124113237 -990353581
+139975824 -980014371 139490336 -980330811
+149083922 -974077726 139975824 -980014371
+193278297 -945271898 149083922 -974077726
+234383863 -918479351 193278297 -945271898
+254071594 -905646917 234383863 -918479351
+276533998 -891005956 254071594 -905646917
+281886320 -887517320 276533998 -891005956
+285189239 -885364483 281886320 -887517320
+293308161 -880072581 285189239 -885364483
+342140089 -848244004 293308161 -880072581
+381510856 -822582196 342140089 -848244004
+481041698 -757708141 381510856 -822582196
+497288160 -747118721 481041698 -757708141
+571989303 -698428628 497288160 -747118721
+599681448 -680378929 571989303 -698428628
+644914704 -650895960 599681448 -680378929
+671710895 -633430242 644914704 -650895960
+685744453 -624283190 671710895 -633430242
+795028203 -553052204 685744453 -624283190
+825285174 -533330756 795028203 -553052204
+843689875 -521334599 825285174 -533330756
+848121061 -518446359 843689875 -521334599
+855605046 -513568308 848121061 -518446359
+914417452 -475234470 855605046 -513568308
+1008312234 -414033990 914417452 -475234470
+1052781093 -385049254 1008312234 -414033990
+1056217176 -382809621 1052781093 -385049254
+1124420849 -338354568 1056217176 -382809621
+1297139391 -225776879 1124420849 -338354568
+1318979906 -211541264 1297139391 -225776879
+1416671979 -147865716 1318979906 -211541264
+-855155309 -144618939 -877361846 -137124182
+-763381610 -175592770 -855155309 -144618939
+-709856255 -193657698 -763381610 -175592770
+-705237138 -195216661 -709856255 -193657698
+-672964300 -206108817 -705237138 -195216661
+-658003956 -211157966 -672964300 -206108817
+-639010317 -217568362 -658003956 -211157966
+-612257546 -226597483 -639010317 -217568362
+-577237733 -238416749 -612257546 -226597483
+-574190077 -239445340 -577237733 -238416749
+-510635871 -260895028 -574190077 -239445340
+-449183129 -281635468 -510635871 -260895028
+-419972623 -291494079 -449183129 -281635468
+-384603331 -303431295 -419972623 -291494079
+-373464390 -307190713 -384603331 -303431295
+-372312149 -307579597 -373464390 -307190713
+-352746598 -314183015 -372312149 -307579597
+-310614243 -328402780 -352746598 -314183015
+-256851105 -346547960 -310614243 -328402780
+-196953698 -366763471 -256851105 -346547960
+-95590896 -400973645 -196953698 -366763471
+-39428517 -419928575 -95590896 -400973645
+-14785135 -428245772 -39428517 -419928575
+-11958200 -429199869 -14785135 -428245772
+9504963 -436443735 -11958200 -429199869
+46692256 -448994531 9504963 -436443735
+70989640 -457194953 46692256 -448994531
+104893554 -468637600 70989640 -457194953
+108454728 -469839505 104893554 -468637600
+115029712 -472058577 108454728 -469839505
+120275461 -473829029 115029712 -472058577
+216540009 -506318531 120275461 -473829029
+255471878 -519458125 216540009 -506318531
+290797714 -531380675 255471878 -519458125
+299498648 -534317260 290797714 -531380675
+349054564 -551042493 299498648 -534317260
+365965037 -556749816 349054564 -551042493
+461887008 -589123698 365965037 -556749816
+465171646 -590232271 461887008 -589123698
+505971096 -604002178 465171646 -590232271
+572444957 -626437256 505971096 -604002178
+644914704 -650895960 572444957 -626437256
+678861584 -662353108 644914704 -650895960
+721990326 -676909156 678861584 -662353108
+731951942 -680271224 721990326 -676909156
+794586028 -701410369 731951942 -680271224
+979195490 -763716480 794586028 -701410369
+998432080 -770208873 979195490 -763716480
+1070817494 -794639114 998432080 -770208873
+1206819091 -840539960 1070817494 -794639114
+1225842150 -846960285 1206819091 -840539960
+1269900712 -861830150 1225842150 -846960285
+1330924198 -882425714 1269900712 -861830150
+1747049039 -1022868789 1330924198 -882425714
+1854345392 -1059081550 1747049039 -1022868789
+2014984655 -1113297665 1854345392 -1059081550
+2071302876 -1132305191 2014984655 -1113297665
+-1460900508 -403720226 -1416134622 -373607351
+-1416134622 -373607351 -1285944510 -286031766
+-1285944510 -286031766 -1232547043 -250112646
+-1232547043 -250112646 -1181196274 -215570286
+-1181196274 -215570286 -1131606399 -182212436
+-1131606399 -182212436 -1084085588 -150246393
+-1084085588 -150246393 -1077857249 -146056747
+-1077857249 -146056747 -1055988389 -131346120
+-1055988389 -131346120 -1028334452 -112744019
+-1028334452 -112744019 -911069336 -33862751
+-911069336 -33862751 -859045330 1132478
+-859045330 1132478 -827484788 22362453
+-827484788 22362453 -782336373 52732646
+-782336373 52732646 -762903867 65804400
+-762903867 65804400 -762521846 66061375
+-762521846 66061375 -752883037 72545158
+-752883037 72545158 -729656631 88168972
+-729656631 88168972 -728932707 88655937
+-728932707 88655937 -685743354 117708319
+-685743354 117708319 -680654775 121131276
+-680654775 121131276 -658496344 136036691
+-658496344 136036691 -617679366 163493236
+-617679366 163493236 -563798218 199737717
+-563798218 199737717 -550869367 208434627
+-550869367 208434627 -541865855 214491061
+-541865855 214491061 -491167496 248594560
+-491167496 248594560 -463862237 266962115
+-463862237 266962115 -439983588 283024676
+-439983588 283024676 -417922991 297864280
+-417922991 297864280 -410793179 302660323
+-410793179 302660323 -336033724 352949111
+-336033724 352949111 -327215005 358881240
+-327215005 358881240 -279449855 391011644
+-279449855 391011644 -268012040 398705572
+-268012040 398705572 -225919710 427020014
+-225919710 427020014 -218402781 432076461
+-218402781 432076461 -197618519 446057507
+-197618519 446057507 -185843494 453978267
+-185843494 453978267 -123660568 495807144
+-123660568 495807144 -118879413 499023305
+-118879413 499023305 -106641466 507255462
+-106641466 507255462 2294952 580534226
+2294952 580534226 16424810 590039022
+16424810 590039022 117897358 658297030
+117897358 658297030 120104151 659781483
+120104151 659781483 137636636 671575141
+137636636 671575141 147421560 678157212
+147421560 678157212 153137194 682001973
+153137194 682001973 358972636 820462251
+358972636 820462251 384991401 837964414
+384991401 837964414 411505617 855799854
+411505617 855799854 446261122 879179001
+446261122 879179001 461224397 889244416
+461224397 889244416 614210354 992154187
+614210354 992154187 621624826 997141714
+621624826 997141714 673384658 1031959239
+673384658 1031959239 686840311 1041010515
+686840311 1041010515 732540289 1071751731
+732540289 1071751731 744081269 1079515055
+744081269 1079515055 749687345 1083286120
+749687345 1083286120 858740180 1156643194
+858740180 1156643194 888172530 1176441590
+888172530 1176441590 926650204 1202324544
+926650204 1202324544 938987596 1210623594
+938987596 1210623594 997962769 1250294697
+997962769 1250294697 1264758922 1429761698
+1264758922 1429761698 1336350173 1477919315
+1336350173 1477919315 1356549911 1491507167
+1356549911 1491507167 1809664522 1796305866
+-537942776 214540408 -516532851 214209849
+-516532851 214209849 -508233709 214081715
+-508233709 214081715 -428912473 212857036
+-428912473 212857036 -421881106 212748476
+-421881106 212748476 -369949895 211946685
+-369949895 211946685 -312073730 211053107
+-312073730 211053107 -304726540 210939670
+-304726540 210939670 -298275518 210840070
+-298275518 210840070 -197562816 209285118
+-197562816 209285118 -143640354 208452584
+-143640354 208452584 -142283077 208431628
+-142283077 208431628 -129813897 208239110
+-129813897 208239110 -118726361 208067924
+-118726361 208067924 -97279245 207736792
+-97279245 207736792 -95132421 207703646
+-95132421 207703646 -67926966 207283608
+-67926966 207283608 -61165986 207179222
+-61165986 207179222 -39585479 206846030
+-39585479 206846030 313533 206230010
+313533 206230010 6825515 206129469
+6825515 206129469 54928407 205386785
+54928407 205386785 116626683 204434196
+116626683 204434196 279713745 201916217
+279713745 201916217 360651975 200666573
+360651975 200666573 390232894 200209859
+390232894 200209859 419326364 199760671
+419326364 199760671 464303291 199066250
+464303291 199066250 503815848 198456197
+503815848 198456197 582580649 197240110
+582580649 197240110 738609385 194831107
+738609385 194831107 789800332 194040746
+789800332 194040746 813839837 193669588
+813839837 193669588 820021160 193574152
+820021160 193574152 839482277 193273682
+839482277 193273682 843429660 193212737
+843429660 193212737 879011121 192663377
+879011121 192663377 912395797 192147936
+260033783 1982043891 313404379 1975942450
+313404379 1975942450 644709189 1938066976
+644709189 1938066976 875180438 1911719010
+875180438 1911719010 891794597 1909819644
+891794597 1909819644 908639662 1907893881
+-26875620 334353518 -21012324 334834127
+-21012324 334834127 18996608 338113623
+18996608 338113623 40371427 339865698
+40371427 339865698 47176205 340423480
+47176205 340423480 52044547 340822533
+52044547 340822533 212328613 353960875
+212328613 353960875 298948261 361061011
+298948261 361061011 321901146 362942438
+321901146 362942438 348807428 365147922
+348807428 365147922 385110450 368123648
+385110450 368123648 404009066 369672751
+404009066 369672751 418630905 370871290
+418630905 370871290 439800457 372606540
+439800457 372606540 545512441 381271657
+545512441 381271657 632191050 388376625
+632191050 388376625 640625467 389067986
+640625467 389067986 641673075 389153858
+641673075 389153858 642494634 389221200
+642494634 389221200 722196934 395754327
+722196934 395754327 937802336 413427310
+937802336 413427310 1071713941 424403924
+1071713941 424403924 1093055122 426153242
+1093055122 426153242 1103527993 427011694
+1103527993 427011694 1154782072 431212945
+1154782072 431212945 1179863909 433268881
+1179863909 433268881 1186052699 433776170
+1186052699 433776170 1208489375 435615285
+1208489375 435615285 1405557861 451768813
+1405557861 451768813 1433837391 454086861
+1433837391 454086861 1494706315 459076232
+1494706315 459076232 1615031575 468939186
+1615031575 468939186 2001586007 500624709
+-1258620479 -1356418020 -1208118529 -1274000146
+-1208118529 -1274000146 -1190913824 -1245922513
+-1190913824 -1245922513 -1172951250 -1216608057
+-1172951250 -1216608057 -1122173796 -1133740568
+-1122173796 -1133740568 -1060964372 -1033848376
+-1060964372 -1033848376 -1042337273 -1003449433
+-1042337273 -1003449433 -980341444 -902273845
+-980341444 -902273845 -865055278 -714129811
+-865055278 -714129811 -830961940 -658490367
+-830961940 -658490367 -775577195 -568103898
+-775577195 -568103898 -775427083 -567858919
+-775427083 -567858919 -767719298 -555280013
+-767719298 -555280013 -726567152 -488120778
+-726567152 -488120778 -692680737 -432819027
+-692680737 -432819027 -684439954 -419370283
+-684439954 -419370283 -669646806 -395228248
+-669646806 -395228248 -668561428 -393456939
+-668561428 -393456939 -632679465 -334898505
+-632679465 -334898505 -626002445 -324001781
+-626002445 -324001781 -624513610 -321572042
+-624513610 -321572042 -591093552 -267031372
+-591093552 -267031372 -574190077 -239445340
+-574190077 -239445340 -567256631 -228130136
+-567256631 -228130136 -544374685 -190787392
+-544374685 -190787392 -530669840 -168421441
+-530669840 -168421441 -519367236 -149975883
+-519367236 -149975883 -508668339 -132515561
+-508668339 -132515561 -477107570 -81009204
+-477107570 -81009204 -464847615 -61001275
+-464847615 -61001275 -417451821 16347431
+-417451821 16347431 -394713365 53456003
+-394713365 53456003 -386512733 66839222
+-386512733 66839222 -361236580 108089249
+-361236580 108089249 -335453888 150165934
+-335453888 150165934 -330671884 157970040
+-330671884 157970040 -300469954 207258807
+-300469954 207258807 -298275518 210840070
+-298275518 210840070 -293862227 218042446
+-293862227 218042446 -292106417 220907883
+-292106417 220907883 -245327451 297249944
+-245327451 297249944 -240644222 304892852
+-240644222 304892852 -209444617 355809798
+-209444617 355809798 -188723570 389626011
+-188723570 389626011 -187741798 391228237
+-187741798 391228237 -185402637 395045686
+-185402637 395045686 -177637014 407718983
+-177637014 407718983 -172668868 415826868
+-172668868 415826868 -169604446 420827926
+-169604446 420827926 -160288583 436031173
+-160288583 436031173 -123660568 495807144
+-123660568 495807144 -119502782 502592542
+-119502782 502592542 -112534245 513965015
+-112534245 513965015 -101553446 531885394
+-101553446 531885394 -33340447 643207240
+-33340447 643207240 -947034 696072451
+-947034 696072451 42425518 766855332
+42425518 766855332 61837274 798534814
+61837274 798534814 73560072 817666118
+73560072 817666118 91278625 846582337
+91278625 846582337 106582745 871558263
+106582745 871558263 243585334 1095142939
+243585334 1095142939 243997794 1095816063
+243997794 1095816063 253582173 1111457521
+253582173 1111457521 269301421 1137110926
+269301421 1137110926 287879988 1167430667
+287879988 1167430667 321982869 1223085684
+492917577 -425913523 498750615 -422216213
+498750615 -422216213 512029813 -413799103
+512029813 -413799103 529560014 -402687467
+529560014 -402687467 609873661 -351780120
+609873661 -351780120 618068321 -346585879
+618068321 -346585879 710525391 -287981342
+710525391 -287981342 736130733 -271751223
+736130733 -271751223 742488198 -267721501
+742488198 -267721501 757089700 -258466240
+757089700 -258466240 762431526 -255080288
+762431526 -255080288 785437208 -240497981
+785437208 -240497981 928210208 -150000351
+928210208 -150000351 957202204 -131623579
+957202204 -131623579 974558396 -120622239
+974558396 -120622239 1098145344 -42285817
+1098145344 -42285817 1166884769 1285131
+1166884769 1285131 1193102517 17903427
+1193102517 17903427 1214857469 31692951
+1214857469 31692951 1413234564 157435611
+1413234564 157435611 1529682216 231246742
+1529682216 231246742 1546197401 241715003
+1546197401 241715003 1560129008 250545646
+1560129008 250545646 1619588185 288234247
+-782329904 1154532293 -746348005 1110934256
+-746348005 1110934256 -693846441 1047319907
+-693846441 1047319907 -649587223 993692526
+-649587223 993692526 -504225877 817563155
+-504225877 817563155 -479729609 787881865
+-479729609 787881865 -470654218 776885524
+-470654218 776885524 -435033191 733724745
+-435033191 733724745 -432489669 730642846
+-432489669 730642846 -409773857 703118873
+-409773857 703118873 -397528337 688281395
+-397528337 688281395 -335450751 613064109
+-335450751 613064109 -320124320 594493596
+-320124320 594493596 -306348526 577801937
+-306348526 577801937 -221917432 475499669
+-221917432 475499669 -197618519 446057507
+-197618519 446057507 -181321039 426310408
+-181321039 426310408 -180829511 425714841
+-180829511 425714841 -173883469 417298559
+-173883469 417298559 -172668868 415826868
+-172668868 415826868 -149421318 387658608
+-149421318 387658608 -124716400 357724504
+-124716400 357724504 -99699697 327412620
+-99699697 327412620 -86010708 310826141
+-86010708 310826141 -77854423 300943449
+-77854423 300943449 -76260756 299012457
+-76260756 299012457 -70520038 292056625
+-70520038 292056625 -66842705 287600926
+-66842705 287600926 -47135072 263721862
+-47135072 263721862 -22237676 233554539
+-22237676 233554539 -15453698 225334625
+-15453698 225334625 -15348415 225207057
+-15348415 225207057 -6323544 214271930
+-6323544 214271930 313533 206230010
+313533 206230010 49434664 146711616
+49434664 146711616 152973370 21257308
+152973370 21257308 186201363 -19003915
+186201363 -19003915 221225201 -61441101
+221225201 -61441101 222969906 -63555100
+222969906 -63555100 271986709 -122947084
+271986709 -122947084 291656469 -146780259
+291656469 -146780259 307160687 -165566191
+307160687 -165566191 332749854 -196571709
+332749854 -196571709 368210932 -239538684
+368210932 -239538684 369304068 -240863200
+369304068 -240863200 378660843 -252200483
+378660843 -252200483 424851473 -308168091
+424851473 -308168091 463097761 -354509808
+463097761 -354509808 484510403 -380454775
+484510403 -380454775 488858857 -385723647
+488858857 -385723647 512029813 -413799103
+512029813 -413799103 520778492 -424399577
+520778492 -424399577 548306338 -457754127
+548306338 -457754127 619346308 -543830828
+619346308 -543830828 640161273 -569051610
+640161273 -569051610 685744453 -624283190
+685744453 -624283190 700421764 -642067185
+700421764 -642067185 731951942 -680271224
+731951942 -680271224 747091431 -698615224
+747091431 -698615224 776918917 -734756169
+776918917 -734756169 804314348 -767950276
+804314348 -767950276 825180663 -793233276
+825180663 -793233276 953395294 -948586559
+953395294 -948586559 975910564 -975867541
+975910564 -975867541 1070104015 -1089998523
+1070104015 -1089998523 1132412925 -1165496099
+1132412925 -1165496099 1157269008 -1195613364
+1157269008 -1195613364 1177489661 -1220114038
+1177489661 -1220114038 1245254575 -1302222467
+1245254575 -1302222467 1444016164 -1543055085
+1444016164 -1543055085 1501255879 -1612410489
+1501255879 -1612410489 1642826397 -1783946643
+1642826397 -1783946643 1911542893 -2109541229
+-455407954 -1534786226 -557200701 -1775268467
+-428258389 -1470646213 -455407954 -1534786226
+-422135845 -1456181890 -428258389 -1470646213
+-391484389 -1383768766 -422135845 -1456181890
+-380525730 -1357879273 -391484389 -1383768766
+-357959867 -1304568113 -380525730 -1357879273
+-352592953 -1291888945 -357959867 -1304568113
+-320239611 -1215455166 -352592953 -1291888945
+-297977157 -1162860801 -320239611 -1215455166
+-281529211 -1124003035 -297977157 -1162860801
+-230270181 -1002905149 -281529211 -1124003035
+-195452913 -920650423 -230270181 -1002905149
+-175985832 -874660044 -195452913 -920650423
+-163338759 -844781720 -175985832 -874660044
+-160491115 -838054248 -163338759 -844781720
+-140884116 -791733316 -160491115 -838054248
+-91172907 -674292111 -140884116 -791733316
+-87204198 -664916157 -91172907 -674292111
+-82268622 -653256012 -87204198 -664916157
+-80681513 -649506515 -82268622 -653256012
+-63386928 -608648589 -80681513 -649506515
+-54255095 -587074914 -63386928 -608648589
+-37169402 -546710489 -54255095 -587074914
+-30401674 -530721939 -37169402 -546710489
+-15338500 -495135654 -30401674 -530721939
+1985540 -454208141 -15338500 -495135654
+1994130 -454187847 1985540 -454208141
+9504963 -436443735 1994130 -454187847
+12596647 -429139727 9504963 -436443735
+34278529 -377916945 12596647 -429139727
+47808891 -345951881 34278529 -377916945
+50144200 -340434784 47808891 -345951881
+60843427 -315158189 50144200 -340434784
+83903136 -260680334 60843427 -315158189
+103643126 -214045214 83903136 -260680334
+105581310 -209466315 103643126 -214045214
+111190238 -196215394 105581310 -209466315
+124244158 -165375909 111190238 -196215394
+125906608 -161448422 124244158 -165375909
+146272269 -113335172 125906608 -161448422
+152550923 -98502044 146272269 -113335172
+154777696 -93241363 152550923 -98502044
+186201363 -19003915 154777696 -93241363
+224453271 71365044 186201363 -19003915
+224529431 71544968 224453271 71365044
+226819765 76955812 224529431 71544968
+279713745 201916217 226819765 76955812
+291706835 230249524 279713745 201916217
+337098942 337486983 291706835 230249524
+339074526 342154239 337098942 337486983
+348807428 365147922 339074526 342154239
+350208091 368456946 348807428 365147922
+374579375 426033355 350208091 368456946
+382330155 444344335 374579375 426033355
+399115067 483998174 382330155 444344335
+402144122 491154225 399115067 483998174
+403573178 494530325 402144122 491154225
+477628357 669483413 403573178 494530325
+479004471 672734440 477628357 669483413
+488547142 695278706 479004471 672734440
+509928558 745791646 488547142 695278706
+575412270 900494904 509928558 745791646
+584920051 922956744 575412270 900494904
+612217732 987446679 584920051 922956744
+614210354 992154187 612217732 987446679
+635258786 1041880461 614210354 992154187
+636307711 1044358513 635258786 1041880461
+636737513 1045373907 636307711 1044358513
+-1355170591 1646779958 -1598900167 2024093171
+-1351849647 1641638867 -1355170591 1646779958
+-1287659828 1542267805 -1351849647 1641638867
+-1142123619 1316965914 -1287659828 1542267805
+-1121199540 1284573737 -1142123619 1316965914
+-1000081804 1097073628 -1121199540 1284573737
+-949557236 1018857487 -1000081804 1097073628
+-910516734 958419613 -949557236 1018857487
+-773323329 746033061 -910516734 958419613
+-759731343 724991562 -773323329 746033061
+-733547067 684456171 -759731343 724991562
+-718716491 661497234 -733547067 684456171
+-687153714 612635487 -718716491 661497234
+-666118735 580071627 -687153714 612635487
+-635339355 532422645 -666118735 580071627
+-592955936 466809664 -635339355 532422645
+-583260982 451801085 -592955936 466809664
+-566951295 426552364 -583260982 451801085
+-528491923 367014126 -566951295 426552364
+-516768191 348864836 -528491923 367014126
+-511069828 340043306 -516768191 348864836
+-484364266 298700923 -511069828 340043306
+-478170634 289112677 -484364266 298700923
+-474183743 282940646 -478170634 289112677
+-463862237 266962115 -474183743 282940646
+-444110475 236384780 -463862237 266962115
+-432660231 218658871 -444110475 236384780
+-428912473 212857036 -432660231 218658871
+-426422647 209002583 -428912473 212857036
+-404767387 175478480 -426422647 209002583
+-385856518 146202916 -404767387 175478480
+-361236580 108089249 -385856518 146202916
+-323160359 49144161 -361236580 108089249
+-313191539 33711617 -323160359 49144161
+-293763711 3635758 -313191539 33711617
+-281819939 -14854172 -293763711 3635758
+-252020948 -60985434 -281819939 -14854172
+-232837519 -90682943 -252020948 -60985434
+-230720194 -93960735 -232837519 -90682943
+-197952606 -144687626 -230720194 -93960735
+-155065467 -211080407 -197952606 -144687626
+-146471368 -224384771 -155065467 -211080407
+-141093111 -232710751 -146471368 -224384771
+-119250533 -266524838 -141093111 -232710751
+-90315305 -311318925 -119250533 -266524838
+-58383945 -360751268 -90315305 -311318925
+-58251262 -360956672 -58383945 -360751268
+-24448148 -413286643 -58251262 -360956672
+-14785135 -428245772 -24448148 -413286643
+1985540 -454208141 -14785135 -428245772
+2132447 -454435566 1985540 -454208141
+25312035 -490319454 2132447 -454435566
+51314826 -530573890 25312035 -490319454
+64506903 -550996299 51314826 -530573890
+67483700 -555604622 64506903 -550996299
+128795136 -650519713 67483700 -555604622
+155772498 -692282865 128795136 -650519713
+160607761 -699768244 155772498 -692282865
+170178506 -714584536 160607761 -699768244
+176153236 -723833904 170178506 -714584536
+216498631 -786291858 176153236 -723833904
+226540055 -801836799 216498631 -786291858
+256372875 -848020432 226540055 -801836799
+266037064 -862981383 256372875 -848020432
+274333455 -875824871 266037064 -862981383
+275687889 -877921644 274333455 -875824871
+281886320 -887517320 275687889 -877921644
+330746242 -963156455 281886320 -887517320
+341488629 -979786544 330746242 -963156455
+385084227 -1047276076 341488629 -979786544
+404348230 -1077098319 385084227 -1047276076
+412591639 -1089859788 404348230 -1077098319
+457818415 -1159874517 412591639 -1089859788
+566021904 -1327382319 457818415 -1159874517
+581347821 -1351108087 566021904 -1327382319
+734098033 -1587577840 581347821 -1351108087
+742711827 -1600912695 734098033 -1587577840
+789024248 -1672608089 742711827 -1600912695
+123722109 -1421494395 121474948 -1436879785
+131798203 -1366200716 123722109 -1421494395
+139362239 -1314412887 131798203 -1366200716
+142285086 -1294401359 139362239 -1314412887
+152782000 -1222533322 142285086 -1294401359
+165993421 -1132080181 152782000 -1222533322
+169841429 -1105734455 165993421 -1132080181
+173099900 -1083425049 169841429 -1105734455
+184761617 -1003582091 173099900 -1083425049
+186659513 -990587980 184761617 -1003582091
+193278297 -945271898 186659513 -990587980
+210471033 -827560331 193278297 -945271898
+211487829 -820598748 210471033 -827560331
+214910083 -797167990 211487829 -820598748
+216498631 -786291858 214910083 -797167990
+222337779 -746313623 216498631 -786291858
+222374820 -746060021 222337779 -746313623
+224956510 -728384254 222374820 -746060021
+227756770 -709212030 224956510 -728384254
+230406106 -691073118 227756770 -709212030
+244467504 -594800533 230406106 -691073118
+247952228 -570942065 244467504 -594800533
+249269848 -561920868 247952228 -570942065
+252411436 -540411713 249269848 -561920868
+253599797 -532275490 252411436 -540411713
+255471878 -519458125 253599797 -532275490
+285224729 -315752643 255471878 -519458125
+287368922 -301072237 285224729 -315752643
+287498187 -300187216 287368922 -301072237
+288545542 -293016402 287498187 -300187216
+289808927 -284366530 288545542 -293016402
+294151940 -254631710 289808927 -284366530
+302292800 -198894606 294151940 -254631710
+307160687 -165566191 302292800 -198894606
+309311321 -150841692 307160687 -165566191
+316787751 -99653659 309311321 -150841692
+328788598 -17488820 316787751 -99653659
+329673508 -11430205 328788598 -17488820
+332036055 4745178 329673508 -11430205
+340203404 60663644 332036055 4745178
+341139261 67071075 340203404 60663644
+356914812 175079758 341139261 67071075
+360651975 200666573 356914812 175079758
+365144437 231424605 360651975 200666573
+372078373 278898400 365144437 231424605
+377637045 316956329 372078373 278898400
+380750380 338272049 377637045 316956329
+385110450 368123648 380750380 338272049
+385274874 369249392 385110450 368123648
+393068578 422609669 385274874 369249392
+396293151 444686987 393068578 422609669
+402208261 485185302 396293151 444686987
+402985845 490509099 402208261 485185302
+403573178 494530325 402985845 490509099
+423273461 629410032 403573178 494530325
+432071095 689643794 423273461 629410032
+435229374 711267231 432071095 689643794
+439306344 739180557 435229374 711267231
+451352830 821657873 439306344 739180557
+459027519 874203300 451352830 821657873
+460087565 881461002 459027519 874203300
+461224397 889244416 460087565 881461002
+469842328 948247835 461224397 889244416
+476254290 992147889 469842328 948247835
+477927564 1003604109 476254290 992147889
+486498668 1062286917 477927564 1003604109
+489074272 1079921011 486498668 1062286917
+490808041 1091791416 489074272 1079921011
+503576745 1179213458 490808041 1091791416
+514083549 1251149209 503576745 1179213458
+523499191 1315614223 514083549 1251149209
+532367067 1376328903 523499191 1315614223
+549415460 1493052213 532367067 1376328903
+581438018 1712297445 549415460 1493052213
+597552925 1822629561 581438018 1712297445
+605916131 1879888977 597552925 1822629561
+606739903 1885529004 605916131 1879888977
+-1858342315 -196637368 -1777662687 -171934159
+-1777662687 -171934159 -1584254163 -112714608
+-1584254163 -112714608 -1372144290 -47768910
+-1372144290 -47768910 -1317292939 -30974033
+-1317292939 -30974033 -1285174416 -21139697
+-1285174416 -21139697 -1276213405 -18395934
+-1276213405 -18395934 -1177626802 11790193
+-1177626802 11790193 -1100807992 35311263
+-1100807992 35311263 -1084430248 40325947
+-1084430248 40325947 -1034063341 55747737
+-1034063341 55747737 -900854998 96534659
+-900854998 96534659 -883046617 101987388
+-883046617 101987388 -855955596 110282359
+-855955596 110282359 -851178450 111745068
+-851178450 111745068 -849926806 112128308
+-849926806 112128308 -843011250 114245775
+-843011250 114245775 -770817935 136350569
+-770817935 136350569 -764576704 138261565
+-764576704 138261565 -691717718 160570181
+-691717718 160570181 -681654046 163651566
+-681654046 163651566 -675033860 165678594
+-675033860 165678594 -642371818 175679350
+-642371818 175679350 -563798218 199737717
+-563798218 199737717 -551568182 203482419
+-551568182 203482419 -535469394 208411690
+-535469394 208411690 -516532851 214209849
+-516532851 214209849 -506678300 217227204
+-506678300 217227204 -444110475 236384780
+-444110475 236384780 -392430599 252208586
+-392430599 252208586 -371170255 258718269
+-371170255 258718269 -363181423 261164361
+-363181423 261164361 -362904799 261249060
+-362904799 261249060 -245327451 297249944
+-245327451 297249944 -238185642 299436687
+-238185642 299436687 -162536675 322599564
+-162536675 322599564 -145507523 327813701
+-145507523 327813701 -133213447 331578012
+355982459 1443460968 340422021 1462388448
+497423050 1271414787 355982459 1443460968
+514083549 1251149209 497423050 1271414787
+570229228 1182854460 514083549 1251149209
+583706709 1166460658 570229228 1182854460
+644600918 1092389870 583706709 1166460658
+656376938 1078065698 644600918 1092389870
+673983958 1056648787 656376938 1078065698
+676451826 1053646910 673983958 1056648787
+686840311 1041010515 676451826 1053646910
+699968574 1025041496 686840311 1041010515
+735843539 981403736 699968574 1025041496
+775244904 933476516 735843539 981403736
+790517204 914899522 775244904 933476516
+802138264 900763842 790517204 914899522
+814004910 886329434 802138264 900763842
+853899428 837802350 814004910 886329434
+892783522 790504331 853899428 837802350
+934490334 739772800 892783522 790504331
+950576264 720206120 934490334 739772800
+965927282 701533375 950576264 720206120
+999980862 660111119 965927282 701533375
+1138956137 491063711 999980862 660111119
+1141659411 487775490 1138956137 491063711
+1149615463 478097870 1141659411 487775490
+1164271834 460270084 1149615463 478097870
+1183334168 437082951 1164271834 460270084
+1186052699 433776170 1183334168 437082951
+1196337032 421266464 1186052699 433776170
+1302270080 292411119 1196337032 421266464
+1313737471 278462359 1302270080 292411119
+1337864198 249114975 1313737471 278462359
+1339589150 247016770 1337864198 249114975
+1413234564 157435611 1339589150 247016770
+1447807468 115381656 1413234564 157435611
+1525055414 21418432 1447807468 115381656
+1593936057 -62366932 1525055414 21418432
+-1814319969 1380407355 -1864446949 1387338113
+-1760810088 1373008863 -1814319969 1380407355
+-1627189958 1354534007 -1760810088 1373008863
+-1424956812 1326572439 -1627189958 1354534007
+-1241613819 1301222699 -1424956812 1326572439
+-1150872189 1288676396 -1241613819 1301222699
+-1121199540 1284573737 -1150872189 1288676396
+-964702766 1262935863 -1121199540 1284573737
+-843027653 1246112573 -964702766 1262935863
+-781597447 1237618986 -843027653 1246112573
+-743465074 1232346650 -781597447 1237618986
+-525621486 1202226720 -743465074 1232346650
+-412834102 1186632283 -525621486 1202226720
+-313378155 1172881103 -412834102 1186632283
+-234668254 1161998356 -313378155 1172881103
+-148009628 1150016586 -234668254 1161998356
+-114845201 1145431139 -148009628 1150016586
+-63394440 1138317350 -114845201 1145431139
+-52875641 1136862978 -63394440 1138317350
+-51989365 1136740438 -52875641 1136862978
+167101833 1106448008 -51989365 1136740438
+243150839 1095933167 167101833 1106448008
+243997794 1095816063 243150839 1095933167
+382525982 1076662599 243997794 1095816063
+486498668 1062286917 382525982 1076662599
+504688481 1059771921 486498668 1062286917
+-1926925002 -2122423818 -1641340853 -1425729920
+-1641340853 -1425729920 -1639402774 -1421001900
+-1639402774 -1421001900 -1565446557 -1240582764
+-1565446557 -1240582764 -1542820631 -1185385919
+-1542820631 -1185385919 -1523348866 -1137883774
+-1523348866 -1137883774 -1508673502 -1102082638
+-1508673502 -1102082638 -1370523021 -765059042
+-1370523021 -765059042 -1316097638 -632286154
+-1316097638 -632286154 -1309795218 -616911150
+-1309795218 -616911150 -1257026750 -488180374
+-1257026750 -488180374 -1240518928 -447908884
+-1240518928 -447908884 -1239145512 -444558382
+-1239145512 -444558382 -1233539687 -430882748
+-1233539687 -430882748 -1232472344 -428278922
+-1232472344 -428278922 -1198975029 -346560888
+-1198975029 -346560888 -1197057426 -341882819
+-1197057426 -341882819 -1131606399 -182212436
+-1131606399 -182212436 -1101737886 -109347010
+-1101737886 -109347010 -1101471283 -108696621
+-1101471283 -108696621 -1093304371 -88773114
+-1093304371 -88773114 -1055517329 3409880
+-1055517329 3409880 -1053230869 8987788
+-1053230869 8987788 -1046958267 24290052
+-1046958267 24290052 -1045976772 26684447
+-1045976772 26684447 -1034063341 55747737
+-1034063341 55747737 -1014128087 104380581
+-1014128087 104380581 -995687034 149368263
+-995687034 149368263 -983219182 179784085
+-983219182 179784085 -968309123 216157767
+-968309123 216157767 -927765241 315066180
+-927765241 315066180 -927267699 316279955
+-927267699 316279955 -924695285 322555462
+-924695285 322555462 -917623970 339806215
+-917623970 339806215 -877544754 437581058
+-877544754 437581058 -870475710 454826272
+-870475710 454826272 -856023014 490084200
+-856023014 490084200 -849241124 506628889
+-849241124 506628889 -835911016 539148219
+-835911016 539148219 -825661121 564153246
+-825661121 564153246 -824099564 567962726
+-824099564 567962726 -814253044 591983703
+-814253044 591983703 -796225927 635961571
+-796225927 635961571 -779453098 676879556
+-779453098 676879556 -767685654 705586705
+-767685654 705586705 -759731343 724991562
+-759731343 724991562 -721545786 818146749
+-721545786 818146749 -715992792 831693497
+-715992792 831693497 -649587223 993692526
+-649587223 993692526 -635346094 1028434327
+-635346094 1028434327 -624437785 1055045581
+-624437785 1055045581 -612762497 1083527910
+-612762497 1083527910 -598211160 1119026476
+-598211160 1119026476 -593108907 1131473625
+-1498072772 -2038626908 -1361069435 -1827697895
+-1361069435 -1827697895 -1324164325 -1770879144
+-1324164325 -1770879144 -1210375318 -1595690688
+-1210375318 -1595690688 -1087913612 -1407149830
+-1087913612 -1407149830 -1010069652 -1287302022
+-1010069652 -1287302022 -1002024906 -1274916409
+-1002024906 -1274916409 -983624056 -1246586637
+-983624056 -1246586637 -965535872 -1218738244
+-965535872 -1218738244 -913854186 -1139169620
+-913854186 -1139169620 -912631976 -1137287918
+-912631976 -1137287918 -898105269 -1114922740
+-898105269 -1114922740 -700385611 -810515466
+-700385611 -810515466 -663869251 -754295231
+-663869251 -754295231 -660213628 -748667069
+-660213628 -748667069 -605221684 -664002003
+-605221684 -664002003 -594429792 -647386911
+-594429792 -647386911 -581808028 -627954565
+-581808028 -627954565 -562406443 -598084072
+-562406443 -598084072 -521892347 -535708962
+-521892347 -535708962 -504207173 -508481039
+-504207173 -508481039 -503306879 -507094955
+-503306879 -507094955 -448870340 -423284985
+-448870340 -423284985 -393772017 -338456139
+-393772017 -338456139 -387964099 -329514325
+-387964099 -329514325 -376796545 -312320868
+-376796545 -312320868 -373464390 -307190713
+-373464390 -307190713 -373206504 -306793675
+-373206504 -306793675 -351475774 -273337253
+-351475774 -273337253 -334677669 -247475053
+-334677669 -247475053 -289383789 -177741034
+-289383789 -177741034 -240326954 -102213605
+-240326954 -102213605 -232837519 -90682943
+-232837519 -90682943 -228233112 -83594042
+-228233112 -83594042 -215702868 -64302600
+-215702868 -64302600 -201235299 -42028470
+-201235299 -42028470 -196355142 -34515027
+-196355142 -34515027 -140891092 50876888
+-140891092 50876888 -133243737 62650682
+-133243737 62650682 -132207420 64246185
+-132207420 64246185 -120030228 82994072
+-120030228 82994072 -61860904 172551002
+-61860904 172551002 -49866502 191017466
+-49866502 191017466 -39585479 206846030
+-39585479 206846030 -29638762 222159900
+-29638762 222159900 -27704022 225138607
+-27704022 225138607 -26604803 226830954
+-26604803 226830954 -22237676 233554539
+-22237676 233554539 -8183599 255192061
+-8183599 255192061 42734468 333585024
+42734468 333585024 44074960 335648833
+44074960 335648833 47176205 340423480
+47176205 340423480 54534817 351752728
+54534817 351752728 61141662 361924563
+61141662 361924563 64889761 367695100
+64889761 367695100 174266022 536089734
+174266022 536089734 197327915 571595601
+197327915 571595601 224911171 614062516
+224911171 614062516 230517931 622694630
+230517931 622694630 263049294 672779601
+263049294 672779601 266694561 678391819
+266694561 678391819 358972636 820462251
+358972636 820462251 371984171 840494684
+371984171 840494684 378274912 850179850
+378274912 850179850 391208864 870092836
+391208864 870092836 409812532 898734863
+409812532 898734863 468935855 989760561
+468935855 989760561 477927564 1003604109
+477927564 1003604109 521941871 1071368111
+521941871 1071368111 532938730 1088298768
+532938730 1088298768 583706709 1166460658
+583706709 1166460658 595242366 1184220844
+595242366 1184220844 645861048 1262152877
+464214131 1667378307 446931452 1641459451
+560393335 1811618382 464214131 1667378307
+605916131 1879888977 560393335 1811618382
+644709189 1938066976 605916131 1879888977
+745597309 2089369019 644709189 1938066976
+-1158913674 -399359610 -1134439821 -410113122
+-1134439821 -410113122 -1037796007 -452577230
+-1037796007 -452577230 -1012138053 -463851020
+-1012138053 -463851020 -993560041 -472013971
+-993560041 -472013971 -873570663 -524735833
+-873570663 -524735833 -860588130 -530440199
+-860588130 -530440199 -780015135 -565842986
+-780015135 -565842986 -775427083 -567858919
+-775427083 -567858919 -774536399 -568250275
+-774536399 -568250275 -671529890 -613510073
+-671529890 -613510073 -663305025 -617123978
+-663305025 -617123978 -613284901 -639102207
+-613284901 -639102207 -594429792 -647386911
+-594429792 -647386911 -578099263 -654562345
+-578099263 -654562345 -403710827 -731186487
+-403710827 -731186487 -373015594 -744673597
+-373015594 -744673597 -343386398 -757692302
+-343386398 -757692302 -243685125 -801499820
+-243685125 -801499820 -160491115 -838054248
+-160491115 -838054248 -153723142 -841028013
+-153723142 -841028013 -139031540 -847483323
+-139031540 -847483323 -100281482 -864509623
+-100281482 -864509623 -29304466 -895696054
+-29304466 -895696054 136270878 -968447832
+136270878 -968447832 137510064 -968992314
+137510064 -968992314 149083922 -974077726
+149083922 -974077726 186659513 -990587980
+186659513 -990587980 247255603 -1017213160
+247255603 -1017213160 284376202 -1033523496
+284376202 -1033523496 338833351 -1057451300
+338833351 -1057451300 338886873 -1057474817
+338886873 -1057474817 381728991 -1076299118
+381728991 -1076299118 388071441 -1079085913
+388071441 -1079085913 412591639 -1089859788
+412591639 -1089859788 515737553 -1135180838
+515737553 -1135180838 705004486 -1218342409
+705004486 -1218342409 925717954 -1315321202
+925717954 -1315321202 976938766 -1337827000
+976938766 -1337827000 1037685678 -1364518448
+1037685678 -1364518448 1342122651 -1498284323
+1342122651 -1498284323 1444016164 -1543055085
+1444016164 -1543055085 1465478486 -1552485366
+1465478486 -1552485366 1715504403 -1662343690
+1715504403 -1662343690 1814262300 -1705736699
+-392064042 2063203344 -350214066 1823581892
+-350214066 1823581892 -335135758 1737247646
+-335135758 1737247646 -309270957 1589152908
+-309270957 1589152908 -303420021 1555652061
+-303420021 1555652061 -267542546 1350227509
+-267542546 1350227509 -254109650 1273314442
+-254109650 1273314442 -234668254 1161998356
+-234668254 1161998356 -232884625 1151785784
+-232884625 1151785784 -230669752 1139104032
+-230669752 1139104032 -211687605 1030417480
+-211687605 1030417480 -197814482 950983796
+-197814482 950983796 -183727760 870327099
+-183727760 870327099 -168283057 781894980
+-168283057 781894980 -167579559 777866944
+-167579559 777866944 -143642817 640811740
+-143642817 640811740 -142164841 632349259
+-142164841 632349259 -123711718 526691753
+-123711718 526691753 -122874380 521897387
+-122874380 521897387 -119502782 502592542
+-119502782 502592542 -118879413 499023305
+-118879413 499023305 -113329171 467244143
+-113329171 467244143 -111792414 458445097
+-111792414 458445097 -98602759 382924757
+-98602759 382924757 -94321487 358411374
+-94321487 358411374 -87182316 317534442
+-87182316 317534442 -86010708 310826141
+-86010708 310826141 -83880756 298630621
+-83880756 298630621 -82191683 288959451
+-82191683 288959451 -79649280 274402355
+-79649280 274402355 -78159712 265873493
+-78159712 265873493 -76765888 257892846
+-76765888 257892846 -74120152 242744087
+-74120152 242744087 -70924564 224447031
+-70924564 224447031 -70153970 220034819
+-70153970 220034819 -69057135 213754646
+-69057135 213754646 -67926966 207283608
+-67926966 207283608 -61860904 172551002
+-61860904 172551002 -43416901 66945716
+-43416901 66945716 -26553552 -29609179
+-26553552 -29609179 -18553073 -75417723
+-18553073 -75417723 -13506992 -104310193
+-13506992 -104310193 -7703487 -137539468
+-7703487 -137539468 -3412798 -162106774
+-3412798 -162106774 6946294 -221420086
+6946294 -221420086 13243404 -257475602
+13243404 -257475602 13547887 -259218991
+13547887 -259218991 14153568 -262686951
+14153568 -262686951 17194909 -280100836
+17194909 -280100836 24891745 -324170801
+24891745 -324170801 34278529 -377916945
+34278529 -377916945 45698670 -443305527
+45698670 -443305527 46692256 -448994531
+46692256 -448994531 50694858 -471912329
+50694858 -471912329 59609651 -522955980
+59609651 -522955980 64506903 -550996299
+64506903 -550996299 65279025 -555417253
+65279025 -555417253 68356944 -573040576
+68356944 -573040576 87224617 -681071677
+87224617 -681071677 87227650 -681089043
+87227650 -681089043 88724328 -689658612
+88724328 -689658612 93482082 -716900203
+93482082 -716900203 97998814 -742761766
+97998814 -742761766 99402315 -750797826
+99402315 -750797826 99906361 -753683856
+99906361 -753683856 122024772 -880327792
+122024772 -880327792 137510064 -968992314
+137510064 -968992314 138786716 -976302071
+138786716 -976302071 139490336 -980330811
+139490336 -980330811 141919122 -994237367
+141919122 -994237367 161568565 -1106744673
+161568565 -1106744673 165993421 -1132080181
+165993421 -1132080181 185019277 -1241017003
+185019277 -1241017003 190735195 -1273744777
+190735195 -1273744777 195368237 -1300272297
+195368237 -1300272297 206444969 -1363694617
+206444969 -1363694617 221170714 -1448010186
+221170714 -1448010186 244200116 -1579870207
+244200116 -1579870207 269176562 -1722878466
+269176562 -1722878466 286889279 -1824296606
+-929362981 -337803818 -857847720 -366513355
+-857847720 -366513355 -805686073 -387453454
+-805686073 -387453454 -745350275 -411675036
+-745350275 -411675036 -692680737 -432819027
+-692680737 -432819027 -678202772 -438631152
+-678202772 -438631152 -667397850 -442968748
+-667397850 -442968748 -660671293 -445669099
+-660671293 -445669099 -646669644 -451290009
+-646669644 -451290009 -644109357 -452317827
+-644109357 -452317827 -604047719 -468400422
+-604047719 -468400422 -508828924 -506625654
+-508828924 -506625654 -504207173 -508481039
+-504207173 -508481039 -484635523 -516338005
+-484635523 -516338005 -325081309 -580390451
+-325081309 -580390451 -279920488 -598520095
+-279920488 -598520095 -239663271 -614681206
+-239663271 -614681206 -179489718 -638837655
+-179489718 -638837655 -129262791 -659001068
+-129262791 -659001068 -100915353 -670381042
+-100915353 -670381042 -91172907 -674292111
+-91172907 -674292111 -41349872 -694293383
+-41349872 -694293383 30209841 -723020764
+30209841 -723020764 61706900 -735665142
+61706900 -735665142 88561560 -746445845
+88561560 -746445845 99402315 -750797826
+99402315 -750797826 101694863 -751718161
+101694863 -751718161 159520560 -774932072
+159520560 -774932072 187315792 -786090365
+187315792 -786090365 214910083 -797167990
+214910083 -797167990 226540055 -801836799
+226540055 -801836799 246071516 -809677632
+246071516 -809677632 265014447 -817282201
+265014447 -817282201 265859833 -817621578
+265859833 -817621578 320811726 -839681812
+320811726 -839681812 342140089 -848244004
+342140089 -848244004 439678116 -887400282
+439678116 -887400282 747530719 -1010986567
+747530719 -1010986567 778178252 -1023289905
+778178252 -1023289905 807285454 -1034974883
+807285454 -1034974883 894234683 -1069880328
+894234683 -1069880328 903674904 -1073670070
+903674904 -1073670070 921041630 -1080641877
+921041630 -1080641877 1044373225 -1130152888
+1044373225 -1130152888 1132412925 -1165496099
+1132412925 -1165496099 1188907597 -1188175675
+1188907597 -1188175675 1266592091 -1219361826
+1266592091 -1219361826 1376706434 -1263566821
+1376706434 -1263566821 1380772458 -1265199110
+-1970336709 -1231344736 -1917486379 -1190259724
+-1917486379 -1190259724 -1838978143 -1129228660
+-1838978143 -1129228660 -1713970218 -1032049472
+-1713970218 -1032049472 -1599053525 -942715049
+-1599053525 -942715049 -1475298703 -846510004
+-1475298703 -846510004 -1370523021 -765059042
+-1370523021 -765059042 -1352867365 -751333813
+-1352867365 -751333813 -1289199735 -701839603
+-1289199735 -701839603 -1180169079 -617080892
+-1180169079 -617080892 -1173546229 -611932393
+-1173546229 -611932393 -1149448813 -593199441
+-1149448813 -593199441 -1111327926 -563564866
+-1111327926 -563564866 -1062594812 -525680512
+-1062594812 -525680512 -1058175206 -522244781
+-1058175206 -522244781 -993560041 -472013971
+-993560041 -472013971 -985925201 -466078766
+-985925201 -466078766 -911937089 -408561576
+-911937089 -408561576 -857847720 -366513355
+-857847720 -366513355 -756293016 -287566330
+-756293016 -287566330 -746669564 -280085211
+-746669564 -280085211 -744974594 -278767568
+-744974594 -278767568 -732988271 -269449589
+-732988271 -269449589 -697005486 -241477140
+-697005486 -241477140 -672579357 -222488653
+-672579357 -222488653 -658003956 -211157966
+-658003956 -211157966 -641673370 -198462827
+-641673370 -198462827 -604173778 -169311236
+-604173778 -169311236 -600760197 -166657571
+-600760197 -166657571 -564634914 -138574347
+-564634914 -138574347 -543683473 -122287028
+-543683473 -122287028 -523241039 -106395401
+-523241039 -106395401 -485212666 -76832745
+-485212666 -76832745 -464847615 -61001275
+-464847615 -61001275 -377246599 7098371
+-377246599 7098371 -347767651 30014840
+-347767651 30014840 -347553069 30181654
+-347553069 30181654 -323160359 49144161
+-323160359 49144161 -292399364 73057273
+-292399364 73057273 -221643812 128061522
+-221643812 128061522 -214925263 133284417
+-214925263 133284417 -176704835 162996374
+-176704835 162996374 -139371410 192018789
+-139371410 192018789 -127419654 201309896
+-127419654 201309896 -118726361 208067924
+-118726361 208067924 -98218648 224010297
+-98218648 224010297 -88073278 231897148
+-88073278 231897148 -81836985 236745143
+-81836985 236745143 -74120152 242744087
+-74120152 242744087 -64446557 250264188
+-64446557 250264188 -47135072 263721862
+-47135072 263721862 -32957965 274742922
+-32957965 274742922 42734468 333585024
+42734468 333585024 44608225 335041654
+44608225 335041654 52044547 340822533
+52044547 340822533 77386351 360522852
+77386351 360522852 79729812 362344622
+79729812 362344622 84288035 365888112
+84288035 365888112 245376981 491116116
+245376981 491116116 323229343 551637313
+323229343 551637313 327629867 555058211
+327629867 555058211 423273461 629410032
+423273461 629410032 476788154 671011510
+476788154 671011510 479004471 672734440
+479004471 672734440 510869669 697505941
+510869669 697505941 665437888 817664835
+665437888 817664835 790517204 914899522
+790517204 914899522 811685325 931355284
+811685325 931355284 820568103 938260616
+820568103 938260616 824971423 941683688
+824971423 941683688 873958380 979765375
+873958380 979765375 988839235 1069071939
+988839235 1069071939 994244729 1073274084
+-893566865 557377933 -923456421 610952082
+-887866922 547161336 -893566865 557377933
+-884398703 540944887 -887866922 547161336
+-883328272 539026243 -884398703 540944887
+-856023014 490084200 -883328272 539026243
+-834481633 451473352 -856023014 490084200
+-814259613 415227332 -834481633 451473352
+-813673396 414176595 -814259613 415227332
+-773992287 343052033 -813673396 414176595
+-762853554 323086928 -773992287 343052033
+-718182903 243019093 -762853554 323086928
+-698223351 207243520 -718182903 243019093
+-695143363 201722938 -698223351 207243520
+-689425870 191474885 -695143363 201722938
+-681994905 178155596 -689425870 191474885
+-675033860 165678594 -681994905 178155596
+-658496344 136036691 -675033860 165678594
+-634579097 93167332 -658496344 136036691
+-631873628 88318040 -634579097 93167332
+-617380350 62340236 -631873628 88318040
+-613238220 54915868 -617380350 62340236
+-599296394 29926489 -613238220 54915868
+-580749924 -3316270 -599296394 29926489
+-561732644 -37402911 -580749924 -3316270
+-523241039 -106395401 -561732644 -37402911
+-508668339 -132515561 -523241039 -106395401
+-496187715 -154885876 -508668339 -132515561
+-463322015 -213794474 -496187715 -154885876
+-454762664 -229136286 -463322015 -213794474
+-448207354 -240886045 -454762664 -229136286
+-440047715 -255511413 -448207354 -240886045
+-433154902 -267866115 -440047715 -255511413
+-419972623 -291494079 -433154902 -267866115
+-396650922 -333295979 -419972623 -291494079
+-393772017 -338456139 -396650922 -333295979
+-337275350 -439720967 -393772017 -338456139
+-308892302 -490594843 -337275350 -439720967
+-302318751 -502377299 -308892302 -490594843
+-289551515 -525261340 -302318751 -502377299
+-260369511 -577567268 -289551515 -525261340
+-239663271 -614681206 -260369511 -577567268
+-222231473 -645926023 -239663271 -614681206
+-212735420 -662946783 -222231473 -645926023
+-172109341 -735765111 -212735420 -662946783
+-140884116 -791733316 -172109341 -735765111
+-120596844 -828096296 -140884116 -791733316
+-118290553 -832230101 -120596844 -828096296
+-100281482 -864509623 -118290553 -832230101
+-62516912 -932198974 -100281482 -864509623
+-51434299 -952063488 -62516912 -932198974
+11044870 -1064051375 -51434299 -952063488
+42945404 -1121230005 11044870 -1064051375
+74385727 -1177583754 42945404 -1121230005
+107514778 -1236964381 74385727 -1177583754
+-413622038 1594902451 -515452333 1765462477
+-377517460 1534429313 -413622038 1594902451
+-377145160 1533805730 -377517460 1534429313
+-366386643 1515785818 -377145160 1533805730
+-267542546 1350227509 -366386643 1515785818
+-215647139 1263305618 -267542546 1350227509
+-148009628 1150016586 -215647139 1263305618
+-144701321 1144475358 -148009628 1150016586
+-144310959 1143821523 -144701321 1144475358
+-117514496 1098938954 -144310959 1143821523
+-91898220 1056033130 -117514496 1098938954
+32640510 847437753 -91898220 1056033130
+52491299 814188797 32640510 847437753
+61837274 798534814 52491299 814188797
+72196640 781183457 61837274 798534814
+99732786 735061960 72196640 781183457
+113083189 712700785 99732786 735061960
+136569629 673362318 113083189 712700785
+137636636 671575141 136569629 673362318
+140605075 666603171 137636636 671575141
+144008697 660902296 140605075 666603171
+183422069 594887113 144008697 660902296
+197327915 571595601 183422069 594887113
+201666427 564328837 197327915 571595601
+245376981 491116116 201666427 564328837
+277494161 437321642 245376981 491116116
+314862237 374732214 277494161 437321642
+319029452 367752364 314862237 374732214
+321901146 362942438 319029452 367752364
+334031986 342623962 321901146 362942438
+337098942 337486983 334031986 342623962
+352753925 311265766 337098942 337486983
+372078373 278898400 352753925 311265766
+400088065 231983741 372078373 278898400
+410108120 215200711 400088065 231983741
+419326364 199760671 410108120 215200711
+437128547 169943014 419326364 199760671
+503597563 58611146 437128547 169943014
+505643777 55183852 503597563 58611146
+527055162 19320986 505643777 55183852
+531451869 11956747 527055162 19320986
+570619967 -53647616 531451869 11956747
+587796268 -82416956 570619967 -53647616
+625219707 -145099114 587796268 -82416956
+636476579 -163953741 625219707 -145099114
+641874753 -172995379 636476579 -163953741
+655254329 -195405417 641874753 -172995379
+663031408 -208431588 655254329 -195405417
+667848097 -216499272 663031408 -208431588
+679490759 -236000077 667848097 -216499272
+683378475 -242511783 679490759 -236000077
+683444575 -242622497 683378475 -242511783
+683919830 -243418522 683444575 -242622497
+710525391 -287981342 683919830 -243418522
+798315595 -435025002 710525391 -287981342
+845866456 -514670023 798315595 -435025002
+848121061 -518446359 845866456 -514670023
+856070443 -531761127 848121061 -518446359
+871116627 -556962640 856070443 -531761127
+905490586 -614537092 871116627 -556962640
+998432080 -770208873 905490586 -614537092
+1029319266 -821943175 998432080 -770208873
+1043809057 -846212761 1029319266 -821943175
+1063237884 -878754954 1043809057 -846212761
+1074183769 -897088696 1063237884 -878754954
+1131838873 -993657757 1074183769 -897088696
+1178328851 -1071525858 1131838873 -993657757
+1266592091 -1219361826 1178328851 -1071525858
+1280448974 -1242571327 1266592091 -1219361826
+1290728296 -1259788615 1280448974 -1242571327
+1465478486 -1552485366 1290728296 -1259788615
+1501255879 -1612410489 1465478486 -1552485366
+1616586962 -1805583574 1501255879 -1612410489
+1737155963 -2007529877 1616586962 -1805583574
+-1748453402 -297985693 -1888400787 -362666474
+-1623721631 -240337254 -1748453402 -297985693
+-1348496291 -113133805 -1623721631 -240337254
+-1295069190 -88440906 -1348496291 -113133805
+-1218657524 -53125018 -1295069190 -88440906
+-1155148799 -23772601 -1218657524 -53125018
+-1131296872 -12748735 -1155148799 -23772601
+-1113584447 -4562419 -1131296872 -12748735
+-1049138605 25223113 -1113584447 -4562419
+-1045976772 26684447 -1049138605 25223113
+-903210205 92668195 -1045976772 26684447
+-883046617 101987388 -903210205 92668195
+-857145917 113958155 -883046617 101987388
+-856264171 114365679 -857145917 113958155
+-853779610 115513992 -856264171 114365679
+-852033065 116321209 -853779610 115513992
+-781753556 148802941 -852033065 116321209
+-767615200 155337397 -781753556 148802941
+-695625994 188609316 -767615200 155337397
+-689425870 191474885 -695625994 188609316
+-681655210 195066323 -689425870 191474885
+-573851411 244891004 -681655210 195066323
+-543762578 258797439 -573851411 244891004
+-478170634 289112677 -543762578 258797439
+-469094717 293307377 -478170634 289112677
+-469046489 293329667 -469094717 293307377
+-426397239 313041267 -469046489 293329667
+-424051517 314125411 -426397239 313041267
+-340256607 352853682 -424051517 314125411
+-327215005 358881240 -340256607 352853682
+-275700213 382690309 -327215005 358881240
+-245571474 396615188 -275700213 382690309
+-208880174 413573146 -245571474 396615188
+-206299951 414765672 -208880174 413573146
+-181321039 426310408 -206299951 414765672
+-180964407 426475236 -181321039 426310408
+-160288583 436031173 -180964407 426475236
+-139552522 445614950 -160288583 436031173
+-111792414 458445097 -139552522 445614950
+-77637137 474230958 -111792414 458445097
+-7970694 506429344 -77637137 474230958
+66381701 540793480 -7970694 506429344
+183422069 594887113 66381701 540793480
+224911171 614062516 183422069 594887113
+235434676 618926262 224911171 614062516
+270259683 635021659 235434676 618926262
+284801752 641742701 270259683 635021659
+376432238 684092413 284801752 641742701
+435229374 711267231 376432238 684092413
+450718069 718425785 435229374 711267231
+509928558 745791646 450718069 718425785
+665437888 817664835 509928558 745791646
+794874148 877487592 665437888 817664835
+814004910 886329434 794874148 877487592
+840063064 898372972 814004910 886329434
+964941903 956089384 840063064 898372972
+994207899 969615521 964941903 956089384
+1022625150 982749385 994207899 969615521
+1078629134 1008633266 1022625150 982749385
+1081878443 1010135029 1078629134 1008633266
+1326679789 1123277138 1081878443 1010135029
+1336308389 1127727278 1326679789 1123277138
+1390424985 1152738847 1336308389 1127727278
+1436768515 1174157866 1390424985 1152738847
+1627791630 1262444791 1436768515 1174157866
+1867420330 1373196210 1627791630 1262444791
+-1251391342 -417431457 -1285607633 -321516739
+-1248486466 -425574373 -1251391342 -417431457
+-1241794486 -444333254 -1248486466 -425574373
+-1240518928 -447908884 -1241794486 -444333254
+-1237555690 -456215398 -1240518928 -447908884
+-1180169079 -617080892 -1237555690 -456215398
+-1176523842 -627299176 -1180169079 -617080892
+-1128381808 -762250378 -1176523842 -627299176
+-1100294320 -840984902 -1128381808 -762250378
+-1098917016 -844845746 -1100294320 -840984902
+-1070814950 -923621134 -1098917016 -844845746
+-1042337273 -1003449433 -1070814950 -923621134
+-984573503 -1165372174 -1042337273 -1003449433
+-965535872 -1218738244 -984573503 -1165372174
+-956771096 -1243307564 -965535872 -1218738244
+-937662545 -1296872434 -956771096 -1243307564
+-935971828 -1301611834 -937662545 -1296872434
+-900566351 -1400860062 -935971828 -1301611834
+-899514389 -1403808911 -900566351 -1400860062
+-898682283 -1406141461 -899514389 -1403808911
+-842930049 -1562425485 -898682283 -1406141461
+-826071673 -1609682692 -842930049 -1562425485
+-808907651 -1657796683 -826071673 -1609682692
+-784629276 -1725853547 -808907651 -1657796683
+-761855793 -1789691912 -784629276 -1725853547
+1183029115 1774770771 1254444672 1473301628
+1254444672 1473301628 1264758922 1429761698
+1264758922 1429761698 1285616751 1341713771
+1285616751 1341713771 1304428175 1262304411
+1304428175 1262304411 1311802937 1231173055
+1311802937 1231173055 1317601206 1206696606
+1317601206 1206696606 1335199602 1132407842
+1335199602 1132407842 1336308389 1127727278
+1336308389 1127727278 1355625300 1046184086
+1355625300 1046184086 1379306698 946216919
+1379306698 946216919 1393020130 888327901
+1393020130 888327901 1404035780 841827128
+1404035780 841827128 1416811498 787896515
+1416811498 787896515 1429342826 734997559
+1429342826 734997559 1434517804 713152232
+1434517804 713152232 1468358062 570301093
+1468358062 570301093 1469235783 566595935
+1469235783 566595935 1481897740 513145548
+1481897740 513145548 1494706315 459076232
+1494706315 459076232 1544166002 250290221
+1544166002 250290221 1546197401 241715003
+1546197401 241715003 1549105866 229437390
+1549105866 229437390 1598963761 18970406
+1598963761 18970406 1648022623 -188123590
+1648022623 -188123590 1654506878 -215495815
+1654506878 -215495815 1715841182 -474408587
+1715841182 -474408587 1719004791 -487763249
+1719004791 -487763249 1727795573 -524872103
+1727795573 -524872103 1747924056 -609841217
+1747924056 -609841217 1854345392 -1059081550
+1854345392 -1059081550 1896055492 -1235153947
+1896055492 -1235153947 1928896418 -1373786563
+-139575003 -267109550 -119250533 -266524838
+-119250533 -266524838 -103049948 -266058765
+-103049948 -266058765 -88846340 -265650143
+-88846340 -265650143 -38213872 -264193504
+-38213872 -264193504 2579838 -263019914
+2579838 -263019914 14153568 -262686951
+14153568 -262686951 15098323 -262659771
+15098323 -262659771 33975828 -262116687
+33975828 -262116687 40901478 -261917443
+40901478 -261917443 83903136 -260680334
+83903136 -260680334 233115939 -256387648
+233115939 -256387648 235612189 -256315833
+235612189 -256315833 262348588 -255546657
+262348588 -255546657 294151940 -254631710
+294151940 -254631710 352637962 -252949132
+352637962 -252949132 353640250 -252920298
+353640250 -252920298 378660843 -252200483
+378660843 -252200483 442894707 -250352546
+442894707 -250352546 560956331 -246956045
+560956331 -246956045 625763440 -245091617
+625763440 -245091617 632138524 -244908213
+632138524 -244908213 655967263 -244222687
+655967263 -244222687 682298742 -243465159
+682298742 -243465159 682789050 -243451054
+682789050 -243451054 683919830 -243418522
+683919830 -243418522 708646185 -242707173
+708646185 -242707173 718300422 -242429431
+718300422 -242429431 721596891 -242334595
+721596891 -242334595 730619911 -242075013
+730619911 -242075013 785437208 -240497981
+785437208 -240497981 870596885 -238048032
+870596885 -238048032 936830651 -236142560
+936830651 -236142560 974971004 -235045305
+974971004 -235045305 1036380737 -233278615
+1036380737 -233278615 1042705743 -233096652
+1042705743 -233096652 1297139391 -225776879
+1297139391 -225776879 1336091592 -224656268
+1336091592 -224656268 1630031381 -216199948
+1630031381 -216199948 1654506878 -215495815
+1654506878 -215495815 1787076935 -211681923
+1787076935 -211681923 2081658360 -203207143
+-1104334171 -1628425713 -949424281 -1589313522
+-949424281 -1589313522 -842930049 -1562425485
+-842930049 -1562425485 -735532205 -1535309301
+-735532205 -1535309301 -697066583 -1525597366
+-697066583 -1525597366 -666739754 -1517940342
+-666739754 -1517940342 -642280056 -1511764672
+-642280056 -1511764672 -574199147 -1494575365
+-574199147 -1494575365 -464860728 -1466969218
+-464860728 -1466969218 -450020781 -1463222377
+-450020781 -1463222377 -422135845 -1456181890
+-422135845 -1456181890 -354243649 -1439040231
+-354243649 -1439040231 -96048261 -1373850155
+-96048261 -1373850155 -72876873 -1367999762
+-72876873 -1367999762 31430862 -1341663779
+31430862 -1341663779 139362239 -1314412887
+139362239 -1314412887 195368237 -1300272297
+195368237 -1300272297 259934157 -1283970467
+259934157 -1283970467 409572127 -1246189348
+409572127 -1246189348 412350205 -1245487929
+838025038 1199465019 901670253 1219692052
+901670253 1219692052 926826358 1227686893
+926826358 1227686893 997962769 1250294697
+997962769 1250294697 1285616751 1341713771
+1285616751 1341713771 1386323940 1373719439
+1386323940 1373719439 1471428210 1400766357
+1471428210 1400766357 1531407131 1419828208
+1531407131 1419828208 1633735034 1452348954
+1633735034 1452348954 1775170566 1497298464
+1775170566 1497298464 1982632917 1563231902
+1982632917 1563231902 2006865240 1570933156
+2006865240 1570933156 2051553381 1585135458
+439800457 372606540 417437724 383136355
+444106695 370578886 439800457 372606540
+499029375 344717751 444106695 370578886
+545264630 322947217 499029375 344717751
+550002939 320716115 545264630 322947217
+569324861 311618110 550002939 320716115
+612004355 291521857 569324861 311618110
+711101352 244860610 612004355 291521857
+727328261 237219937 711101352 244860610
+743235165 229729942 727328261 237219937
+816946369 195021961 743235165 229729942
+820021160 193574152 816946369 195021961
+833102554 187414589 820021160 193574152
+839628093 184341945 833102554 187414589
+851896024 178565413 839628093 184341945
+909972802 151219127 851896024 178565413
+919260057 146846089 909972802 151219127
+925785935 143773286 919260057 146846089
+951190686 131811094 925785935 143773286
+1042897841 88629460 951190686 131811094
+1110524983 56786247 1042897841 88629460
+1159954902 33511459 1110524983 56786247
+1179166122 24465579 1159954902 33511459
+1193102517 17903427 1179166122 24465579
+1282891535 -24375024 1193102517 17903427
+1587626793 -167864003 1282891535 -24375024
+-396650922 -333295979 -502702642 -379463704
+-387964099 -329514325 -396650922 -333295979
+-368961968 -321242087 -387964099 -329514325
+-360805384 -317691263 -368961968 -321242087
+-352746598 -314183015 -360805384 -317691263
+-304801778 -293311092 -352746598 -314183015
+-232080656 -261653248 -304801778 -293311092
+-208514195 -251394010 -232080656 -261653248
+-170801749 -234976569 -208514195 -251394010
+-146471368 -224384771 -170801749 -234976569
+-130259722 -217327320 -146471368 -224384771
+-100949656 -204567706 -130259722 -217327320
+-71305620 -191662703 -100949656 -204567706
+-25816638 -171859886 -71305620 -191662703
+-3412798 -162106774 -25816638 -171859886
+20756695 -151585016 -3412798 -162106774
+83110285 -124440492 20756695 -151585016
+121637981 -107668147 83110285 -124440492
+150250752 -95212087 121637981 -107668147
+154777696 -93241363 150250752 -95212087
+216709707 -66280366 154777696 -93241363
+222969906 -63555100 216709707 -66280366
+328788598 -17488820 222969906 -63555100
+334306775 -15086580 328788598 -17488820
+351778866 -7480416 334306775 -15086580
+451918890 36113757 351778866 -7480416
+496426071 55489165 451918890 36113757
+503597563 58611146 496426071 55489165
+544932723 76605671 503597563 58611146
+560640019 83443563 544932723 76605671
+753654158 167468826 560640019 83443563
+798817322 187129804 753654158 167468826
+813839837 193669588 798817322 187129804
+816946369 195021961 813839837 193669588
+850456729 209610099 816946369 195021961
+863410696 215249378 850456729 209610099
+920997707 240318856 863410696 215249378
+1010943676 279475230 920997707 240318856
+1011119742 279551877 1010943676 279475230
+1058947471 300372826 1011119742 279551877
+1114391131 324509235 1058947471 300372826
+1119458900 326715398 1114391131 324509235
+1120852368 327322019 1119458900 326715398
+1212605161 367264962 1120852368 327322019
+1205329621 -2144704708 1529449927 -1877436419
+1529449927 -1877436419 1616586962 -1805583574
+1616586962 -1805583574 1642826397 -1783946643
+1642826397 -1783946643 1645718082 -1781562171
+-94163870 268666421 -102791782 274009194
+-88573713 265204756 -94163870 268666421
+-79918647 259845169 -88573713 265204756
+-76765888 257892846 -79918647 259845169
+-64446557 250264188 -76765888 257892846
+-26604803 226830954 -64446557 250264188
+-23968401 225198381 -26604803 226830954
+-21770882 223837583 -23968401 225198381
+-6323544 214271930 -21770882 223837583
+6825515 206129469 -6323544 214271930
+71779370 165907261 6825515 206129469
+221682343 73080922 71779370 165907261
+224453271 71365044 221682343 73080922
+225865904 70490281 224453271 71365044
+236170098 64109483 225865904 70490281
+300946950 23996882 236170098 64109483
+332036055 4745178 300946950 23996882
+351778866 -7480416 332036055 4745178
+416720962 -47695343 351778866 -7480416
+491658474 -94099859 416720962 -47695343
+512512207 -107013384 491658474 -94099859
+534825191 -120830539 512512207 -107013384
+621566180 -174544273 534825191 -120830539
+624939885 -176633416 621566180 -174544273
+655254329 -195405417 624939885 -176633416
+667592700 -203045865 655254329 -195405417
+672350842 -205992311 667592700 -203045865
+696796304 -221129987 672350842 -205992311
+699578695 -222852963 696796304 -221129987
+705413580 -226466173 699578695 -222852963
+717434616 -233910114 705413580 -226466173
+730619911 -242075013 717434616 -233910114
+745232404 -251123695 730619911 -242075013
+757089700 -258466240 745232404 -251123695
+821515478 -298361440 757089700 -258466240
+900530702 -347291050 821515478 -298361440
+901289272 -347760789 900530702 -347291050
+962027641 -385372588 901289272 -347760789
+1008312234 -414033990 962027641 -385372588
+1088629374 -463769802 1008312234 -414033990
+1106980115 -475133367 1088629374 -463769802
+1172382804 -515633512 1106980115 -475133367
+1362654005 -633457587 1172382804 -515633512
+1419654357 -668754645 1362654005 -633457587
+-448240046 1933086959 -434753250 1857062948
+-434753250 1857062948 -387995013 1593490452
+-387995013 1593490452 -377517460 1534429313
+-377517460 1534429313 -377393767 1533732063
+-377393767 1533732063 -369852674 1491223516
+-369852674 1491223516 -334926018 1294344707
+-334926018 1294344707 -313378155 1172881103
+-313378155 1172881103 -310781410 1158243454
+-310781410 1158243454 -306649730 1134953500
+-306649730 1134953500 -286004046 1018575408
+-286004046 1018575408 -279368610 981171976
+-279368610 981171976 -241147887 765724773
+-241147887 765724773 -239873582 758541615
+-239873582 758541615 -239644094 757248012
+-239644094 757248012 -217734790 633746988
+-217734790 633746988 -216176796 624964698
+-216176796 624964698 -214144547 613509071
+-214144547 613509071 -192136402 489450893
+-192136402 489450893 -185843494 453978267
+-185843494 453978267 -180964407 426475236
+-180964407 426475236 -180829511 425714841
+-180829511 425714841 -178640403 413375009
+-178640403 413375009 -177637014 407718983
+-177637014 407718983 -174492578 389994046
+-174492578 389994046 -173758609 385856721
+-173758609 385856721 -169566344 362225254
+-169566344 362225254 -168592007 356732994
+-168592007 356732994 -162536675 322599564
+-162536675 322599564 -153541709 271895648
+-153541709 271895648 -144914210 223263117
+-144914210 223263117 -142496016 209631948
+-142496016 209631948 -142283077 208431628
+-142283077 208431628 -140523963 198515639
+-140523963 198515639 -139371410 192018789
+-139371410 192018789 -124374623 107483083
+-124374623 107483083 -120030228 82994072
+-120030228 82994072 -113372947 45467505
+-113372947 45467505 -107427917 11955837
+-107427917 11955837 -106637565 7500685
+-106637565 7500685 -95049558 -57819995
+-95049558 -57819995 -87931160 -97945848
+-87931160 -97945848 -78152255 -153068761
+-78152255 -153068761 -71305620 -191662703
+-71305620 -191662703 -65052458 -226911285
+-65052458 -226911285 -63295691 -236814040
+-352102531 -1505182278 -340953161 -1500428772
+-340953161 -1500428772 -335163710 -1497960455
+-335163710 -1497960455 -46911640 -1375064908
+-46911640 -1375064908 -39618894 -1371955664
+-39618894 -1371955664 31430862 -1341663779
+31430862 -1341663779 142285086 -1294401359
+142285086 -1294401359 190735195 -1273744777
+190735195 -1273744777 220194182 -1261185012
+220194182 -1261185012 388337532 -1189497517
+388337532 -1189497517 407904797 -1181155063
+407904797 -1181155063 425581702 -1173618559
+425581702 -1173618559 457818415 -1159874517
+457818415 -1159874517 515737553 -1135180838
+515737553 -1135180838 607917662 -1095880080
+607917662 -1095880080 765957726 -1028500096
+765957726 -1028500096 778178252 -1023289905
+778178252 -1023289905 789163799 -1018606245
+789163799 -1018606245 794307955 -1016413047
+794307955 -1016413047 953395294 -948586559
+953395294 -948586559 1000776082 -928385879
+1000776082 -928385879 1008829712 -924952234
+1008829712 -924952234 1050152606 -907334322
+1050152606 -907334322 1074183769 -897088696
+1074183769 -897088696 1090161367 -890276687
+1090161367 -890276687 1206819091 -840539960
+1206819091 -840539960 1238653503 -826967438
+1238653503 -826967438 1251525555 -821479471
+1251525555 -821479471 1288699405 -805630494
+1288699405 -805630494 1747924056 -609841217
+1747924056 -609841217 1806226305 -584984200
+1806226305 -584984200 1862098116 -561163393
+-650911164 -500519358 -652892123 -514557584
+-650078874 -494621272 -650911164 -500519358
+-644109357 -452317827 -650078874 -494621272
+-643591127 -448645351 -644109357 -452317827
+-627866674 -337212784 -643591127 -448645351
+-626002445 -324001781 -627866674 -337212784
+-625083070 -317486565 -626002445 -324001781
+-620168913 -282662007 -625083070 -317486565
+-618255572 -269102965 -620168913 -282662007
+-612257546 -226597483 -618255572 -269102965
+-604173778 -169311236 -612257546 -226597483
+-603626240 -165431066 -604173778 -169311236
+-595952907 -111053396 -603626240 -165431066
+-590082530 -69452507 -595952907 -111053396
+-583944832 -25957235 -590082530 -69452507
+-580749924 -3316270 -583944832 -25957235
+-572928036 52114149 -580749924 -3316270
+-567170907 92912491 -572928036 52114149
+-566779722 95684653 -567170907 92912491
+-565042625 107994725 -566779722 95684653
+-564151625 114308870 -565042625 107994725
+-561148023 135594128 -564151625 114308870
+-551568182 203482419 -561148023 135594128
+-550869367 208434627 -551568182 203482419
+-549051075 221320090 -550869367 208434627
+-543762578 258797439 -549051075 221320090
+-535578985 316791107 -543762578 258797439
+-533800438 329394923 -535578985 316791107
+-531098700 348540993 -533800438 329394923
+-528491923 367014126 -531098700 348540993
+-523785076 400369561 -528491923 367014126
+-520698361 422243810 -523785076 400369561
+-513975050 469889072 -520698361 422243810
+-509869121 498986063 -513975050 469889072
+-496032261 597042048 -509869121 498986063
+-490554785 635858608 -496032261 597042048
+-484503501 678741504 -490554785 635858608
+-477739340 726676258 -484503501 678741504
+-470654218 776885524 -477739340 726676258
+-468776948 790188942 -470654218 776885524
+-466522027 806168620 -468776948 790188942
+-465898384 810588116 -466522027 806168620
+-460415955 849439776 -465898384 810588116
+-453045245 901672886 -460415955 849439776
+-428322205 1076874632 -453045245 901672886
+-421856093 1122697239 -428322205 1076874632
+-421008117 1128706484 -421856093 1122697239
+-415613750 1166934091 -421008117 1128706484
+-412834102 1186632283 -415613750 1166934091
+-395413473 1310084924 -412834102 1186632283
+-369852674 1491223516 -395413473 1310084924
+-366386643 1515785818 -369852674 1491223516
+-363263360 1537919204 -366386643 1515785818
+-355672903 1591709566 -363263360 1537919204
+-335135758 1737247646 -355672903 1591709566
+-324395856 1813356799 -335135758 1737247646
+-297386431 2004761188 -324395856 1813356799
+-1908575156 393013513 -2126439478 486247163
+-1879070313 380387103 -1908575156 393013513
+-1780594780 338245126 -1879070313 380387103
+-1759928845 329401271 -1780594780 338245126
+-1484040859 211336764 -1759928845 329401271
+-1462558743 202143629 -1484040859 211336764
+-1396514888 173880582 -1462558743 202143629
+-1236906220 105577069 -1396514888 173880582
+-1119147725 55183071 -1236906220 105577069
+-1097419979 45884820 -1119147725 55183071
+-1084430248 40325947 -1097419979 45884820
+-1049138605 25223113 -1084430248 40325947
+-1046958267 24290052 -1049138605 25223113
+-1017239248 11571987 -1046958267 24290052
+-965972870 -10367133 -1017239248 11571987
+-929584205 -25939431 -965972870 -10367133
+-911069336 -33862751 -929584205 -25939431
+-792901990 -84431714 -911069336 -33862751
+-785845294 -87451583 -792901990 -84431714
+-719349415 -115908070 -785845294 -87451583
+-679782769 -132840365 -719349415 -115908070
+-674634405 -135043574 -679782769 -132840365
+-648983066 -146020901 -674634405 -135043574
+-603626240 -165431066 -648983066 -146020901
+-600760197 -166657571 -603626240 -165431066
+-544374685 -190787392 -600760197 -166657571
+-534940396 -194824736 -544374685 -190787392
+-468048000 -223450911 -534940396 -194824736
+-454762664 -229136286 -468048000 -223450911
+-446890334 -232505199 -454762664 -229136286
+-410246871 -248186536 -446890334 -232505199
+-400227215 -252474384 -410246871 -248186536
+-351475774 -273337253 -400227215 -252474384
+-304801778 -293311092 -351475774 -273337253
+-278826596 -304427006 -304801778 -293311092
+-248364731 -317462967 -278826596 -304427006
+-168152952 -351789087 -248364731 -317462967
+-83499983 -388015786 -168152952 -351789087
+-44273657 -404802442 -83499983 -388015786
+-24448148 -413286643 -44273657 -404802442
+-19711799 -415313533 -24448148 -413286643
+12596647 -429139727 -19711799 -415313533
+45698670 -443305527 12596647 -429139727
+73648779 -455266598 45698670 -443305527
+104893554 -468637600 73648779 -455266598
+108634529 -470238527 104893554 -468637600
+114348807 -472683916 108634529 -470238527
+120896005 -475485747 114348807 -472683916
+235865895 -524686380 120896005 -475485747
+253599797 -532275490 235865895 -524686380
+276345219 -542009249 253599797 -532275490
+287972680 -546985147 276345219 -542009249
+316664171 -559263488 287972680 -546985147
+342975020 -570523048 316664171 -559263488
+367744028 -581122787 342975020 -570523048
+449052739 -615918332 367744028 -581122787
+539289501 -654534580 449052739 -615918332
+542159493 -655762775 539289501 -654534580
+599681448 -680378929 542159493 -655762775
+640938667 -698034693 599681448 -680378929
+767646023 -752258299 640938667 -698034693
+804314348 -767950276 767646023 -752258299
+849762385 -787399474 804314348 -767950276
+882100759 -801238475 849762385 -787399474
+1028737988 -863990943 882100759 -801238475
+1033444165 -866004922 1028737988 -863990943
+1063237884 -878754954 1033444165 -866004922
+1090161367 -890276687 1063237884 -878754954
+1174858948 -926522478 1090161367 -890276687
+1329496453 -992698613 1174858948 -926522478
+1410652056 -1027428637 1329496453 -992698613
+1739874221 -1168317166 1410652056 -1027428637
+1896055492 -1235153947 1739874221 -1168317166
+2063948869 -1307002848 1896055492 -1235153947
+2108014085 -1325860276 2063948869 -1307002848
+233210753 -922238323 234383863 -918479351
+234383863 -918479351 244011493 -887629742
+244011493 -887629742 253428638 -857454587
+253428638 -857454587 256372875 -848020432
+256372875 -848020432 258218338 -842107055
+258218338 -842107055 265576487 -818529499
+265576487 -818529499 265859833 -817621578
+265859833 -817621578 279604594 -773579538
+279604594 -773579538 296667994 -718903653
+296667994 -718903653 329505290 -613683812
+329505290 -613683812 340392467 -578798265
+340392467 -578798265 342975020 -570523048
+342975020 -570523048 346971178 -557718244
+346971178 -557718244 349054564 -551042493
+349054564 -551042493 374371774 -469919103
+374371774 -469919103 382871143 -442684759
+382871143 -442684759 386054507 -432484374
+386054507 -432484374 397377669 -396201810
+397377669 -396201810 413265090 -345294091
+413265090 -345294091 424851473 -308168091
+424851473 -308168091 442894707 -250352546
+442894707 -250352546 462773592 -186655062
+462773592 -186655062 462922079 -186179268
+462922079 -186179268 468249020 -169110268
+468249020 -169110268 477630889 -139048147
+477630889 -139048147 480349439 -130337155
+480349439 -130337155 491658474 -94099859
+491658474 -94099859 512519911 -27254005
+512519911 -27254005 523460166 7801617
+523460166 7801617 527055162 19320986
+527055162 19320986 537913770 54114991
+537913770 54114991 544932723 76605671
+544932723 76605671 552321299 100280727
+552321299 100280727 582580649 197240110
+582580649 197240110 594393834 235092843
+594393834 235092843 612004355 291521857
+612004355 291521857 619649223 316018142
+619649223 316018142 621772885 322822945
+621772885 322822945 638044438 374961531
+638044438 374961531 638564609 376628306
+638564609 376628306 638595781 376728190
+638595781 376728190 642494634 389221200
+642494634 389221200 642875922 390442952
+642875922 390442952 643007527 390864651
+643007527 390864651 709214535 603010341
+709214535 603010341 746027352 720968858
+746027352 720968858 756330882 753984237
+756330882 753984237 794874148 877487592
+794874148 877487592 802138264 900763842
+802138264 900763842 811685325 931355284
+811685325 931355284 814362180 939932673
+814362180 939932673 816462157 946661584
+816462157 946661584 830335906 991116939
+830335906 991116939 839877966 1021692358
+839877966 1021692358 852399659 1061815348
+852399659 1061815348 870826577 1120860323
+870826577 1120860323 877956983 1143708130
+877956983 1143708130 888172530 1176441590
+888172530 1176441590 895722904 1200635089
+895722904 1200635089 901670253 1219692052
+901670253 1219692052 911066311 1249799639
+911066311 1249799639 932064469 1317083583
+932064469 1317083583 1059838074 1726505791
+-1747616665 573669010 -1659646703 528339135
+-1659646703 528339135 -1627956530 512009566
+-1627956530 512009566 -1562451798 478255757
+-1562451798 478255757 -1502221368 447219734
+-1502221368 447219734 -1428998173 409488693
+-1428998173 409488693 -1423619267 406717007
+-1423619267 406717007 -1215947358 299706144
+-1215947358 299706144 -1044411980 211316006
+-1044411980 211316006 -983219182 179784085
+-983219182 179784085 -921288787 147872090
+-921288787 147872090 -881935660 127593892
+-881935660 127593892 -866532228 119656687
+-866532228 119656687 -857480915 114992653
+-857480915 114992653 -856264171 114365679
+-856264171 114365679 -851178450 111745068
+-851178450 111745068 -847097971 109642446
+-847097971 109642446 -762521846 66061375
+-762521846 66061375 -762280924 65937231
+-762280924 65937231 -750639830 59938713
+-750639830 59938713 -731507273 50079935
+-731507273 50079935 -678341166 22684073
+-678341166 22684073 -672046122 19440312
+-672046122 19440312 -664925649 15771217
+-664925649 15771217 -662323236 14430224
+-662323236 14430224 -618201519 -8305172
+-618201519 -8305172 -583944832 -25957235
+-583944832 -25957235 -561732644 -37402911
+-561732644 -37402911 -485212666 -76832745
+-485212666 -76832745 -477107570 -81009204
+-477107570 -81009204 -442038931 -99079656
+-442038931 -99079656 -313674582 -165224277
+-313674582 -165224277 -289383789 -177741034
+-289383789 -177741034 -218642605 -214193123
+-694162522 1190025879 -487330917 1172879468
+-487330917 1172879468 -415613750 1166934091
+-415613750 1166934091 -310781410 1158243454
+-310781410 1158243454 -232884625 1151785784
+-232884625 1151785784 -144701321 1144475358
+-144701321 1144475358 -139792035 1144068377
+-139792035 1144068377 -64112948 1137794555
+-64112948 1137794555 -52875641 1136862978
+-52875641 1136862978 -51966057 1136787573
+-51966057 1136787573 170571410 1118339142
+170571410 1118339142 233709142 1113105002
+233709142 1113105002 253582173 1111457521
+253582173 1111457521 396084246 1099644051
+396084246 1099644051 421321249 1097551895
+421321249 1097551895 490808041 1091791416
+490808041 1091791416 532938730 1088298768
+532938730 1088298768 629895802 1080260994
+629895802 1080260994 656376938 1078065698
+656376938 1078065698 696886837 1074707414
+696886837 1074707414 722766411 1072561989
+722766411 1072561989 732540289 1071751731
+732540289 1071751731 756286890 1069783130
+756286890 1069783130 852399659 1061815348
+852399659 1061815348 880410797 1059493216
+577845266 -426517000 576607395 -429405519
+599245161 -376581267 577845266 -426517000
+609873661 -351780120 599245161 -376581267
+644323628 -271392607 609873661 -351780120
+655967263 -244222687 644323628 -271392607
+661285806 -231812096 655967263 -244222687
+667848097 -216499272 661285806 -231812096
+672350842 -205992311 667848097 -216499272
+675786742 -197974788 672350842 -205992311
+679780800 -188654824 675786742 -197974788
+686885015 -172077446 679780800 -188654824
+687999192 -169477562 686885015 -172077446
+738348994 -51988468 687999192 -169477562
+780377820 46083985 738348994 -51988468
+787314071 62269429 780377820 46083985
+797906416 86986208 787314071 62269429
+830437141 162895253 797906416 86986208
+832925681 168702155 830437141 162895253
+839628093 184341945 832925681 168702155
+843429660 193212737 839628093 184341945
+846034627 199291316 843429660 193212737
+850456729 209610099 846034627 199291316
+863220737 239394363 850456729 209610099
+885447065 291258540 863220737 239394363
+924088046 381425603 885447065 291258540
+937802336 413427310 924088046 381425603
+952832132 448498690 937802336 413427310
+961327493 468322248 952832132 448498690
+815095227 -306250929 821515478 -298361440
+821515478 -298361440 841865950 -273353878
+841865950 -273353878 870596885 -238048032
+870596885 -238048032 933870419 -160294709
+933870419 -160294709 957202204 -131623579
+957202204 -131623579 980191863 -103372866
+980191863 -103372866 1056116444 -10073377
+1056116444 -10073377 1093379090 35716613
+1093379090 35716613 1110524983 56786247
+1110524983 56786247 1264349686 245812858
+1264349686 245812858 1272027575 255247789
+1272027575 255247789 1302270080 292411119
+1302270080 292411119 1356312826 358821241
+1356312826 358821241 1433837391 454086861
+1433837391 454086861 1481897740 513145548
+1481897740 513145548 1502538936 538510364
+-1582923280 -1994951201 -1404476116 -1803708962
+-1404476116 -1803708962 -1339488917 -1734062031
+-1339488917 -1734062031 -1210375318 -1595690688
+-1210375318 -1595690688 -1032719763 -1405296819
+-1032719763 -1405296819 -994582895 -1364425449
+-994582895 -1364425449 -935971828 -1301611834
+-935971828 -1301611834 -933025521 -1298454269
+-933025521 -1298454269 -871897749 -1232943495
+-871897749 -1232943495 -858158294 -1218218889
+-858158294 -1218218889 -810610831 -1167262163
+-810610831 -1167262163 -708162298 -1057467833
+-708162298 -1057467833 -654312755 -999757153
+-654312755 -999757153 -546142356 -883830687
+-546142356 -883830687 -537154496 -874198376
+-537154496 -874198376 -515384604 -850867532
+-515384604 -850867532 -513126102 -848447091
+-513126102 -848447091 -508432535 -843416984
+-508432535 -843416984 -403710827 -731186487
+-403710827 -731186487 -353324585 -677187436
+-353324585 -677187436 -312330982 -633254496
+-312330982 -633254496 -279920488 -598520095
+-279920488 -598520095 -260369511 -577567268
+-260369511 -577567268 -219379373 -533638042
+-219379373 -533638042 -217293250 -531402339
+-217293250 -531402339 -200348194 -513242284
+-200348194 -513242284 -172381514 -483270327
+-172381514 -483270327 -95590896 -400973645
+-95590896 -400973645 -83499983 -388015786
+-83499983 -388015786 -58301057 -361010038
+-58301057 -361010038 -58251262 -360956672
+-58251262 -360956672 -53128210 -355466286
+-53128210 -355466286 -981316 -299580339
+-981316 -299580339 17194909 -280100836
+17194909 -280100836 21080809 -275936309
+21080809 -275936309 33975828 -262116687
+33975828 -262116687 38970965 -256763387
+38970965 -256763387 61923072 -232165561
+61923072 -232165561 76930031 -216082568
+76930031 -216082568 100425241 -190902698
+100425241 -190902698 124244158 -165375909
+124244158 -165375909 127014738 -162406672
+127014738 -162406672 167154149 -119389172
+167154149 -119389172 168114551 -118359907
+168114551 -118359907 216709707 -66280366
+216709707 -66280366 221225201 -61441101
+221225201 -61441101 294091339 16649708
+294091339 16649708 300946950 23996882
+300946950 23996882 335311705 60825669
+335311705 60825669 341139261 67071075
+341139261 67071075 437128547 169943014
+437128547 169943014 464303291 199066250
+464303291 199066250 489939957 226541125
+489939957 226541125 496457277 233525752
+496457277 233525752 569324861 311618110
+569324861 311618110 577126564 319979213
+577126564 319979213 597289501 341587879
+597289501 341587879 627658219 374134104
+627658219 374134104 628223193 374739588
+628223193 374739588 635437864 382471568
+635437864 382471568 641673075 389153858
+641673075 389153858 642875922 390442952
+642875922 390442952 643891615 391531473
+643891615 391531473 914867987 681937477
+914867987 681937477 935197048 703724179
+935197048 703724179 950576264 720206120
+950576264 720206120 972359439 743551199
+972359439 743551199 1130482417 913011961
+1130482417 913011961 1142171230 925538889
+1142171230 925538889 1165281665 950306395
+1165281665 950306395 1326679789 1123277138
+1326679789 1123277138 1335199602 1132407842
+1335199602 1132407842 1409947300 1212515122
+1409947300 1212515122 1423422286 1226956296
+1423422286 1226956296 1453696434 1259401170
+1453696434 1259401170 1522906391 1333573641
+1522906391 1333573641 1633735034 1452348954
+1633735034 1452348954 1979502394 1822908634
+1979502394 1822908634 2141323368 1996332546
+-892815021 -563653521 -900493081 -571566598
+-882537215 -553061122 -892815021 -563653521
+-860588130 -530440199 -882537215 -553061122
+-812443956 -480822383 -860588130 -530440199
+-745350275 -411675036 -812443956 -480822383
+-701549794 -366533869 -745350275 -411675036
+-678905426 -343196382 -701549794 -366533869
+-669959281 -333976405 -678905426 -343196382
+-658709116 -322381884 -669959281 -333976405
+-628710167 -291464699 -658709116 -322381884
+-620168913 -282662007 -628710167 -291464699
+-606114067 -268176957 -620168913 -282662007
+-577237733 -238416749 -606114067 -268176957
+-567256631 -228130136 -577237733 -238416749
+-534940396 -194824736 -567256631 -228130136
+-519146640 -178547550 -534940396 -194824736
+-506091562 -165092869 -519146640 -178547550
+-496187715 -154885876 -506091562 -165092869
+-442038931 -99079656 -496187715 -154885876
+-345991049 -91850 -442038931 -99079656
+-331645950 14692336 -345991049 -91850
+-326633956 19857742 -331645950 14692336
+-313191539 33711617 -326633956 19857742
+-286049317 61684634 -313191539 33711617
+-221643812 128061522 -286049317 61684634
+-215822880 134060627 -221643812 128061522
+-180206438 170767250 -215822880 134060627
+-156610449 195085488 -180206438 170767250
+-143640354 208452584 -156610449 195085488
+-142496016 209631948 -143640354 208452584
+-129022966 223517394 -142496016 209631948
+-108045350 245137113 -129022966 223517394
+-96222894 257321441 -108045350 245137113
+-88573713 265204756 -96222894 257321441
+-79649280 274402355 -88573713 265204756
+-73960504 280265258 -79649280 274402355
+-66842705 287600926 -73960504 280265258
+-59214046 295463090 -66842705 287600926
+-39681164 315593852 -59214046 295463090
+-21012324 334834127 -39681164 315593852
+4021044 360633739 -21012324 334834127
+13527121 370430786 4021044 360633739
+15350326 372309798 13527121 370430786
+174266022 536089734 15350326 372309798
+201666427 564328837 174266022 536089734
+246450301 610483496 201666427 564328837
+270259683 635021659 246450301 610483496
+282095638 647219900 270259683 635021659
+311596134 677623374 282095638 647219900
+414717390 783901062 311596134 677623374
+451352830 821657873 414717390 783901062
+518778899 891147782 451352830 821657873
+528408205 901071831 518778899 891147782
+612217732 987446679 528408205 901071831
+621624826 997141714 612217732 987446679
+659032191 1035694078 621624826 997141714
+676451826 1053646910 659032191 1035694078
+681856294 1059216802 676451826 1053646910
+696886837 1074707414 681856294 1059216802
+734788722 1113769435 696886837 1074707414
+808924678 1190174614 734788722 1113769435
+814784394 1196213690 808924678 1190174614
+892311701 1276114025 814784394 1196213690
+932064469 1317083583 892311701 1276114025
+1057372283 1446226935 932064469 1317083583
+-1974115694 33033844 -1881659693 160963955
+-1881659693 160963955 -1861323858 189102372
+-1861323858 189102372 -1783887806 296249582
+-1783887806 296249582 -1759928845 329401271
+-1759928845 329401271 -1627956530 512009566
+-1627956530 512009566 -1618898284 524543338
+-1618898284 524543338 -1607583214 540199847
+-1607583214 540199847 -1592441890 561150691
+-1592441890 561150691 -1556389307 611036159
+-1556389307 611036159 -1548012363 622627223
+-1548012363 622627223 -1518201943 663875495
+-1518201943 663875495 -1502508645 685590098
+-1502508645 685590098 -1313176800 947565993
+-1313176800 947565993 -1288955985 981080006
+-1288955985 981080006 -1254488811 1028771766
+-1254488811 1028771766 -1252945251 1030907568
+-1252945251 1030907568 -1213864696 1084982800
+-1213864696 1084982800 -1213554262 1085412343
+-1213554262 1085412343 -1184670674 1125378171
+-1184670674 1125378171 -1131318398 1199200989
+230948982 64282420 233854294 64186188
+233854294 64186188 236170098 64109483
+236170098 64109483 335311705 60825669
+335311705 60825669 340203404 60663644
+340203404 60663644 431327359 57645395
+431327359 57645395 496426071 55489165
+496426071 55489165 505643777 55183852
+505643777 55183852 537913770 54114991
+537913770 54114991 575749530 52861777
+575749530 52861777 608067106 51791340
+608067106 51791340 682735100 49318152
+682735100 49318152 765666795 46571250
+765666795 46571250 780377820 46083985
+780377820 46083985 821138265 44733899
+821138265 44733899 826199997 44566242
+826199997 44566242 862769904 43354957
+862769904 43354957 875906654 42919835
+875906654 42919835 991990733 39074845
+991990733 39074845 1026342220 37937039
+1026342220 37937039 1093379090 35716613
+1093379090 35716613 1159954902 33511459
+1159954902 33511459 1183544793 32730103
+1183544793 32730103 1214857469 31692951
+1214857469 31692951 1344005201 27415260
+1344005201 27415260 1525055414 21418432
+1525055414 21418432 1598963761 18970406
+1598963761 18970406 1729869352 14634490
+1729869352 14634490 1734591042 14478097
+-868193676 1104278235 -891914195 1146760588
+-828049649 1032382141 -868193676 1104278235
+-808308424 997026521 -828049649 1032382141
+-715992792 831693497 -808308424 997026521
+-698096018 799641203 -715992792 831693497
+-649203002 712076075 -698096018 799641203
+-642199301 699532770 -649203002 712076075
+-608081532 638429425 -642199301 699532770
+-590235529 606468060 -608081532 638429425
+-580278964 588636312 -590235529 606468060
+-526603237 492505569 -580278964 588636312
+-513975050 469889072 -526603237 492505569
+-485543254 418969041 -513975050 469889072
+-455903906 365886340 -485543254 418969041
+-447276593 350435222 -455903906 365886340
+-443846313 344291750 -447276593 350435222
+-429757820 319059912 -443846313 344291750
+-426397239 313041267 -429757820 319059912
+-417922991 297864280 -426397239 313041267
+-402181594 269672167 -417922991 297864280
+-392430599 252208586 -402181594 269672167
+-386631467 241822610 -392430599 252208586
+-374219851 219593980 -386631467 241822610
+-369949895 211946685 -374219851 219593980
+-359325317 192918559 -369949895 211946685
+-338839019 156228546 -359325317 192918559
+-335453888 150165934 -338839019 156228546
+-292399364 73057273 -335453888 150165934
+-286049317 61684634 -292399364 73057273
+-238373781 -23700045 -286049317 61684634
+-237637829 -25018100 -238373781 -23700045
+-215702868 -64302600 -237637829 -25018100
+-209379444 -75627559 -215702868 -64302600
+-188640004 -112770937 -209379444 -75627559
+-178582649 -130783195 -188640004 -112770937
+-140065074 -199766388 -178582649 -130783195
+-130259722 -217327320 -140065074 -199766388
+-122463545 -231289912 -130259722 -217327320
+-103049948 -266058765 -122463545 -231289912
+-80599109 -306267179 -103049948 -266058765
+-69426878 -326276127 -80599109 -306267179
+-53128210 -355466286 -69426878 -326276127
+-19711799 -415313533 -53128210 -355466286
+-11958200 -429199869 -19711799 -415313533
+1994130 -454187847 -11958200 -429199869
+2132447 -454435566 1994130 -454187847
+23074602 -491941996 2132447 -454435566
+46906000 -534622927 23074602 -491941996
+58179877 -554813920 46906000 -534622927
+68356944 -573040576 58179877 -554813920
+116618421 -659474646 68356944 -573040576
+137285373 -696488201 116618421 -659474646
+142860882 -706473680 137285373 -696488201
+143892304 -708320908 142860882 -706473680
+151468020 -721888664 143892304 -708320908
+187315792 -786090365 151468020 -721888664
+201859828 -812138060 187315792 -786090365
+210471033 -827560331 201859828 -812138060
+244011493 -887629742 210471033 -827560331
+254071594 -905646917 244011493 -887629742
+311318527 -1008173524 254071594 -905646917
+325950011 -1034377834 311318527 -1008173524
+338833351 -1057451300 325950011 -1034377834
+338969186 -1057694575 338833351 -1057451300
+353285119 -1083333747 338969186 -1057694575
+407904797 -1181155063 353285119 -1083333747
+504245403 -1353696629 407904797 -1181155063
+512846778 -1369101294 504245403 -1353696629
+517098866 -1376716585 512846778 -1369101294
+617053029 -1555729865 517098866 -1376716585
+689044608 -1684663451 617053029 -1555729865
+854354401 -1980725637 689044608 -1684663451
+38829647 -1740995270 244200116 -1579870207
+244200116 -1579870207 363059457 -1486618149
+363059457 -1486618149 468609929 -1403807673
+468609929 -1403807673 512846778 -1369101294
+512846778 -1369101294 513453041 -1368625646
+513453041 -1368625646 533743908 -1352706282
+533743908 -1352706282 566021904 -1327382319
+566021904 -1327382319 705004486 -1218342409
+705004486 -1218342409 806020087 -1139089803
+806020087 -1139089803 847814877 -1106299362
+847814877 -1106299362 853844526 -1101568752
+853844526 -1101568752 894234683 -1069880328
+894234683 -1069880328 894827123 -1069415524
+894827123 -1069415524 949302708 -1026676263
+949302708 -1026676263 961574314 -1017048475
+-1367328625 -61079780 -1517071279 -131228239
+-1315110429 -36617638 -1367328625 -61079780
+-1283642674 -21876250 -1315110429 -36617638
+-1276213405 -18395934 -1283642674 -21876250
+-1185428399 24133219 -1276213405 -18395934
+-1119147725 55183071 -1185428399 24133219
+-1090076914 68801586 -1119147725 55183071
+-1014128087 104380581 -1090076914 68801586
+-943649161 137397147 -1014128087 104380581
+-921288787 147872090 -943649161 137397147
+-901272613 157248869 -921288787 147872090
+-875130377 169495463 -901272613 157248869
+-848937556 181765755 -875130377 169495463
+-821846581 194456796 -848937556 181765755
+-778213356 214897221 -821846581 194456796
+-749291562 228445928 -778213356 214897221
+-718182903 243019093 -749291562 228445928
+-704127742 249603376 -718182903 243019093
+-620184642 288927369 -704127742 249603376
+-549904030 321851032 -620184642 288927369
+-533800438 329394923 -549904030 321851032
+-511069828 340043306 -533800438 329394923
+-490995669 349447249 -511069828 340043306
+-474068184 357377101 -490995669 349447249
+-455903906 365886340 -474068184 357377101
+-426313456 379748285 -455903906 365886340
+-366301608 407861442 -426313456 379748285
+-300857192 438519540 -366301608 407861442
+-262977691 456264575 -300857192 438519540
+-242139040 466026652 -262977691 456264575
+-221917432 475499669 -242139040 466026652
+-192136402 489450893 -221917432 475499669
+-122874380 521897387 -192136402 489450893
+-120484330 523017030 -122874380 521897387
+-101553446 531885394 -120484330 523017030
+2294952 580534226 -101553446 531885394
+15449575 586696642 2294952 580534226
+52590229 604095556 15449575 586696642
+93135623 623089456 52590229 604095556
+-1005159139 -1968232079 -1570011284 -2076985615
+-878242435 -1943796232 -1005159139 -1968232079
+-598397545 -1889916431 -878242435 -1943796232
+-231135879 -1819205882 -598397545 -1889916431
+269176562 -1722878466 -231135879 -1819205882
+344584281 -1708359877 269176562 -1722878466
+-1222003264 -1275695641 -1208118529 -1274000146
+-1208118529 -1274000146 -1074253792 -1257653632
+-1074253792 -1257653632 -1058329628 -1255709097
+-1058329628 -1255709097 -1017416875 -1250713152
+-1017416875 -1250713152 -983624056 -1246586637
+-983624056 -1246586637 -956771096 -1243307564
+-956771096 -1243307564 -871897749 -1232943495
+-871897749 -1232943495 -853340302 -1230677404
+-853340302 -1230677404 -689170179 -1210630233
+-689170179 -1210630233 -662981158 -1207432235
+-662981158 -1207432235 -649470950 -1205782474
+-649470950 -1205782474 -621612957 -1202380674
+-621612957 -1202380674 -503746966 -1187987801
+-503746966 -1187987801 -438135599 -1179975854
+-438135599 -1179975854 -297977157 -1162860801
+-297977157 -1162860801 -269187593 -1159345245
+-269187593 -1159345245 -104257471 -1139205269
+-104257471 -1139205269 -12163651 -1127959492
+-12163651 -1127959492 42945404 -1121230005
+42945404 -1121230005 161568565 -1106744673
+161568565 -1106744673 169841429 -1105734455
+169841429 -1105734455 179854307 -1104511761
+179854307 -1104511761 348778755 -1083884029
+348778755 -1083884029 353285119 -1083333747
+353285119 -1083333747 383250032 -1079674666
+383250032 -1079674666 388071441 -1079085913
+388071441 -1079085913 404348230 -1077098319
+404348230 -1077098319 479651392 -1067902886
+479651392 -1067902886 578198611 -1055869070
+-978418967 -539576384 -887249486 -552398392
+-887249486 -552398392 -882537215 -553061122
+-882537215 -553061122 -781652377 -567249489
+-781652377 -567249489 -775577195 -568103898
+-775577195 -568103898 -774536399 -568250275
+-774536399 -568250275 -664088558 -583783576
+-664088558 -583783576 -629629174 -588629918
+-629629174 -588629918 -624944281 -589288798
+-624944281 -589288798 -586442760 -594703623
+-586442760 -594703623 -562406443 -598084072
+-562406443 -598084072 -339395301 -629448191
+-339395301 -629448191 -312330982 -633254496
+-312330982 -633254496 -222231473 -645926023
+-222231473 -645926023 -194619356 -649809370
+-194619356 -649809370 -129262791 -659001068
+-129262791 -659001068 -93934253 -663969647
+-93934253 -663969647 -87204198 -664916157
+-87204198 -664916157 -64322772 -668134184
+-64322772 -668134184 45000570 -683509336
+45000570 -683509336 57481848 -685264694
+57481848 -685264694 77685909 -688106177
+77685909 -688106177 88724328 -689658612
+88724328 -689658612 111843968 -692910141
+111843968 -692910141 137285373 -696488201
+137285373 -696488201 150283040 -698316183
+150283040 -698316183 160607761 -699768244
+160607761 -699768244 195545511 -704681863
+195545511 -704681863 207366837 -706344405
+207366837 -706344405 215543397 -707494350
+215543397 -707494350 227756770 -709212030
+227756770 -709212030 296667994 -718903653
+296667994 -718903653 439610266 -739006946
+439610266 -739006946 465143326 -742597896
+465143326 -742597896 497288160 -747118721
+497288160 -747118721 576875274 -758311793
+576875274 -758311793 617889423 -764079992
+617889423 -764079992 751432073 -782861330
+751432073 -782861330 825180663 -793233276
+825180663 -793233276 862593314 -798494963
+862593314 -798494963 882100759 -801238475
+882100759 -801238475 1006368765 -818715434
+1006368765 -818715434 1029319266 -821943175
+1029319266 -821943175 1054652875 -825506074
+1054652875 -825506074 1120033745 -834701190
+386122129 104914472 431327359 57645395
+431327359 57645395 451918890 36113757
+451918890 36113757 493761784 -7639475
+493761784 -7639475 512519911 -27254005
+512519911 -27254005 553125994 -69713960
+553125994 -69713960 574497375 -92061052
+574497375 -92061052 625219707 -145099114
+625219707 -145099114 639779479 -160323612
+639779479 -160323612 651216600 -172282895
+651216600 -172282895 673718830 -195812466
+673718830 -195812466 675786742 -197974788
+675786742 -197974788 697245853 -220413615
+697245853 -220413615 699578695 -222852963
+699578695 -222852963 704016629 -227493511
+704016629 -227493511 718300422 -242429431
+718300422 -242429431 721363977 -245632853
+721363977 -245632853 725217058 -249661846
+725217058 -249661846 742488198 -267721501
+742488198 -267721501 855854805 -386263863
+855854805 -386263863 879669769 -411166100
+879669769 -411166100 898147602 -430487538
+-1739467890 -336762320 -1787337956 -355134232
+-1641969443 -299343676 -1739467890 -336762320
+-1325122137 -177741776 -1641969443 -299343676
+-1268881673 -156157413 -1325122137 -177741776
+-1147194628 -109455498 -1268881673 -156157413
+-1121789096 -99705183 -1147194628 -109455498
+-1110011459 -95185078 -1121789096 -99705183
+-1093304371 -88773114 -1110011459 -95185078
+-1070476309 -80011999 -1093304371 -88773114
+-989455097 -48917105 -1070476309 -80011999
+-929584205 -25939431 -989455097 -48917105
+-859045330 1132478 -929584205 -25939431
+-824858688 14252869 -859045330 1132478
+-764784323 37308634 -824858688 14252869
+-747774622 43836737 -764784323 37308634
+-731507273 50079935 -747774622 43836737
+-704244181 60543157 -731507273 50079935
+-679454481 70057124 -704244181 60543157
+-679119349 70185743 -679454481 70057124
+-668762601 74160529 -679119349 70185743
+-631873628 88318040 -668762601 74160529
+-600058799 100528160 -631873628 88318040
+-564151625 114308870 -600058799 100528160
+-556028702 117426342 -564151625 114308870
+-538199830 124268833 -556028702 117426342
+-521282649 130761428 -538199830 124268833
+-473189332 149219022 -521282649 130761428
+-404767387 175478480 -473189332 149219022
+-359325317 192918559 -404767387 175478480
+-312073730 211053107 -359325317 192918559
+-307075853 212971228 -312073730 211053107
+-293862227 218042446 -307075853 212971228
+-286147572 221003231 -293862227 218042446
+-215125406 248260621 -286147572 221003231
+-153541709 271895648 -215125406 248260621
+-116383029 286156668 -153541709 271895648
+-83880756 298630621 -116383029 286156668
+-77854423 300943449 -83880756 298630621
+-74321641 302299285 -77854423 300943449
+-69985486 303963446 -74321641 302299285
+-66675195 305233893 -69985486 303963446
+-39681164 315593852 -66675195 305233893
+18996608 338113623 -39681164 315593852
+36133819 344690663 18996608 338113623
+54534817 351752728 36133819 344690663
+77386351 360522852 54534817 351752728
+82283545 362402331 77386351 360522852
+89983696 365357550 82283545 362402331
+277494161 437321642 89983696 365357550
+368536625 472262563 277494161 437321642
+399115067 483998174 368536625 472262563
+402208261 485185302 399115067 483998174
+407354887 487160510 402208261 485185302
+476725776 513784161 407354887 487160510
+548162801 541200768 476725776 513784161
+709214535 603010341 548162801 541200768
+914867987 681937477 709214535 603010341
+940952444 691948355 914867987 681937477
+965927282 701533375 940952444 691948355
+1111611550 757445114 965927282 701533375
+1147072114 771054420 1111611550 757445114
+1229678906 802757839 1147072114 771054420
+1282780616 823137588 1229678906 802757839
+1303066219 830922941 1282780616 823137588
+1896779308 501923279 1913549999 709239891
+1913549999 709239891 1924006544 838502029
+1924006544 838502029 1954660881 1217446053
+1954660881 1217446053 1960643572 1291403129
+1960643572 1291403129 1968680212 1390750786
+1968680212 1390750786 1982632917 1563231902
+1982632917 1563231902 1984311702 1583984764
+1984311702 1583984764 1990507367 1660574585
+-682292363 190812855 -681994905 178155596
+-681994905 178155596 -681654046 163651566
+-681654046 163651566 -680654775 121131276
+-680654775 121131276 -679771129 83530950
+-679771129 83530950 -679609557 76655831
+-679609557 76655831 -679526079 73103745
+-679526079 73103745 -679454481 70057124
+-679454481 70057124 -678543118 31277403
+-678543118 31277403 -678341166 22684073
+-678341166 22684073 -677846296 1626702
+-677846296 1626702 -676869261 -39947468
+-676869261 -39947468 -674917413 -123001201
+-674917413 -123001201 -674634405 -135043574
+-674634405 -135043574 -672964300 -206108817
+-672964300 -206108817 -672579357 -222488653
+-672579357 -222488653 -671388639 -273155316
+-671388639 -273155316 -670363467 -316777771
+-670363467 -316777771 -669959281 -333976405
+-669959281 -333976405 -668561428 -393456939
+-668561428 -393456939 -668348305 -402525601
+-668348305 -402525601 -667397850 -442968748
+-667397850 -442968748 -666795962 -468579905
+-666795962 -468579905 -666662260 -474269082
+-666662260 -474269082 -666216194 -493249813
+-666216194 -493249813 -664088558 -583783576
+-664088558 -583783576 -663488215 -609328962
+-663488215 -609328962 -663305025 -617123978
+-663305025 -617123978 -660213628 -748667069
+-660213628 -748667069 -660029623 -756496734
+-660029623 -756496734 -658545656 -819641517
+-658545656 -819641517 -654312755 -999757153
+-654312755 -999757153 -653458362 -1036112722
+-653458362 -1036112722 -650198163 -1174838601
+-650198163 -1174838601 -649470950 -1205782474
+-649470950 -1205782474 -649344981 -1211142642
+-649344981 -1211142642 -649076248 -1222577575
+-649076248 -1222577575 -645087999 -1392282944
+-645087999 -1392282944 -644983857 -1396714340
+-644983857 -1396714340 -642786434 -1490217646
+-642786434 -1490217646 -642690905 -1494282512
+-642690905 -1494282512 -642280056 -1511764672
+-642280056 -1511764672 -640959643 -1567950058
+-640959643 -1567950058 -639956277 -1610644596
+-1556738026 -1387588084 -1524970410 -1288445414
+-1524970410 -1288445414 -1521470357 -1277522196
+-1521470357 -1277522196 -1488435642 -1174425076
+-1488435642 -1174425076 -1477133038 -1139151094
+-1477133038 -1139151094 -1469533678 -1115434463
+-1469533678 -1115434463 -1352867365 -751333813
+-1352867365 -751333813 -1315345182 -634231878
+-1315345182 -634231878 -1309795218 -616911150
+-1309795218 -616911150 -1281332262 -528081905
+-1281332262 -528081905 -1254160499 -443282306
+-1254160499 -443282306 -1248486466 -425574373
+-1248486466 -425574373 -1246733095 -420102326
+-1246733095 -420102326 -1242368201 -406480052
+-1242368201 -406480052 -1210517368 -307077674
+-1210517368 -307077674 -1208295723 -300144205
+-1208295723 -300144205 -1181196274 -215570286
+-1181196274 -215570286 -1147194628 -109455498
+-1147194628 -109455498 -1141095668 -90421422
+-1141095668 -90421422 -1131651639 -60947817
+-1131651639 -60947817 -1115100956 -9295249
+-1115100956 -9295249 -1113584447 -4562419
+-1113584447 -4562419 -1100807992 35311263
+-1100807992 35311263 -1097419979 45884820
+-1097419979 45884820 -1090076914 68801586
+-1090076914 68801586 -1059553725 164060555
+-1059553725 164060555 -1044411980 211316006
+-1044411980 211316006 -1026480877 267276686
+-1026480877 267276686 -1003865202 337857318
+-1003865202 337857318 -999376278 351866674
+-999376278 351866674 -988872199 384648562
+-988872199 384648562 -966953846 453052940
+-966953846 453052940 -963605873 463501534
+-963605873 463501534 -962316837 467524452
+-962316837 467524452 -955327929 489335939
+-955327929 489335939 -942510967 529336039
+-942510967 529336039 -935435944 551416281
+-1444915312 1072773864 -1597996058 1064411576
+-1309889521 1080149871 -1444915312 1072773864
+-1284686902 1081526605 -1309889521 1080149871
+-1213734911 1085402475 -1284686902 1081526605
+-1213554262 1085412343 -1213734911 1085402475
+-1172455690 1087657420 -1213554262 1085412343
+-1000081804 1097073628 -1172455690 1087657420
+-935813724 1100584378 -1000081804 1097073628
+-868193676 1104278235 -935813724 1100584378
+-823597429 1106714379 -868193676 1104278235
+-746348005 1110934256 -823597429 1106714379
+-694987452 1113739911 -746348005 1110934256
+-641846242 1116642837 -694987452 1113739911
+-598211160 1119026476 -641846242 1116642837
+-429118543 1128263439 -598211160 1119026476
+-421008117 1128706484 -429118543 1128263439
+-306649730 1134953500 -421008117 1128706484
+-230669752 1139104032 -306649730 1134953500
+-144310959 1143821523 -230669752 1139104032
+-139792035 1144068377 -144310959 1143821523
+-114845201 1145431139 -139792035 1144068377
+-48647651 1149047289 -114845201 1145431139
+-45827590 1149201340 -48647651 1149047289
+176225661 1161331365 -45827590 1149201340
+183227212 1161713836 176225661 1161331365
+206289551 1162973655 183227212 1161713836
+287879988 1167430667 206289551 1162973655
+441011093 1175795706 287879988 1167430667
+503576745 1179213458 441011093 1175795706
+570229228 1182854460 503576745 1179213458
+595242366 1184220844 570229228 1182854460
+697622413 1189813523 595242366 1184220844
+767334921 1193621684 697622413 1189813523
+801066118 1195464306 767334921 1193621684
+814784394 1196213690 801066118 1195464306
+895722904 1200635089 814784394 1196213690
+926650204 1202324544 895722904 1200635089
+944218451 1203284239 926650204 1202324544
+961466276 1204226430 944218451 1203284239
+-381087636 1532637491 -377393767 1533732063
+-377393767 1533732063 -377145160 1533805730
+-377145160 1533805730 -363263360 1537919204
+-363263360 1537919204 -303420021 1555652061
+-303420021 1555652061 -209007271 1583628573
+-209007271 1583628573 -50781240 1630514321
+-50781240 1630514321 233888171 1714867938
+233888171 1714867938 414802591 1768476740
+414802591 1768476740 560393335 1811618382
+560393335 1811618382 597552925 1822629561
+597552925 1822629561 870302673 1903451129
+870302673 1903451129 891794597 1909819644
+891794597 1909819644 1014676148 1946232069
+-432660231 218658871 -502541174 217540701
+-414360296 218951690 -432660231 218658871
+-374219851 219593980 -414360296 218951690
+-315815175 220528518 -374219851 219593980
+-292106417 220907883 -315815175 220528518
+-286147572 221003231 -292106417 220907883
+-203439407 222326651 -286147572 221003231
+-144914210 223263117 -203439407 222326651
+-129022966 223517394 -144914210 223263117
+-120721874 223650221 -129022966 223517394
+-98218648 224010297 -120721874 223650221
+-90337697 224136400 -98218648 224010297
+-73213163 224410411 -90337697 224136400
+-70924564 224447031 -73213163 224410411
+-27704022 225138607 -70924564 224447031
+-23968401 225198381 -27704022 225138607
+-15453698 225334625 -23968401 225198381
+-14693080 225346796 -15453698 225334625
+28754626 226042006 -14693080 225346796
+143924433 227884847 28754626 226042006
+291706835 230249524 143924433 227884847
+365144437 231424605 291706835 230249524
+400088065 231983741 365144437 231424605
+433058922 232511310 400088065 231983741
+486567257 233367501 433058922 232511310
+496457277 233525752 486567257 233367501
+594393834 235092843 496457277 233525752
+715407351 237029189 594393834 235092843
+727328261 237219937 715407351 237029189
+733337210 237316086 727328261 237219937
+863220737 239394363 733337210 237316086
+890170710 239825591 863220737 239394363
+920997707 240318856 890170710 239825591
+972245715 241138880 920997707 240318856
+987034769 241375521 972245715 241138880
+1005537724 241671588 987034769 241375521
+1044765645 242299277 1005537724 241671588
+1093338650 243076497 1044765645 242299277
+1264349686 245812858 1093338650 243076497
+1296713639 246330716 1264349686 245812858
+1339589150 247016770 1296713639 246330716
+1357339651 247300798 1339589150 247016770
+1544166002 250290221 1357339651 247300798
+1560129008 250545646 1544166002 250290221
+1657178515 252098543 1560129008 250545646
+-2097538536 1208477630 -2105396822 1242389760
+-2015211199 853197207 -2097538536 1208477630
+-2011736664 838202987 -2015211199 853197207
+-1908575156 393013513 -2011736664 838202987
+-1880358286 271244707 -1908575156 393013513
+-1861323858 189102372 -1880358286 271244707
+-1777662687 -171934159 -1861323858 189102372
+-1748453402 -297985693 -1777662687 -171934159
+-1739467890 -336762320 -1748453402 -297985693
+-1724038116 -403348909 -1739467890 -336762320
+-1702661548 -495598655 -1724038116 -403348909
+-1599053525 -942715049 -1702661548 -495598655
+-1581098725 -1020198294 -1599053525 -942715049
+-1566711940 -1082283902 -1581098725 -1020198294
+-1554022976 -1137042636 -1566711940 -1082283902
+-1542820631 -1185385919 -1554022976 -1137042636
+-1535909933 -1215208767 -1542820631 -1185385919
+-1521470357 -1277522196 -1535909933 -1215208767
+-1511364611 -1321133150 -1521470357 -1277522196
+-1500763797 -1366880551 -1511364611 -1321133150
+-1488317399 -1420592498 -1500763797 -1366880551
+-1458049184 -1551213799 -1488317399 -1420592498
+-88846340 -265650143 -97027764 -240108399
+-76516060 -304144278 -88846340 -265650143
+-69426878 -326276127 -76516060 -304144278
+-58383945 -360751268 -69426878 -326276127
+-58301057 -361010038 -58383945 -360751268
+-44273657 -404802442 -58301057 -361010038
+-39428517 -419928575 -44273657 -404802442
+-15338500 -495135654 -39428517 -419928575
+-8927756 -515149476 -15338500 -495135654
+2254970 -550061040 -8927756 -515149476
+8583463 -569818081 2254970 -550061040
+36389811 -656627246 8583463 -569818081
+40893566 -670687601 36389811 -656627246
+45000570 -683509336 40893566 -670687601
+52423862 -706684252 45000570 -683509336
+61706900 -735665142 52423862 -706684252
+67761096 -754565850 61706900 -735665142
+75922214 -780044197 67761096 -754565850
+100017714 -855268396 75922214 -780044197
+136270878 -968447832 100017714 -855268396
+138786716 -976302071 136270878 -968447832
+139975824 -980014371 138786716 -976302071
+144727916 -994850016 139975824 -980014371
+173099900 -1083425049 144727916 -994850016
+179854307 -1104511761 173099900 -1083425049
+208324298 -1193392759 179854307 -1104511761
+-918953980 -197240504 -966248972 -236249724
+-855155309 -144618939 -918953980 -197240504
+-790642712 -91408525 -855155309 -144618939
+-785845294 -87451583 -790642712 -91408525
+-732275317 -43266713 -785845294 -87451583
+-701746524 -18086364 -732275317 -43266713
+-677846296 1626702 -701746524 -18086364
+-670417241 7754235 -677846296 1626702
+-663149499 13748717 -670417241 7754235
+-662323236 14430224 -663149499 13748717
+-613238220 54915868 -662323236 14430224
+-607103254 59976029 -613238220 54915868
+-568825269 91547963 -607103254 59976029
+-567170907 92912491 -568825269 91547963
+-543251644 112641257 -567170907 92912491
+-532540511 121475870 -543251644 112641257
+-521282649 130761428 -532540511 121475870
+-485137105 160574511 -521282649 130761428
+-426422647 209002583 -485137105 160574511
+-421881106 212748476 -426422647 209002583
+-414360296 218951690 -421881106 212748476
+-386631467 241822610 -414360296 218951690
+-367653236 257475979 -386631467 241822610
+-363181423 261164361 -367653236 257475979
+-362989710 261322487 -363181423 261164361
+-259481354 346696861 -362989710 261322487
+-249531075 354903916 -259481354 346696861
+-203690100 392713854 -249531075 354903916
+-195566826 399413984 -203690100 392713854
+-193303552 401280747 -195566826 399413984
+-178640403 413375009 -193303552 401280747
+-173883469 417298559 -178640403 413375009
+-169604446 420827926 -173883469 417298559
+-139552522 445614950 -169604446 420827926
+-113329171 467244143 -139552522 445614950
+-89072436 487251258 -113329171 467244143
+10364008 569267091 -89072436 487251258
+52590229 604095556 10364008 569267091
+118360406 658343231 52590229 604095556
+120104151 659781483 118360406 658343231
+136569629 673362318 120104151 659781483
+149979044 684422492 136569629 673362318
+152197260 686252091 149979044 684422492
+310186759 816562871 152197260 686252091
+369747460 865688928 310186759 816562871
+371053669 866766298 369747460 865688928
+409812532 898734863 371053669 866766298
+469842328 948247835 409812532 898734863
+553694114 1017409339 469842328 948247835
+595809204 1052146143 553694114 1017409339
+629895802 1080260994 595809204 1052146143
+644600918 1092389870 629895802 1080260994
+716324564 1151548006 644600918 1092389870
+767334921 1193621684 716324564 1151548006
+783722660 1207138399 767334921 1193621684
+843038678 1256062641 783722660 1207138399
+-1363261533 -353289162 -1251391342 -417431457
+-1251391342 -417431457 -1246733095 -420102326
+-1246733095 -420102326 -1235007612 -426825291
+-1235007612 -426825291 -1232472344 -428278922
+-1232472344 -428278922 -1223627622 -433350163
+-1223627622 -433350163 -1197977274 -448057139
+-1197977274 -448057139 -1176072050 -460616796
+-1176072050 -460616796 -1147410228 -477050441
+-1147410228 -477050441 -1144037090 -478984476
+-1144037090 -478984476 -1062594812 -525680512
+-1062594812 -525680512 -1059670668 -527357110
+-1059670668 -527357110 -915688845 -609911045
+-915688845 -609911045 -865086102 -638924815
+-865086102 -638924815 -830961940 -658490367
+-830961940 -658490367 -796283912 -678373485
+-796283912 -678373485 -663869251 -754295231
+-663869251 -754295231 -660029623 -756496734
+-660029623 -756496734 -555943760 -816175778
+-555943760 -816175778 -555540291 -816407112
+-555540291 -816407112 -525651517 -833544247
+-525651517 -833544247 -508432535 -843416984
+-508432535 -843416984 -483191059 -857889527
+-483191059 -857889527 -417105378 -895780650
+-417105378 -895780650 -373541211 -920758757
+-373541211 -920758757 -367231431 -924376556
+-367231431 -924376556 -297755734 -964211390
+-297755734 -964211390 -230270181 -1002905149
+-230270181 -1002905149 -162305293 -1041873741
+-162305293 -1041873741 -51979474 -1105130548
+-51979474 -1105130548 -12163651 -1127959492
+-12163651 -1127959492 74385727 -1177583754
+74385727 -1177583754 152782000 -1222533322
+152782000 -1222533322 185019277 -1241017003
+185019277 -1241017003 220194182 -1261185012
+220194182 -1261185012 259934157 -1283970467
+259934157 -1283970467 288787428 -1300513881
+1293879540 1739434679 1356549911 1491507167
+1356549911 1491507167 1359652523 1479233061
+1359652523 1479233061 1386323940 1373719439
+1386323940 1373719439 1402632488 1309201905
+1402632488 1309201905 1406103202 1295471566
+1406103202 1295471566 1418651548 1245829604
+1418651548 1245829604 1419600898 1242073921
+1419600898 1242073921 1423422286 1226956296
+1423422286 1226956296 1436768515 1174157866
+1436768515 1174157866 1475711074 1020098915
+1475711074 1020098915 1475959291 1019116955
+1475959291 1019116955 1525463786 823274389
+1525463786 823274389 1527474781 815318783
+1527474781 815318783 1528993600 809310249
+1528993600 809310249 1531513610 799340947
+1531513610 799340947 1550310007 724981345
+1550310007 724981345 1583727648 592779278
+1583727648 592779278 1615031575 468939186
+1615031575 468939186 1678621791 217372721
+1678621791 217372721 1729869352 14634490
+1729869352 14634490 1743470377 -39171929
+1743470377 -39171929 1787076935 -211681923
+1787076935 -211681923 1855109798 -480823751
+1855109798 -480823751 1861986607 -508028792
+1861986607 -508028792 1899512098 -656481743
+1899512098 -656481743 2014984655 -1113297665
+2014984655 -1113297665 2063948869 -1307002848
+2063948869 -1307002848 2138311717 -1601186448
+-1056143067 1630304119 -1166961844 1788809239
+-1021172326 1580285146 -1056143067 1630304119
+-929415447 1449044435 -1021172326 1580285146
+-912365336 1424657503 -929415447 1449044435
+-856845684 1345247234 -912365336 1424657503
+-781597447 1237618986 -856845684 1345247234
+-694987452 1113739911 -781597447 1237618986
+-651820415 1051997701 -694987452 1113739911
+-635346094 1028434327 -651820415 1051997701
+-493415141 825429176 -635346094 1028434327
+-473879051 797486526 -493415141 825429176
+-468776948 790188942 -473879051 797486526
+-442178886 752145488 -468776948 790188942
+-429893152 734573088 -442178886 752145488
+-408249589 703616101 -429893152 734573088
+-397528337 688281395 -408249589 703616101
+-344321409 612179036 -397528337 688281395
+-325026098 584580774 -344321409 612179036
+-317316933 573554285 -325026098 584580774
+-242139040 466026652 -317316933 573554285
+-218402781 432076461 -242139040 466026652
+-206299951 414765672 -218402781 432076461
+-201264134 407562896 -206299951 414765672
+-195566826 399413984 -201264134 407562896
+-189990197 391437680 -195566826 399413984
+-188723570 389626011 -189990197 391437680
+-169566344 362225254 -188723570 389626011
+-165771003 356796743 -169566344 362225254
+-145507523 327813701 -165771003 356796743
+-116383029 286156668 -145507523 327813701
+-98736203 260916250 -116383029 286156668
+-96222894 257321441 -98736203 260916250
+-85238974 241611039 -96222894 257321441
+-81836985 236745143 -85238974 241611039
+-73213163 224410411 -81836985 236745143
+-70153970 220034819 -73213163 224410411
+-66190544 214365894 -70153970 220034819
+-61165986 207179222 -66190544 214365894
+-49866502 191017466 -61165986 207179222
+6748173 110040975 -49866502 191017466
+97875901 -20299855 6748173 110040975
+150250752 -95212087 97875901 -20299855
+152550923 -98502044 150250752 -95212087
+166112542 -117899352 152550923 -98502044
+167154149 -119389172 166112542 -117899352
+196926669 -161973083 167154149 -119389172
+226767546 -204654764 196926669 -161973083
+262348588 -255546657 226767546 -204654764
+278646485 -278857689 262348588 -255546657
+288545542 -293016402 278646485 -278857689
+291519944 -297270716 288545542 -293016402
+296927374 -305005014 291519944 -297270716
+304588496 -315962787 296927374 -305005014
+386054507 -432484374 304588496 -315962787
+388704021 -436273998 386054507 -432484374
+399372493 -451533213 388704021 -436273998
+469252726 -551483553 399372493 -451533213
+479916422 -566735936 469252726 -551483553
+497696564 -592167038 479916422 -566735936
+505971096 -604002178 497696564 -592167038
+540552493 -653464268 505971096 -604002178
+542159493 -655762775 540552493 -653464268
+571989303 -698428628 542159493 -655762775
+599182360 -737323107 571989303 -698428628
+617889423 -764079992 599182360 -737323107
+794307955 -1016413047 617889423 -764079992
+799223245 -1023443431 794307955 -1016413047
+807285454 -1034974883 799223245 -1023443431
+853844526 -1101568752 807285454 -1034974883
+875644369 -1132749269 853844526 -1101568752
+885998260 -1147558536 875644369 -1132749269
+893402995 -1158149596 885998260 -1147558536
+962814639 -1257429710 893402995 -1158149596
+1018059171 -1336446473 962814639 -1257429710
+1037685678 -1364518448 1018059171 -1336446473
+1180920198 -1569388102 1037685678 -1364518448
+-901775427 556558922 -996691681 547088629
+-893566865 557377933 -901775427 556558922
+-856767628 561049586 -893566865 557377933
+-840235408 562699093 -856767628 561049586
+-840104023 562712202 -840235408 562699093
+-825661121 564153246 -840104023 562712202
+-749037373 571798399 -825661121 564153246
+-724821119 574214582 -749037373 571798399
+-666118735 580071627 -724821119 574214582
+-602444674 586424723 -666118735 580071627
+-580278964 588636312 -602444674 586424723
+-496032261 597042048 -580278964 588636312
+-447503081 601884059 -496032261 597042048
+-377612439 608857416 -447503081 601884059
+-344321409 612179036 -377612439 608857416
+-335450751 613064109 -344321409 612179036
+-309669417 615636448 -335450751 613064109
+-216176796 624964698 -309669417 615636448
+-210517514 625529354 -216176796 624964698
+-173591796 629213627 -210517514 625529354
+-142164841 632349259 -173591796 629213627
+-33340447 643207240 -142164841 632349259
+33895543 649915728 -33340447 643207240
+117897358 658297030 33895543 649915728
+118360406 658343231 117897358 658297030
+136818513 660184893 118360406 658343231
+144008697 660902296 136818513 660184893
+176444316 664138568 144008697 660902296
+263049294 672779601 176444316 664138568
+269165862 673389883 263049294 672779601
+311596134 677623374 269165862 673389883
+376432238 684092413 311596134 677623374
+432071095 689643794 376432238 684092413
+464750648 692904404 432071095 689643794
+488547142 695278706 464750648 692904404
+510869669 697505941 488547142 695278706
+714203126 717793588 510869669 697505941
+746027352 720968858 714203126 717793588
+918364759 738163866 746027352 720968858
+934490334 739772800 918364759 738163866
+972359439 743551199 934490334 739772800
+1111611550 757445114 972359439 743551199
+1131683822 759447830 1111611550 757445114
+1251991318 771451540 1131683822 759447830
+1266368990 772886076 1251991318 771451540
+1324197087 778655889 1266368990 772886076
+1416811498 787896515 1324197087 778655889
+1495490016 795746684 1416811498 787896515
+1511082467 797302425 1495490016 795746684
+1531513610 799340947 1511082467 797302425
+1557384686 801922240 1531513610 799340947
+1592954783 805471256 1557384686 801922240
+1924006544 838502029 1592954783 805471256
+2091174702 855181274 1924006544 838502029
+267255938 -885067233 272610074 -880529914
+272610074 -880529914 275687889 -877921644
+275687889 -877921644 276213061 -877476591
+276213061 -877476591 287737604 -867710210
+287737604 -867710210 320811726 -839681812
+320811726 -839681812 355658774 -810150961
+355658774 -810150961 439610266 -739006946
+439610266 -739006946 451110750 -729260953
+451110750 -729260953 539289501 -654534580
+539289501 -654534580 540552493 -653464268
+540552493 -653464268 572444957 -626437256
+572444957 -626437256 602385680 -601064231
+602385680 -601064231 618495282 -587412279
+618495282 -587412279 640161273 -569051610
+640161273 -569051610 673160050 -541087062
+673160050 -541087062 723520113 -498409832
+723520113 -498409832 798315595 -435025002
+798315595 -435025002 811344220 -423983999
+811344220 -423983999 855854805 -386263863
+855854805 -386263863 900028294 -348829395
+900028294 -348829395 901289272 -347760789
+901289272 -347760789 957658150 -299991437
+957658150 -299991437 993827484 -269340027
+993827484 -269340027 1036380737 -233278615
+1036380737 -233278615 1047684656 -223699200
+1047684656 -223699200 1184056997 -108131557
+1184056997 -108131557 1282891535 -24375024
+1282891535 -24375024 1344005201 27415260
+1344005201 27415260 1447807468 115381656
+1447807468 115381656 1523470048 179501300
+-525621486 1202226720 -648662068 1296529390
+-487330917 1172879468 -525621486 1202226720
+-429118543 1128263439 -487330917 1172879468
+-421856093 1122697239 -429118543 1128263439
+-286004046 1018575408 -421856093 1122697239
+-257737570 996910978 -286004046 1018575408
+-197814482 950983796 -257737570 996910978
+-158676849 920987324 -197814482 950983796
+-34245787 825618942 -158676849 920987324
+-6606200 804434981 -34245787 825618942
+42425518 766855332 -6606200 804434981
+63339109 750826414 42425518 766855332
+89219676 730990628 63339109 750826414
+113083189 712700785 89219676 730990628
+149979044 684422492 113083189 712700785
+150763260 683821441 149979044 684422492
+153137194 682001973 150763260 683821441
+176444316 664138568 153137194 682001973
+230517931 622694630 176444316 664138568
+235434676 618926262 230517931 622694630
+246450301 610483496 235434676 618926262
+323229343 551637313 246450301 610483496
+333032028 544124187 323229343 551637313
+402144122 491154225 333032028 544124187
+402985845 490509099 402144122 491154225
+407354887 487160510 402985845 490509099
+427638269 471614606 407354887 487160510
+545512441 381271657 427638269 471614606
+556159873 373111086 545512441 381271657
+571562991 361305590 556159873 373111086
+587560958 349044180 571562991 361305590
+597289501 341587879 587560958 349044180
+621772885 322822945 597289501 341587879
+632173595 314851472 621772885 322822945
+702075470 261276194 632173595 314851472
+733337210 237316086 702075470 261276194
+743235165 229729942 733337210 237316086
+789800332 194040746 743235165 229729942
+798817322 187129804 789800332 194040746
+817337032 172935641 798817322 187129804
+826928781 165584184 817337032 172935641
+830437141 162895253 826928781 165584184
+876932908 127259246 830437141 162895253
+891370686 116193621 876932908 127259246
+902922638 107339794 891370686 116193621
+919624204 94539122 902922638 107339794
+991990733 39074845 919624204 94539122
+1019762313 17789720 991990733 39074845
+1056116444 -10073377 1019762313 17789720
+1098145344 -42285817 1056116444 -10073377
+1130615209 -67171874 1098145344 -42285817
+1184056997 -108131557 1130615209 -67171874
+1318979906 -211541264 1184056997 -108131557
+1336091592 -224656268 1318979906 -211541264
+1529583181 -372955090 1336091592 -224656268
+1638842537 -456695339 1529583181 -372955090
+1681849818 -489657646 1638842537 -456695339
+1727795573 -524872103 1681849818 -489657646
+1806226305 -584984200 1727795573 -524872103
+1899512098 -656481743 1806226305 -584984200
+2127997902 -831601373 1899512098 -656481743
+-1713970218 -1032049472 -1746038018 -1021110136
+-1609935671 -1067538928 -1713970218 -1032049472
+-1566711940 -1082283902 -1609935671 -1067538928
+-1508673502 -1102082638 -1566711940 -1082283902
+-1469533678 -1115434463 -1508673502 -1102082638
+-1433912527 -1127585958 -1469533678 -1115434463
+-1283412327 -1178926310 -1433912527 -1127585958
+-1209524329 -1204131830 -1283412327 -1178926310
+-1172951250 -1216608057 -1209524329 -1204131830
+-1142463125 -1227008516 -1172951250 -1216608057
+-1077540096 -1249155803 -1142463125 -1227008516
+-1058329628 -1255709097 -1077540096 -1249155803
+-1013331237 -1271059464 -1058329628 -1255709097
+-1002024906 -1274916409 -1013331237 -1271059464
+-937662545 -1296872434 -1002024906 -1274916409
+-933025521 -1298454269 -937662545 -1296872434
+-824944236 -1335324195 -933025521 -1298454269
+-811036211 -1340068660 -824944236 -1335324195
+-809534544 -1340580925 -811036211 -1340068660
+-656819571 -1392676806 -809534544 -1340580925
+-644983857 -1396714340 -656819571 -1392676806
+-569637836 -1422417237 -644983857 -1396714340
+-549372297 -1429330450 -569637836 -1422417237
+-523016061 -1438321391 -549372297 -1429330450
+-466149913 -1457720223 -523016061 -1438321391
+-450020781 -1463222377 -466149913 -1457720223
+-428258389 -1470646213 -450020781 -1463222377
+-340953161 -1500428772 -428258389 -1470646213
+-333546172 -1502955529 -340953161 -1500428772
+-122689274 -1574885448 -333546172 -1502955529
+236121868 2134066257 313404379 1975942450
+313404379 1975942450 414802591 1768476740
+414802591 1768476740 464214131 1667378307
+464214131 1667378307 549415460 1493052213
+549415460 1493052213 585103051 1420033653
+585103051 1420033653 642791051 1302001177
+642791051 1302001177 697622413 1189813523
+697622413 1189813523 716324564 1151548006
+716324564 1151548006 734788722 1113769435
+734788722 1113769435 749687345 1083286120
+749687345 1083286120 750506111 1081610886
+750506111 1081610886 756286890 1069783130
+756286890 1069783130 789353949 1002126306
+789353949 1002126306 789547095 1001731119
+789547095 1001731119 816462157 946661584
+816462157 946661584 819348653 940755671
+819348653 940755671 820568103 938260616
+820568103 938260616 840063064 898372972
+840063064 898372972 865004224 847342135
+865004224 847342135 892783522 790504331
+892783522 790504331 918364759 738163866
+918364759 738163866 935197048 703724179
+935197048 703724179 940952444 691948355
+940952444 691948355 968220733 636156101
+968220733 636156101 1049169811 470530320
+1049169811 470530320 1071713941 424403924
+1071713941 424403924 1077735403 412083717
+1077735403 412083717 1084926731 397369909
+1084926731 397369909 1090877306 385194741
+1090877306 385194741 1106688670 352843914
+1106688670 352843914 1118288209 329110691
+1118288209 329110691 1119458900 326715398
+1119458900 326715398 1120175444 325249315
+1120175444 325249315 1121466372 322608014
+1870793521 1649677108 1857900883 1657138007
+1984311702 1583984764 1870793521 1649677108
+2006865240 1570933156 1984311702 1583984764
+2065577095 1536956931 2006865240 1570933156
+-1742966439 930545432 -1726736696 932351917
+-1726736696 932351917 -1718582911 933259491
+-1718582911 933259491 -1342202955 975153242
+-1342202955 975153242 -1288955985 981080006
+-1288955985 981080006 -1244465318 986032132
+-1244465318 986032132 -1230888686 987543307
+-1230888686 987543307 -1206001765 990313397
+-1206001765 990313397 -1143196854 997304028
+-1143196854 997304028 -949557236 1018857487
+-949557236 1018857487 -921820488 1021944783
+-921820488 1021944783 -828049649 1032382141
+-828049649 1032382141 -813462830 1034005757
+-813462830 1034005757 -693846441 1047319907
+-693846441 1047319907 -651820415 1051997701
+-651820415 1051997701 -624437785 1055045581
+-624437785 1055045581 -591014755 1058765801
+-591014755 1058765801 -428322205 1076874632
+-428322205 1076874632 -422688739 1077501677
+9346012 -177671086 25210947 -220027078
+25210947 -220027078 35000604 -246163371
+35000604 -246163371 38970965 -256763387
+38970965 -256763387 40901478 -261917443
+40901478 -261917443 60843427 -315158189
+60843427 -315158189 85958638 -382210440
+85958638 -382210440 104848158 -432641423
+104848158 -432641423 118439401 -468927142
+118439401 -468927142 120275461 -473829029
+120275461 -473829029 120896005 -475485747
+120896005 -475485747 153648336 -562927479
+153648336 -562927479 169644778 -605634561
+169644778 -605634561 174003914 -617272524
+174003914 -617272524 188589936 -656214088
+188589936 -656214088 205315539 -700867877
+205315539 -700867877 207366837 -706344405
+207366837 -706344405 222213785 -745982586
+222213785 -745982586 222337779 -746313623
+222337779 -746313623 246071516 -809677632
+246071516 -809677632 258218338 -842107055
+258218338 -842107055 266037064 -862981383
+266037064 -862981383 269137499 -871258880
+269137499 -871258880 272610074 -880529914
+272610074 -880529914 276533998 -891005956
+276533998 -891005956 318048638 -1001841178
+318048638 -1001841178 330616905 -1035395768
+330616905 -1035395768 338886873 -1057474817
+338886873 -1057474817 338969186 -1057694575
+338969186 -1057694575 348778755 -1083884029
+348778755 -1083884029 388337532 -1189497517
+388337532 -1189497517 409572127 -1246189348
+409572127 -1246189348 450515899 -1355500478
+450515899 -1355500478 468609929 -1403807673
+468609929 -1403807673 515125935 -1527995476
+515125935 -1527995476 616318186 -1798157178
+616318186 -1798157178 676101695 -1957766380
+676101695 -1957766380 683182707 -1976671169
+-1872120808 1334204845 -1867950484 1322677744
+-1867950484 1322677744 -1726736696 932351917
+-1726736696 932351917 -1706285404 875822964
+-1706285404 875822964 -1700364750 859457818
+-1700364750 859457818 -1682905725 811199725
+-1682905725 811199725 -1645928315 708991303
+-1645928315 708991303 -1629174303 662681919
+-1629174303 662681919 -1592441890 561150691
+-1592441890 561150691 -1586142454 543738563
+-1586142454 543738563 -1577813320 520716191
+-1577813320 520716191 -1562451798 478255757
+-1562451798 478255757 -1484115981 261729503
+-1484115981 261729503 -1475673460 238393721
+-1475673460 238393721 -1462558743 202143629
+-1462558743 202143629 -1402123723 35096563
+-1402123723 35096563 -1372144290 -47768910
+-1372144290 -47768910 -1367328625 -61079780
+-1367328625 -61079780 -1348496291 -113133805
+-1348496291 -113133805 -1325122137 -177741776
+-1325122137 -177741776 -1285944510 -286031766
+-1285944510 -286031766 -1242368201 -406480052
+-1242368201 -406480052 -1235007612 -426825291
+-1235007612 -426825291 -1233539687 -430882748
+-1233539687 -430882748 -1229286213 -442639679
+-1229286213 -442639679 -1228257277 -445483738
+-1228257277 -445483738 -1220074232 -468102305
+-434753250 1857062948 -1134839641 2134326477
+-350214066 1823581892 -434753250 1857062948
+-324395856 1813356799 -350214066 1823581892
+19733490 1677067168 -324395856 1813356799
+-1034922799 -300881329 -982523978 -296884978
+-982523978 -296884978 -752215196 -279319794
+-752215196 -279319794 -748802595 -279059521
+-748802595 -279059521 -744974594 -278767568
+-744974594 -278767568 -730332486 -277650844
+-730332486 -277650844 -691101106 -274658746
+-691101106 -274658746 -671388639 -273155316
+-671388639 -273155316 -631684333 -270127149
+-631684333 -270127149 -618255572 -269102965
+-618255572 -269102965 -606114067 -268176957
+-606114067 -268176957 -591093552 -267031372
+-591093552 -267031372 -510635871 -260895028
+-510635871 -260895028 -440047715 -255511413
+-440047715 -255511413 -432241632 -254916059
+-432241632 -254916059 -427525114 -254556339
+-427525114 -254556339 -416700652 -253730780
+-416700652 -253730780 -400227215 -252474384
+-400227215 -252474384 -334677669 -247475053
+-334677669 -247475053 -225514518 -239149401
+-225514518 -239149401 -188541355 -236329532
+-188541355 -236329532 -170801749 -234976569
+-170801749 -234976569 -141093111 -232710751
+-141093111 -232710751 -122463545 -231289912
+-122463545 -231289912 -76520414 -227785922
+-76520414 -227785922 -65052458 -226911285
+-65052458 -226911285 -3137958 -222189191
+-3137958 -222189191 6946294 -221420086
+6946294 -221420086 25210947 -220027078
+25210947 -220027078 76930031 -216082568
+76930031 -216082568 95593811 -214659119
+95593811 -214659119 103643126 -214045214
+103643126 -214045214 141472285 -211160061
+141472285 -211160061 179995950 -208221939
+179995950 -208221939 226767546 -204654764
+226767546 -204654764 302292800 -198894606
+302292800 -198894606 332749854 -196571709
+332749854 -196571709 422444580 -189730874
+422444580 -189730874 441855326 -188250455
+441855326 -188250455 462773592 -186655062
+462773592 -186655062 464438395 -186528091
+464438395 -186528091 543875961 -180469548
+543875961 -180469548 621566180 -174544273
+621566180 -174544273 627234015 -174111999
+627234015 -174111999 641874753 -172995379
+641874753 -172995379 651216600 -172282895
+651216600 -172282895 685687598 -169653862
+685687598 -169653862 687999192 -169477562
+687999192 -169477562 696576495 -168823388
+696576495 -168823388 731281546 -166176504
+731281546 -166176504 793886739 -161401733
+793886739 -161401733 832784662 -158435067
+-1542342992 550967496 -1556601223 587836881
+-1528881399 516158084 -1542342992 550967496
+-1502221368 447219734 -1528881399 516158084
+-1451585677 316284367 -1502221368 447219734
+-1425251216 248187885 -1451585677 316284367
+-1396514888 173880582 -1425251216 248187885
+-1329302059 79528 -1396514888 173880582
+-1317292939 -30974033 -1329302059 79528
+-1315110429 -36617638 -1317292939 -30974033
+-1295069190 -88440906 -1315110429 -36617638
+-1268881673 -156157413 -1295069190 -88440906
+-1232547043 -250112646 -1268881673 -156157413
+-1210517368 -307077674 -1232547043 -250112646
+-1203000155 -326515923 -1210517368 -307077674
+-1197057426 -341882819 -1203000155 -326515923
+-1185739156 -371149958 -1197057426 -341882819
+-1154570784 -451746117 -1185739156 -371149958
+-1146533930 -472528068 -1154570784 -451746117
+-1144037090 -478984476 -1146533930 -472528068
+-1111327926 -563564866 -1144037090 -478984476
+-1087947418 -624022921 -1111327926 -563564866
+-1028045793 -778918433 -1087947418 -624022921
+-1015413526 -811583346 -1028045793 -778918433
+-980341444 -902273845 -1015413526 -811583346
+-898105269 -1114922740 -980341444 -902273845
+-892496018 -1129427320 -898105269 -1114922740
+-885773602 -1146810354 -892496018 -1129427320
+-858158294 -1218218889 -885773602 -1146810354
+-853340302 -1230677404 -858158294 -1218218889
+-816035177 -1327142176 -853340302 -1230677404
+-811036211 -1340068660 -816035177 -1327142176
+-810549462 -1341327310 -811036211 -1340068660
+-788975612 -1397113651 -810549462 -1341327310
+-735532205 -1535309301 -788975612 -1397113651
+-730788025 -1547576952 -735532205 -1535309301
+-721439487 -1571750694 -730788025 -1547576952
+-698466676 -1631154515 -721439487 -1571750694
+-598397545 -1889916431 -698466676 -1631154515
+-572218394 -1957611305 -598397545 -1889916431
+284376202 -1033523496 214867690 -1098923894
+291462957 -1026855583 284376202 -1033523496
+311318527 -1008173524 291462957 -1026855583
+318048638 -1001841178 311318527 -1008173524
+339207147 -981933185 318048638 -1001841178
+341488629 -979786544 339207147 -981933185
+366190273 -956544824 341488629 -979786544
+439678116 -887400282 366190273 -956544824
+465595167 -863014989 439678116 -887400282
+529036223 -803323446 465595167 -863014989
+576875274 -758311793 529036223 -803323446
+599182360 -737323107 576875274 -758311793
+640938667 -698034693 599182360 -737323107
+678861584 -662353108 640938667 -698034693
+691455068 -650503928 678861584 -662353108
+700421764 -642067185 691455068 -650503928
+795028203 -553052204 700421764 -642067185
+813422638 -535744923 795028203 -553052204
+-1436096997 -2115886764 -1117825587 -2092060787
+-1117825587 -2092060787 -165855696 -2020795785
+-165855696 -2020795785 676101695 -1957766380
+676101695 -1957766380 804755043 -1948135317
+-345134810 -758960216 -343386398 -757692302
+-343386398 -757692302 -212735420 -662946783
+-212735420 -662946783 -194619356 -649809370
+-194619356 -649809370 -179489718 -638837655
+-179489718 -638837655 -124848891 -599213202
+-124848891 -599213202 -108166846 -587115712
+-108166846 -587115712 -78604493 -565677675
+-78604493 -565677675 -50846490 -545548117
+-50846490 -545548117 -30401674 -530721939
+-30401674 -530721939 -8927756 -515149476
+-8927756 -515149476 23074602 -491941996
+23074602 -491941996 25312035 -490319454
+25312035 -490319454 50694858 -471912329
+50694858 -471912329 70989640 -457194953
+70989640 -457194953 73648779 -455266598
+73648779 -455266598 94933026 -439831681
+94933026 -439831681 104848158 -432641423
+104848158 -432641423 124230900 -418585439
+124230900 -418585439 286871237 -300641867
+286871237 -300641867 287498187 -300187216
+287498187 -300187216 291519944 -297270716
+291519944 -297270716 301415580 -290094596
+301415580 -290094596 352637962 -252949132
+352637962 -252949132 357252874 -249602489
+357252874 -249602489 369304068 -240863200
+369304068 -240863200 441855326 -188250455
+441855326 -188250455 449097079 -182998879
+449097079 -182998879 468249020 -169110268
+468249020 -169110268 500158849 -145969888
+500158849 -145969888 534825191 -120830539
+534825191 -120830539 574497375 -92061052
+574497375 -92061052 587796268 -82416956
+587796268 -82416956 628133987 -53164836
+628133987 -53164836 765666795 46571250
+765666795 46571250 787314071 62269429
+787314071 62269429 804602982 74807007
+804602982 74807007 876932908 127259246
+876932908 127259246 909972802 151219127
+909972802 151219127 947566422 178481280
+947566422 178481280 948969001 179498403
+948969001 179498403 1022798118 233037826
+-1650658806 -1134392710 -1740005019 -1281069345
+-1609935671 -1067538928 -1650658806 -1134392710
+-1581098725 -1020198294 -1609935671 -1067538928
+-1475298703 -846510004 -1581098725 -1020198294
+-1327246341 -603457484 -1475298703 -846510004
+-1281332262 -528081905 -1327246341 -603457484
+-1257026750 -488180374 -1281332262 -528081905
+-1237555690 -456215398 -1257026750 -488180374
+-1230882720 -445260610 -1237555690 -456215398
+-1229286213 -442639679 -1230882720 -445260610
+-1223627622 -433350163 -1229286213 -442639679
+-1191980077 -381395466 -1223627622 -433350163
+-1185739156 -371149958 -1191980077 -381395466
+-1099436749 -229470237 -1185739156 -371149958
+-1062971884 -169607111 -1099436749 -229470237
+-1043363609 -137416873 -1062971884 -169607111
+-1028334452 -112744019 -1043363609 -137416873
+-989455097 -48917105 -1028334452 -112744019
+-965972870 -10367133 -989455097 -48917105
+-942961134 27410449 -965972870 -10367133
+-903210205 92668195 -942961134 27410449
+-900854998 96534659 -903210205 92668195
+-884283085 123740205 -900854998 96534659
+-881935660 127593892 -884283085 123740205
+-876911718 135841527 -881935660 127593892
+-868633279 149431957 -876911718 135841527
+-848937556 181765755 -868633279 149431957
+-833277922 207473642 -848937556 181765755
+-804043465 255466854 -833277922 207473642
+-789639934 279112641 -804043465 255466854
+-762853554 323086928 -789639934 279112641
+-750366850 343585926 -762853554 323086928
+-725767450 383969922 -750366850 343585926
+-723720369 387330545 -725767450 383969922
+-723398662 387858680 -723720369 387330545
+-692693959 438265545 -723398662 387858680
+-649537750 509113624 -692693959 438265545
+-635339355 532422645 -649537750 509113624
+-602444674 586424723 -635339355 532422645
+-590235529 606468060 -602444674 586424723
+-561513326 653620323 -590235529 606468060
+-545783793 679442960 -561513326 653620323
+-521401876 719469923 -545783793 679442960
+-479729609 787881865 -521401876 719469923
+-473879051 797486526 -479729609 787881865
+-467401532 808120448 -473879051 797486526
+-465898384 810588116 -467401532 808120448
+-427873531 873012222 -465898384 810588116
+-427757773 873202257 -427873531 873012222
+-332120372 1030206920 -427757773 873202257
+-865055278 -714129811 -880363917 -722089238
+-796283912 -678373485 -865055278 -714129811
+-671529890 -613510073 -796283912 -678373485
+-663488215 -609328962 -671529890 -613510073
+-628771442 -591278655 -663488215 -609328962
+-624944281 -589288798 -628771442 -591278655
+-589748217 -570989293 -624944281 -589288798
+-521892347 -535708962 -589748217 -570989293
+-484635523 -516338005 -521892347 -535708962
+-471978864 -509757423 -484635523 -516338005
+-374471543 -459060400 -471978864 -509757423
+-337275350 -439720967 -374471543 -459060400
+-287597329 -413891853 -337275350 -439720967
+-274516126 -407090537 -287597329 -413891853
+-264812852 -402045510 -274516126 -407090537
+-196953698 -366763471 -264812852 -402045510
+-168152952 -351789087 -196953698 -366763471
+-90315305 -311318925 -168152952 -351789087
+-80599109 -306267179 -90315305 -311318925
+-76516060 -304144278 -80599109 -306267179
+-24587050 -277144806 -76516060 -304144278
+2579838 -263019914 -24587050 -277144806
+12853625 -257678260 2579838 -263019914
+13243404 -257475602 12853625 -257678260
+35000604 -246163371 13243404 -257475602
+61923072 -232165561 35000604 -246163371
+95593811 -214659119 61923072 -232165561
+105581310 -209466315 95593811 -214659119
+121387789 -201248046 105581310 -209466315
+152952757 -184836458 121387789 -201248046
+196926669 -161973083 152952757 -184836458
+246241613 -136332743 196926669 -161973083
+271986709 -122947084 246241613 -136332743
+316787751 -99653659 271986709 -122947084
+391948771 -60575158 316787751 -99653659
+416720962 -47695343 391948771 -60575158
+493761784 -7639475 416720962 -47695343
+523460166 7801617 493761784 -7639475
+531451869 11956747 523460166 7801617
+582775377 38641400 531451869 11956747
+608067106 51791340 582775377 38641400
+770750466 136375369 608067106 51791340
+786371776 144497363 770750466 136375369
+826928781 165584184 786371776 144497363
+832925681 168702155 826928781 165584184
+851896024 178565413 832925681 168702155
+879011121 192663377 851896024 178565413
+972245715 241138880 879011121 192663377
+993976458 252437355 972245715 241138880
+1034506075 273509935 993976458 252437355
+1040807769 276786378 1034506075 273509935
+1076736895 295467024 1040807769 276786378
+-2077944395 -1592198087 -1652471466 -1426103606
+-1652471466 -1426103606 -1639402774 -1421001900
+-1639402774 -1421001900 -1500763797 -1366880551
+-1500763797 -1366880551 -1493502751 -1364046012
+-1493502751 -1364046012 -1305025922 -1290469154
+-1305025922 -1290469154 -1239584591 -1264922419
+-1239584591 -1264922419 -1190913824 -1245922513
+-1190913824 -1245922513 -1142463125 -1227008516
+-1142463125 -1227008516 -1093497210 -1207893391
+-1093497210 -1207893391 -1030920632 -1183464987
+-1030920632 -1183464987 -984573503 -1165372174
+-984573503 -1165372174 -915974382 -1138592714
+-915974382 -1138592714 -912631976 -1137287918
+-912631976 -1137287918 -892496018 -1129427320
+-892496018 -1129427320 -708162298 -1057467833
+-708162298 -1057467833 -653458362 -1036112722
+-653458362 -1036112722 -531549732 -988522501
+-531549732 -988522501 -503659073 -977634653
+-503659073 -977634653 -432932636 -950024739
+-432932636 -950024739 -429032597 -948502257
+-429032597 -948502257 -385057860 -931335569
+-385057860 -931335569 -367231431 -924376556
+-367231431 -924376556 -299532949 -897948684
+-299532949 -897948684 -163338759 -844781720
+-163338759 -844781720 -153723142 -841028013
+-153723142 -841028013 -120596844 -828096296
+-120596844 -828096296 -103700505 -821500369
+-103700505 -821500369 25924024 -770898045
+25924024 -770898045 67761096 -754565850
+67761096 -754565850 88561560 -746445845
+88561560 -746445845 97998814 -742761766
+97998814 -742761766 115248716 -736027816
+115248716 -736027816 116368608 -735590637
+116368608 -735590637 151468020 -721888664
+151468020 -721888664 162859758 -717441601
+162859758 -717441601 170178506 -714584536
+170178506 -714584536 195545511 -704681863
+195545511 -704681863 205315539 -700867877
+205315539 -700867877 211474136 -698463708
+211474136 -698463708 230406106 -691073118
+230406106 -691073118 246209497 -684903851
+1709541396 -1783226156 1715504403 -1662343690
+1715504403 -1662343690 1725059547 -1468641197
+1725059547 -1468641197 1739874221 -1168317166
+1739874221 -1168317166 1747049039 -1022868789
+1747049039 -1022868789 1759063094 -779319109
+-1003865202 337857318 -1021019264 337469667
+-972428906 338567721 -1003865202 337857318
+-948871705 339100072 -972428906 338567721
+-930189584 339522254 -948871705 339100072
+-917623970 339806215 -930189584 339522254
+-800909159 342443760 -917623970 339806215
+-773992287 343052033 -800909159 342443760
+-750366850 343585926 -773992287 343052033
+-717331696 344332461 -750366850 343585926
+-679381903 345190058 -717331696 344332461
+-619791089 346536704 -679381903 345190058
+-531098700 348540993 -619791089 346536704
+-516768191 348864836 -531098700 348540993
+-490995669 349447249 -516768191 348864836
+-465562663 350021990 -490995669 349447249
+-447276593 350435222 -465562663 350021990
+-440735340 350583042 -447276593 350435222
+-340256607 352853682 -440735340 350583042
+-336033724 352949111 -340256607 352853682
+-263041922 354598595 -336033724 352949111
+-249531075 354903916 -263041922 354598595
+-209444617 355809798 -249531075 354903916
+-168592007 356732994 -209444617 355809798
+-165771003 356796743 -168592007 356732994
+-137737298 357430255 -165771003 356796743
+-124716400 357724504 -137737298 357430255
+-94321487 358411374 -124716400 357724504
+-50872663 359393240 -94321487 358411374
+-40499887 359627646 -50872663 359393240
+4021044 360633739 -40499887 359627646
+21779094 361035039 4021044 360633739
+61141662 361924563 21779094 361035039
+79729812 362344622 61141662 361924563
+82283545 362402331 79729812 362344622
+114011375 363119323 82283545 362402331
+306405252 367467080 114011375 363119323
+319029452 367752364 306405252 367467080
+350208091 368456946 319029452 367752364
+385274874 369249392 350208091 368456946
+404009066 369672751 385274874 369249392
+419055076 370012764 404009066 369672751
+444106695 370578886 419055076 370012764
+556159873 373111086 444106695 370578886
+621424851 374585958 556159873 373111086
+628223193 374739588 621424851 374585958
+630534177 374791812 628223193 374739588
+638044438 374961531 630534177 374791812
+639548466 374995519 638044438 374961531
+924088046 381425603 639548466 374995519
+1047386985 384211938 924088046 381425603
+1077090878 384883193 1047386985 384211938
+1090877306 385194741 1077090878 384883193
+1136829142 386233171 1090877306 385194741
+751432073 -782861330 703282366 -873741525
+767646023 -752258299 751432073 -782861330
+776918917 -734756169 767646023 -752258299
+780678736 -727659696 776918917 -734756169
+794586028 -701410369 780678736 -727659696
+871116627 -556962640 794586028 -701410369
+874184216 -551172717 871116627 -556962640
+885257203 -530273001 874184216 -551172717
+914417452 -475234470 885257203 -530273001
+962027641 -385372588 914417452 -475234470
+1001874673 -310163282 962027641 -385372588
+1008940624 -296826648 1001874673 -310163282
+1042705743 -233096652 1008940624 -296826648
+1047684656 -223699200 1042705743 -233096652
+1130615209 -67171874 1047684656 -223699200
+1166884769 1285131 1130615209 -67171874
+1179166122 24465579 1166884769 1285131
+1183544793 32730103 1179166122 24465579
+1296713639 246330716 1183544793 32730103
+1300054802 252636996 1296713639 246330716
+1313737471 278462359 1300054802 252636996
+1356312826 358821241 1313737471 278462359
+1405557861 451768813 1356312826 358821241
+1466003358 565856706 1405557861 451768813
+1468358062 570301093 1466003358 565856706
+1550310007 724981345 1468358062 570301093
+1586992440 794217627 1550310007 724981345
+1592954783 805471256 1586992440 794217627
+1675288804 960872656 1592954783 805471256
+1696731086 1001343906 1675288804 960872656
+1698562637 1004800867 1696731086 1001343906
+-1607583214 540199847 -1650150500 533174280
+-1586142454 543738563 -1607583214 540199847
+-1542342992 550967496 -1586142454 543738563
+-1520681702 554542610 -1542342992 550967496
+-1437779093 568225368 -1520681702 554542610
+-1379834253 577788942 -1437779093 568225368
+-1370224565 579374985 -1379834253 577788942
+-1308033651 589639357 -1370224565 579374985
+-1026244756 636147537 -1308033651 589639357
+-991541620 641875157 -1026244756 636147537
+-858109104 663897683 -991541620 641875157
+-833271956 667996959 -858109104 663897683
+-779453098 676879556 -833271956 667996959
+-764038873 679423615 -779453098 676879556
+-733547067 684456171 -764038873 679423615
+-673554360 694357738 -733547067 684456171
+-642199301 699532770 -673554360 694357738
+-583514567 709218461 -642199301 699532770
+-521401876 719469923 -583514567 709218461
+-477739340 726676258 -521401876 719469923
+-435033191 733724745 -477739340 726676258
+-433958329 733902146 -435033191 733724745
+-429893152 734573088 -433958329 733902146
+-321935917 752391017 -429893152 734573088
+-241147887 765724773 -321935917 752391017
+-234946299 766748321 -241147887 765724773
+-193997334 773506791 -234946299 766748321
+-167579559 777866944 -193997334 773506791
+-6606200 804434981 -167579559 777866944
+52491299 814188797 -6606200 804434981
+73560072 817666118 52491299 814188797
+83311073 819275483 73560072 817666118
+246573593 846221338 83311073 819275483
+369313041 866479014 246573593 846221338
+371053669 866766298 369313041 866479014
+391208864 870092836 371053669 866766298
+446261122 879179001 391208864 870092836
+460087565 881461002 446261122 879179001
+490900735 886546598 460087565 881461002
+518778899 891147782 490900735 886546598
+575412270 900494904 518778899 891147782
+775244904 933476516 575412270 900494904
+814362180 939932673 775244904 933476516
+819348653 940755671 814362180 939932673
+824971423 941683688 819348653 940755671
+944493915 961410418 824971423 941683688
+994207899 969615521 944493915 961410418
+998794899 970372588 994207899 969615521
+629491517 -248033654 561613600 -328180178
+632138524 -244908213 629491517 -248033654
+646174149 -228335716 632138524 -244908213
+663031408 -208431588 646174149 -228335716
+667592700 -203045865 663031408 -208431588
+673718830 -195812466 667592700 -203045865
+679780800 -188654824 673718830 -195812466
+689440316 -177249398 679780800 -188654824
+696576495 -168823388 689440316 -177249398
+824139519 -18203961 696576495 -168823388
+843302717 4422893 824139519 -18203961
+875906654 42919835 843302717 4422893
+919624204 94539122 875906654 42919835
+951190686 131811094 919624204 94539122
+1044765645 242299277 951190686 131811094
+1071548353 273922831 1044765645 242299277
+1114391131 324509235 1071548353 273922831
+1118288209 329110691 1114391131 324509235
+1123412589 335161278 1118288209 329110691
+1196337032 421266464 1123412589 335161278
+1208489375 435615285 1196337032 421266464
+1283432753 524104318 1208489375 435615285
+1303678438 548009313 1283432753 524104318
+1052781093 -385049254 1048911426 -376551709
+1088629374 -463769802 1052781093 -385049254
+1113611982 -518630023 1088629374 -463769802
+1247639057 -812944969 1113611982 -518630023
+1251525555 -821479471 1247639057 -812944969
+1269900712 -861830150 1251525555 -821479471
+1329496453 -992698613 1269900712 -861830150
+1374109438 -1090665894 1329496453 -992698613
+581438018 1712297445 568734472 1730121650
+677779567 1577121685 581438018 1712297445
+892311701 1276114025 677779567 1577121685
+911066311 1249799639 892311701 1276114025
+926826358 1227686893 911066311 1249799639
+938987596 1210623594 926826358 1227686893
+944218451 1203284239 938987596 1210623594
+978037371 1155833287 944218451 1203284239
+1023077127 1092638504 978037371 1155833287
+1071482607 1024721312 1023077127 1092638504
+1081878443 1010135029 1071482607 1024721312
+1086931909 1003044567 1081878443 1010135029
+1142171230 925538889 1086931909 1003044567
+1155793669 906425395 1142171230 925538889
+1215493548 822661158 1155793669 906425395
+1229678906 802757839 1215493548 822661158
+1251991318 771451540 1229678906 802757839
+1261529681 758068370 1251991318 771451540
+1287984529 720949865 1261529681 758068370
+1332924922 657894499 1287984529 720949865
+-1870484211 1107970524 -2017453579 1340493016
+-1729703912 885239854 -1870484211 1107970524
+-1697337960 834033184 -1729703912 885239854
+-1682905725 811199725 -1697337960 834033184
+-1610363059 696428860 -1682905725 811199725
+-1570834671 633890392 -1610363059 696428860
+-1556389307 611036159 -1570834671 633890392
+-1520681702 554542610 -1556389307 611036159
+-1494389352 512945081 -1520681702 554542610
+-1428998173 409488693 -1494389352 512945081
+-1424810854 402863872 -1428998173 409488693
+-1310336461 221752179 -1424810854 402863872
+-1236906220 105577069 -1310336461 221752179
+-1185428399 24133219 -1236906220 105577069
+-1177626802 11790193 -1185428399 24133219
+-1158456167 -18539963 -1177626802 11790193
+-1155148799 -23772601 -1158456167 -18539963
+-1131651639 -60947817 -1155148799 -23772601
+-1110011459 -95185078 -1131651639 -60947817
+-1101471283 -108696621 -1110011459 -95185078
+-1100764283 -109815178 -1101471283 -108696621
+-1082002861 -139497911 -1100764283 -109815178
+-1077857249 -146056747 -1082002861 -139497911
+-1062971884 -169607111 -1077857249 -146056747
+-982523978 -296884978 -1062971884 -169607111
+-911937089 -408561576 -982523978 -296884978
+-901170943 -425594860 -911937089 -408561576
+-1884366481 -68408424 -1881659693 160963955
+-1881659693 160963955 -1880358286 271244707
+-1880358286 271244707 -1879070313 380387103
+-1879070313 380387103 -1874311340 783660908
+-1874311340 783660908 -1874240824 789636384
+-1874240824 789636384 -1871640724 1009968024
+-1871640724 1009968024 -1870484211 1107970524
+-1870484211 1107970524 -1867950484 1322677744
+-1867950484 1322677744 -1866174779 1473150336
+-1866174779 1473150336 -1865146272 1560305668
+-1865146272 1560305668 -1864503280 1614792662
+-1864503280 1614792662 -1862508387 1783839147
+-1864503280 1614792662 -1968190317 2099071565
+-1850040491 1547243011 -1864503280 1614792662
+-1826001943 1434968978 -1850040491 1547243011
+-1814319969 1380407355 -1826001943 1434968978
+-1718582911 933259491 -1814319969 1380407355
+-1706285404 875822964 -1718582911 933259491
+-1703341617 862073766 -1706285404 875822964
+-1697337960 834033184 -1703341617 862073766
+-1672581434 718405781 -1697337960 834033184
+-1664369510 680051308 -1672581434 718405781
+-1657842175 649564853 -1664369510 680051308
+-889867104 1582152707 -869126850 1433355965
+-869126850 1433355965 -859528933 1364497658
+-859528933 1364497658 -856845684 1345247234
+-856845684 1345247234 -843027653 1246112573
+-843027653 1246112573 -823597429 1106714379
+-823597429 1106714379 -813462830 1034005757
+-813462830 1034005757 -808308424 997026521
+-808308424 997026521 -791016644 872970156
+-791016644 872970156 -773323329 746033061
+-773323329 746033061 -767685654 705586705
+-767685654 705586705 -764038873 679423615
+-764038873 679423615 -757596950 633207350
+-757596950 633207350 -752739233 598356647
+-752739233 598356647 -751790544 591550469
+-751790544 591550469 -749037373 571798399
+-749037373 571798399 -730921043 441826475
+-730921043 441826475 -723398662 387858680
+-723398662 387858680 -723264679 386897444
+-723264679 386897444 -722705888 382888510
+-722705888 382888510 -717331696 344332461
+-717331696 344332461 -704127742 249603376
+-704127742 249603376 -698223351 207243520
+-698223351 207243520 -697624535 202947436
+-697624535 202947436 -695625994 188609316
+-695625994 188609316 -691717718 160570181
+-691717718 160570181 -685743354 117708319
+-685743354 117708319 -680944613 83280726
+-680944613 83280726 -680034829 76753663
+-680034829 76753663 -679526079 73103745
+-679526079 73103745 -679119349 70185743
+-679119349 70185743 -672781588 24716760
+-672781588 24716760 -672046122 19440312
+-672046122 19440312 -670417241 7754235
+-670417241 7754235 -661939576 -53067055
+-661939576 -53067055 -657188989 -87149173
+-657188989 -87149173 -648983066 -146020901
+-648983066 -146020901 -641673370 -198462827
+-641673370 -198462827 -639010317 -217568362
+-639010317 -217568362 -631684333 -270127149
+-631684333 -270127149 -628710167 -291464699
+-628710167 -291464699 -625083070 -317486565
+-625083070 -317486565 -624513610 -321572042
+-624513610 -321572042 -621935996 -340064611
+-621935996 -340064611 -610735524 -420420121
+-610735524 -420420121 -604047719 -468400422
+-604047719 -468400422 -599797250 -498894547
+-599797250 -498894547 -589748217 -570989293
+-589748217 -570989293 -586442760 -594703623
+-586442760 -594703623 -581808028 -627954565
+-581808028 -627954565 -578099263 -654562345
+-578099263 -654562345 -558619047 -794319199
+-558619047 -794319199 -555540291 -816407112
+-555540291 -816407112 -555291992 -818188484
+-555291992 -818188484 -551845484 -842914755
+-551845484 -842914755 -546142356 -883830687
+-546142356 -883830687 -531549732 -988522501
+-531549732 -988522501 -521991700 -1057094666
+-521991700 -1057094666 -512886046 -1122421331
+-512886046 -1122421331 -503746966 -1187987801
+-503746966 -1187987801 -494652456 -1253234518
+-494652456 -1253234518 -476708690 -1381968419
+-476708690 -1381968419 -476061958 -1386608270
+-476061958 -1386608270 -476049011 -1386701151
+-476049011 -1386701151 -466149913 -1457720223
+-466149913 -1457720223 -464860728 -1466969218
+-464860728 -1466969218 -455407954 -1534786226
+-455407954 -1534786226 -424707449 -1755040758
+434956886 -638380585 449052739 -615918332
+449052739 -615918332 465171646 -590232271
+465171646 -590232271 465665783 -589444844
+465665783 -589444844 479916422 -566735936
+479916422 -566735936 490156665 -550417738
+490156665 -550417738 520253176 -502457856
+520253176 -502457856 548306338 -457754127
+548306338 -457754127 566399834 -428921485
+566399834 -428921485 570258380 -422772752
+570258380 -422772752 599245161 -376581267
+599245161 -376581267 618068321 -346585879
+618068321 -346585879 682789050 -243451054
+682789050 -243451054 683192809 -242807650
+683192809 -242807650 683378475 -242511783
+683378475 -242511783 686458869 -237603064
+686458869 -237603064 696796304 -221129987
+696796304 -221129987 697245853 -220413615
+697245853 -220413615 704810579 -208358949
+704810579 -208358949 731281546 -166176504
+731281546 -166176504 824139519 -18203961
+824139519 -18203961 840984488 8639108
+840984488 8639108 862769904 43354957
+862769904 43354957 902922638 107339794
+902922638 107339794 925785935 143773286
+925785935 143773286 946505847 176791216
+946505847 176791216 947566422 178481280
+947566422 178481280 987034769 241375521
+987034769 241375521 993976458 252437355
+993976458 252437355 1010943676 279475230
+1010943676 279475230 1010998842 279563139
+1010998842 279563139 1077090878 384883193
+1077090878 384883193 1084926731 397369909
+1084926731 397369909 1103527993 427011694
+1103527993 427011694 1116502666 447687305
+1116502666 447687305 1141659411 487775490
+1141659411 487775490 1144521596 492336485
+1144521596 492336485 1207542531 592762628
+1207542531 592762628 1287984529 720949865
+1287984529 720949865 1324197087 778655889
+1324197087 778655889 1352733760 824130111
+1352733760 824130111 1369481878 850818843
+1369481878 850818843 1393020130 888327901
+1393020130 888327901 1474318016 1017879027
+1474318016 1017879027 1475711074 1020098915
+1475711074 1020098915 1627791630 1262444791
+1627791630 1262444791 1775170566 1497298464
+1775170566 1497298464 1870793521 1649677108
+1870793521 1649677108 1979502394 1822908634
+1979502394 1822908634 2003983731 1861920531
+-915974382 -1138592714 -944630033 -1130795503
+-913854186 -1139169620 -915974382 -1138592714
+-885773602 -1146810354 -913854186 -1139169620
+-810610831 -1167262163 -885773602 -1146810354
+-680498113 -1202665867 -810610831 -1167262163
+-662981158 -1207432235 -680498113 -1202665867
+-649344981 -1211142642 -662981158 -1207432235
+-637799181 -1214284257 -649344981 -1211142642
+-494652456 -1253234518 -637799181 -1214284257
+-406659105 -1277177531 -494652456 -1253234518
+-382403235 -1283777559 -406659105 -1277177531
+-352592953 -1291888945 -382403235 -1283777559
+-342655693 -1294592876 -352592953 -1291888945
+-72876873 -1367999762 -342655693 -1294592876
+-56282458 -1372515106 -72876873 -1367999762
+-46911640 -1375064908 -56282458 -1372515106
+123722109 -1421494395 -46911640 -1375064908
+221170714 -1448010186 123722109 -1421494395
+363059457 -1486618149 221170714 -1448010186
+515125935 -1527995476 363059457 -1486618149
+595067677 -1549747645 515125935 -1527995476
+617053029 -1555729865 595067677 -1549747645
+734098033 -1587577840 617053029 -1555729865
+748709151 -1591553529 734098033 -1587577840
+1223539396 -1720754960 748709151 -1591553529
+-1402123723 35096563 -1457256436 61607687
+-1329302059 79528 -1402123723 35096563
+-1285174416 -21139697 -1329302059 79528
+-1283642674 -21876250 -1285174416 -21139697
+-1249990843 -38058074 -1283642674 -21876250
+-1218657524 -53125018 -1249990843 -38058074
+-1141095668 -90421422 -1218657524 -53125018
+-1121789096 -99705183 -1141095668 -90421422
+-1101737886 -109347010 -1121789096 -99705183
+-1100764283 -109815178 -1101737886 -109347010
+-1078340603 -120597831 -1100764283 -109815178
+-1055988389 -131346120 -1078340603 -120597831
+-1043363609 -137416873 -1055988389 -131346120
+-918953980 -197240504 -1043363609 -137416873
+-751455651 -277783772 -918953980 -197240504
+-748802595 -279059521 -751455651 -277783772
+-746669564 -280085211 -748802595 -279059521
+-726385658 -289838933 -746669564 -280085211
+-684845548 -309813916 -726385658 -289838933
+-670363467 -316777771 -684845548 -309813916
+-658709116 -322381884 -670363467 -316777771
+-632679465 -334898505 -658709116 -322381884
+-627866674 -337212784 -632679465 -334898505
+-621935996 -340064611 -627866674 -337212784
+-554785065 -372354816 -621935996 -340064611
+-448870340 -423284985 -554785065 -372354816
+-374471543 -459060400 -448870340 -423284985
+-308892302 -490594843 -374471543 -459060400
+-300112703 -494816602 -308892302 -490594843
+-225474746 -530707020 -300112703 -494816602
+-219379373 -533638042 -225474746 -530707020
+-155432742 -564387427 -219379373 -533638042
+-108166846 -587115712 -155432742 -564387427
+-63386928 -608648589 -108166846 -587115712
+-43900388 -618018889 -63386928 -608648589
+10999797 -644418200 -43900388 -618018889
+36389811 -656627246 10999797 -644418200
+87224617 -681071677 36389811 -656627246
+87240729 -681079425 87224617 -681071677
+111843968 -692910141 87240729 -681079425
+142005619 -707413677 111843968 -692910141
+143892304 -708320908 142005619 -707413677
+162859758 -717441601 143892304 -708320908
+176153236 -723833904 162859758 -717441601
+222213785 -745982586 176153236 -723833904
+222374820 -746060021 222213785 -745982586
+235838632 -752534231 222374820 -746060021
+279604594 -773579538 235838632 -752534231
+355658774 -810150961 279604594 -773579538
+381510856 -822582196 355658774 -810150961
+465595167 -863014989 381510856 -822582196
+721123396 -985888327 465595167 -863014989
+789163799 -1018606245 721123396 -985888327
+799223245 -1023443431 789163799 -1018606245
+894827123 -1069415524 799223245 -1023443431
+903674904 -1073670070 894827123 -1069415524
+920464672 -1081743600 903674904 -1073670070
+1038899873 -1138694366 920464672 -1081743600
+1157269008 -1195613364 1038899873 -1138694366
+1203586301 -1217885504 1157269008 -1195613364
+1233732538 -1232381627 1203586301 -1217885504
+1290728296 -1259788615 1233732538 -1232381627
+1527949710 -1373858935 1290728296 -1259788615
+1627435442 -1421697658 1527949710 -1373858935
+1725059547 -1468641197 1627435442 -1421697658
+1755150208 -1483110596 1725059547 -1468641197
+-592421323 -754100964 -565780907 -785797957
+-565780907 -785797957 -558619047 -794319199
+-558619047 -794319199 -525651517 -833544247
+-525651517 -833544247 -513126102 -848447091
+-513126102 -848447091 -510128171 -852014056
+-510128171 -852014056 -431597853 -945450094
+-431597853 -945450094 -429032597 -948502257
+-429032597 -948502257 -418018751 -961606624
+-418018751 -961606624 -370726603 -1017875222
+-370726603 -1017875222 -281529211 -1124003035
+-281529211 -1124003035 -268553950 -1139441110
+-1136111224 -2112158047 -1117825587 -2092060787
+-1117825587 -2092060787 -1005159139 -1968232079
+-1005159139 -1968232079 -897168955 -1849542928
+-897168955 -1849542928 -784629276 -1725853547
+-784629276 -1725853547 -698466676 -1631154515
+-698466676 -1631154515 -640959643 -1567950058
+-640959643 -1567950058 -574199147 -1494575365
+-574199147 -1494575365 -523016061 -1438321391
+-523016061 -1438321391 -476049011 -1386701151
+-476049011 -1386701151 -475961432 -1386604896
+-475961432 -1386604896 -464506427 -1374015002
+-464506427 -1374015002 -398715982 -1301706467
+-398715982 -1301706467 -382403235 -1283777559
+-382403235 -1283777559 -320239611 -1215455166
+-320239611 -1215455166 -269187593 -1159345245
+-269187593 -1159345245 -162305293 -1041873741
+-162305293 -1041873741 -75762666 -946757031
+-75762666 -946757031 -62516912 -932198974
+-62516912 -932198974 -29304466 -895696054
+-29304466 -895696054 54567624 -803514461
+54567624 -803514461 75922214 -780044197
+75922214 -780044197 99906361 -753683856
+99906361 -753683856 101694863 -751718161
+101694863 -751718161 115649996 -736380444
+115649996 -736380444 116368608 -735590637
+116368608 -735590637 142005619 -707413677
+142005619 -707413677 142860882 -706473680
+142860882 -706473680 150283040 -698316183
+150283040 -698316183 155772498 -692282865
+155772498 -692282865 188589936 -656214088
+188589936 -656214088 191162266 -653386909
+191162266 -653386909 244467504 -594800533
+244467504 -594800533 264867329 -572379625
+264867329 -572379625 274688986 -561584903
+274688986 -561584903 287972680 -546985147
+287972680 -546985147 299498648 -534317260
+299498648 -534317260 325169335 -506103288
+325169335 -506103288 382871143 -442684759
+382871143 -442684759 388704021 -436273998
+388704021 -436273998 412928598 -409649406
+412928598 -409649406 453442107 -365122082
+453442107 -365122082 463097761 -354509808
+463097761 -354509808 560956331 -246956045
+560956331 -246956045 589028862 -216102271
+589028862 -216102271 589715491 -215347615
+589715491 -215347615 624939885 -176633416
+624939885 -176633416 627234015 -174111999
+627234015 -174111999 636476579 -163953741
+636476579 -163953741 639779479 -160323612
+639779479 -160323612 666544124 -130907299
+666544124 -130907299 738348994 -51988468
+738348994 -51988468 823102375 41161728
+823102375 41161728 826199997 44566242
+826199997 44566242 891370686 116193621
+891370686 116193621 919260057 146846089
+919260057 146846089 946505847 176791216
+946505847 176791216 948969001 179498403
+948969001 179498403 1005537724 241671588
+1005537724 241671588 1034506075 273509935
+1034506075 273509935 1037746618 277071530
+1037746618 277071530 1058947471 300372826
+1058947471 300372826 1106688670 352843914
+1106688670 352843914 1141785382 391417780
+1141785382 391417780 1179863909 433268881
+1179863909 433268881 1183334168 437082951
+1183334168 437082951 1257014075 518062585
+1257014075 518062585 1434517804 713152232
+1434517804 713152232 1511082467 797302425
+1511082467 797302425 1523345216 810780088
+1523345216 810780088 1527474781 815318783
+1527474781 815318783 1581727981 874947039
+1581727981 874947039 1696731086 1001343906
+1696731086 1001343906 1960643572 1291403129
+1960643572 1291403129 2146986394 1496207589
+242824577 1571223473 263034410 1557619988
+263034410 1557619988 392816666 1470261974
+392816666 1470261974 532367067 1376328903
+532367067 1376328903 551658056 1363343904
+551658056 1363343904 642791051 1302001177
+642791051 1302001177 783722660 1207138399
+783722660 1207138399 801066118 1195464306
+801066118 1195464306 808924678 1190174614
+808924678 1190174614 858740180 1156643194
+858740180 1156643194 877956983 1143708130
+877956983 1143708130 898492770 1129885243
+898492770 1129885243 979118597 1075615019
+979118597 1075615019 988839235 1069071939
+988839235 1069071939 1064122100 1018398128
+1064122100 1018398128 1078629134 1008633266
+1078629134 1008633266 1086931909 1003044567
+1086931909 1003044567 1165281665 950306395
+1165281665 950306395 1277539336 874744392
+1277539336 874744392 1281242196 872251952
+1281242196 872251952 1295652928 862551913
+1295652928 862551913 1352733760 824130111
+1352733760 824130111 1379790850 805917656
+799575713 -656409786 840017369 -532579615
+840017369 -532579615 843689875 -521334599
+843689875 -521334599 845866456 -514670023
+845866456 -514670023 849958649 -502139950
+849958649 -502139950 879669769 -411166100
+879669769 -411166100 900028294 -348829395
+900028294 -348829395 900530702 -347291050
+900530702 -347291050 918890880 -291073173
+918890880 -291073173 936830651 -236142560
+936830651 -236142560 951268016 -191936126
+951268016 -191936126 974558396 -120622239
+974558396 -120622239 980191863 -103372866
+980191863 -103372866 1019762313 17789720
+1019762313 17789720 1026342220 37937039
+1026342220 37937039 1042897841 88629460
+1042897841 88629460 1093338650 243076497
+1093338650 243076497 1102471971 271042234
+1102471971 271042234 1120175444 325249315
+1120175444 325249315 1120852368 327322019
+1120852368 327322019 1123412589 335161278
+1123412589 335161278 1141785382 391417780
+1141785382 391417780 1154782072 431212945
+1154782072 431212945 1164271834 460270084
+1164271834 460270084 1177183882 499806080
+1177183882 499806080 1178868206 504963388
+1178868206 504963388 1207542531 592762628
+1207542531 592762628 1261529681 758068370
+1261529681 758068370 1266368990 772886076
+1266368990 772886076 1282780616 823137588
+1282780616 823137588 1295652928 862551913
+1295652928 862551913 1297904140 869445005
+1297904140 869445005 1304566272 889844093
+1304566272 889844093 1355625300 1046184086
+1355625300 1046184086 1390424985 1152738847
+1390424985 1152738847 1409947300 1212515122
+1409947300 1212515122 1419600898 1242073921
+1419600898 1242073921 1421142513 1246794260
+1421142513 1246794260 1440728902 1306766729
+1440728902 1306766729 1456691038 1355641929
+1456691038 1355641929 1471428210 1400766357
+1471428210 1400766357 1485156155 1442800583
+284483175 -560904279 316664171 -559263488
+316664171 -559263488 346971178 -557718244
+346971178 -557718244 365965037 -556749816
+365965037 -556749816 469252726 -551483553
+469252726 -551483553 490156665 -550417738
+490156665 -550417738 570950733 -546298342
+570950733 -546298342 619346308 -543830828
+619346308 -543830828 673160050 -541087062
+673160050 -541087062 825285174 -533330756
+825285174 -533330756 840017369 -532579615
+840017369 -532579615 856070443 -531761127
+856070443 -531761127 864384125 -531337243
+864384125 -531337243 885257203 -530273001
+885257203 -530273001 1113611982 -518630023
+1113611982 -518630023 1130424818 -517772797
+1130424818 -517772797 1172382804 -515633512
+1172382804 -515633512 1447131872 -501625059
+1447131872 -501625059 1681849818 -489657646
+1681849818 -489657646 1719004791 -487763249
+1719004791 -487763249 1763935115 -485472415
+1763935115 -485472415 1855109798 -480823751
+1855109798 -480823751 2118586206 -467390048
+-2097538536 1208477630 -2145938559 1251009559
+-1871640724 1009968024 -2097538536 1208477630
+-1729703912 885239854 -1871640724 1009968024
+-1703341617 862073766 -1729703912 885239854
+-1700364750 859457818 -1703341617 862073766
+-1502508645 685590098 -1700364750 859457818
+-1450641934 640011790 -1502508645 685590098
+-1379834253 577788942 -1450641934 640011790
+-1372663700 571487759 -1379834253 577788942
+-1283711185 493319987 -1372663700 571487759
+-1280779117 490743407 -1283711185 493319987
+-1132488515 360431791 -1280779117 490743407
+-1026480877 267276686 -1132488515 360431791
+-968309123 216157767 -1026480877 267276686
+-901272613 157248869 -968309123 216157767
+-876911718 135841527 -901272613 157248869
+-859189089 120267617 -876911718 135841527
+-855643307 117151732 -859189089 120267617
+-853779610 115513992 -855643307 117151732
+-849926806 112128308 -853779610 115513992
+-847097971 109642446 -849926806 112128308
+-790512384 59917384 -847097971 109642446
+-782336373 52732646 -790512384 59917384
+-764784323 37308634 -782336373 52732646
+-743244945 18380723 -764784323 37308634
+-701746524 -18086364 -743244945 18380723
+-676869261 -39947468 -701746524 -18086364
+-661939576 -53067055 -676869261 -39947468
+-646879788 -66300970 -661939576 -53067055
+-595952907 -111053396 -646879788 -66300970
+-564634914 -138574347 -595952907 -111053396
+-530669840 -168421441 -564634914 -138574347
+-519146640 -178547550 -530669840 -168421441
+-468048000 -223450911 -519146640 -178547550
+-448207354 -240886045 -468048000 -223450911
+-432241632 -254916059 -448207354 -240886045
+-425241228 -261067723 -432241632 -254916059
+-410196487 -274288416 -425241228 -261067723
+-373206504 -306793675 -410196487 -274288416
+-372312149 -307579597 -373206504 -306793675
+-360805384 -317691263 -372312149 -307579597
+-331063869 -343826871 -360805384 -317691263
+-271364289 -396288380 -331063869 -343826871
+-264812852 -402045510 -271364289 -396288380
+-172381514 -483270327 -264812852 -402045510
+-106935843 -540781262 -172381514 -483270327
+-78604493 -565677675 -106935843 -540781262
+-54255095 -587074914 -78604493 -565677675
+-31745214 -606855661 -54255095 -587074914
+10999797 -644418200 -31745214 -606855661
+40893566 -670687601 10999797 -644418200
+57481848 -685264694 40893566 -670687601
+68447119 -694900518 57481848 -685264694
+93482082 -716900203 68447119 -694900518
+115248716 -736027816 93482082 -716900203
+115649996 -736380444 115248716 -736027816
+159520560 -774932072 115649996 -736380444
+201859828 -812138060 159520560 -774932072
+211487829 -820598748 201859828 -812138060
+253428638 -857454587 211487829 -820598748
+269137499 -871258880 253428638 -857454587
+274333455 -875824871 269137499 -871258880
+276213061 -877476591 274333455 -875824871
+285189239 -885364483 276213061 -877476591
+302578356 -900645316 285189239 -885364483
+366190273 -956544824 302578356 -900645316
+416556115 -1000804231 366190273 -956544824
+-475133347 -1094657450 -499797613 -1179188248
+-470692542 -1079437670 -475133347 -1094657450
+-443008387 -984556934 -470692542 -1079437670
+-432932636 -950024739 -443008387 -984556934
+-431597853 -945450094 -432932636 -950024739
+-417105378 -895780650 -431597853 -945450094
+-410665263 -873708715 -417105378 -895780650
+-373015594 -744673597 -410665263 -873708715
+-353324585 -677187436 -373015594 -744673597
+-339395301 -629448191 -353324585 -677187436
+-325081309 -580390451 -339395301 -629448191
+-308525322 -523648817 -325081309 -580390451
+-302318751 -502377299 -308525322 -523648817
+-300112703 -494816602 -302318751 -502377299
+-279268002 -423376442 -300112703 -494816602
+-274516126 -407090537 -279268002 -423376442
+-271364289 -396288380 -274516126 -407090537
+-256851105 -346547960 -271364289 -396288380
+-248364731 -317462967 -256851105 -346547960
+-234892364 -271289694 -248364731 -317462967
+-232080656 -261653248 -234892364 -271289694
+-225514518 -239149401 -232080656 -261653248
+-197952606 -144687626 -225514518 -239149401
+-190571041 -119389100 -197952606 -144687626
+-188640004 -112770937 -190571041 -119389100
+-172182412 -56366528 -188640004 -112770937
+-167728132 -41100563 -172182412 -56366528
+-167239711 -39426621 -167728132 -41100563
+-140891092 50876888 -167239711 -39426621
+-136607123 65559155 -140891092 50876888
+-135110441 70688668 -136607123 65559155
+-124374623 107483083 -135110441 70688668
+-95132421 207703646 -124374623 107483083
+-94979678 208227133 -95132421 207703646
+-90337697 224136400 -94979678 208227133
+-88073278 231897148 -90337697 224136400
+-85238974 241611039 -88073278 231897148
+-79918647 259845169 -85238974 241611039
+-78159712 265873493 -79918647 259845169
+-73960504 280265258 -78159712 265873493
+-70520038 292056625 -73960504 280265258
+-67596069 302077820 -70520038 292056625
+-66675195 305233893 -67596069 302077820
+-60887191 325070871 -66675195 305233893
+-50872663 359393240 -60887191 325070871
+-45451316 377973593 -50872663 359393240
+-32395649 422718728 -45451316 377973593
+-7970694 506429344 -32395649 422718728
+10364008 569267091 -7970694 506429344
+15449575 586696642 10364008 569267091
+16424810 590039022 15449575 586696642
+33895543 649915728 16424810 590039022
+53517266 717164427 33895543 649915728
+63339109 750826414 53517266 717164427
+72196640 781183457 63339109 750826414
+83311073 819275483 72196640 781183457
+91278625 846582337 83311073 819275483
+97722767 868668072 91278625 846582337
+167101833 1106448008 97722767 868668072
+170571410 1118339142 167101833 1106448008
+182629396 1159664967 170571410 1118339142
+183227212 1161713836 182629396 1159664967
+191462818 1189939381 183227212 1161713836
+220340387 1288910251 191462818 1189939381
+-1239584591 -1264922419 -1263591341 -1313471049
+-1209524329 -1204131830 -1239584591 -1264922419
+-1145232409 -1074114874 -1209524329 -1204131830
+-1079550965 -941287896 -1145232409 -1074114874
+-1070814950 -923621134 -1079550965 -941287896
+-1015413526 -811583346 -1070814950 -923621134
+-978002860 -735928101 -1015413526 -811583346
+-915688845 -609911045 -978002860 -735928101
+-892815021 -563653521 -915688845 -609911045
+-887249486 -552398392 -892815021 -563653521
+-873570663 -524735833 -887249486 -552398392
+-850266465 -477607969 -873570663 -524735833
+-805686073 -387453454 -850266465 -477607969
+-756293016 -287566330 -805686073 -387453454
+-752215196 -279319794 -756293016 -287566330
+-751455651 -277783772 -752215196 -279319794
+-738665408 -251918182 -751455651 -277783772
+-709856255 -193657698 -738665408 -251918182
+-706663465 -187200948 -709856255 -193657698
+-679782769 -132840365 -706663465 -187200948
+-674917413 -123001201 -679782769 -132840365
+-657188989 -87149173 -674917413 -123001201
+-646879788 -66300970 -657188989 -87149173
+-627416449 -26940441 -646879788 -66300970
+-618201519 -8305172 -627416449 -26940441
+-599296394 29926489 -618201519 -8305172
+-586752267 55294361 -599296394 29926489
+-568825269 91547963 -586752267 55294361
+-566779722 95684653 -568825269 91547963
+-560179789 109031637 -566779722 95684653
+-556028702 117426342 -560179789 109031637
+-549811483 129999367 -556028702 117426342
+-518848763 192614989 -549811483 129999367
+-508233709 214081715 -518848763 192614989
+-506678300 217227204 -508233709 214081715
+-491167496 248594560 -506678300 217227204
+-474183743 282940646 -491167496 248594560
+-469063044 293296190 -474183743 282940646
+-469046489 293329667 -469063044 293296190
+-448366131 335151365 -469046489 293329667
+-443846313 344291750 -448366131 335151365
+-440735340 350583042 -443846313 344291750
+-426313456 379748285 -440735340 350583042
+-410381387 411967562 -426313456 379748285
+-353250088 527503660 -410381387 411967562
+-346816555 540514134 -353250088 527503660
+-333595955 567250032 -346816555 540514134
+-325026098 584580774 -333595955 567250032
+-320124320 594493596 -325026098 584580774
+-309669417 615636448 -320124320 594493596
+-270823524 694194140 -309669417 615636448
+-239644094 757248012 -270823524 694194140
+-238837257 758879672 -239644094 757248012
+-234946299 766748321 -238837257 758879672
+-183727760 870327099 -234946299 766748321
+-158676849 920987324 -183727760 870327099
+-91898220 1056033130 -158676849 920987324
+-51989365 1136740438 -91898220 1056033130
+-51966057 1136787573 -51989365 1136740438
+-45827590 1149201340 -51966057 1136787573
+-44361697 1152165800 -45827590 1149201340
+-15197607 1211144071 -44361697 1152165800
+77135680 1397868824 -15197607 1211144071
+158966208 1563353945 77135680 1397868824
+233888171 1714867938 158966208 1563353945
+306496472 1861703035 233888171 1714867938
+-1074512879 1880049947 -1029814640 1628853474
+-1029814640 1628853474 -1021172326 1580285146
+-1021172326 1580285146 -1014089584 1540481344
+-1014089584 1540481344 -1001140356 1467708894
+-1001140356 1467708894 -964702766 1262935863
+-964702766 1262935863 -935813724 1100584378
+-935813724 1100584378 -921820488 1021944783
+-921820488 1021944783 -910516734 958419613
+-910516734 958419613 -863487997 694126146
+-863487997 694126146 -858109104 663897683
+-858109104 663897683 -841752249 571974954
+-841752249 571974954 -840109026 562740319
+-840109026 562740319 -840104023 562712202
+-840104023 562712202 -835911016 539148219
+-835911016 539148219 -826233411 484761732
+-826233411 484761732 -820071170 450130988
+-820071170 450130988 -813833589 415076851
+-813833589 415076851 -813673396 414176595
+-813673396 414176595 -800909159 342443760
+-800909159 342443760 -789639934 279112641
+-789639934 279112641 -783640661 245397749
+-783640661 245397749 -778213356 214897221
+-778213356 214897221 -767615200 155337397
+-767615200 155337397 -764576704 138261565
+-764576704 138261565 -762564293 126952162
+-762564293 126952162 -756773168 94407029
+-756773168 94407029 -752883037 72545158
+-752883037 72545158 -752093744 68109463
+-752093744 68109463 -750639830 59938713
+-750639830 59938713 -747774622 43836737
+-747774622 43836737 -743244945 18380723
+-743244945 18380723 -732275317 -43266713
+-732275317 -43266713 -719349415 -115908070
+-719349415 -115908070 -706663465 -187200948
+-706663465 -187200948 -705237138 -195216661
+-705237138 -195216661 -697005486 -241477140
+-697005486 -241477140 -691101106 -274658746
+-691101106 -274658746 -684845548 -309813916
+-684845548 -309813916 -678905426 -343196382
+-678905426 -343196382 -669646806 -395228248
+-669646806 -395228248 -668348305 -402525601
+-668348305 -402525601 -660671293 -445669099
+-660671293 -445669099 -657947173 -460978185
+-657947173 -460978185 -651989572 -494458888
+-651989572 -494458888 -650911164 -500519358
+-650911164 -500519358 -648864631 -512020519
+-136810617 196379569 -134834704 199728771
+-134834704 199728771 -129813897 208239110
+-129813897 208239110 -120721874 223650221
+-120721874 223650221 -108045350 245137113
+-108045350 245137113 -98736203 260916250
+-98736203 260916250 -94163870 268666421
+-94163870 268666421 -82191683 288959451
+-82191683 288959451 -76260756 299012457
+-76260756 299012457 -74321641 302299285
+-74321641 302299285 -72274251 305769641
+-72274251 305769641 -60887191 325070871
+-60887191 325070871 -40499887 359627646
+-40499887 359627646 -30498183 376580679
+-30498183 376580679 -14978256 402887179
+-14978256 402887179 66381701 540793480
+66381701 540793480 136818513 660184893
+136818513 660184893 140605075 666603171
+140605075 666603171 147421560 678157212
+147421560 678157212 150763260 683821441
+150763260 683821441 152197260 686252091
+152197260 686252091 205056965 775850054
+205056965 775850054 246573593 846221338
+246573593 846221338 298445764 934145417
+298445764 934145417 315869254 963678483
+315869254 963678483 382525982 1076662599
+382525982 1076662599 396084246 1099644051
+396084246 1099644051 398373016 1103523549
+398373016 1103523549 441011093 1175795706
+441011093 1175795706 497423050 1271414787
+497423050 1271414787 523499191 1315614223
+523499191 1315614223 551658056 1363343904
+551658056 1363343904 585103051 1420033653
+585103051 1420033653 677779567 1577121685
+677779567 1577121685 870302673 1903451129
+870302673 1903451129 875180438 1911719010
+875180438 1911719010 990761157 2107629997
+-1950043782 1633720411 -1865146272 1560305668
+-1865146272 1560305668 -1850040491 1547243011
+-1850040491 1547243011 -1627189958 1354534007
+-1627189958 1354534007 -1309889521 1080149871
+-1309889521 1080149871 -1258422764 1035644222
+-1258422764 1035644222 -1252945251 1030907568
+-1252945251 1030907568 -1235304962 1015653207
+-1235304962 1015653207 -1206001765 990313397
+-1206001765 990313397 -1115625150 912160623
+-1115625150 912160623 -863487997 694126146
+-863487997 694126146 -833271956 667996959
+-833271956 667996959 -796225927 635961571
+-796225927 635961571 -776845150 619202131
+-776845150 619202131 -752739233 598356647
+-752739233 598356647 -746764483 593190008
+-746764483 593190008 -724821119 574214582
+-724821119 574214582 -649537750 509113624
+-649537750 509113624 -583260982 451801085
+-583260982 451801085 -552507171 425206864
+-552507171 425206864 -523785076 400369561
+-523785076 400369561 -474068184 357377101
+-474068184 357377101 -465562663 350021990
+-465562663 350021990 -448366131 335151365
+-448366131 335151365 -429757820 319059912
+-429757820 319059912 -424051517 314125411
+-424051517 314125411 -410793179 302660323
+-410793179 302660323 -362989710 261322487
+-362989710 261322487 -362904799 261249060
+-362904799 261249060 -352249691 252035103
+-352249691 252035103 -315815175 220528518
+-315815175 220528518 -307075853 212971228
+-307075853 212971228 -304726540 210939670
+-304726540 210939670 -300469954 207258807
+-300469954 207258807 -260720743 172885854
+-260720743 172885854 -215822880 134060627
+-215822880 134060627 -214925263 133284417
+-214925263 133284417 -136607123 65559155
+-136607123 65559155 -133243737 62650682
+-133243737 62650682 -130367868 60163787
+-130367868 60163787 -113372947 45467505
+-113372947 45467505 -90969807 26094489
+-90969807 26094489 -26553552 -29609179
+-26553552 -29609179 25664909 -74764860
+25664909 -74764860 42720297 -89513431
+42720297 -89513431 83110285 -124440492
+83110285 -124440492 125906608 -161448422
+125906608 -161448422 127014738 -162406672
+127014738 -162406672 152952757 -184836458
+152952757 -184836458 179995950 -208221939
+179995950 -208221939 235612189 -256315833
+235612189 -256315833 239124172 -259352805
+239124172 -259352805 286871237 -300641867
+286871237 -300641867 287368922 -301072237
+287368922 -301072237 294497472 -307236619
+294497472 -307236619 304588496 -315962787
+304588496 -315962787 397377669 -396201810
+397377669 -396201810 412928598 -409649406
+412928598 -409649406 432873135 -426896356
+432873135 -426896356 520253176 -502457856
+520253176 -502457856 570950733 -546298342
+570950733 -546298342 618495282 -587412279
+618495282 -587412279 671710895 -633430242
+671710895 -633430242 691455068 -650503928
+691455068 -650503928 721990326 -676909156
+721990326 -676909156 747091431 -698615224
+747091431 -698615224 780678736 -727659696
+780678736 -727659696 849762385 -787399474
+849762385 -787399474 862593314 -798494963
+862593314 -798494963 1004524071 -921228951
+1004524071 -921228951 1008829712 -924952234
+1008829712 -924952234 1096174672 -1000483399
+1096174672 -1000483399 1116308398 -1017893949
+1116308398 -1017893949 1178328851 -1071525858
+1178328851 -1071525858 1408401397 -1270480065
+1408401397 -1270480065 1527949710 -1373858935
+1527949710 -1373858935 1568043436 -1408529805
+-1724038116 -403348909 -1924900296 -386278274
+-1675411221 -407481554 -1724038116 -403348909
+-1393778460 -431416622 -1675411221 -407481554
+-1254160499 -443282306 -1393778460 -431416622
+-1241794486 -444333254 -1254160499 -443282306
+-1239145512 -444558382 -1241794486 -444333254
+-1230882720 -445260610 -1239145512 -444558382
+-1228257277 -445483738 -1230882720 -445260610
+-1197977274 -448057139 -1228257277 -445483738
+-1178257558 -449733054 -1197977274 -448057139
+-1154570784 -451746117 -1178257558 -449733054
+-1142702469 -452754768 -1154570784 -451746117
+-1040391433 -461449855 -1142702469 -452754768
+-1012138053 -463851020 -1040391433 -461449855
+-985925201 -466078766 -1012138053 -463851020
+-850266465 -477607969 -985925201 -466078766
+-812443956 -480822383 -850266465 -477607969
+-726567152 -488120778 -812443956 -480822383
+-692875602 -490984115 -726567152 -488120778
+-666216194 -493249813 -692875602 -490984115
+-660354473 -493747982 -666216194 -493249813
+-651989572 -494458888 -660354473 -493747982
+-650078874 -494621272 -651989572 -494458888
+-599797250 -498894547 -650078874 -494621272
+-508828924 -506625654 -599797250 -498894547
+-503306879 -507094955 -508828924 -506625654
+-471978864 -509757423 -503306879 -507094955
+-308525322 -523648817 -471978864 -509757423
+-289551515 -525261340 -308525322 -523648817
+-225474746 -530707020 -289551515 -525261340
+-217293250 -531402339 -225474746 -530707020
+-181747122 -534423291 -217293250 -531402339
+-106935843 -540781262 -181747122 -534423291
+-50846490 -545548117 -106935843 -540781262
+-37169402 -546710489 -50846490 -545548117
+2254970 -550061040 -37169402 -546710489
+27737924 -552226755 2254970 -550061040
+58179877 -554813920 27737924 -552226755
+65279025 -555417253 58179877 -554813920
+67483700 -555604622 65279025 -555417253
+150271393 -562640483 67483700 -555604622
+153648336 -562927479 150271393 -562640483
+238137275 -570107924 153648336 -562927479
+247952228 -570942065 238137275 -570107924
+264867329 -572379625 247952228 -570942065
+288126576 -574356354 264867329 -572379625
+340392467 -578798265 288126576 -574356354
+367744028 -581122787 340392467 -578798265
+461887008 -589123698 367744028 -581122787
+465665783 -589444844 461887008 -589123698
+497696564 -592167038 465665783 -589444844
+602385680 -601064231 497696564 -592167038
+615992856 -602220661 602385680 -601064231
+-1565446557 -1240582764 -1723198488 -1376102557
+-1535909933 -1215208767 -1565446557 -1240582764
+-1488435642 -1174425076 -1535909933 -1215208767
+-1433912527 -1127585958 -1488435642 -1174425076
+-1241421889 -962223220 -1433912527 -1127585958
+-1201699946 -928099330 -1241421889 -962223220
+-1168570871 -899639170 -1201699946 -928099330
+-1100294320 -840984902 -1168570871 -899639170
+-1099780865 -840543809 -1100294320 -840984902
+-1028045793 -778918433 -1099780865 -840543809
+-978002860 -735928101 -1028045793 -778918433
+-865086102 -638924815 -978002860 -735928101
+-781652377 -567249489 -865086102 -638924815
+-780015135 -565842986 -781652377 -567249489
+-767719298 -555280013 -780015135 -565842986
+-692875602 -490984115 -767719298 -555280013
+-668132701 -469728256 -692875602 -490984115
+-666795962 -468579905 -668132701 -469728256
+-657947173 -460978185 -666795962 -468579905
+-646669644 -451290009 -657947173 -460978185
+-643591127 -448645351 -646669644 -451290009
+-610735524 -420420121 -643591127 -448645351
+-554785065 -372354816 -610735524 -420420121
+-449183129 -281635468 -554785065 -372354816
+-433154902 -267866115 -449183129 -281635468
+-425241228 -261067723 -433154902 -267866115
+-423283679 -259386054 -425241228 -261067723
+-416700652 -253730780 -423283679 -259386054
+-410246871 -248186536 -416700652 -253730780
+-313674582 -165224277 -410246871 -248186536
+-240326954 -102213605 -313674582 -165224277
+-230720194 -93960735 -240326954 -102213605
+-223684819 -87916863 -230720194 -93960735
+-209379444 -75627559 -223684819 -87916863
+-181567248 -51734963 -209379444 -75627559
+-168879851 -40835614 -181567248 -51734963
+-167239711 -39426621 -168879851 -40835614
+-108305406 11202014 -167239711 -39426621
+-107427917 11955837 -108305406 11202014
+-90969807 26094489 -107427917 11955837
+-43416901 66945716 -90969807 26094489
+6748173 110040975 -43416901 66945716
+49434664 146711616 6748173 110040975
+71779370 165907261 49434664 146711616
+87664008 179553260 71779370 165907261
+116626683 204434196 87664008 179553260
+143924433 227884847 116626683 204434196
+192364295 269498030 143924433 227884847
+283018210 347375997 192364295 269498030
+298948261 361061011 283018210 347375997
+306405252 367467080 298948261 361061011
+314862237 374732214 306405252 367467080
+374579375 426033355 314862237 374732214
+386371851 436163905 374579375 426033355
+396293151 444686987 386371851 436163905
+427638269 471614606 396293151 444686987
+476725776 513784161 427638269 471614606
+535483429 564261039 476725776 513784161
+714203126 717793588 535483429 564261039
+756330882 753984237 714203126 717793588
+853899428 837802350 756330882 753984237
+865004224 847342135 853899428 837802350
+985395807 950766811 865004224 847342135
+1022625150 982749385 985395807 950766811
+1064122100 1018398128 1022625150 982749385
+1071482607 1024721312 1064122100 1018398128
+1255165533 1182517617 1071482607 1024721312
+1311802937 1231173055 1255165533 1182517617
+1374740603 1285240852 1311802937 1231173055
+1402632488 1309201905 1374740603 1285240852
+1456691038 1355641929 1402632488 1309201905
+1531407131 1419828208 1456691038 1355641929
+1617477729 1493768790 1531407131 1419828208
+1854792130 1697638233 1617477729 1493768790
+-2033930685 846042412 -2011736664 838202987
+-2011736664 838202987 -1917081590 804768700
+-1917081590 804768700 -1874240824 789636384
+-1874240824 789636384 -1748677306 745284543
+-1748677306 745284543 -1672581434 718405781
+-1672581434 718405781 -1645928315 708991303
+-1645928315 708991303 -1610363059 696428860
+-1610363059 696428860 -1518201943 663875495
+-1518201943 663875495 -1450641934 640011790
+-1450641934 640011790 -1361238492 608432496
+-1361238492 608432496 -1308033651 589639357
+-1308033651 589639357 -1043783327 496300237
+-1043783327 496300237 -977792174 472990687
+-977792174 472990687 -972844264 471242975
+-972844264 471242975 -962316837 467524452
+-962316837 467524452 -946386552 461897520
+-946386552 461897520 -877544754 437581058
+-877544754 437581058 -814259613 415227332
+-814259613 415227332 -813833589 415076851
+-813833589 415076851 -725767450 383969922
+-725767450 383969922 -722705888 382888510
+-722705888 382888510 -716882353 380831508
+-716882353 380831508 -619791089 346536704
+-619791089 346536704 -549904030 321851032
+-549904030 321851032 -535578985 316791107
+-535578985 316791107 -484364266 298700923
+-484364266 298700923 -469094717 293307377
+-469094717 293307377 -469063044 293296190
+-469063044 293296190 -439983588 283024676
+-439983588 283024676 -402181594 269672167
+-402181594 269672167 -371170255 258718269
+-371170255 258718269 -367653236 257475979
+-367653236 257475979 -352249691 252035103
+-352249691 252035103 -327838731 243412607
+-1794207361 -1430862073 -1652471466 -1426103606
+-1652471466 -1426103606 -1641340853 -1425729920
+-1641340853 -1425729920 -1488317399 -1420592498
+-1488317399 -1420592498 -1470219002 -1419984884
+-1470219002 -1419984884 -1329204762 -1415250644
+-1329204762 -1415250644 -1087913612 -1407149830
+-1087913612 -1407149830 -1032719763 -1405296819
+-1032719763 -1405296819 -986686065 -1403751340
+-986686065 -1403751340 -900566351 -1400860062
+-900566351 -1400860062 -896141766 -1400711517
+-896141766 -1400711517 -891067100 -1400541146
+-891067100 -1400541146 -788975612 -1397113651
+-788975612 -1397113651 -656819571 -1392676806
+-656819571 -1392676806 -645087999 -1392282944
+-645087999 -1392282944 -535257212 -1388595620
+-535257212 -1388595620 -484248919 -1386883129
+-484248919 -1386883129 -476061958 -1386608270
+-476061958 -1386608270 -475961432 -1386604896
+-475961432 -1386604896 -391484389 -1383768766
+-391484389 -1383768766 -372350046 -1383126373
+-372350046 -1383126373 -96048261 -1373850155
+-96048261 -1373850155 -56282458 -1372515106
+-56282458 -1372515106 -39618894 -1371955664
+-39618894 -1371955664 131798203 -1366200716
+131798203 -1366200716 206444969 -1363694617
+206444969 -1363694617 450515899 -1355500478
+450515899 -1355500478 504245403 -1353696629
+504245403 -1353696629 506688972 -1353614592
+506688972 -1353614592 533743908 -1352706282
+533743908 -1352706282 581347821 -1351108087
+581347821 -1351108087 909853073 -1340079253
+909853073 -1340079253 976938766 -1337827000
+976938766 -1337827000 1018059171 -1336446473
+1018059171 -1336446473 1065594883 -1334850567
+-1355170591 1646779958 -1475225618 1653394759
+-1353484384 1646687052 -1355170591 1646779958
+-1094851068 1632436855 -1353484384 1646687052
+-1056143067 1630304119 -1094851068 1632436855
+-1029814640 1628853474 -1056143067 1630304119
+-413622038 1594902451 -1029814640 1628853474
+-387995013 1593490452 -413622038 1594902451
+-355672903 1591709566 -387995013 1593490452
+-309270957 1589152908 -355672903 1591709566
+-209007271 1583628573 -309270957 1589152908
+-19253174 1573173489 -209007271 1583628573
+158966208 1563353945 -19253174 1573173489
+263034410 1557619988 158966208 1563353945
+350847642 1552781649 263034410 1557619988
+616318186 -1798157178 583621999 -1849181442
+669561781 -1715067513 616318186 -1798157178
+689044608 -1684663451 669561781 -1715067513
+742711827 -1600912695 689044608 -1684663451
+748709151 -1591553529 742711827 -1600912695
+909853073 -1340079253 748709151 -1591553529
+925717954 -1315321202 909853073 -1340079253
+962814639 -1257429710 925717954 -1315321202
+1010119613 -1183607602 962814639 -1257429710
+1038899873 -1138694366 1010119613 -1183607602
+1044373225 -1130152888 1038899873 -1138694366
+1070104015 -1089998523 1044373225 -1130152888
+1109797068 -1028055251 1070104015 -1089998523
+1116308398 -1017893949 1109797068 -1028055251
+1131838873 -993657757 1116308398 -1017893949
+1174858948 -926522478 1131838873 -993657757
+1225842150 -846960285 1174858948 -926522478
+1238653503 -826967438 1225842150 -846960285
+1247639057 -812944969 1238653503 -826967438
+1271902178 -775080985 1247639057 -812944969
+1362654005 -633457587 1271902178 -775080985
+1447131872 -501625059 1362654005 -633457587
+1496853683 -424031338 1447131872 -501625059
+1529583181 -372955090 1496853683 -424031338
+1630031381 -216199948 1529583181 -372955090
+1648022623 -188123590 1630031381 -216199948
+1743470377 -39171929 1648022623 -188123590
+1821218689 82158744 1743470377 -39171929
+-1559272060 279018876 -1484115981 261729503
+-1484115981 261729503 -1469496873 258366432
+-1469496873 258366432 -1425251216 248187885
+-1425251216 248187885 -1310336461 221752179
+-1310336461 221752179 -1059553725 164060555
+-1059553725 164060555 -995687034 149368263
+-995687034 149368263 -943649161 137397147
+-943649161 137397147 -884283085 123740205
+-884283085 123740205 -866532228 119656687
+-866532228 119656687 -858384271 117782280
+-858384271 117782280 -855643307 117151732
+-855643307 117151732 -852033065 116321209
+-852033065 116321209 -843011250 114245775
+-843011250 114245775 -756773168 94407029
+-756773168 94407029 -729656631 88168972
+-729656631 88168972 -728213509 87836987
+-728213509 87836987 -695196998 80241663
+-695196998 80241663 -680034829 76753663
+-680034829 76753663 -679609557 76655831
+-679609557 76655831 -668762601 74160529
+-668762601 74160529 -617380350 62340236
+-617380350 62340236 -607103254 59976029
+-607103254 59976029 -586752267 55294361
+-586752267 55294361 -572928036 52114149
+-572928036 52114149 -417451821 16347431
+-417451821 16347431 -377246599 7098371
+-377246599 7098371 -345991049 -91850
+-345991049 -91850 -306542258 -9166896
+-306542258 -9166896 -281819939 -14854172
+-281819939 -14854172 -237637829 -25018100
+-237637829 -25018100 -234013683 -25851821
+-234013683 -25851821 -196355142 -34515027
+-196355142 -34515027 -168879851 -40835614
+-168879851 -40835614 -167728132 -41100563
+-167728132 -41100563 -95049558 -57819995
+-95049558 -57819995 -75139838 -62400151
+-75139838 -62400151 -18553073 -75417723
+-18553073 -75417723 14667139 -83059908
+14667139 -83059908 42720297 -89513431
+42720297 -89513431 121637981 -107668147
+121637981 -107668147 146272269 -113335172
+146272269 -113335172 166112542 -117899352
+166112542 -117899352 168114551 -118359907
+168114551 -118359907 246241613 -136332743
+246241613 -136332743 291656469 -146780259
+291656469 -146780259 309311321 -150841692
+309311321 -150841692 433645260 -179444246
+433645260 -179444246 449097079 -182998879
+449097079 -182998879 462922079 -186179268
+462922079 -186179268 464438395 -186528091
+464438395 -186528091 587396604 -214814163
+587396604 -214814163 589715491 -215347615
+589715491 -215347615 646174149 -228335716
+646174149 -228335716 661285806 -231812096
+661285806 -231812096 679490759 -236000077
+679490759 -236000077 686458869 -237603064
+686458869 -237603064 689361812 -238270875
+689361812 -238270875 708646185 -242707173
+708646185 -242707173 721363977 -245632853
+721363977 -245632853 723465290 -246116252
+723465290 -246116252 745232404 -251123695
+745232404 -251123695 762431526 -255080288
+762431526 -255080288 841865950 -273353878
+841865950 -273353878 918890880 -291073173
+918890880 -291073173 957658150 -299991437
+957658150 -299991437 1001874673 -310163282
+1001874673 -310163282 1018358603 -313955348
+1018358603 -313955348 1124420849 -338354568
+1124420849 -338354568 1496853683 -424031338
+1496853683 -424031338 1638842537 -456695339
+1638842537 -456695339 1715841182 -474408587
+1715841182 -474408587 1763935115 -485472415
+1763935115 -485472415 1861986607 -508028792
+1861986607 -508028792 2028932301 -546434019

Added: branches/release/libs/polygon/benchmark/voronoi_benchmark.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/voronoi_benchmark.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,156 @@
+// Boost.Polygon library voronoi_benchmark.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <algorithm>
+#include <iomanip>
+#include <iostream>
+#include <fstream>
+#include <list>
+#include <numeric>
+#include <vector>
+
+#define BOOST_TEST_MODULE benchmark_test
+#include <boost/mpl/list.hpp>
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/test/test_case_template.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/polygon/polygon.hpp>
+#include <boost/polygon/voronoi.hpp>
+using boost::polygon::point_data;
+using boost::polygon::segment_data;
+using boost::polygon::voronoi_diagram;
+
+typedef boost::mpl::list<int> test_types;
+const char *BENCHMARK_FILE = "voronoi_benchmark.txt";
+const char *POINT_INPUT_FILE = "input_data/voronoi_point.txt";
+const char *SEGMENT_INPUT_FILE = "input_data/voronoi_segment.txt";
+const int POINT_RUNS = 10;
+const int SEGMENT_RUNS = 10;
+
+boost::mt19937 gen(static_cast<unsigned int>(time(NULL)));
+boost::timer timer;
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(benchmark_test_random, T, test_types) {
+ typedef T coordinate_type;
+ typedef point_data<coordinate_type> point_type;
+ voronoi_diagram<double> test_output;
+
+ std::ofstream bench_file(BENCHMARK_FILE, std::ios_base::out | std::ios_base::app);
+ bench_file << "Voronoi Benchmark Test (time in seconds):" << std::endl;
+ bench_file << "| Number of points | Number of tests | Time per one test |" << std::endl;
+ bench_file << std::setiosflags(std::ios::right | std::ios::fixed) << std::setprecision(6);
+ int max_points = 100000;
+ std::vector<point_type> points;
+ coordinate_type x, y;
+ for (int num_points = 10; num_points <= max_points; num_points *= 10) {
+ points.resize(num_points);
+ timer.restart();
+ int num_tests = max_points / num_points;
+ for (int cur = 0; cur < num_tests; cur++) {
+ test_output.clear();
+ for (int cur_point = 0; cur_point < num_points; cur_point++) {
+ x = static_cast<coordinate_type>(gen());
+ y = static_cast<coordinate_type>(gen());
+ points[cur_point] = point_type(x, y);
+ }
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ }
+ double elapsed_time = timer.elapsed();
+ double time_per_test = elapsed_time / num_tests;
+
+ bench_file << "| " << std::setw(16) << num_points << " ";
+ bench_file << "| " << std::setw(15) << num_tests << " ";
+ bench_file << "| " << std::setw(17) << time_per_test << " ";
+ bench_file << "| " << std::endl;
+ }
+ bench_file.close();
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(benchmark_test_points, T, test_types) {
+ typedef T coordinate_type;
+ typedef point_data<coordinate_type> point_type;
+
+ std::vector<point_type> points;
+ {
+ std::ifstream input_file(POINT_INPUT_FILE);
+ int num_points;
+ coordinate_type x, y;
+ input_file >> num_points;
+ points.reserve(num_points);
+ for (int i = 0; i < num_points; ++i) {
+ input_file >> x >> y;
+ points.push_back(point_type(x, y));
+ }
+ input_file.close();
+ }
+
+ std::vector<double> periods;
+ {
+ for (int i = 0; i < POINT_RUNS; ++i) {
+ voronoi_diagram<double> test_output;
+ timer.restart();
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ periods.push_back(timer.elapsed());
+ }
+ }
+ std::sort(periods.begin(), periods.end());
+ // Using olympic system to evaluate average time.
+ double elapsed_time =
+ std::accumulate(periods.begin() + 2, periods.end() - 2, 0.0);
+ elapsed_time /= (periods.size() - 4);
+
+ std::ofstream bench_file(
+ BENCHMARK_FILE, std::ios_base::out | std::ios_base::app);
+ bench_file << std::setiosflags(std::ios::right | std::ios::fixed) << std::setprecision(6);
+ bench_file << "Static test of " << points.size() << " points: " << elapsed_time << std::endl;
+ bench_file.close();
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(benchmark_test_segments, T, test_types) {
+ typedef T coordinate_type;
+ typedef point_data<coordinate_type> point_type;
+ typedef segment_data<coordinate_type> segment_type;
+
+ std::vector<segment_type> segments;
+ {
+ std::ifstream input_file(SEGMENT_INPUT_FILE);
+ int num_segments;
+ coordinate_type x0, y0, x1, y1;
+ input_file >> num_segments;
+ segments.reserve(num_segments);
+ for (int i = 0; i < num_segments; ++i) {
+ input_file >> x0 >> y0 >> x1 >> y1;
+ point_type p0(x0, y0), p1(x1, y1);
+ segments.push_back(segment_type(p0, p1));
+ }
+ input_file.close();
+ }
+
+ std::vector<double> periods;
+ {
+ for (int i = 0; i < SEGMENT_RUNS; ++i) {
+ voronoi_diagram<double> test_output;
+ timer.restart();
+ construct_voronoi(segments.begin(), segments.end(), &test_output);
+ periods.push_back(timer.elapsed());
+ }
+ }
+ std::sort(periods.begin(), periods.end());
+ // Using olympic system to evaluate average time.
+ double elapsed_time =
+ std::accumulate(periods.begin() + 2, periods.end() - 2, 0.0);
+ elapsed_time /= (periods.size() - 4);
+
+ std::ofstream bench_file(
+ BENCHMARK_FILE, std::ios_base::out | std::ios_base::app);
+ bench_file << std::setiosflags(std::ios::right | std::ios::fixed) << std::setprecision(6);
+ bench_file << "Static test of " << segments.size() << " segments: " << elapsed_time << std::endl;
+ bench_file.close();
+}

Added: branches/release/libs/polygon/benchmark/voronoi_benchmark_points.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/voronoi_benchmark_points.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,141 @@
+// Boost.Polygon library voronoi_benchmark.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <algorithm>
+#include <iomanip>
+#include <iostream>
+#include <fstream>
+#include <numeric>
+#include <vector>
+#include <utility>
+
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/timer.hpp>
+
+typedef boost::int32_t int32;
+
+// Include for the Boost.Polygon Voronoi library.
+#include <boost/polygon/voronoi.hpp>
+typedef boost::polygon::default_voronoi_builder VB_BOOST;
+typedef boost::polygon::voronoi_diagram<double> VD_BOOST;
+
+// Includes for the CGAL library.
+#include <CGAL/Quotient.h>
+#include <CGAL/MP_Float.h>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_2.h>
+typedef CGAL::Quotient<CGAL::MP_Float> ENT;
+typedef CGAL::Simple_cartesian<double> CK;
+typedef CGAL::Simple_cartesian<ENT> EK;
+typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<
+ CK, CGAL::Field_with_sqrt_tag, EK, CGAL::Field_tag> Gt;
+typedef CGAL::Segment_Delaunay_graph_2<Gt> SDT_CGAL;
+typedef SDT_CGAL::Point_2 Point_CGAL;
+
+// Includes for the S-Hull library.
+#include <s_hull.h>
+
+const int RANDOM_SEED = 27;
+const int NUM_TESTS = 6;
+const int NUM_POINTS[] = {10, 100, 1000, 10000, 100000, 1000000};
+const int NUM_RUNS[] = {100000, 10000, 1000, 100, 10, 1};
+std::ofstream bf("benchmark_points.txt",
+ std::ios_base::out | std::ios_base::app);
+boost::timer timer;
+
+void format_line(int num_points, int num_tests, double time_per_test) {
+ bf << "| " << std::setw(16) << num_points << " ";
+ bf << "| " << std::setw(15) << num_tests << " ";
+ bf << "| " << std::setw(17) << time_per_test << " ";
+ bf << "|" << std::endl;
+}
+
+void run_boost_test() {
+ boost::mt19937 gen(RANDOM_SEED);
+ bf << "Boost.Polygon Voronoi of Points:\n";
+ for (int i = 0; i < NUM_TESTS; ++i) {
+ timer.restart();
+ for (int j = 0; j < NUM_RUNS[i]; ++j) {
+ VB_BOOST vb;
+ VD_BOOST vd;
+ for (int k = 0; k < NUM_POINTS[i]; ++k)
+ vb.insert_point(static_cast<int32>(gen()), static_cast<int32>(gen()));
+ vb.construct(&vd);
+ }
+ double time_per_test = timer.elapsed() / NUM_RUNS[i];
+ format_line(NUM_POINTS[i], NUM_RUNS[i], time_per_test);
+ }
+ bf << "\n";
+}
+
+void run_cgal_test() {
+ boost::mt19937 gen(RANDOM_SEED);
+ bf << "CGAL Triangulation of Points:\n";
+ for (int i = 0; i < NUM_TESTS; ++i) {
+ timer.restart();
+ for (int j = 0; j < NUM_RUNS[i]; ++j) {
+ SDT_CGAL dt;
+ for (int k = 0; k < NUM_POINTS[i]; ++k) {
+ dt.insert(Point_CGAL(
+ static_cast<int32>(gen()), static_cast<int32>(gen())));
+ }
+ }
+ double time_per_test = timer.elapsed() / NUM_RUNS[i];
+ format_line(NUM_POINTS[i], NUM_RUNS[i], time_per_test);
+ }
+ bf << "\n";
+}
+
+void run_shull_test() {
+ boost::mt19937 gen(RANDOM_SEED);
+ bf << "S-Hull Triangulation of Points:\n";
+ // This value is required by S-Hull as it doesn't seem to support properly
+ // coordinates with the absolute value higher than 100.
+ float koef = 100.0 / (1 << 16) / (1 << 15);
+ for (int i = 0; i < NUM_TESTS; ++i) {
+ timer.restart();
+ for (int j = 0; j < NUM_RUNS[i]; ++j) {
+ // S-Hull doesn't deal properly with duplicates so we need
+ // to eliminate them before running the algorithm.
+ std::vector< pair<int32, int32> > upts;
+ std::vector<Shx> pts;
+ std::vector<Triad> triads;
+ Shx pt;
+ for (int k = 0; k < NUM_POINTS[i]; ++k) {
+ int32 x = static_cast<int32>(gen());
+ int32 y = static_cast<int32>(gen());
+ upts.push_back(std::make_pair(x, y));
+ }
+ // Absolutely the same code is used by the Boost.Polygon Voronoi library.
+ std::sort(upts.begin(), upts.end());
+ upts.erase(std::unique(upts.begin(), upts.end()), upts.end());
+ for (int k = 0; k < upts.size(); ++k) {
+ pt.r = koef * upts[k].first;
+ pt.c = koef * upts[k].second;
+ pt.id = k;
+ pts.push_back(pt);
+ }
+ s_hull_del_ray2(pts, triads);
+ }
+ double time_per_test = timer.elapsed() / NUM_RUNS[i];
+ format_line(NUM_POINTS[i], NUM_RUNS[i], time_per_test);
+ }
+ bf << "\n";
+}
+
+int main() {
+ bf << std::setiosflags(std::ios::right | std::ios::fixed)
+ << std::setprecision(6);
+ run_boost_test();
+ run_cgal_test();
+ run_shull_test();
+ bf.close();
+ return 0;
+}

Added: branches/release/libs/polygon/benchmark/voronoi_benchmark_segments.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/benchmark/voronoi_benchmark_segments.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,180 @@
+// Boost.Polygon library voronoi_benchmark.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <algorithm>
+#include <iomanip>
+#include <iostream>
+#include <fstream>
+#include <numeric>
+#include <vector>
+#include <utility>
+
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/timer.hpp>
+
+typedef boost::int32_t int32;
+
+// Include for the Boost.Polygon Voronoi library.
+#include <boost/polygon/voronoi.hpp>
+typedef boost::polygon::voronoi_diagram<double> VD_BOOST;
+
+// Includes for the CGAL library.
+#include <CGAL/Quotient.h>
+#include <CGAL/MP_Float.h>
+#include <CGAL/Simple_cartesian.h>
+#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
+#include <CGAL/Segment_Delaunay_graph_2.h>
+typedef CGAL::Quotient<CGAL::MP_Float> ENT;
+typedef CGAL::Simple_cartesian<double> CK;
+typedef CGAL::Simple_cartesian<ENT> EK;
+typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<
+ CK, CGAL::Field_with_sqrt_tag, EK, CGAL::Field_tag> Gt;
+typedef CGAL::Segment_Delaunay_graph_2<Gt> SDT_CGAL;
+typedef SDT_CGAL::Point_2 Point_CGAL;
+typedef SDT_CGAL::Site_2 Site_CGAL;
+
+// Include for the Boost.Polygon library.
+#include <boost/polygon/polygon.hpp>
+typedef boost::polygon::point_data<int32> POINT_POLYGON;
+typedef boost::polygon::segment_data<int32> SEGMENT_POLYGON;
+typedef std::vector<SEGMENT_POLYGON> SSD_POLYGON;
+
+const int RANDOM_SEED = 27;
+const int NUM_TESTS = 6;
+const int NUM_SEGMENTS[] = {10, 100, 1000, 10000, 100000, 1000000};
+const int NUM_RUNS[] = {100000, 10000, 1000, 100, 10, 1};
+std::ofstream bf("benchmark_segments.txt",
+ std::ios_base::out | std::ios_base::app);
+boost::timer timer;
+
+void format_line(int num_points, int num_tests, double time_per_test) {
+ bf << "| " << std::setw(16) << num_points << " ";
+ bf << "| " << std::setw(15) << num_tests << " ";
+ bf << "| " << std::setw(17) << time_per_test << " ";
+ bf << "|" << std::endl;
+}
+
+void clean_segment_set(std::vector<SEGMENT_POLYGON> &data) {
+ typedef int32 Unit;
+ typedef boost::polygon::scanline_base<Unit>::Point Point;
+ typedef boost::polygon::scanline_base<Unit>::half_edge half_edge;
+ typedef int segment_id;
+ std::vector<std::pair<half_edge, segment_id> > half_edges;
+ std::vector<std::pair<half_edge, segment_id> > half_edges_out;
+ segment_id id = 0;
+ half_edges.reserve(data.size());
+ for (std::vector<SEGMENT_POLYGON>::iterator it = data.begin();
+ it != data.end(); ++it) {
+ POINT_POLYGON l = it->low();
+ POINT_POLYGON h = it->high();
+ half_edges.push_back(std::make_pair(half_edge(l, h), id++));
+ }
+ half_edges_out.reserve(half_edges.size());
+ // Apparently no need to pre-sort data when calling validate_scan.
+ boost::polygon::line_intersection<Unit>::validate_scan(
+ half_edges_out, half_edges.begin(), half_edges.end());
+ std::vector<SEGMENT_POLYGON> result;
+ result.reserve(half_edges_out.size());
+ for (std::size_t i = 0; i < half_edges_out.size(); ++i) {
+ id = half_edges_out[i].second;
+ POINT_POLYGON l = half_edges_out[i].first.first;
+ POINT_POLYGON h = half_edges_out[i].first.second;
+ SEGMENT_POLYGON orig_seg = data[id];
+ if (orig_seg.high() < orig_seg.low())
+ std::swap(l, h);
+ result.push_back(SEGMENT_POLYGON(l, h));
+ }
+ std::swap(result, data);
+}
+
+std::vector<double> get_intersection_runtime() {
+ std::vector<double> running_times;
+ boost::mt19937 gen(RANDOM_SEED);
+ for (int i = 0; i < NUM_TESTS; ++i) {
+ timer.restart();
+ for (int j = 0; j < NUM_RUNS[i]; ++j) {
+ SSD_POLYGON ssd;
+ for (int k = 0; k < NUM_SEGMENTS[i]; ++k) {
+ int32 x1 = gen();
+ int32 y1 = gen();
+ int32 dx = (gen() & 1023) + 1;
+ int32 dy = (gen() & 1023) + 1;
+ ssd.push_back(SEGMENT_POLYGON(
+ POINT_POLYGON(x1, y1), POINT_POLYGON(x1 + dx, y1 + dy)));
+ }
+ clean_segment_set(ssd);
+ }
+ running_times.push_back(timer.elapsed());
+ }
+ return running_times;
+}
+
+void run_voronoi_test(const std::vector<double> &running_times) {
+ boost::mt19937 gen(RANDOM_SEED);
+ bf << "Boost.Polygon Voronoi of Segments:\n";
+ for (int i = 0; i < NUM_TESTS; ++i) {
+ timer.restart();
+ for (int j = 0; j < NUM_RUNS[i]; ++j) {
+ SSD_POLYGON ssd;
+ VD_BOOST vd;
+ for (int k = 0; k < NUM_SEGMENTS[i]; ++k) {
+ int32 x1 = gen();
+ int32 y1 = gen();
+ int32 dx = (gen() & 1023) + 1;
+ int32 dy = (gen() & 1023) + 1;
+ ssd.push_back(SEGMENT_POLYGON(
+ POINT_POLYGON(x1, y1), POINT_POLYGON(x1 + dx, y1 + dy)));
+ }
+ clean_segment_set(ssd);
+ boost::polygon::construct_voronoi(ssd.begin(), ssd.end(), &vd);
+ }
+ double time_per_test = (timer.elapsed() - running_times[i]) / NUM_RUNS[i];
+ format_line(NUM_SEGMENTS[i], NUM_RUNS[i], time_per_test);
+ }
+ bf << "\n";
+}
+
+void run_cgal_test(const std::vector<double> &running_times) {
+ boost::mt19937 gen(RANDOM_SEED);
+ bf << "CGAL Triangulation of Segments:\n";
+ for (int i = 0; i < NUM_TESTS; ++i) {
+ timer.restart();
+ for (int j = 0; j < NUM_RUNS[i]; ++j) {
+ SSD_POLYGON ssd;
+ for (int k = 0; k < NUM_SEGMENTS[i]; ++k) {
+ int32 x1 = gen();
+ int32 y1 = gen();
+ int32 dx = (gen() & 1023) + 1;
+ int32 dy = (gen() & 1023) + 1;
+ ssd.push_back(SEGMENT_POLYGON(POINT_POLYGON(x1, y1),
+ POINT_POLYGON(x1 + dx, y1 + dy)));
+ }
+ clean_segment_set(ssd);
+ SDT_CGAL dt;
+ for (SSD_POLYGON::iterator it = ssd.begin(); it != ssd.end(); ++it) {
+ dt.insert(Site_CGAL::construct_site_2(
+ Point_CGAL(it->low().x(), it->low().y()),
+ Point_CGAL(it->high().x(), it->high().y())));
+ }
+ }
+ double time_per_test = (timer.elapsed() - running_times[i]) / NUM_RUNS[i];
+ format_line(NUM_SEGMENTS[i], NUM_RUNS[i], time_per_test);
+ }
+ bf << "\n";
+}
+
+int main() {
+ bf << std::setiosflags(std::ios::right | std::ios::fixed)
+ << std::setprecision(6);
+ std::vector<double> running_times = get_intersection_runtime();
+ run_voronoi_test(running_times);
+ run_cgal_test(running_times);
+ bf.close();
+ return 0;
+}

Modified: branches/release/libs/polygon/doc/analysis.htm
==============================================================================
--- branches/release/libs/polygon/doc/analysis.htm (original)
+++ branches/release/libs/polygon/doc/analysis.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -2,63 +2,85 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Performance Analysis</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Performance Analysis</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
         <h3 class="navbar">Contents</h3>
         <ul>
- <li>Boost.Polygon Main Page</li>
- <li><a href="gtl_design_overview.htm">Polygon
- Library Design Overview</a></li>
- <li>Isotropy</li>
- <li>Coordinate Concept</li>
- <li>Interval Concept</li>
- <li>
- Point Concept</li>
- <li>Rectangle Concept</li>
- <li>Polygon 90 Concept</li>
- <li>Polygon 90 With Holes Concept</li>
- <li>Polygon 45 Concept</li>
- <li>Polygon 45 With Holes Concept</li>
- <li>Polygon Concept</li>
- <li>Polygon With Holes Concept</li>
- <li>Polygon 90 Set Concept</li>
- <li>Polygon 45 Set Concept</li>
- <li>Polygon Set Concept</li>
- <li>Connectivity Extraction 90</li>
- <li>Connectivity Extraction 45</li>
- <li>Connectivity Extraction</li>
- <li>Property Merge 90</li>
- <li>Property Merge 45</li>
- <li>Property Merge</li>
- </ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li>Voronoi Main Page
+ </li>
+ <li>Voronoi Benchmark</li>
+ <li>Voronoi Builder<br />
+ </li>
+ <li>Voronoi Diagram</li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+</ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
- Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon Set Algorithms Analysis</h1>
 <p>Most non-trivial algorithms in the Boost.Polygon library are
@@ -86,25 +108,25 @@
 constant factor of input vertices we can examine runtime complexity in terms of
 input vertices.&nbsp; The operation performed was a union (Boolean OR) of the
 input rectangles by each of the Manhattan, 45-degree and arbitrary angle
-Booleans algorithms, which are labeled &quot;boolean 90&quot;, &quot;boolean 45&quot; and &quot;boolean&quot;.&nbsp;
+Booleans algorithms, which are labeled "boolean 90", "boolean 45" and "boolean".&nbsp;
 Also shown in the plot is the performance of the arbitrary angle Booleans
 algorithm as prior to the addition of divide and conquer recursive subdivision,
 which was described in the paper
 <a href="GTL_boostcon_draft03.pdf">presented</a> at
 <a href="http://www.boostcon.com/home">boostcon</a> 2009.&nbsp; Finally, the
 time required to sort the input points is shown as a common reference for O(n log n)
-runtime to put the data into context.</p><img border="0" src="images/perf_graph.PNG" width="391" height="414"><p>
+runtime to put the data into context.</p><img src="images/perf_graph.PNG" border="0" height="414" width="391" /><p>
 We can see in the log-log plot that sorting and the three Booleans algorithms
-provided by the Boost.Polygon library have nearly 45 degree &quot;linear&quot;
+provided by the Boost.Polygon library have nearly 45 degree "linear"
 scaling with empirical exponents just slightly larger than 1.0 and can be
 observed to scale proportional to O(n log n) for
-these inputs.&nbsp; The &quot;old boolean&quot; algorithm presented at boostcon 2009
+these inputs.&nbsp; The "old boolean" algorithm presented at boostcon 2009
 exhibits scaling close to the expected O(n<sup><font size="2">1.5</font></sup>)
 scaling.&nbsp; Because the speedup provided by the divide and conquer approach
 is algorithmic, the 10X potential performance improvement alluded to in the paper is
 realized at inputs of 200,000 rectangles and larger.&nbsp; Even for small inputs
 of 2K rectangles the algorithm is 2X faster and now can be expected to be
-roughly as fast as GPC at small scales,
+roughly as fast as GPC at small scales,
 while algorithmically faster at large scales.</p>
 <p>
 
@@ -116,10 +138,10 @@
 work, 45-degree&nbsp; Booleans cost roughly
 
 
-</body>ten units of O(n log n) work and arbitrary angle Booleans cost roughly
+ten units of O(n log n) work and arbitrary angle Booleans cost roughly
 seventy units of O(n log n) work.&nbsp; Sorting the input vertices is the first
 step in a Booleans algorithm and therefore provides a hard lower bound for the
-runtime of an optimal Booleans algorithm.<p>
+runtime of an optimal Booleans algorithm.</p><p>
 
 
 One final thing to note about performance of the arbitrary angle Booleans
@@ -137,17 +159,17 @@
 intersection point within one integer unit of both line segments.&nbsp; This
 means that there is effectively no runtime penalty for the use of infinite
 precision to ensure 100% robustness.&nbsp; Most inputs will process through the
-algorithm without ever resorting to GMP.<tr>
+algorithm without ever resorting to GMP.</p></td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table1">
+<table class="docinfo" id="table1" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -160,6 +182,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_connectivity_extraction.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_connectivity_extraction.htm (original)
+++ branches/release/libs/polygon/doc/gtl_connectivity_extraction.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Connectivity Extraction 45</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Connectivity Extraction 45</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,32 +40,47 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Connectivity Extraction</h1>
 
 <p>
-<p>The connectivity extraction algorithm constructs the connectivity graph where
+</p><p>The connectivity extraction algorithm constructs the connectivity graph where
 input polygon sets are modeled as graph nodes and assigned node ids and
 overlap/touching between input polygon sets is modeled as graph edges.&nbsp; One
 supported graph formats is std::vector&lt;std::set&lt;int&gt; &gt; where node ids index into
@@ -71,33 +90,33 @@
 the operator[] is used internally to access the graph&nbsp;&nbsp; The other
 supported graph format is std::map&lt;int, std::set&lt;int&gt; &gt; which is slightly easier to
 work with, but potentially more expensive.&nbsp; Improving the interface to
-support more generic graph concepts is deferred to future work.<p>The following
-is the declaration of the connectivity extraction algorithm.<p>
-<font face="Courier New">template &lt;typename coordinate_type&gt;<br>
-class connectivity_extraction;</font><p>
+support more generic graph concepts is deferred to future work.</p><p>The following
+is the declaration of the connectivity extraction algorithm.</p><p>
+<font face="Courier New">template &lt;typename coordinate_type&gt;<br />
+class connectivity_extraction;</font></p><p>
 Example code connectivity_extraction_usage.cpp
                 demonstrates using the connectivity extraction algorithm to build a
-connectivity graph on geometry.<h2>Member Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+connectivity graph on geometry.</p><h2>Member Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">connectivity_extraction</font></b><font face="Courier New">()</font></td>
                 <td>Default constructor. </td>
         </tr>
         <tr>
- <td width="586"><b><font face="Courier New">connectivity_extraction</font></b><font face="Courier New">(<br>&nbsp;&nbsp;&nbsp;&nbsp; const
+ <td width="586"><b><font face="Courier New">connectivity_extraction</font></b><font face="Courier New">(<br />&nbsp;&nbsp;&nbsp;&nbsp; const
                 connectivity_extraction&amp; that)</font></td>
                 <td>Copy construct.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">unsigned int <br><b>insert</b>(const polygon_set_data&lt;coordinate_type&gt;&amp; ps)</font></td>
+<font face="Courier New">unsigned int <br /><b>insert</b>(const polygon_set_data&lt;coordinate_type&gt;&amp; ps)</font></td>
                 <td>I<font face="Times New Roman">nsert a polygon set graph node, the
                 value returned is the id of the graph node.</font></td>
         </tr>
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GeoObjT&gt;<br>
+template &lt;class GeoObjT&gt;<br />
 unsigned int <b>insert</b>(const GeoObjT&amp; geoObj)</font></td>
                 <td>Insert a geometry object that is a refinement of polygon set as a
                 graph node, the return value is the id of the graph node.</td>
@@ -105,24 +124,24 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GraphT&gt;<br>
+template &lt;class GraphT&gt;<br />
 void <b>extract</b>(GraphT&amp; graph)</font></td>
                 <td>Accepts a graph object that conforms to the expectations defined
                 above.&nbsp; Performs connectivity extraction and populates the graph
                 object.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table2">
+<table class="docinfo" id="table2" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -135,6 +154,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_connectivity_extraction_45.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_connectivity_extraction_45.htm (original)
+++ branches/release/libs/polygon/doc/gtl_connectivity_extraction_45.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Connectivity Extraction 45</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Connectivity Extraction 45</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,32 +40,47 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Connectivity Extraction 45</h1>
 
 <p>
-<p>The connectivity extraction algorithm constructs the connectivity graph where
+</p><p>The connectivity extraction algorithm constructs the connectivity graph where
 input polygon sets are modeled as graph nodes and assigned node ids and
 overlap/touching between input polygon sets is modeled as graph edges.&nbsp; One
 supported graph formats is std::vector&lt;std::set&lt;int&gt; &gt; where node ids index into
@@ -71,33 +90,33 @@
 the operator[] is used internally to access the graph&nbsp;&nbsp; The other
 supported graph format is std::map&lt;int, std::set&lt;int&gt; &gt; which is slightly easier to
 work with, but potentially more expensive.&nbsp; Improving the interface to
-support more generic graph concepts is deferred to future work.<p>The following
-is the declaration of the connectivity extraction algorithm.<p>
-<font face="Courier New">template &lt;typename coordinate_type&gt;<br>
-class connectivity_extraction_45;</font><p>
+support more generic graph concepts is deferred to future work.</p><p>The following
+is the declaration of the connectivity extraction algorithm.</p><p>
+<font face="Courier New">template &lt;typename coordinate_type&gt;<br />
+class connectivity_extraction_45;</font></p><p>
 Example code connectivity_extraction_usage.cpp
                 demonstrates using the connectivity extraction algorithm to build a
-connectivity graph on geometry.<h2>Member Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+connectivity graph on geometry.</p><h2>Member Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">connectivity_extraction_45</font></b><font face="Courier New">()</font></td>
                 <td>Default constructor. </td>
         </tr>
         <tr>
- <td width="586"><b><font face="Courier New">connectivity_extraction_45</font></b><font face="Courier New">(<br>&nbsp;&nbsp;&nbsp;&nbsp; const
+ <td width="586"><b><font face="Courier New">connectivity_extraction_45</font></b><font face="Courier New">(<br />&nbsp;&nbsp;&nbsp;&nbsp; const
                 connectivity_extraction_45&amp; that)</font></td>
                 <td>Copy construct.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">unsigned int <br><b>insert</b>(const polygon_45_set_data&lt;coordinate_type&gt;&amp; ps)</font></td>
+<font face="Courier New">unsigned int <br /><b>insert</b>(const polygon_45_set_data&lt;coordinate_type&gt;&amp; ps)</font></td>
                 <td>I<font face="Times New Roman">nsert a polygon set graph node, the
                 value returned is the id of the graph node.</font></td>
         </tr>
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GeoObjT&gt;<br>
+template &lt;class GeoObjT&gt;<br />
 unsigned int <b>insert</b>(const GeoObjT&amp; geoObj)</font></td>
                 <td>Insert a geometry object that is a refinement of polygon 45 set as a
                 graph node, the return value is the id of the graph node.</td>
@@ -105,24 +124,24 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GraphT&gt;<br>
+template &lt;class GraphT&gt;<br />
 void <b>extract</b>(GraphT&amp; graph)</font></td>
                 <td>Accepts a graph object that conforms to the expectations defined
                 above.&nbsp; Performs connectivity extraction and populates the graph
                 object.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table2">
+<table class="docinfo" id="table2" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -135,6 +154,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_connectivity_extraction_90.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_connectivity_extraction_90.htm (original)
+++ branches/release/libs/polygon/doc/gtl_connectivity_extraction_90.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Connectivity Extraction 90</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Connectivity Extraction 90</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,32 +40,47 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Connectivity Extraction 90</h1>
 
 <p>
-<p>The connectivity extraction algorithm constructs the connectivity graph where
+</p><p>The connectivity extraction algorithm constructs the connectivity graph where
 input polygon sets are modeled as graph nodes and assigned node ids and
 overlap/touching between input polygon sets is modeled as graph edges.&nbsp; One
 supported graph formats is std::vector&lt;std::set&lt;int&gt; &gt; where node ids index into
@@ -71,33 +90,33 @@
 the operator[] is used internally to access the graph&nbsp;&nbsp; The other
 supported graph format is std::map&lt;int, std::set&lt;int&gt; &gt; which is slightly easier to
 work with, but potentially more expensive.&nbsp; Improving the interface to
-support more generic graph concepts is deferred to future work.<p>The following
-is the declaration of the connectivity extraction algorithm.<p>
-<font face="Courier New">template &lt;typename coordinate_type&gt;<br>
-class connectivity_extraction_90;</font><p>
+support more generic graph concepts is deferred to future work.</p><p>The following
+is the declaration of the connectivity extraction algorithm.</p><p>
+<font face="Courier New">template &lt;typename coordinate_type&gt;<br />
+class connectivity_extraction_90;</font></p><p>
 Example code connectivity_extraction_usage.cpp
                 demonstrates using the connectivity extraction algorithm to build a
-connectivity graph on geometry.<h2>Member Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+connectivity graph on geometry.</p><h2>Member Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">connectivity_extraction_90</font></b><font face="Courier New">()</font></td>
                 <td>Default constructor. </td>
         </tr>
         <tr>
- <td width="586"><b><font face="Courier New">connectivity_extraction_90</font></b><font face="Courier New">(<br>&nbsp;&nbsp;&nbsp;&nbsp; const
+ <td width="586"><b><font face="Courier New">connectivity_extraction_90</font></b><font face="Courier New">(<br />&nbsp;&nbsp;&nbsp;&nbsp; const
                 connectivity_extraction_90&amp; that)</font></td>
                 <td>Copy construct.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">unsigned int <br><b>insert</b>(const polygon_90_set_data&lt;coordinate_type&gt;&amp; ps)</font></td>
+<font face="Courier New">unsigned int <br /><b>insert</b>(const polygon_90_set_data&lt;coordinate_type&gt;&amp; ps)</font></td>
                 <td>I<font face="Times New Roman">nsert a polygon set graph node, the
                 value returned is the id of the graph node.</font></td>
         </tr>
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GeoObjT&gt;<br>
+template &lt;class GeoObjT&gt;<br />
 unsigned int <b>insert</b>(const GeoObjT&amp; geoObj)</font></td>
                 <td>Insert a geometry object that is a refinement of polygon 90 set as a
                 graph node, the return value is the id of the graph node.</td>
@@ -105,24 +124,24 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GraphT&gt;<br>
+template &lt;class GraphT&gt;<br />
 void <b>extract</b>(GraphT&amp; graph)</font></td>
                 <td>Accepts a graph object that conforms to the expectations defined
                 above.&nbsp; Performs connectivity extraction and populates the graph
                 object.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table2">
+<table class="docinfo" id="table2" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -135,6 +154,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_coordinate_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_coordinate_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_coordinate_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,17 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head><!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Coordinate Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Coordinate Concept</title>
+
+
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +23,8 @@
                         <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,56 +41,71 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Coordinate Concept</h1>
 
 <p>
 The coordinate concept tag is <font face="Courier New">
-coordinate_concept</font><p>
+coordinate_concept</font></p><p>
 To register a user defined type as a model of coordinate concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below
-CCoordinate is registered as a model of coordinate concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CCoordinate&gt; { typedef coordinate_concept type; };</font><p>
+CCoordinate is registered as a model of coordinate concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CCoordinate&gt; { typedef coordinate_concept type; };</font></p><p>
 The coordinate type is expected to be integral and built-in numerical data types
 such as float and int already have concept type traits specializations in the
 library.&nbsp; In the coordinate traits are type definitions for related types
 are provided to allow the library to choose the best type to cast to under
 various circumstances.&nbsp; The definition of coordinate_traits and its
-specialization for int are shown below.<p>
-<font face="Courier New">template &lt;typename T&gt;<br>
-struct coordinate_traits {};<br>
-<br>
-template &lt;&gt;<br>
-struct coordinate_traits&lt;int&gt; {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef int coordinate_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef long double area_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef long long manhattan_area_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef unsigned long long unsigned_area_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef long long coordinate_difference;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef long double coordinate_distance;<br>
-};</font><p>
+specialization for int are shown below.</p><p>
+<font face="Courier New">template &lt;typename T&gt;<br />
+struct coordinate_traits {};<br />
+<br />
+template &lt;&gt;<br />
+struct coordinate_traits&lt;int&gt; {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef int coordinate_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef long double area_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef long long manhattan_area_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef unsigned long long unsigned_area_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef long long coordinate_difference;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef long double coordinate_distance;<br />
+};</font></p><p>
 By making use of the coordinate traits of int the library is able to avoid
 overflow and handle the normal issues encountered when programming integer
 geometry.&nbsp; For the out of the ordinary issues there is a special
@@ -94,37 +114,37 @@
 available in most compilers, long double, but can be overridden by specializing
 for a particular coordinate type.&nbsp; Use of gmp multi-precision rational or
 similar data type is recommended for numerically robust calculations in the
-general polygon algorithms.<p>
-<font face="Courier New">template &lt;typename T&gt;<br>
-struct high_precision_type {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef long double type;<br>
-};</font><p>
-There is only one generic function on coordinate concepts, Euclidean distance.<p>
+general polygon algorithms.</p><p>
+<font face="Courier New">template &lt;typename T&gt;<br />
+struct high_precision_type {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef long double type;<br />
+};</font></p><p>
+There is only one generic function on coordinate concepts, Euclidean distance.</p><p>
 <font face="Courier New">template &lt;typename coordinate_type_1, typename
-coordinate_type_2&gt;<br>
-coordinate_difference euclidean_distance(coordinate_type_1, coordinate_type_2)</font><p>
+coordinate_type_2&gt;<br />
+coordinate_difference euclidean_distance(coordinate_type_1, coordinate_type_2)</font></p><p>
 This function returns the absolution value of the difference between the two
-coordinates.<p>
+coordinates.</p><p>
 Note: older versions of the stl define a fully generic distance(T, T) function
 for computing the difference between two iterators.&nbsp; We were forced to name
-our distance function euclidean_distance to avoid name collision.<p>
+our distance function euclidean_distance to avoid name collision.</p><p>
 The
 <a href="http://www.mentor.com/products/esl/high_level_synthesis/ac_datatypes">
 Algorithmic C</a> ac_int&lt;128&gt; is an example of a user defined coordinate data
 type that satisfies the coordinate concept.&nbsp; In general a data type should
 define std::numeric_limits and be integer-like.&nbsp; Floating point coordinate
 types are not supported by all the algorithms and generally not suitable for use
-with the library at present.<tr>
+with the library at present.</p></td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table1">
+<table class="docinfo" id="table1" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -137,6 +157,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_design_overview.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_design_overview.htm (original)
+++ branches/release/libs/polygon/doc/gtl_design_overview.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Overview</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Overview</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -21,6 +23,8 @@
             <li>Interval Concept</li>
             <li>
                         <a href="gtl_point_concept.htm">Point Concept</a></li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -37,6 +41,18 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
@@ -46,23 +62,27 @@
              <li>Performance Analysis</li>
                 <li>Layout Versus Schematic Tutorial</li>
                 <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+
         </ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon Library Design Overview</h1>
 
 <p>
-<p>The Polygon library uses C++-Concepts inspired template programming to
+</p><p>The Polygon library uses C++-Concepts inspired template programming to
 provide generic library functions overloaded on concept type.&nbsp; There are
 currently thirteen concepts in the Polygon library type system.&nbsp; A concept
 object in the Polygon library is just an empty struct similar to a tag that
@@ -70,7 +90,7 @@
 refinement diagram below.</p>
 
 
-</body><img border="0" src="images/refinements.png" width="466" height="369"><p>
+<img src="images/refinements.png" border="0" height="369" width="466" /><p>
 The arrows between diagram bubbles show concept refinement relationships.&nbsp; This is
 similar, but not identical to, inheritance relationships between normal classes.&nbsp;
 A refinement of a concept narrows down the definition of a more general concept.&nbsp;
@@ -123,7 +143,7 @@
 as that conceptual type with the library by
 specializing the geometry_concept meta-function.&nbsp; Once mapped and
 registered, a user data type can be used interchangeably with library data types
-in the generic free functions that are overloaded on concept.<p>Traits for
+in the generic free functions that are overloaded on concept.</p><p>Traits for
 mapping a data type to a concept are broken down into mutable and read only
 traits.&nbsp; Read only traits are specialized internally to work with any types
 that are refinements of a concept.&nbsp; The mutable traits are defined only for
@@ -135,7 +155,7 @@
 traits defined for that triangle type.&nbsp; This would allow the triangle type
 to be passed into any API that expects a const reference to an object that models
 polygon.&nbsp;
-<p>An object that is a model of a given concept can usually be viewed as a model of any of its
+</p><p>An object that is a model of a given concept can usually be viewed as a model of any of its
 refinements if it is determined at runtime to conform to the restrictions of
 those concepts.&nbsp; This concept casting is accomplished through the
 <font face="Courier New">view_as&lt;&gt;()</font> function.&nbsp; For example if
@@ -146,17 +166,17 @@
 passed into any interface that expects an object of the conceptual type
 specified in its template parameter.&nbsp; The exception to this ability to
 concept cast geometric objects is that polygon set objects cannot be viewed as
-individual polygons or rectangles.</p> <tr>
+individual polygons or rectangles.</p> </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table1">
+<table class="docinfo" id="table1" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -169,6 +189,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_interval_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_interval_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_interval_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Interval Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Interval Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
                         <li>Interval Concept</li>
             <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,6 +40,18 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
@@ -45,30 +61,34 @@
              <li>Performance Analysis</li>
                 <li>Layout Versus Schematic Tutorial</li>
                 <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+
         </ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Interval Concept</h1>
 
 <p>
-<p>The interval concept tag is <font face="Courier New">
+</p><p>The interval concept tag is <font face="Courier New">
 interval_concept</font></p>
 <p>
 To register a user defined type as a model of interval concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below
-CInterval is registered as a model of interval&nbsp; concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CInterval&gt; { typedef interval_concept type; };</font><p>
+CInterval is registered as a model of interval&nbsp; concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CInterval&gt; { typedef interval_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of an interval is that it has a low
 and high coordinate and there is an invariant that low is less than or equal to
 high.&nbsp; This invariant is enforced by the generic library functions that
@@ -76,50 +96,51 @@
 mapping of that data type to the interval concept through its traits.&nbsp; In
 this way a std::pair&lt;int, int&gt;, boost::tuple&lt;int, int&gt; or boost::array&lt;int, 2&gt;
 could all be made models of interval by simply providing indirect access to their
-elements through traits.</font><p>
+elements through traits.</font></p><p>
 <font face="Times New Roman">Below is shown the default interval traits.&nbsp;
 Specialization of these traits is required for types that don't conform to the
-default behavior.</font><p>
-<font face="Courier New">template &lt;typename T&gt;<br>
-struct interval_traits {<br>
-&nbsp; typedef typename T::coordinate_type coordinate_type;<br>
-<br>
-&nbsp; static inline coordinate_type get(const T&amp; interval, direction_1d dir) {<br>
-&nbsp;&nbsp;&nbsp; return interval.get(dir); <br>
-&nbsp; }<br>
-};<br>
-<br>
-template &lt;typename T&gt;<br>
-struct interval_mutable_traits {<br>
+default behavior.</font></p><p>
+<font face="Courier New">template &lt;typename T&gt;<br />
+struct interval_traits {<br />
+&nbsp; typedef typename T::coordinate_type coordinate_type;<br />
+<br />
+&nbsp; static inline coordinate_type get(const T&amp; interval, direction_1d dir) {<br />
+&nbsp;&nbsp;&nbsp; return interval.get(dir); <br />
+&nbsp; }<br />
+};<br />
+<br />
+template &lt;typename T&gt;<br />
+struct interval_mutable_traits {<br />
 &nbsp; static inline void set(T&amp; interval, direction_1d dir, </font>
-<br>
-<font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typename interval_traits&lt;T&gt;::coordinate_type value) {<br>
+<br />
+<font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+typename interval_traits&lt;T&gt;::coordinate_type value) {<br />
 &nbsp;&nbsp;&nbsp;
-interval.set(dir, value); <br>
+interval.set(dir, value); <br />
 &nbsp;
-}<br>
+}<br />
 &nbsp;
 static inline T construct(typename interval_traits&lt;T&gt;::coordinate_type low_value,
-<br>
+<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-typename interval_traits&lt;T&gt;::coordinate_type high_value) {<br>
+typename interval_traits&lt;T&gt;::coordinate_type high_value) {<br />
 &nbsp;&nbsp;&nbsp;
-return T(low_value, high_value); <br>
+return T(low_value, high_value); <br />
 &nbsp;
-}<br>
-};</font><h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+}<br />
+};</font></p><h2>Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_type <b>get</b>(const T&amp; interval, direction_1d)</font></td>
                 <td><font face="Times New Roman">Expects a model of interval.&nbsp;
                 Returns the low or high coordinate of the interval, depending on the
- direction_1d value.</font><font face="Courier New"><br>
+ direction_1d value.</font><font face="Courier New"><br />
 &nbsp;</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coordinate_type&gt;<br>
+ coordinate_type&gt;<br />
                 void <b>set</b>(T&amp; interval, direction_1d, coordinate_type)</font></td>
                 <td><font face="Times New Roman">Expects a model of interval.&nbsp;&nbsp;
                 Sets the low or high coordinate of the interval to the coordinate,
@@ -127,28 +148,28 @@
                 high after this change then both are set to the input coordinate value.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T <b>construct</b>(coordinate_type low, coordinate_type high)</font></td>
                 <td>Construct an object that is a model of interval given low and high
                 coordinate values.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models interval into left object
                 that models interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>equivalence</b>(const T&amp; interval1, const T2&amp; interval2)</font></td>
                 <td>Given two objects that model interval, compares and returns true if
                 their low and high values are respectively equal to each other.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- bool <b>contains</b>(const T&amp;, coordinate_type, <br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ bool <b>contains</b>(const T&amp;, coordinate_type, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models interval and a coordinate, returns true
@@ -158,8 +179,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>contains</b>(const T1&amp; a, const T2&amp; b, <br>
+ T2&gt;<br />
+ bool <b>contains</b>(const T1&amp; a, const T2&amp; b, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch = true) </font></td>
                 <td>Returns true if model of interval a contains both ends of model of
@@ -168,25 +189,25 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
+ interval_type&gt;<br />
                 coordinate_type <b>low</b>(const interval_type&amp; interval)</font></td>
                 <td>Returns the low end of an object that models interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
+ interval_type&gt;<br />
                 coordinate_type <b>high</b>(const interval_type&amp; interval)</font></td>
                 <td>Returns the high end of an object that models interval.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename interval_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename interval_type&gt;<br />
                 coordinate_type <b>center</b>(const interval_type&amp; interval)</font></td>
                 <td>Returns the center coordinate of an object that models interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
+ interval_type&gt;<br />
                 void <b>low</b>(interval_type&amp; interval, coordinate_type )</font></td>
                 <td>Sets the low end of the object that models interval to the
                 coordinate value.&nbsp; If the low end would be set to larger than high
@@ -194,7 +215,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
+ interval_type&gt;<br />
                 void <b>high</b>(interval_type&amp; interval, coordinate_type )</font></td>
                 <td>Sets the high end of the object that models interval to the
                 coordinate value.&nbsp; If the high end would be set to less than low
@@ -202,15 +223,15 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
+ interval_type&gt;<br />
                 coordinate_difference <b>delta</b>(const interval_type&amp; interval)</font></td>
                 <td>Returns the distance from low to high end of an object that models
                 interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
- interval_type&amp; <b>flip</b>(interval_type&amp; interval,<br>
+ interval_type&gt;<br />
+ interval_type&amp; <b>flip</b>(interval_type&amp; interval,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 coordinate_type axis = 0)</font></td>
                 <td>Flips an object that models interval about the axis coordinate.&nbsp;
@@ -218,26 +239,26 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
- interval_type&amp; <b>scale_up</b>(interval_type&amp; interval, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- unsigned_area_type factor)</font></td>
+ interval_type&gt;<br />
+ interval_type&amp; <b>scale_up</b>(interval_type&amp; interval, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+unsigned_area_type factor)</font></td>
                 <td>Multiplies low and high ends of an object that models interval by
                 unsigned factor.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
- interval_type&amp; <b>scale_down</b>(interval_type&amp; interval, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- unsigned_area_type factor)</font></td>
+ interval_type&gt;<br />
+ interval_type&amp; <b>scale_down</b>(interval_type&amp; interval, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+unsigned_area_type factor)</font></td>
                 <td>Divides low and high ends of an object that models interval by
                 unsigned factor.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
- interval_type&amp; <b>scale</b>(interval_type&amp; interval,<br>
+ interval_type&gt;<br />
+ interval_type&amp; <b>scale</b>(interval_type&amp; interval,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 double factor) </font></td>
                 <td>Multiplies low and high ends of an object that models interval by
@@ -245,8 +266,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
- interval_type&amp; <b>move</b>(interval_type&amp; interval,<br>
+ interval_type&gt;<br />
+ interval_type&amp; <b>move</b>(interval_type&amp; interval,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to low and high ends of an object that
@@ -254,53 +275,53 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
- interval_type&amp; <b>convolve</b>(interval_type&amp; interval,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- coordinate_type b)</font></td>
+ interval_type&gt;<br />
+ interval_type&amp; <b>convolve</b>(interval_type&amp; interval,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+coordinate_type b)</font></td>
                 <td>Adds coordinate value to low and high ends of an object that models
                 interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- interval_type&gt;<br>
- interval_type&amp; <b>deconvolve</b>(interval_type&amp; interval,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- coordinate_type b)</font></td>
+ interval_type&gt;<br />
+ interval_type&amp; <b>deconvolve</b>(interval_type&amp; interval,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+coordinate_type b)</font></td>
                 <td>Subtracts coordinate value from low and high ends of an object that
                 models interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>convolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Adds low end of b to low end of a and adds high end of b to high end
                 of a.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>deconvolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Subtracts low end of b from low end of a and subtracts high end of b
                 from high end of a. </td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>reflected_convolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Adds high end of b to low end of a and adds low end of b to high end
                 of a.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>reflected_deconvolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Subtracts high end of b from low end of a and subtracts low end of b
                 from high end of a.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- coordinate_difference <b>euclidean_distance</b>(const T&amp;,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ coordinate_difference <b>euclidean_distance</b>(const T&amp;,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 coordinate_type)</font></td>
                 <td>Returns the distance from an object that models interval to a
@@ -309,8 +330,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>intersects</b>(const T1&amp; interval, const T2&amp; b, <br>
+ T2&gt;<br />
+ bool <b>intersects</b>(const T1&amp; interval, const T2&amp; b, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch = true)</font></td>
                 <td>Returns true if two objects that model interval overlap.&nbsp; If
@@ -319,10 +340,10 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>boundaries_intersect</b>(const T1&amp; interval, const T2&amp; b, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- bool consider_touch = true)</font></td>
+ T2&gt;<br />
+ bool <b>boundaries_intersect</b>(const T1&amp; interval, const T2&amp; b, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+bool consider_touch = true)</font></td>
                 <td>Returns true is two objects that model interval partially overlap
                 such that one end point of each is contained within the other.&nbsp; If
                 the consider_touch flag is true a coordinate is considered contained
@@ -330,8 +351,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>abuts</b>(const T1&amp; a, const T2&amp; b,<br>
+ T2&gt;<br />
+ bool <b>abuts</b>(const T1&amp; a, const T2&amp; b,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; direction_1d dir)
                 </font></td>
                 <td>Returns true if interval b abuts but down not overlap interval a on
@@ -339,14 +360,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>abuts</b>(const T1&amp; a, const T2&amp; b)</font></td>
                 <td>Returns true if interval b abuts but down not overlap interval a.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>intersect</b>(T1&amp; a, const T2&amp; b,<br>
+ T2&gt;<br />
+ bool <b>intersect</b>(T1&amp; a, const T2&amp; b,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch = true) </font></td>
                 <td>Sets interval a to the intersection of interval a and interval b and
@@ -356,55 +377,55 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T&amp; <b>generalized_intersect</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Same as intersect, but if they do not intersect set a to the
                 interval between a and b.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; interval, coordinate_type)</font></td>
                 <td>Adds the coordinate value to high end of interval and subtracts it
                 from low end of interval.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; interval, direction_1d, coordinate_type)</font></td>
                 <td>Adds the coordinate value to high end of interval or subtracts it
                 from low end of interval depending on the direction_1d.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; interval, coordinate_type)</font></td>
                 <td>Subtracts the coordinate value from high end of interval and adds it
                 to low end of interval.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; interval, direction_1d, coordinate_type)</font></td>
                 <td>Subtracts the coordinate value from high end of interval or adds it
                 to low end of interval depending on the direction_1d.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>encompass</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Sets low of a to min of low of a and low of b and sets high of a to
                 max of high of a and high of b.&nbsp; Returns true if b was not
                 contained within a to begin with.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 bool <b>encompass</b>(T&amp; a, coordinate_type)</font></td>
                 <td>Sets low of a to min of low of a and coordinate value and sets high
                 of a to max of high of a and coordinate value.&nbsp; Returns true if
                 coordinate value was not contained within a to begin with.</td>
         </tr>
-</table>
+</tbody></table>
         <h1>Interval Data</h1>
 
 <p>
-<p>The library provides a model of interval concept declared
+</p><p>The library provides a model of interval concept declared
 <font face="Courier New">
 template&lt;typename T&gt; interval_data </font>where T is the coordinate type.</p>
 <p>This data type is used internally when an interval is needed and is available
@@ -412,8 +433,8 @@
 instead of providing their own.&nbsp; The data type is implemented to be
 convenient to use with the library traits.</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">interval_concept</font></td>
         </tr>
@@ -444,42 +465,42 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>&nbsp;
- <br> </b>interval_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
+ <br /> </b>interval_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator==</b>(const T2&amp; that) const</font></td>
                 <td>Compare equality to an object that is a model of interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator!=</b>(const T2&amp; that) const</font></td>
                 <td>Compare inequality to an object that is a model of interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&lt;</b>(const T2&amp; that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&lt;=</b>(const T2&amp; that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&gt;</b>(const T2&amp; that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&gt;=</b>(const T2&amp; that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
@@ -493,18 +514,18 @@
                 dir, T value)</font></td>
                 <td>Sets the coordinate in the given direction to the value.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -517,6 +538,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_isotropy.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_isotropy.htm (original)
+++ branches/release/libs/polygon/doc/gtl_isotropy.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Isotropy</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Isotropy</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
                         <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,6 +40,18 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
@@ -45,32 +61,34 @@
              <li>Performance Analysis</li>
                 <li>Layout Versus Schematic Tutorial</li>
                 <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Isotropy</h1>
 
 <p>
-<p align="left">What is isotropy?</p>
-<P:COLORSCHEME
-colors="#ffffff,#000000,#808080,#000000,#bbe0e3,#333399,#009999,#99cc00" />
-<div class="O" style="TEXT-ALIGN: center; mso-line-spacing: '90 0 0'; mso-margin-left-alt: 216; mso-char-wrap: 1; mso-kinsoku-overflow: 1" v:shape="_x0000_s1026">
- <p style="TEXT-ALIGN: left">
- <span style="mso-bidi-font-family: Arial">Isotropy - Function: <i>adjective</i> Etymology: International
- Scientific Vocabulary<br>
+</p><p align="left">What is isotropy?</p>
+<p:colorscheme colors="#ffffff,#000000,#808080,#000000,#bbe0e3,#333399,#009999,#99cc00">
+</p:colorscheme><div class="O" style="text-align: center;" v:shape="_x0000_s1026">
+ <p style="text-align: left;">
+ <span style="">Isotropy - Function: <i>adjective</i> Etymology: International
+ Scientific Vocabulary<br />
         <b>:</b> exhibiting properties (as velocity of light transmission) with the
         same values when measured along axes in all directions &lt;an <i>isotropic</i>
- crystal&gt;</span></div>
+ crystal&gt;</span></p></div>
 <p align="left">In computational geometry things are often symmetric and
 invariant to direction and orientation.&nbsp; This invariance to direction is
 called isotropy.&nbsp; In such situations it is convenient to parameterize
@@ -95,8 +113,8 @@
 describing isotropic situations programmatically.&nbsp; For instance, to get the
 positive direction_2d from an orientation_2d you would call a member function of
 orientation_2d and pass a direction_1d:</p>
-<p align="left"><font face="Courier New">orientation_2d orient = HORIZONTAL;<br>
-direction_2d dir = orient.get_direction(direction_1d(HIGH));<br>
+<p align="left"><font face="Courier New">orientation_2d orient = HORIZONTAL;<br />
+direction_2d dir = orient.get_direction(direction_1d(HIGH));<br />
 assert(dir == EAST);</font></p>
 <p align="left">The motivation for providing isotropic data types is to
 encourage programming at a higher level of abstraction where program behavior is
@@ -114,7 +132,7 @@
 <h2>direction_1d</h2>
 
 <p>
-<p align="left">The direction_1d data type has two possible states.&nbsp; These
+</p><p align="left">The direction_1d data type has two possible states.&nbsp; These
 are the positive and negative directions on a continuum such as the number line.&nbsp;&nbsp;
 These states can be described by one of several direction_1d_enum values:&nbsp;
 We make clockwise and counterclockwise winding orientation of polygons a
@@ -122,24 +140,23 @@
 type.&nbsp; This is because winding orientation can be thought of as positive
 and negative directions in a 1d (although cyclic) space.&nbsp; We assign
 counterclockwise to be the positive direction of travel in the 1d cyclic space
-to conform with the mathematical convention frequently described as the &quot;right
-hand rule&quot; which assigns positive normal value to counterclockwise and negative
+to conform with the mathematical convention frequently described as the "right
+hand rule" which assigns positive normal value to counterclockwise and negative
 normal value to clockwise as well as the common convention that counterclockwise
 polygon winding corresponds to positive polygonal regions where as clockwise
 polygon winding corresponds to hole (negative) polygonal regions.</p>
 <p align="left"><font face="Courier New">enum direction_1d_enum {LOW = 0, HIGH =
-1,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-LEFT = 0, RIGHT = 1,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CLOCKWISE = 0, COUNTERCLOCKWISE = 1,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-REVERSE = 0, FORWARD = 1,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+LEFT = 0, RIGHT = 1,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+CLOCKWISE = 0, COUNTERCLOCKWISE = 1,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+REVERSE = 0, FORWARD = 1,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 NEGATIVE = 0, POSITIVE = 1 };</font></p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New"><b>direction_1d</b>(direction_1d_enum
                 val = LOW)</font></td>
                 <td>Constructor defaults to LOW. </td>
@@ -193,18 +210,18 @@
                 <td>Returns positive 1 if positive direction and negative one if
                 negative direction.</td>
         </tr>
- </table>
+ </tbody></table>
 <h2>orientation_2d</h2>
 
 <p>
-<p align="left">The orientation_2d data type has two possible states.&nbsp;
+</p><p align="left">The orientation_2d data type has two possible states.&nbsp;
 These are the horizontal and vertical axis of a 2d Cartesian coordinate system.&nbsp;&nbsp;
 These states can be described by one of the two orientation_2d_enum values:</p>
 <p align="left"><font face="Courier New">enum orientation_2d_enum { HORIZONTAL =
 0, VERTICAL = 1 };</font></p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">orientation_2</font></b><font face="Courier New"><b>d</b>(orientation_2d_enum
                 val = HORIZONTAL)</font></td>
                 <td>Constructor defaults to HORIZONTAL. </td>
@@ -261,18 +278,18 @@
                 <td>Returns the positive or negative direction_2d depending on the value
                 of dir</td>
         </tr>
- </table>
+ </tbody></table>
 <h2>direction_2d</h2>
 
 <p>
-<p align="left">The direction_2d data type has four possible states.&nbsp; These
+</p><p align="left">The direction_2d data type has four possible states.&nbsp; These
 are the cardinal directions of the 2D Cartesian coordinate system.&nbsp;&nbsp;
 These states can be described by one of several direction_2d_enum values:</p>
 <p align="left"><font face="Courier New">enum direction_2d_enum { WEST = 0, EAST
 = 1, SOUTH = 2, NORTH = 3 };</font></p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table3">
- <tr>
+<table id="table3" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New"><b>direction_2d</b>(direction_2d_enum
                 val = WEST)</font></td>
                 <td>Constructor defaults to WEST. </td>
@@ -342,19 +359,19 @@
                 <td>Returns positive 1 if positive direction and negative one if
                 negative direction.</td>
         </tr>
- </table>
+ </tbody></table>
 <h2>orientation_3d</h2>
 
 <p>
-<p align="left">The orientation_3d data type has three possible states.&nbsp;
+</p><p align="left">The orientation_3d data type has three possible states.&nbsp;
 These are the horizontal, vertical and proximal (x, y, z) axis of a 3d Cartesian
 coordinate system.&nbsp;&nbsp; These states can be described by one of the
 orientation_2d_enum values or by the orientation_3d_enum value:</p>
 <p align="left"><font face="Courier New">enum orientation_3d_enum { PROXIMAL = 2
 };</font></p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table6">
- <tr>
+<table id="table6" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">orientation_3</font></b><font face="Courier New"><b>d</b>(orientation_2d_enum
                 val = HORIZONTAL)</font></td>
                 <td>Constructor defaults to HORIZONTAL. </td>
@@ -416,19 +433,19 @@
                 <td>Returns the positive or negative direction_2d depending on the value
                 of dir</td>
         </tr>
- </table>
+ </tbody></table>
 <h2>direction_3d</h2>
 
 <p>
-<p align="left">The direction_3d data type has six possible states.&nbsp; These
+</p><p align="left">The direction_3d data type has six possible states.&nbsp; These
 are the cardinal directions of the 3D Cartesian coordinate system.&nbsp;&nbsp;
 These states can be described by one of the direction_2d_enum values or the
 direction_3d_enum values:</p>
 <p align="left"><font face="Courier New">enum direction_3d_enum { DOWN = 4, UP =
 5 };</font></p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table5">
- <tr>
+<table id="table5" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New"><b>direction_3d</b>(direction_2d_enum
                 val = WEST)</font></td>
                 <td>Constructor defaults to LOW. </td>
@@ -490,18 +507,18 @@
                 <td>Returns positive 1 if positive direction and negative one if
                 negative direction.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table7">
+<table class="docinfo" id="table7" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -514,6 +531,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_minkowski_tutorial.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_minkowski_tutorial.htm (original)
+++ branches/release/libs/polygon/doc/gtl_minkowski_tutorial.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -96,7 +96,7 @@
 convolutions.&nbsp; First we implement a function that convolves all pairs of
 edges represented by iterator pairs over points.&nbsp; We assume that the first
 point is equal to the last point in each sequence because we know the polygons
-that gave rise to the iterators were produced by the Boost.Polygon algorithm for
+that gave rise to the iterators were produce by the Boost.Polygon algorithm for
 general polygon formation.</p>
 <p><font face="Courier New" size="2">template &lt;typename itrT1, typename itrT2&gt;<br>
 void convolve_two_point_sequences(polygon_set&amp; result, itrT1 ab, itrT1 ae, itrT2
@@ -177,7 +177,7 @@
 &nbsp;&nbsp;&nbsp; }<br>
 &nbsp; }<br>
 }</font></p>
-<p>We test the convolution of two polygon sets with the code shown below that
+<p>We test the convolution of two polygon set with the code shown below that
 produces the first example shown in this tutorial.<font face="Courier New" size="2">
 </font></p>
 <p><font face="Courier New" size="2">polygon_set a, b, c;<br>
@@ -197,6 +197,7 @@
 polygon poly;<br>
 boost::polygon::set_points(poly, pts.begin(), pts.end());<br>
 b+=poly;<br>
+polys.clear();<br>
 convolve_two_polygon_sets(c, a, b);</font></p>
 <p>Output (a is blue, b is green and c is red):</p>
 <p><img border="0" src="images/convolution1.PNG" width="438" height="404"></p>

Modified: branches/release/libs/polygon/doc/gtl_point_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_point_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_point_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Point Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Point Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,6 +40,18 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
@@ -45,30 +61,34 @@
              <li>Performance Analysis</li>
                 <li>Layout Versus Schematic Tutorial</li>
                 <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+
         </ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Point Concept</h1>
 
 <p>
-<p>
+</p><p>
 The point concept tag is <font face="Courier New">
-point_concept</font><p>
+point_concept</font></p><p>
 To register a user defined type as a model of point concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below CPoint is registered as a model of
-point&nbsp; concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CPoint&gt; { typedef point_concept type; };</font><p>
+point&nbsp; concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CPoint&gt; { typedef point_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a point is that it has an x and y
 coordinate.&nbsp; A std::pair&lt;int, int&gt;, boost::tuple&lt;int, int&gt; or boost::array&lt;int, 2&gt;
 could all be made models of point by simply providing indirect access to their
@@ -76,116 +96,115 @@
 point and interval in the same compilation unit, for obvious reason that
 duplicate specialization of the geometry_concept struct is illegal, but also
 because it would make overloading generic function by concept ambiguous if a
-type modeled more than one concept.</font><p>
+type modeled more than one concept.</font></p><p>
 <font face="Times New Roman">Below is shown the default point traits.&nbsp;
 Specialization of these traits is required for types that don't conform to the
-default behavior.</font><p>
-template &lt;typename T&gt;<br>
-struct point_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br>
-<br>
+default behavior.</font></p><p>
+template &lt;typename T&gt;<br />
+struct point_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br />
+<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline coordinate_type get(const T&amp; point,
-orientation_2d orient) {<br>
+orientation_2d orient) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return point.get(orient);
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-};<br>
-<br>
-template &lt;typename T&gt;<br>
-struct point_mutable_traits {<br>
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+};<br />
+<br />
+template &lt;typename T&gt;<br />
+struct point_mutable_traits {<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline void set(T&amp; point, orientation_2d orient,
-typename point_traits&lt;T&gt;::coordinate_type value) {<br>
+typename point_traits&lt;T&gt;::coordinate_type value) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; point.set(orient, value);
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T construct(typename point_traits&lt;T&gt;::coordinate_type
-x_value, typename point_traits&lt;T&gt;::coordinate_type y_value) {<br>
+x_value, typename point_traits&lt;T&gt;::coordinate_type y_value) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return T(x_value, y_value);
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-};<p>
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+};</p><p>
 Example code custom_point.cpp demonstrates
 how to map a
- user defined point class to the library point_concept<h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ user defined point class to the library point_concept</p><h2>Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_type <b>get</b>(const T&amp; point, orientation_2d)</font></td>
                 <td><font face="Times New Roman">Expects a model of point.&nbsp; Returns
                 the x or y coordinate of the point, depending on the orientation_2d
- value.</font><font face="Courier New"><br>
+ value.</font><font face="Courier New"><br />
 &nbsp;</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coordinate_type&gt;<br>
+ coordinate_type&gt;<br />
                 void <b>set</b>(T&amp; point, orientation_2d, coordinate_type)</font></td>
                 <td><font face="Times New Roman">Expects a model of point.&nbsp;&nbsp;
                 Sets the x or y coordinate of the point to the coordinate, depending on
                 the orientation_2d&nbsp; value. </font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T <b>construct</b>(coordinate_type x, coordinate_type y)</font></td>
                 <td>Construct an object that is a model of point given x and y
                 coordinate values.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models point into left object
                 that models point.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>equivalence</b>(const T&amp; point1, const T2&amp; point2)</font></td>
                 <td>Given two objects that model point, compares and returns true if
                 their x and y values are respectively equal to each other.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br />
                 coordinate_type <b>x</b>(const point_type&amp; point)</font></td>
                 <td>Returns the x coordinate of an object that models point.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br />
                 coordinate_type <b>y</b>(const point_type&amp; point)</font></td>
                 <td>Returns the y coordinate of an object that models point.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br />
                 void <b>x</b>(point_type&amp; point, coordinate_type )</font></td>
                 <td>Sets the x coordinate of the object that models point to the
                 coordinate value.&nbsp; </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br />
                 void <b>y</b>(point_type&amp; point, coordinate_type )</font></td>
                 <td>Sets the y coordinate of the object that models point to the
                 coordinate value.&nbsp; </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br>
- point_type&amp; <b>scale_up</b>(point_type&amp; point, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- unsigned_area_type factor)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br />
+ point_type&amp; <b>scale_up</b>(point_type&amp; point, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+unsigned_area_type factor)</font></td>
                 <td>Multiplies x and y coordinate of an object that models point by
                 unsigned factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br>
- point_type&amp; <b>scale_down</b>(point_type&amp; point, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- unsigned_area_type factor)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br />
+ point_type&amp; <b>scale_down</b>(point_type&amp; point, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+unsigned_area_type factor)</font></td>
                 <td>Divides x and y coordinate of an object that models point by
                 unsigned factor.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename point_type,
- typename scaling_type&gt;<br>
- point_type&amp; <b>scale</b>(point_type&amp; point,<br>
+ typename scaling_type&gt;<br />
+ point_type&amp; <b>scale</b>(point_type&amp; point,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 const scaling_type&amp; factor) </font></td>
                 <td>Calls the scale member function of scaling type on the x and y value
@@ -193,8 +212,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename point_type,
- typename transform_type&gt;<br>
- point_type&amp; <b>transform</b>(point_type&amp; point,<br>
+ typename transform_type&gt;<br />
+ point_type&amp; <b>transform</b>(point_type&amp; point,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 const transform_type&amp; transform) </font></td>
                 <td>Calls the transform member function of transform type on the x and y
@@ -202,8 +221,8 @@
                 transformed values.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br>
- point_type&amp; <b>move</b>(point_type&amp; point, orientation_2d<br>
+ <td width="586"><font face="Courier New">template &lt;typename point_type&gt;<br />
+ point_type&amp; <b>move</b>(point_type&amp; point, orientation_2d<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to the coordinate of an object that models
@@ -211,30 +230,30 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>convolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Adds x coordinate of b to x coordinate of a and adds y coordinate of
                 b to y coordinate of a.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>deconvolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Subtracts x coordinate of b from x coordinate of a and subtracts y
                 coordinate of b from y coordinate of a. </td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- coordinate_distance <b>euclidean_distance</b>(const T1&amp;,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T2&amp;)</font></td>
+ T2&gt;<br />
+ coordinate_distance <b>euclidean_distance</b>(const T1&amp;,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const T2&amp;)</font></td>
                 <td>Returns the distance from an object that models point to a second
                 object that models point.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- coordinate_difference <b>euclidean_distance</b>(const T&amp;,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ coordinate_difference <b>euclidean_distance</b>(const T&amp;,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d,
                 coordinate_type)</font></td>
                 <td>Returns the distance from an object that models point to a
@@ -242,28 +261,28 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- coordinate_difference <b>manhattan_distance</b>(const T1&amp;,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T2&amp;)</font></td>
+ T2&gt;<br />
+ coordinate_difference <b>manhattan_distance</b>(const T1&amp;,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const T2&amp;)</font></td>
                 <td>Returns the distance in x plus the distance in y from an object that
                 models point to a second object that models point.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- coordinate_difference <b>distance_squared</b>(const T1&amp;,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T2&amp;)</font></td>
+ T2&gt;<br />
+ coordinate_difference <b>distance_squared</b>(const T1&amp;,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const T2&amp;)</font></td>
                 <td>Returns the square of the distance in x plus the square of the
                 distance in y from an object that models point to a second object that
                 models point.</td>
         </tr>
-</table>
+</tbody></table>
 <h1>Point Data</h1>
 
 <p>
-<p>The library provides a model of point concept declared
+</p><p>The library provides a model of point concept declared
 <font face="Courier New">
 template&lt;typename T&gt; point_data </font>where T is the coordinate type.</p>
 <p>This data type is used internally when a point is needed and is available to
@@ -273,8 +292,8 @@
 <p>Example code point_usage.cpp demonstrates using the
                 library provided point data type and functions</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">point_concept</font></td>
         </tr>
@@ -304,42 +323,42 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>&nbsp;
- <br> </b>point_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
+ <br /> </b>point_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of point.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator==</b>(const T2&amp; that) const</font></td>
                 <td>Compare equality to an object that is a model of point.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator!=</b>(const T2&amp; that) const</font></td>
                 <td>Compare inequality to an object that is a model of point.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&lt;</b>(const T2&amp; that) const</font></td>
                 <td>Compares y coordinates then x coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&lt;=</b>(const T2&amp; that) const</font></td>
                 <td>Compares y coordinates then x coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&gt;</b>(const T2&amp; that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator&gt;=</b>(const T2&amp; that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
@@ -369,18 +388,18 @@
                 <td width="586"><font face="Courier New">void <b>y</b>(T value)</font></td>
                 <td>Sets the coordinate in the vertical orientation to the value.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -393,6 +412,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_45_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_45_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_45_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon 45 Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon 45 Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,40 +40,55 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon 45 Concept</h1>
 
 <p>
-<p>The polygon_45 concept tag is <font face="Courier New">
+</p><p>The polygon_45 concept tag is <font face="Courier New">
 polygon_45_concept</font></p>
 <p>
 To register a user defined type as a model of
 <font face="Times New Roman">polygon_45 </font>concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below CPolygon45 is registered as a model of
-polygon_45&nbsp; concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CPolygon45&gt; { typedef polygon_45_concept type; };</font><p>
+polygon_45&nbsp; concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CPolygon45&gt; { typedef polygon_45_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a polygon_45 is that it can provide
 iterators over the points that represent its vertices, angles formed as these
 vertices must be multiple of 45-degree relative to the coordinate axis.&nbsp; It
@@ -80,75 +99,75 @@
 or std::list&lt;point_data&lt;int&gt; &gt;
 could be made models of polygon_45_concept by simply providing access to their
 iterators through traits.&nbsp; Library functions that create polygon objects
-require that those objects provide a default constructor.</font><p>
+require that those objects provide a default constructor.</font></p><p>
 <font face="Times New Roman">Below is shown the default polygon traits.&nbsp;
 Specialization of these traits is required for types that don't conform to the
 default behavior.&nbsp; Note that these traits are also used by several other
 polygon concepts through SFINAE enable template parameter.&nbsp; The SFINAE enable
 parameter also allows the library to provide default specialization that work
-for any object that models the 90 degree polygon concepts.</font><p>
-<font face="Courier New">template &lt;typename T, typename enable = gtl_yes&gt;<br>
-struct polygon_traits {};<br>
-<br>
-template &lt;typename T&gt;<br>
-struct polygon_traits&lt;T, <br>
-&nbsp; typename gtl_or_4&lt;<br>
+for any object that models the 90 degree polygon concepts.</font></p><p>
+<font face="Courier New">template &lt;typename T, typename enable = gtl_yes&gt;<br />
+struct polygon_traits {};<br />
+<br />
+template &lt;typename T&gt;<br />
+struct polygon_traits&lt;T, <br />
+&nbsp; typename gtl_or_4&lt;<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_concept&gt;::type,<br>
+polygon_concept&gt;::type,<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_45_concept&gt;::type,<br>
+polygon_45_concept&gt;::type,<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_with_holes_concept&gt;::type,<br>
+polygon_with_holes_concept&gt;::type,<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_45_with_holes_concept&gt;::type<br>
-&nbsp; &gt;::type&gt; {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::iterator_type iterator_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::point_type point_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type begin_points(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type end_points(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline winding_direction winding(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return unknown_winding;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+polygon_45_with_holes_concept&gt;::type<br />
+&nbsp; &gt;::type&gt; {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::iterator_type iterator_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::point_type point_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type begin_points(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type end_points(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline winding_direction winding(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return unknown_winding;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
-<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br>
-struct polygon_mutable_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br>
+<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br />
+struct polygon_mutable_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T&amp; set_points(T&amp; t, iT input_begin, iT
-input_end) {<br>
+input_end) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.set(input_begin,
-input_end);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+input_end);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
 <p>An object that is a model of <font face="Courier New">
 polygon_45_concept</font> can be viewed as a model of any of its
 refinements if it is determined at runtime to conform to the restriction of
 those concepts.&nbsp; This concept casting is accomplished through the
 <font face="Courier New">view_as&lt;&gt;()</font> function.</p>
-<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_45_object)</font><br>
+<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_45_object)</font><br />
 <font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_45_object)</font></p>
 <p>The return value of <font face="Courier New">view_as&lt;&gt;()</font> can be
 passed into any interface that expects an object of the conceptual type
 specified in its template parameter.</p>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>begin_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_45.&nbsp;
                 Returns the begin iterator over the range of points that correspond to
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>end_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_45.&nbsp;
                 Returns the end iterator over the range of points that correspond to
@@ -156,7 +175,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_points</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_45.&nbsp;&nbsp;
                 Sets the polygon to the point data range [b,e) that corresponds to
@@ -164,22 +183,22 @@
                 points is disallowed.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 unsigned int <b>size</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Returns the number of edges in the
                 polygon.</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models polygon_45 into left object
                 that models polygon_45.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br>
+ typename point_type&gt;<br />
+ bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models polygon_45 and an object that models
@@ -189,85 +208,84 @@
                 the polygon.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename T, typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename T, typename point_type&gt;<br />
                 void <b>center</b>(point_type&amp; p, const T&amp; polygon)</font></td>
                 <td>Sets object that models point to the center point of the bounding
                 box of an object that models polygon_45.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename rectangle_type&gt;<br>
+ typename rectangle_type&gt;<br />
                 bool <b>extents</b>(rectangle_type&amp; bbox, const T&amp; polygon)</font></td>
                 <td>Sets object that models rectangle to the bounding box of an object
                 that models polygon_45 and returns true.&nbsp; Returns false and leaves
                 bbox unchanged if polygon is empty.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 area_type <b>area</b>(const T&amp; polygon)</font></td>
                 <td>Returns the area of an object
                 that models polygon_45.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 direction_1d <b>winding</b>(const T&amp; polygon)</font></td>
                 <td>Returns the winding direction of an object
                 that models polygon_45, LOW == CLOCKWISE, HIGH = COUNTERCLOCKWISE.&nbsp;
                 Complexity depends upon winding trait.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_distance <b>perimeter</b>(const T&amp; polygon)</font></td>
                 <td>Returns the perimeter length of an object
                 that models polygon_45.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename transform_type&gt;<br>
+ typename transform_type&gt;<br />
                 T&amp; <b>transform</b>(T&amp; polygon, const transform_type&amp;)</font></td>
                 <td>Applies transform() on the vertices of polygon and sets the polygon to that described by the result of
                 transforming its vertices.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_up</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales up coordinate of an object that models
                 polygon_45 by unsigned factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_down</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales down coordinates of an object that models
                 polygon_45 by unsigned factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br />
                 T&amp; <b>scale</b>(T&amp; rectangle, double scaling) </font></td>
                 <td>Scales coordinates of an object that models polygon_45 by floating
                 point factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to coordinate indicated by orientation_2d of
                 vertices of an object that models polygon_45.&nbsp; Linear wrt.
                 vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br>
- polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br />
+ polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Convolves coordinate values of point with vertices of an
                 object that models polygon_45.&nbsp; Linear wrt. vertices.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon 45 Data</h1>
 
 <p>
-<p>The library provides a model of polygon 45 concept declared
+</p><p>The library provides a model of polygon 45 concept declared
 <font face="Courier New">
 template&lt;typename T&gt; polygon_45_data </font>where T is the coordinate type.</p>
 <p>This data type is used internally when a 45-degree polygon is needed and is
@@ -275,8 +293,8 @@
 data type instead of providing their own.&nbsp; The data type is implemented to
 be convenient to use with the library traits.</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">polygon_45_concept</font></td>
         </tr>
@@ -304,7 +322,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>&nbsp;
- <br> </b>polygon_45_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
+ <br /> </b>polygon_45_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of polygon 45.</td>
         </tr>
         <tr>
@@ -324,23 +342,23 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
+ <br /> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
                 <td>Sets the polygon to the iterator range of points.&nbsp; No check is
                 performed to ensure the points describe corners that are multiples of 45
                 degrees relative to the coordinate axis.</td>
         </tr>
-</table>
- <tr>
+</tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -353,6 +371,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_45_set_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_45_set_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_45_set_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon 45 Set Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon 45 Set Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,32 +40,47 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon 45 Set Concept</h1>
 
 <p>
-<p>The polygon_45_set concept tag is <font face="Courier New">
+</p><p>The polygon_45_set concept tag is <font face="Courier New">
 polygon_45_set_concept</font></p>
 <p>
 <font face="Times New Roman">The semantic of a polygon_45_set is zero or more
@@ -75,7 +94,7 @@
 intersection point.&nbsp; In the case that data represented contains no
 45-degree angles and is Manhattan a runtime check will default to the Manhattan
 algorithm.&nbsp; The results of which are identical to what the 45-degree
-algorithm would do, but obtained more efficiently.</font><p>
+algorithm would do, but obtained more efficiently.</font></p><p>
 <font face="Times New Roman">The motivation for providing the polygon_45_set is
 to extend the special case of Manhattan geometry capability of the library to
 encompass the slightly less common, but still important special case of geometry
@@ -84,7 +103,7 @@
 and affords many opportunities for optimization.&nbsp; 45-degree algorithms can
 be 50X faster than arbitrary angle algorithms and are required to provide a
 complete feature set that meets the performance requirements of application
-domains in which Manhattan and 45-degree geometry are a common special case.</font><p>Users are recommended to use std::vector and std::list of user defined polygons
+domains in which Manhattan and 45-degree geometry are a common special case.</font></p><p>Users are recommended to use std::vector and std::list of user defined polygons
 or library provided polygon_45_set_data&lt;coordinate_type&gt; objects.&nbsp; Lists
 and vectors of models of polygon_45_concept or polygon_45_with_holes_concept are automatically models of polygon_45_set_concept.</p>
 <p>An object that is a model of <font face="Courier New">
@@ -106,10 +125,10 @@
 eliminate temp copies of intermediate results when Boolean operators are chained
 together.</p>
 <p>Operators are declared inside the namespace <font face="Courier New">boost::polygon::operators</font>.</p>
-<table border="1" width="100%" id="table5">
- <tr>
+<table id="table5" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_45_set_view <b>operator</b>|(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean OR operation (polygon set union).&nbsp; Accepts two objects
                 that model polygon_45_set or one of its refinements.&nbsp; Returns an
@@ -119,7 +138,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_45_set_view <b>operator</b>+(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator|.&nbsp; The plus sign is also used for OR
                 operations in Boolean logic expressions.&nbsp; O( n log n) runtime
@@ -127,7 +146,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_45_set_view <b>operator</b>&amp;(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean AND operation (polygon set intersection).&nbsp; Accepts two
                 objects that model polygon_45_set or one of its refinements.&nbsp; O( n
@@ -135,7 +154,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_45_set_view <b>operator</b>*(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator&amp;.&nbsp; The multiplication symbol is also used for
                 AND operations in Boolean logic expressions.&nbsp; O( n log n) runtime
@@ -143,7 +162,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_45_set_view <b>operator</b>^(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean XOR operation (polygon set disjoint-union).&nbsp; Accepts
                 two objects that model polygon_45_set or one of its refinements.&nbsp;
@@ -152,7 +171,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_45_set_view <b>operator</b>-(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean SUBTRACT operation (polygon set difference).&nbsp; Accepts
                 two objects that model polygon_45_set or one of its refinements.&nbsp;
@@ -161,7 +180,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>|=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator|, but with self assignment, left operand must model
                 polygon_45_set and not one of it's refinements.&nbsp; O( n log n)
@@ -169,7 +188,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>+=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator+, but with self assignment, left operand must model
                 polygon_45_set and not one of it's refinements.&nbsp; O( n log n)
@@ -177,7 +196,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>&amp;=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator&amp;, but with self assignment, left operand must model
                 polygon_45_set and not one of it's refinements.&nbsp; O( n log n)
@@ -185,7 +204,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>*=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator*, but with self assignment, left operand must model
                 polygon_45_set and not one of it's refinements.&nbsp; O( n log n)
@@ -193,7 +212,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>^=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator^, but with self assignment, left operand must model
                 polygon_45_set and not one of it's refinements.&nbsp; O( n log n)
@@ -201,14 +220,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>-=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator-, but with self assignment, left operand must model
                 polygon_45_set and not one of it's refinements.&nbsp; O( n log n)
                 runtime complexity and O(n) memory wrt vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T1&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T1&gt;<br />
                 T1 <b>operator</b>+(const T1&amp;, coordinate_type bloating)</font></td>
                 <td>Performs resize operation, inflating by bloating ammount.&nbsp; If
                 negative the result is a shrink instead of bloat.&nbsp; Note: returns
@@ -217,7 +236,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1 <b>operator</b>-(const T1&amp;, coordinate_type shrinking)</font></td>
                 <td>Performs resize operation, deflating by bloating ammount.&nbsp; If
                 negative the result is a bloat instead of shrink.&nbsp; Note: returns
@@ -226,7 +245,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>+=(const T1&amp;, coordinate_type bloating)</font></td>
                 <td>Performs resize operation, inflating by bloating ammount.&nbsp; If
                 negative the result is a shrink instead of bloat.&nbsp; Returns
@@ -235,19 +254,19 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>-=(const T1&amp;, coordinate_type shrinking)</font></td>
                 <td>Performs resize operation, deflating by bloating ammount.&nbsp; If
                 negative the result is a bloat instead of shrink.&nbsp; Returns
                 reference to modified argument.&nbsp; O( n log n) runtime complexity and
                 O(n) memory wrt vertices + intersections.</td>
         </tr>
- </table>
+ </tbody></table>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table3">
- <tr>
+<table id="table3" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; lvalue, const T2&amp; rvalue)</font></td>
                 <td>Eliminates overlaps in geometry and copies from an object that
                 models polygon_45_set or any of its refinements into an object that
@@ -256,7 +275,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>equivalence</b>(const T1&amp; lvalue, const T2&amp; rvalue) </font></td>
                 <td>Returns true if an object that models polygon_45_set or one of its
                 refinements covers the exact same geometric regions as another object
@@ -266,8 +285,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- output_container_type, typename T&gt;<br>
- void <b>get_trapezoids</b>(output_container_type&amp; output, <br>
+ output_container_type, typename T&gt;<br />
+ void <b>get_trapezoids</b>(output_container_type&amp; output, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 const T&amp; polygon_set)</font></td>
                 <td>Output container is expected to be a standard container.&nbsp;
@@ -280,10 +299,12 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- output_container_type, typename T&gt;<br>
- void <b>get_trapezoids</b>(output_container_type&amp; output, <br>
+ output_container_type, typename T&gt;<br />
+ void <b>get_trapezoids</b>(output_container_type&amp; output, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T&amp; polygon_set,<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d orient)</font></td>
+ const T&amp; polygon_set,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+orientation_2d orient)</font></td>
                 <td>Output container is expected to be a standard container.&nbsp;
                 Slices geometry of an object that models polygon_45_set or one of its
                 refinements into non overlapping trapezoids along a the specified slicing
@@ -294,13 +315,13 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- polygon_set_type&gt;<br>
+ polygon_set_type&gt;<br />
                 void <b>clear</b>(polygon_set_type&amp; polygon_set)</font></td>
                 <td>Makes the object empty of geometry.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- polygon_set_type&gt;<br>
+ polygon_set_type&gt;<br />
                 bool <b>empty</b>(const polygon_set_type&amp; polygon_set)</font></td>
                 <td>Checks whether the object is empty of geometry.&nbsp; Polygons that
                 are completely covered by holes will result in empty returning true.&nbsp;&nbsp;
@@ -308,8 +329,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- rectangle_type&gt;<br>
- bool <b>extents</b>(rectangle_type&amp; extents_rectangle, <br>
+ rectangle_type&gt;<br />
+ bool <b>extents</b>(rectangle_type&amp; extents_rectangle, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const
                 T&amp; polygon_set)</font></td>
                 <td>Computes bounding box of an object that models polygon_45_set and
@@ -319,7 +340,7 @@
                 log n) runtime complexity and O(n) memory wrt vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 area_type <b>area</b>(const T&amp; polygon_set)</font></td>
                 <td>Computes the area covered by geometry in an object that models
                 polygon_45_set.&nbsp;&nbsp; O( n log n) runtime complexity and O(n)
@@ -327,7 +348,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>interact</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Given an object that models polygon_45_set and an object that models
                 polygon_45_set or one of its refinements, modifies a to retain only
@@ -335,7 +356,7 @@
                 runtime complexity and O(n) memory wrt vertices plus intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>self_intersect</b>(T&amp; polygon_set)</font></td>
                 <td>Given an object that models polygon_45_set that has self overlapping
                 regions, modifies the argument to contain only the regions of overlap.&nbsp;
@@ -343,7 +364,7 @@
                 intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>self_xor</b>(T&amp; polygon_set)</font></td>
                 <td>Given an object that models polygon_45_set that has self overlapping
                 regions, modifies the argument to contain only the regions that do not
@@ -351,14 +372,14 @@
                 vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; polygon_set, unsigned_area_type bloating)</font></td>
                 <td>Same as getting all the polygons, bloating them and putting them
                 back.&nbsp; O( n log n) runtime complexity and O(n) memory wrt vertices
                 + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; polygon_set, unsigned_area_type shrinking)</font></td>
                 <td>Same as getting all the polygons, shrinking them and overwriting
                 the polygon set with the resulting regions.&nbsp; O( n log n) runtime
@@ -366,10 +387,10 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coord_type&gt;<br>
- T&amp; <b>resize</b>(T&amp; polygon_set, coord_type resizing,<br>
+ coord_type&gt;<br />
+ T&amp; <b>resize</b>(T&amp; polygon_set, coord_type resizing,<br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- RoundingOption rounding = CLOSEST, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CornerOption corner = INTERSECTION)</font></td>
+ RoundingOption rounding = CLOSEST, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CornerOption corner = INTERSECTION)</font></td>
                 <td>Same as bloat if resizing is positive, same as shrink if resizing is
                 negative.&nbsp; RoundingOption is an enum that controls snapping of
                 non-integer results of resizing 45 degree edges.&nbsp; CornerOption is
@@ -378,7 +399,7 @@
                 complexity and O(n) memory wrt vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>grow_and</b>(T&amp; polygon_set, unsigned_area_type bloating)</font></td>
                 <td>Same as bloating non-overlapping regions and then applying self
                 intersect to retain only the overlaps introduced by the bloat.&nbsp; O(
@@ -386,13 +407,13 @@
                 intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>scale_up</b>(T&amp; polygon_set, unsigned_area_type factor)</font></td>
                 <td>Scales geometry up by unsigned factor.&nbsp; O( n log n) runtime
                 complexity and O(n) memory wrt vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>scale_down</b>(T&amp; polygon_set, unsigned_area_type factor)</font></td>
                 <td>Scales geometry down by unsigned factor.&nbsp; Snaps 45 degree edges
                 back to 45 degrees after division truncation leads to small changes in
@@ -400,7 +421,7 @@
                 vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename scaling_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, typename scaling_type&gt;<br />
 T&amp; <b>scale</b>(polygon_set_type&amp; polygon_set, double scaling)</font></td>
                 <td>Scales geometry by multiplying by floating point factor.&nbsp;&nbsp;
                 Snaps 45 degree edges back to 45 degrees after truncation of fractional
@@ -408,32 +429,32 @@
                 runtime complexity and O(n) memory wrt vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename transformation_type&gt;<br>
-T&amp; <b>transform</b>(T&amp; polygon_set,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, typename transformation_type&gt;<br />
+T&amp; <b>transform</b>(T&amp; polygon_set,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const
 transformation_type&amp; transformation)</font></td>
                 <td>Applies transformation.transform() on all vertices.&nbsp; O( n log
                 n) runtime complexity and O(n) memory wrt vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
-T&amp; <b>keep</b>(T&amp; polygon_set, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_area,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_area,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_width,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_width,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_height,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+T&amp; <b>keep</b>(T&amp; polygon_set, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_area,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_area,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_width,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_width,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_height,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_height)</font></td>
                 <td>Retains only regions that satisfy the min/max criteria in the
                 argument list.&nbsp; Note: useful for visualization to cull too small
                 polygons.&nbsp; O( n log n) runtime complexity and O(n) memory wrt
                 vertices.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon 45 Set Data Object</h1>
 
 <p>
-<p>The polygon 45 set data type encapsulates the internal data format that
+</p><p>The polygon 45 set data type encapsulates the internal data format that
 serves as the input to the sweep-line algorithm that implements polygon-clipping
 Boolean operations.&nbsp; It also internally keeps track of whether that data
 has been sorted or scanned and maintains the invariant that when its flags
@@ -444,20 +465,20 @@
 maintain the data is sorted form rather than going all the way out to polygons
 then resorting those vertices for a subsequent operation.</p>
 <p>The declaration of Polygon 45 Set Data is the following:</p>
-<p><font face="Courier New">template &lt;typename T&gt;<br>
+<p><font face="Courier New">template &lt;typename T&gt;<br />
 class polygon_45_set_data;</font></p>
 <p>The class is parameterized on the coordinate data type.&nbsp; Algorithms that
 benefit from knowledge of the invariants enforced by the class are implemented
 as member functions to provide them access to information about those
 invariants.&nbsp; </p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table4">
- <tr>
+<table id="table4" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New"><b>polygon_45_set_data</b>()</font></td>
                 <td>Default constructor. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename iT&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename iT&gt;<br />
         <b>polygon_45_set_data</b>(iT input_begin, iT
         input_end)</font></td>
                 <td>Construct from an iterator range of
@@ -470,34 +491,34 @@
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br>
+<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br />
 <b>polygon_45_set_data</b>(const polygon_45_set_view&lt;l,r,op&gt;&amp;
 t)</font></td>
                 <td>Copy construct from a Boolean operator template.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">polygon_45_set_data&amp; <br><b>operator=</b>(const polygon_45_set_data&amp; that)</font></td>
+<font face="Courier New">polygon_45_set_data&amp; <br /><b>operator=</b>(const polygon_45_set_data&amp; that)</font></td>
                 <td>Assignment from another polygon set, may change scanning
                 orientation.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br>
-polygon_45_set_data&amp; <br><b>operator=</b>(const polygon_45_set_view&lt;l, r,
+<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br />
+polygon_45_set_data&amp; <br /><b>operator=</b>(const polygon_45_set_view&lt;l, r,
 op&gt;&amp; that)</font></td>
                 <td>Assignment from a Boolean operator template.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename geometry_object&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename geometry_object&gt;<br />
 polygon_45_set_data&amp; <b>operator=</b>(const geometry_object&amp; geo)</font></td>
                 <td>Assignment from an insertable object.</td>
         </tr>
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename iT&gt;<br>
-void <b>insert</b>(iT input_begin, iT input_end, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole = false)</font></td>
+template &lt;typename iT&gt;<br />
+void <b>insert</b>(iT input_begin, iT input_end, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole = false)</font></td>
                 <td>Insert objects of an iterator range.&nbsp; If is_hole is true
                 inserts subtractive regions.&nbsp; Linear wrt the number of vertices
                 added.</td>
@@ -505,15 +526,15 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-void <b>insert</b>(const polygon_45_set_data&amp; polygon_set, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
+void <b>insert</b>(const polygon_45_set_data&amp; polygon_set, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
 = false)</font></td>
                 <td>Insert a polygon set.&nbsp; Linear wrt the number of vertices added.</td>
         </tr>
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename geometry_type&gt;<br>
-void <b>insert</b>(const geometry_type&amp; geometry_object, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
+template &lt;typename geometry_type&gt;<br />
+void <b>insert</b>(const geometry_type&amp; geometry_object, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
 = false)</font></td>
                 <td>Insert a geometry object, if is_hole is true then the inserted
                 region is subtractive rather than additive.&nbsp; Linear wrt the number
@@ -521,7 +542,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of geometry objects.&nbsp; Will scan
                 and eliminate overlaps.&nbsp; Converts polygon set geometry to objects
@@ -534,7 +555,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get_polygons</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of polygon objects.&nbsp; Will scan and
                 eliminate overlaps.&nbsp; Converts polygon set geometry to polygons and
@@ -544,7 +565,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get_polygons_with_holes</b>(output_container&amp; o) const</font></td>
                 <td>Expects a standard container of polygon with holes objects.&nbsp; Will scan and
                 eliminate overlaps.&nbsp; Converts polygon set geometry to polygons and
@@ -553,7 +574,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get_trapezoids</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of polygon objects.&nbsp; Will scan
                 and eliminate overlaps.&nbsp; Slices polygon set geometry to trapezoids
@@ -563,8 +584,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename output_container&gt;<br>
-void <b>get_trapezoids</b>(output_container&amp; output, <br>&nbsp; orientation_2d
+template &lt;typename output_container&gt;<br />
+void <b>get_trapezoids</b>(output_container&amp; output, <br />&nbsp; orientation_2d
 slicing_orientation) const </font>
                 </td>
                 <td>Expects a standard container of polygon objects.&nbsp; Will scan
@@ -618,15 +639,15 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename input_iterator_type&gt;<br>
-void <b>set</b>(input_iterator_type input_begin, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_iterator_type input_end) </font>
+template &lt;typename input_iterator_type&gt;<br />
+void <b>set</b>(input_iterator_type input_begin, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_iterator_type input_end) </font>
                 </td>
                 <td>Overwrite geometry in polygon set with insertable objects in the
                 iterator range.&nbsp; </td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename rectangle_type&gt;<br>
+template &lt;typename rectangle_type&gt;<br />
 bool <b>extents</b>(rectangle_type&amp; extents_rectangle) const</font></td>
                 <td>Given an object that models rectangle, scans and eliminates overlaps
                 in the polygon set because subtractive regions may alter its extents
@@ -636,9 +657,9 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-polygon_45_set_data&amp;<br>
-<b>resize</b>(coord_type resizing,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RoundingOption rounding = CLOSEST, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CornerOption
+polygon_45_set_data&amp;<br />
+<b>resize</b>(coord_type resizing,<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RoundingOption rounding = CLOSEST, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CornerOption
                 corner = INTERSECTION)</font></td>
                 <td>Same as bloat if resizing is positive, same as shrink if resizing is
                 negative.&nbsp; RoundingOption is an enum that controls snapping of
@@ -649,8 +670,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename transformation_type&gt;<br>
-polygon_45_set_data&amp; <br><b>transform</b>(const transformation_type&amp; transformation) </font>
+template &lt;typename transformation_type&gt;<br />
+polygon_45_set_data&amp; <br /><b>transform</b>(const transformation_type&amp; transformation) </font>
                 </td>
                 <td>Applies transformation.transform() on vertices stored within the
                 polygon set.&nbsp; O(n log n) runtime and O(n) memory wrt. vertices +
@@ -708,18 +729,18 @@
                 <td>Retain only overlapping regions of geometry within a polygon set.&nbsp;
                 O(n log n) runtime and O(n) memory wrt. vertices + intersections.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table6">
+<table class="docinfo" id="table6" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -732,6 +753,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_45_with_holes_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_45_with_holes_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_45_with_holes_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon 45 With Holes Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon 45 With Holes Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,91 +40,106 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon 45 With Holes Concept</h1>
 
 <p>
-<p>The polygon_45_with_holes concept tag is <font face="Courier New">
+</p><p>The polygon_45_with_holes concept tag is <font face="Courier New">
 polygon_45_with_holes_concept</font></p>
 <p>
 To register a user defined type as a model of
 <font face="Times New Roman">polygon_45_with_holes </font>concept, specialize
 the geometry concept meta-function for that type.&nbsp; In the example below
-CPolygon45WithHoles is registered as a model of polygon<font face="Times New Roman">_45_with_holes&nbsp;</font> concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CPolygon45WithHoles&gt; { typedef polygon_45_with_holes_concept type; };</font><p>
+CPolygon45WithHoles is registered as a model of polygon<font face="Times New Roman">_45_with_holes&nbsp;</font> concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CPolygon45WithHoles&gt; { typedef polygon_45_with_holes_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a polygon_45_with_holes is a
 polygon_45 that it can provide iterators over holes that are also polygon_45.&nbsp;
 A mutable polygon_45_with_holes must also be able to set its geometry based on
 an interator range over polygon_45 holes.&nbsp; There is no convention of
-winding of holes enforced within the library. </font><p>
+winding of holes enforced within the library. </font></p><p>
 <font face="Times New Roman">Below is shown the default polygon with holes
 traits.&nbsp; Specialization of these traits is required for types that don't
-conform to the default behavior.</font><p><font face="Courier New">template &lt;typename
-T, typename enable = void&gt;<br>
-struct polygon_with_holes_traits {<br>
+conform to the default behavior.</font></p><p><font face="Courier New">template &lt;typename
+T, typename enable = void&gt;<br />
+struct polygon_with_holes_traits {<br />
 &nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::iterator_holes_type
-iterator_holes_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::hole_type hole_type;<br>
+iterator_holes_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::hole_type hole_type;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_holes_type begin_holes(const T&amp;
-t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_holes_type end_holes(const T&amp; t)
-{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size_holes(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size_holes(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
-<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br>
-struct polygon_with_holes_mutable_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br>
+<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br />
+struct polygon_with_holes_mutable_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T&amp; set_holes(T&amp; t, iT inputBegin, iT
-inputEnd) {<br>
+inputEnd) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.set_holes(inputBegin,
-inputEnd);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+inputEnd);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
 <p>An object that is a model of <font face="Courier New">
 polygon_45_with_holes_concept</font> can be viewed as a model of any of its
 refinements if it is determined at runtime to conform to the restriction of
 those concepts.&nbsp; This concept casting is accomplished through the
 <font face="Courier New">view_as&lt;&gt;()</font> function.</p>
-<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_45_with_holes_object)</font><br>
-<font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_45_with_holes_object)</font><br>
-<font face="Courier New">view_as&lt;polygon_90_with_holes_concept&gt;(polygon_45_with_holes_object)</font><br>
+<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_45_with_holes_object)</font><br />
+<font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_45_with_holes_object)</font><br />
+<font face="Courier New">view_as&lt;polygon_90_with_holes_concept&gt;(polygon_45_with_holes_object)</font><br />
 <font face="Courier New">view_as&lt;polygon_45_concept&gt;(polygon_45_with_holes_object)</font></p>
 <p>The return value of <font face="Courier New">view_as&lt;&gt;()</font> can be
 passed into any interface that expects an object of the conceptual type
 specified in its template parameter. </p>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>begin_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_45_with_holes.&nbsp;
@@ -128,7 +147,7 @@
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>end_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_45_with_holes.&nbsp;
@@ -136,7 +155,7 @@
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 hole_iterator_type <b>begin_holes</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_45_with_holes.&nbsp;
@@ -144,7 +163,7 @@
                 to horizontal and vertical edges.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 hole_iterator_type <b>end_holes</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_45_with_holes.&nbsp;
@@ -153,7 +172,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_points</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_45_with_holes.&nbsp;&nbsp;
@@ -162,14 +181,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_holes</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_45_with_holes.&nbsp;&nbsp;
                 Sets the polygon holes to the hole data range [b,e)</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 unsigned int <b>size</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Returns the number of edges in the
                 outer shell of the polygon_45_with_holes.&nbsp; Does not include sizes
@@ -177,7 +196,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models polygon_45_with_holes or
                 one of its refinements into left object
@@ -185,8 +204,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br>
+ typename point_type&gt;<br />
+ bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models polygon_45_with_holes and an object that models
@@ -197,86 +216,85 @@
                 the polygon or one of its holes.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename T, typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename T, typename point_type&gt;<br />
                 void <b>center</b>(point_type&amp; p, const T&amp; polygon)</font></td>
                 <td>Sets object that models point to the center point of the bounding
                 box of an object that models polygon_45_with_holes.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename rectangle_type&gt;<br>
+ typename rectangle_type&gt;<br />
                 bool <b>extents</b>(rectangle_type&amp; bbox, const T&amp; polygon)</font></td>
                 <td>Sets object that models rectangle to the bounding box of an object
                 that models polygon_45_with_holes and returns true.&nbsp; Returns false
                 and leaves bbox unchanged if polygon is empty.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 manhattan_area_type <b>area</b>(const T&amp; polygon)</font></td>
                 <td>Returns the area of an object
                 that models polygon_45_with_holes including subtracting the area of its
                 holes from the area of the outer shell polygon.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 direction_1d <b>winding</b>(const T&amp; polygon)</font></td>
                 <td>Returns the winding direction of an object
                 that models polygon_45_with_holes, LOW == CLOCKWISE, HIGH =
                 COUNTERCLOCKWISE.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_difference <b>perimeter</b>(const T&amp; polygon)</font></td>
                 <td>Returns the perimeter length of an object
                 that models polygon_45, including the perimeters of the holes.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename transform_type&gt;<br>
+ typename transform_type&gt;<br />
                 T&amp; <b>transform</b>(T&amp; polygon, const transform_type&amp;)</font></td>
                 <td>Applies transform() on the vertices of polygon and sets the polygon to that described by the result of
                 transforming its vertices.&nbsp; Also applies transform() on the holes
                 of the polygon.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_up</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales up outer shell and holes of an object that models
                 polygon_45 by unsigned factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_down</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales down outer shell and holes of an object that models
                 polygon_45 by unsigned factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br />
                 T&amp; <b>scale</b>(T&amp; rectangle, double scaling) </font></td>
                 <td>Scales outer shell and holes of an object that models polygon_45 by
                 floating point factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to coordinate indicated by orientation_2d of
                 vertices of an object that models polygon_45 .</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br>
- polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br />
+ polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Convolves coordinate values of point with the outer shell and holes of an
                 object that models polygon_45_with_holes.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon 45 With Holes Data</h1>
 
 <p>
-<p>The library provides a model of polygon 45 with holes concept declared
+</p><p>The library provides a model of polygon 45 with holes concept declared
 <font face="Courier New">
 template&lt;typename T&gt; polygon_45_with_holes_data </font>where T is the
 coordinate type.</p>
@@ -285,8 +303,8 @@
 library polygon data type instead of providing their own.&nbsp; The data type is
 implemented to be convenient to use with the library traits.</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">polygon_45_with_holes_concept</font></td>
         </tr>
@@ -314,13 +332,13 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">polygon_45_with_holes_data&amp; <b>
- <br>operator=</b>(const polygon_45_with_holes_data&amp; that)</font></td>
+ <br />operator=</b>(const polygon_45_with_holes_data&amp; that)</font></td>
                 <td>Assignment operator.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b> </b>
                 polygon_45_with_holes_data&amp;<b>&nbsp;
- <br> operator=</b>(const T2&amp; that) const</font></td>
+ <br /> operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of polygon 45 with holes.</td>
         </tr>
         <tr>
@@ -356,30 +374,30 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
+ <br /> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
                 <td>Sets the polygon to the iterator range of points.&nbsp; No check is
                 performed to ensure the points describe a 45 degree figure.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set_holes</b>(iT begin_holes, iT end_choless)</font></td>
+ <br /> </b>void <b>set_holes</b>(iT begin_holes, iT end_choless)</font></td>
                 <td>Sets the polygon holes the iterator range of hole polygons.&nbsp; These
                 polygons in the input range may be either polygon_45_data or
                 polygon_45_with_holes_data or any type that provides begin and end
                 member functions to iterate over point_data&lt;T&gt;.</td>
         </tr>
-</table>
- <tr>
+</tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -392,6 +410,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_90_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_90_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_90_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon 90 Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon 90 Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,40 +40,55 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon 90 Concept</h1>
 
 <p>
-<p>The polygon_90 concept tag is <font face="Courier New">
+</p><p>The polygon_90 concept tag is <font face="Courier New">
 polygon_90_concept</font></p>
 <p>
 To register a user defined type as a model of
 <font face="Times New Roman">polygon_90 </font>concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below CPolygon90 is registered as a model of
-polygon_90&nbsp; concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CPolygon90&gt; { typedef polygon_90_concept type; };</font><p>
+polygon_90&nbsp; concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CPolygon90&gt; { typedef polygon_90_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a polygon_90 is that it can provide
 iterators over the x and y coordinates that correspond to its horizontal and
 vertical sides, starting with an x coordinate.&nbsp; A mutable polygon_90 must
@@ -80,40 +99,40 @@
 specialization of polygon_90_traits.&nbsp; A std::vector&lt;int&gt; or std::list&lt;int&gt;
 could be made models of polygon_90_concept by simply providing access to their
 iterators through traits.&nbsp; Library functions that create polygon objects
-require that those objects provide a default constructor.</font><p>
+require that those objects provide a default constructor.</font></p><p>
 <font face="Times New Roman">Below is shown the default polygon traits.&nbsp;
 Specialization of these traits is required for types that don't conform to the
 default behavior.&nbsp; Note that these traits are also used by the
-polygon_90_with_holes concept.</font><p><font face="Courier New">template &lt;typename
-T&gt;<br>
-struct polygon_90_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br>
+polygon_90_with_holes concept.</font></p><p><font face="Courier New">template &lt;typename
+T&gt;<br />
+struct polygon_90_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::compact_iterator_type
-compact_iterator_type;<br>
+compact_iterator_type;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline compact_iterator_type begin_compact(const
-T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_compact();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_compact();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline compact_iterator_type end_compact(const
-T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_compact();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline winding_direction winding(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return unknown_winding;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_compact();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline winding_direction winding(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return unknown_winding;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
-<p><font face="Courier New">template &lt;typename T&gt;<br>
-struct polygon_90_mutable_traits { <br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br>
+<p><font face="Courier New">template &lt;typename T&gt;<br />
+struct polygon_90_mutable_traits { <br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T&amp; set_compact(T&amp; t, iT input_begin, iT
-input_end) {<br>
+input_end) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.set_compact(input_begin,
-input_end);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }</font><br>
+input_end);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }</font><br />
 <font face="Courier New">};</font></p>
 <p>An object that is a model of <font face="Courier New">
 polygon_90_concept</font> can be viewed as a model of any of its
@@ -125,30 +144,30 @@
 passed into any interface that expects an object of the conceptual type
 specified in its template parameter.</p>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 compact_iterator_type <b>begin_compact</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;
                 Returns the begin iterator over the range of coordinates that correspond
                 to horizontal and vertical edges.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 compact_iterator_type <b>end_compact</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;
                 Returns the end iterator over the range of coordinates that correspond
                 to horizontal and vertical edges.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>begin_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;
                 Returns the begin iterator over the range of points that correspond to
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>end_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;
                 Returns the end iterator over the range of points that correspond to
@@ -156,7 +175,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_compact</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;&nbsp;
                 Sets the polygon to the coordinate data range [b,e) that corresponds to
@@ -164,7 +183,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_points</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;&nbsp;
                 Sets the polygon to the point data range [b,e) that corresponds to
@@ -172,22 +191,22 @@
                 successive input points results in undefined behavior.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 unsigned int <b>size</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Returns the number of edges in the
                 polygon.</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models polygon_90 into left object
                 that models polygon_90.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br>
+ typename point_type&gt;<br />
+ bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models polygon_90 and an object that models
@@ -197,85 +216,84 @@
                 the polygon.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename T, typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename T, typename point_type&gt;<br />
                 void <b>center</b>(point_type&amp; p, const T&amp; polygon)</font></td>
                 <td>Sets object that models point to the center point of the bounding
                 box of an object that models polygon_90.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename rectangle_type&gt;<br>
+ typename rectangle_type&gt;<br />
                 bool <b>extents</b>(rectangle_type&amp; bbox, const T&amp; polygon)</font></td>
                 <td>Sets object that models rectangle to the bounding box of an object
                 that models polygon_90 and returns true.&nbsp; Returns false and leaves
                 bbox unchanged if polygon is empty.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 manhattan_area_type <b>area</b>(const T&amp; polygon)</font></td>
                 <td>Returns the area of an object
                 that models polygon_90.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 direction_1d <b>winding</b>(const T&amp; polygon)</font></td>
                 <td>Returns the winding direction of an object
                 that models polygon_90, LOW == CLOCKWISE, HIGH = COUNTERCLOCKWISE.&nbsp;
                 Complexity depends upon winding trait.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_difference <b>perimeter</b>(const T&amp; polygon)</font></td>
                 <td>Returns the perimeter length of an object
                 that models polygon_90.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename transform_type&gt;<br>
+ typename transform_type&gt;<br />
                 T&amp; <b>transform</b>(T&amp; polygon, const transform_type&amp;)</font></td>
                 <td>Applies transform() on the vertices of polygon and sets the polygon to that described by the result of
                 transforming its vertices.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_up</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales up coordinate of an object that models
                 polygon_90 by unsigned factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_down</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales down coordinates of an object that models
                 polygon_90 by unsigned factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br />
                 T&amp; <b>scale</b>(T&amp; rectangle, double scaling) </font></td>
                 <td>Scales coordinates of an object that models polygon_90 by floating
                 point factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to coordinate indicated by orientation_2d of
                 vertices of an object that models polygon_90 .&nbsp; Linear wrt.
                 vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br>
- polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br />
+ polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Convolves coordinate values of point with vertices of an
                 object that models polygon_90.&nbsp; Linear wrt. vertices.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon 90 Data</h1>
 
 <p>
-<p>The library provides a model of polygon 90 concept declared
+</p><p>The library provides a model of polygon 90 concept declared
 <font face="Courier New">
 template&lt;typename T&gt; polygon_90_data </font>where T is the coordinate type.</p>
 <p>This data type is used internally when a Manhattan polygon is needed and is
@@ -283,8 +301,8 @@
 data type instead of providing their own.&nbsp; The data type is implemented to
 be convenient to use with the library traits.</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">polygon_90_concept</font></td>
         </tr>
@@ -319,7 +337,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>&nbsp;
- <br> </b>polygon_90_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
+ <br /> </b>polygon_90_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of polygon 90.</td>
         </tr>
         <tr>
@@ -351,31 +369,31 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
+ <br /> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
                 <td>Sets the polygon to the iterator range of points.&nbsp; No check is
                 performed to ensure the points describe a Manhattan figure, every other
                 x and y value of the points is used to initialize the polygon.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set_compact</b>(iT begin_coords, iT end_coords)</font></td>
+ <br /> </b>void <b>set_compact</b>(iT begin_coords, iT end_coords)</font></td>
                 <td>Sets the polygon to the iterator range of coordinates.&nbsp; These
                 coordinates correspond to the x values of vertical edges and y values of
                 horizontal edges.&nbsp; It is expected that the sequence start with an x
                 value and proceed x then y then x then y.</td>
         </tr>
-</table>
- <tr>
+</tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -388,6 +406,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_90_set_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_90_set_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_90_set_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon 90 Set Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon 90 Set Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,36 +40,51 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon 90 Set Concept</h1>
 
 <p>
-<p>The polygon_90_set concept tag is <font face="Courier New">
+</p><p>The polygon_90_set concept tag is <font face="Courier New">
 polygon_90_set_concept</font></p>
 <p>
 <font face="Times New Roman">The semantic of a polygon_90_set is zero or more
-Manhattan geometry regions.</font><p>
+Manhattan geometry regions.</font></p><p>
 <font face="Times New Roman">The motivation for providing the
 polygon_90_set_concept is that it is a very common special case of planar
 geometry which afford the implementation of a variety of optimizations on the
@@ -73,7 +92,7 @@
 polygon_90_set_concept can be 100X faster than arbitrary angle polygon
 manipulation.&nbsp; Because the performance benefits are so large and the
 special case is important enough, the library provides these performance
-benefits for those application domains that require them.</font><p>Users are recommended to use std::vector and std::list of user defined polygons
+benefits for those application domains that require them.</font></p><p>Users are recommended to use std::vector and std::list of user defined polygons
 or library provided polygon_90_set_data&lt;coordinate_type&gt; objects.&nbsp; Lists
 and vectors of models of polygon_90_concept or polygon_90_with_holes_concept or
 rectangle_concept are automatically models of polygon_90_set_concept.</p>
@@ -85,10 +104,10 @@
 eliminate temp copies of intermediate results when Boolean operators are chained
 together.</p>
 <p>Operators are declared inside the namespace <font face="Courier New">boost::polygon::operators</font>.</p>
-<table border="1" width="100%" id="table3">
- <tr>
+<table id="table3" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_90_set_view <b>operator</b>|(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean OR operation (polygon set union).&nbsp; Accepts two objects
                 that model polygon_90_set or one of its refinements.&nbsp; Returns an
@@ -98,7 +117,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_90_set_view <b>operator</b>+(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator|.&nbsp; The plus sign is also used for OR
                 operations in Boolean logic expressions.&nbsp; O( n log n) runtime
@@ -106,7 +125,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_90_set_view <b>operator</b>&amp;(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean AND operation (polygon set intersection).&nbsp; Accepts two
                 objects that model polygon_90_set or one of its refinements.&nbsp; O( n
@@ -114,7 +133,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_90_set_view <b>operator</b>*(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator&amp;.&nbsp; The multiplication symbol is also used for
                 AND operations in Boolean logic expressions.&nbsp; O( n log n) runtime
@@ -122,7 +141,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_90_set_view <b>operator</b>^(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean XOR operation (polygon set disjoint-union).&nbsp; Accepts
                 two objects that model polygon_90_set or one of its refinements.&nbsp;
@@ -132,7 +151,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_90_set_view <b>operator</b>-(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean SUBTRACT operation (polygon set difference).&nbsp; Accepts
                 two objects that model polygon_90_set or one of its refinements.&nbsp;
@@ -141,7 +160,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>|=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator|, but with self assignment, left operand must model
                 polygon_90_set and not one of it's refinements.&nbsp; O( n log n)
@@ -149,7 +168,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>+=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator+, but with self assignment, left operand must model
                 polygon_90_set and not one of it's refinements.&nbsp; O( n log n)
@@ -157,7 +176,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>&amp;=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator&amp;, but with self assignment, left operand must model
                 polygon_90_set and not one of it's refinements.&nbsp; O( n log n)
@@ -165,7 +184,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>*=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator*, but with self assignment, left operand must model
                 polygon_90_set and not one of it's refinements.&nbsp; O( n log n)
@@ -173,7 +192,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>^=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator^, but with self assignment, left operand must model
                 polygon_90_set and not one of it's refinements.&nbsp; O( n log n)
@@ -181,14 +200,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>-=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator-, but with self assignment, left operand must model
                 polygon_90_set and not one of it's refinements.&nbsp; O( n log n)
                 runtime complexity and O(n) memory wrt vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T1&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T1&gt;<br />
                 T1 <b>operator</b>+(const T1&amp;, coordinate_type bloating)</font></td>
                 <td>Performs resize operation, inflating by bloating ammount.&nbsp; If
                 negative the result is a shrink instead of bloat.&nbsp; Note: returns
@@ -197,7 +216,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1 <b>operator</b>-(const T1&amp;, coordinate_type shrinking)</font></td>
                 <td>Performs resize operation, deflating by bloating ammount.&nbsp; If
                 negative the result is a bloat instead of shrink.&nbsp; Note: returns
@@ -206,7 +225,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>+=(const T1&amp;, coordinate_type bloating)</font></td>
                 <td>Performs resize operation, inflating by bloating ammount.&nbsp; If
                 negative the result is a shrink instead of bloat.&nbsp; Returns
@@ -215,19 +234,19 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>-=(const T1&amp;, coordinate_type shrinking)</font></td>
                 <td>Performs resize operation, deflating by bloating ammount.&nbsp; If
                 negative the result is a bloat instead of shrink.&nbsp; Returns
                 reference to modified argument.&nbsp; O( n log n) runtime complexity and
                 O(n) memory wrt vertices + intersections.</td>
         </tr>
- </table>
+ </tbody></table>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; lvalue, const T2&amp; rvalue)</font></td>
                 <td>Eliminates overlaps in geometry and copies from an object that
                 models polygon_90_set or any of its refinements into an object that
@@ -236,7 +255,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>equivalence</b>(const T1&amp; lvalue, const T2&amp; rvalue) </font></td>
                 <td>Returns true if an object that models polygon_90_set or one of its
                 refinements covers the exact same geometric regions as another object
@@ -246,8 +265,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- output_container_type, typename T&gt;<br>
- void <b>get_rectangles</b>(output_container_type&amp; output, <br>
+ output_container_type, typename T&gt;<br />
+ void <b>get_rectangles</b>(output_container_type&amp; output, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 const T&amp; polygon_set)</font></td>
                 <td>Output container is expected to be a standard container.&nbsp;
@@ -258,10 +277,9 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- output_container_type, typename T&gt;<br>
- void <b>get_max_rectangles</b>(output_container_type&amp; output, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T&amp; polygon_set)</font></td>
+ output_container_type, typename T&gt;<br />
+ void <b>get_max_rectangles</b>(output_container_type&amp; output, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const T&amp; polygon_set)</font></td>
                 <td>Output container is expected to be a standard container.&nbsp; Given
                 an object that models polygon_90_set or one of its refinements finds all
                 overlapping rectangles that are maximal in area and appends them to the
@@ -269,13 +287,13 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- polygon_set_type&gt;<br>
+ polygon_set_type&gt;<br />
                 void <b>clear</b>(polygon_set_type&amp; polygon_set)</font></td>
                 <td>Makes the object empty of geometry.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- polygon_set_type&gt;<br>
+ polygon_set_type&gt;<br />
                 bool <b>empty</b>(const polygon_set_type&amp; polygon_set)</font></td>
                 <td>Checks whether the object is empty of geometry.&nbsp; Polygons that
                 are completely covered by holes will result in empty returning true.&nbsp;
@@ -284,8 +302,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- rectangle_type&gt;<br>
- bool <b>extents</b>(rectangle_type&amp; extents_rectangle, <br>
+ rectangle_type&gt;<br />
+ bool <b>extents</b>(rectangle_type&amp; extents_rectangle, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const
                 T&amp; polygon_set)</font></td>
                 <td>Computes bounding box of an object that models polygon_90_set and
@@ -295,7 +313,7 @@
                 runtime complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 manhattan_area_type <b>area</b>(const T&amp; polygon_set)</font></td>
                 <td>Computes the area covered by geometry in an object that models
                 polygon_90_set.&nbsp; O( n log n) runtime complexity and O(n) memory wrt
@@ -303,7 +321,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>interact</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Given an object that models polygon_90_set and an object that models
                 polygon_90_set or one of its refinements, modifies a to retain only
@@ -311,7 +329,7 @@
                 complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>self_intersect</b>(T&amp; polygon_set)</font></td>
                 <td>Given an object that models polygon_90_set that has self overlapping
                 regions, modifies the argument to contain only the regions of overlap.&nbsp;
@@ -319,7 +337,7 @@
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>self_xor</b>(T&amp; polygon_set)</font></td>
                 <td>Given an object that models polygon_90_set that has self overlapping
                 regions, modifies the argument to contain only the regions that do not
@@ -327,24 +345,24 @@
                 vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; polygon_set, unsigned_area_type bloating)</font></td>
                 <td>Same as getting all the rectangles, bloating them and putting them
                 back.&nbsp; O( n log n) runtime complexity and O(n) memory wrt vertices
                 + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>bloat</b>(T&amp; polygon_set, orientation_2d orient,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>bloat</b>(T&amp; polygon_set, orientation_2d orient,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type bloating)</font></td>
                 <td>Same as getting all the rectangles, bloating them and putting them
                 back.&nbsp; O( n log n) runtime complexity and O(n) memory wrt vertices
                 + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>bloat</b>(T&amp; polygon_set, orientation_2d orient,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type low_bloating,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>bloat</b>(T&amp; polygon_set, orientation_2d orient,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type low_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
                 high_bloating)</font></td>
                 <td>Same as getting all the rectangles, bloating them and putting them
@@ -352,22 +370,22 @@
                 + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>bloat</b>(T&amp; polygon_set, direction_2d dir,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>bloat</b>(T&amp; polygon_set, direction_2d dir,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type bloating)</font></td>
                 <td>Same as getting all the rectangles, bloating them and putting them
                 back.&nbsp; O( n log n) runtime complexity and O(n) memory wrt vertices
                 + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>bloat</b>(T&amp; polygon_set, <br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>bloat</b>(T&amp; polygon_set, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
- west_bloating,<br>
+ west_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
- east_bloating,<br>
+ east_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
- south_bloating,<br>
+ south_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
                 north_bloating)</font></td>
                 <td>Same as getting all the rectangles, bloating them and putting them
@@ -375,15 +393,15 @@
                 + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; polygon_set, unsigned_area_type shrinking)</font></td>
                 <td>Same as getting all the rectangles of the inverse, bloating them and overwriting
                 the polygon set with the resulting regions then negating.&nbsp; O( n log
                 n) runtime complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>shrink</b>(T&amp; polygon_set, orientation_2d orient,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>shrink</b>(T&amp; polygon_set, orientation_2d orient,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
                 shrinking)</font></td>
                 <td>Same as getting all the rectangles of the inverse, bloating them and overwriting
@@ -391,10 +409,10 @@
                 n) runtime complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>shrink</b>(T&amp; polygon_set, orientation_2d orient,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>shrink</b>(T&amp; polygon_set, orientation_2d orient,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
- low_shrinking,<br>
+ low_shrinking,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
                 high_shrinking)</font></td>
                 <td>Same as getting all the rectangles of the inverse, bloating them and overwriting
@@ -402,8 +420,8 @@
                 n) runtime complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>shrink</b>(T&amp; polygon_set, direction_2d dir,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>shrink</b>(T&amp; polygon_set, direction_2d dir,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
                 shrinking)</font></td>
                 <td>Same as getting all the rectangles of the inverse, bloating them and overwriting
@@ -411,14 +429,14 @@
                 n) runtime complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>shrink</b>(T&amp; polygon_set, <br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>shrink</b>(T&amp; polygon_set, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
- west_shrinking,<br>
+ west_shrinking,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
- east_shrinking,<br>
+ east_shrinking,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
- south_shrinking,<br>
+ south_shrinking,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type
                 north_shrinking)</font></td>
                 <td>Same as getting all the rectangles of the inverse, bloating them and overwriting
@@ -427,23 +445,23 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coord_type&gt;<br>
+ coord_type&gt;<br />
                 T&amp; <b>resize</b>(T&amp; polygon_set, coord_type resizing)</font></td>
                 <td>Same as bloat if resizing is positive, same as shrink if resizing is
                 negative.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coord_type&gt;<br>
- T&amp; <b>resize</b>(polygon_set_type&amp; polygon_set, <br>
+ coord_type&gt;<br />
+ T&amp; <b>resize</b>(polygon_set_type&amp; polygon_set, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coord_type west, coord_type east,
- <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coord_type south, coord_type north)</font></td>
+ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coord_type south, coord_type north)</font></td>
                 <td>Same as bloat if resizing is positive, same as shrink if resizing is
                 negative.&nbsp; O( n log n) runtime complexity and O(n) memory wrt
                 vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>grow_and</b>(T&amp; polygon_set, unsigned_area_type bloating)</font></td>
                 <td>Same as bloating non-overlapping regions and then applying self
                 intersect to retain only the overlaps introduced by the bloat.&nbsp; O(
@@ -451,8 +469,8 @@
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
-T&amp; <b>grow_and</b>(T&amp; polygon_set, orientation_2d orient,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+T&amp; <b>grow_and</b>(T&amp; polygon_set, orientation_2d orient,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 unsigned_area_type bloating)</font></td>
                 <td>Same as bloating non-overlapping regions and then applying self
@@ -461,10 +479,10 @@
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
-T&amp; <b>grow_and</b>(T&amp; polygon_set, orientation_2d orient,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+T&amp; <b>grow_and</b>(T&amp; polygon_set, orientation_2d orient,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type low_bloating,<br>
+unsigned_area_type low_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 unsigned_area_type high_bloating)</font></td>
                 <td>Same as bloating non-overlapping regions and then applying self
@@ -473,8 +491,8 @@
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
-T&amp; <b>grow_and</b>(T&amp; polygon_set, direction_2d dir,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+T&amp; <b>grow_and</b>(T&amp; polygon_set, direction_2d dir,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 unsigned_area_type bloating)</font></td>
                 <td>Same as bloating non-overlapping regions and then applying self
@@ -483,14 +501,14 @@
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
-T&amp; <b>grow_and</b>(T&amp; polygon_set, <br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+T&amp; <b>grow_and</b>(T&amp; polygon_set, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type west_bloating,<br>
+unsigned_area_type west_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type east_bloating,<br>
+unsigned_area_type east_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type south_bloating,<br>
+unsigned_area_type south_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 unsigned_area_type north_bloating)</font></td>
                 <td>Same as bloating non-overlapping regions and then applying self
@@ -499,28 +517,28 @@
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>scale_up</b>(T&amp; polygon_set, unsigned_area_type factor)</font></td>
                 <td>Scales geometry up by unsigned factor.&nbsp; O( n log n) runtime
                 complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>scale_down</b>(T&amp; polygon_set, unsigned_area_type factor)</font></td>
                 <td>Scales geometry down by unsigned factor.&nbsp; O( n log n) runtime
                 complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename scaling_type&gt;<br>
-T&amp; <b>scale</b>(polygon_set_type&amp; polygon_set, <br>
+ <td width="586"><font face="Courier New">template &lt;typename T, typename scaling_type&gt;<br />
+T&amp; <b>scale</b>(polygon_set_type&amp; polygon_set, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const scaling_type&amp; scaling)</font></td>
                 <td>Scales geometry by applying scaling.scale() on all vertices.&nbsp;
                 O( n log n) runtime complexity and O(n) memory wrt vertices +
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename coord_type&gt;<br>
-T&amp; <b>move</b>(T&amp; polygon_set,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, typename coord_type&gt;<br />
+T&amp; <b>move</b>(T&amp; polygon_set,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d orient, coord_type
 displacement)</font></td>
                 <td>Moves geometry by displacement amount in the orientation.&nbsp;&nbsp;&nbsp;
@@ -528,40 +546,40 @@
                 intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename coord_type&gt;<br>
-T&amp; <b>move</b>(T&amp; polygon_set, coord_type x_displacement, <br>
+ <td width="586"><font face="Courier New">template &lt;typename T, typename coord_type&gt;<br />
+T&amp; <b>move</b>(T&amp; polygon_set, coord_type x_displacement, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coord_type y_displacement)</font></td>
                 <td>Moves the geometry by x_dispacement in x and y_displacement in y.&nbsp;
                 Note: for consistency should be convolve(polygon_set, point).&nbsp; O( n
                 log n) runtime complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename transformation_type&gt;<br>
-T&amp; <b>transform</b>(T&amp; polygon_set,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, typename transformation_type&gt;<br />
+T&amp; <b>transform</b>(T&amp; polygon_set,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const
 transformation_type&amp; transformation)</font></td>
                 <td>Applies transformation.transform() on all vertices.&nbsp; O( n log
                 n) runtime complexity and O(n) memory wrt vertices + intersections. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
-T&amp; <b>keep</b>(T&amp; polygon_set, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_area,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_area,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_width,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_width,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_height,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+T&amp; <b>keep</b>(T&amp; polygon_set, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_area,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_area,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_width,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_width,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_height,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_height)</font></td>
                 <td>Retains only regions that satisfy the min/max criteria in the
                 argument list.&nbsp; Note: useful for visualization to cull too small
                 polygons.&nbsp; O( n log n) runtime complexity and O(n) memory wrt
                 vertices + intersections. </td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon 90 Set Data Object</h1>
 
 <p>
-<p>The polygon 90 set data type encapsulates the internal data format that
+</p><p>The polygon 90 set data type encapsulates the internal data format that
 serves as the input to the sweep-line algorithm that implements polygon-clipping
 boolean operations.&nbsp; It also internally keeps track of whether that data
 has been sorted or scanned and maintains the invariant that when its flags
@@ -572,15 +590,15 @@
 maintain the data is sorted form rather than going all the way out to polygons
 then resorting those vertices for a subsequent operation.</p>
 <p>The declaration of Polygon 90 Set Data is the following:</p>
-<p><font face="Courier New">template &lt;typename T&gt;<br>
+<p><font face="Courier New">template &lt;typename T&gt;<br />
 class polygon_90_set_data;</font></p>
 <p>The class is parameterized on the coordinate data type.&nbsp; Algorithms that
 benefit from knowledge of the invariants enforced by the class are implemented
 as member functions to provide them access to information about those
 invariants.&nbsp; </p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New"><b>polygon_90_set_data</b>()</font></td>
                 <td>Default constructor.&nbsp; Scanning orientation defaults to
                 HORIZONTAL</td>
@@ -591,9 +609,9 @@
                 <td>Construct with scanning orientation.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename iT&gt;<br>
- <b>polygon_90_set_data</b>(orientation_2d orient, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iT input_begin, iT
- input_end)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename iT&gt;<br />
+ <b>polygon_90_set_data</b>(orientation_2d orient, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+iT input_begin, iT input_end)</font></td>
                 <td>Construct with scanning orientation from an iterator range of
                 insertable objects.</td>
         </tr>
@@ -604,7 +622,7 @@
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br>
+<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br />
 <b>polygon_90_set_data</b>(const polygon_90_set_view&lt;l,r,op&gt;&amp;
 t)</font></td>
                 <td>Copy construct from a Boolean operator template.</td>
@@ -612,33 +630,33 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-<b>polygon_90_set_data</b>(orientation_2d orient, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const polygon_90_set_data&amp;
-that)</font></td>
+<b>polygon_90_set_data</b>(orientation_2d orient, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const polygon_90_set_data&amp; that)</font></td>
                 <td>Construct with scanning orientation and copy from another polygon
                 set.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">polygon_90_set_data&amp; <br><b>operator=</b>(const polygon_90_set_data&amp; that)</font></td>
+<font face="Courier New">polygon_90_set_data&amp; <br /><b>operator=</b>(const polygon_90_set_data&amp; that)</font></td>
                 <td>Assignment from another polygon set, may change scanning
                 orientation.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br>
-polygon_90_set_data&amp; <br><b>operator=</b>(const polygon_90_set_view&lt;l, r,
+<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br />
+polygon_90_set_data&amp; <br /><b>operator=</b>(const polygon_90_set_view&lt;l, r,
 op&gt;&amp; that)</font></td>
                 <td>Assignment from a Boolean operator template.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename geometry_object&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename geometry_object&gt;<br />
 polygon_90_set_data&amp; <b>operator=</b>(const geometry_object&amp; geo)</font></td>
                 <td>Assignment from an insertable object.</td>
         </tr>
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename iT&gt;<br>
+template &lt;typename iT&gt;<br />
 void <b>insert</b>(iT input_begin, iT input_end)</font></td>
                 <td>Insert objects of an iterator range.&nbsp; Linear wrt. inserted
                 vertices.</td>
@@ -652,8 +670,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename geometry_type&gt;<br>
-void <b>insert</b>(const geometry_type&amp; geometry_object, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
+template &lt;typename geometry_type&gt;<br />
+void <b>insert</b>(const geometry_type&amp; geometry_object, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
 = false)</font></td>
                 <td>Insert a geometry object, if is_hole is true then the inserted
                 region is subtractive rather than additive.&nbsp; Linear wrt. inserted
@@ -661,7 +679,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of geometry objects.&nbsp; Will scan
                 and eliminate overlaps.&nbsp; Converts polygon set geometry to objects
@@ -674,7 +692,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get_polygons</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of polygon objects.&nbsp; Will scan and
                 eliminate overlaps.&nbsp; Converts polygon set geometry to polygons and
@@ -685,7 +703,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get_rectangles</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of rectangle objects.&nbsp; Will scan
                 and eliminate overlaps.&nbsp; Slices polygon set geometry to rectangles
@@ -696,8 +714,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename output_container&gt;<br>
-void <b>get_rectangles</b>(output_container&amp; output, <br>&nbsp; orientation_2d
+template &lt;typename output_container&gt;<br />
+void <b>get_rectangles</b>(output_container&amp; output, <br />&nbsp; orientation_2d
 slicing_orientation) const </font>
                 </td>
                 <td>Expects a standard container of rectangle objects.&nbsp; Will scan
@@ -750,9 +768,9 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename input_iterator_type&gt;<br>
-void <b>set</b>(input_iterator_type input_begin, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_iterator_type input_end,
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d orient) </font>
+template &lt;typename input_iterator_type&gt;<br />
+void <b>set</b>(input_iterator_type input_begin, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_iterator_type input_end,
+<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d orient) </font>
                 </td>
                 <td>Overwrite geometry in polygon set with insertable objects in the
                 iterator range.&nbsp; Also sets the scanning orientation to that
@@ -760,7 +778,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename rectangle_type&gt;<br>
+template &lt;typename rectangle_type&gt;<br />
 bool <b>extents</b>(rectangle_type&amp; extents_rectangle) const</font></td>
                 <td>Given an object that models rectangle, scans and eliminates overlaps
                 in the polygon set because subtractive regions may alter its extents
@@ -770,12 +788,12 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-polygon_90_set_data&amp;<br>
-<b>bloat</b>(unsigned_area_type west_bloating,<br>
+polygon_90_set_data&amp;<br />
+<b>bloat</b>(unsigned_area_type west_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type east_bloating,<br>
+unsigned_area_type east_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type south_bloating,<br>
+unsigned_area_type south_bloating,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 unsigned_area_type north_bloating) </font></td>
                 <td>Scans to eliminate overlaps and subtractive regions.&nbsp; Inserts
@@ -786,12 +804,12 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-polygon_90_set_data&amp;<br>
-<b>shrink</b>(unsigned_area_type west_shrinking,<br>
+polygon_90_set_data&amp;<br />
+<b>shrink</b>(unsigned_area_type west_shrinking,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type east_shrinking,<br>
+unsigned_area_type east_shrinking,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-unsigned_area_type south_shrinking,<br>
+unsigned_area_type south_shrinking,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 unsigned_area_type north_shrinking)</font></td>
                 <td>Scans to eliminate overlaps and subtractive regions.&nbsp; Inserts
@@ -804,24 +822,24 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-polygon_90_set_data&amp;<br>
-<b>resize</b>(coordinate_type west, coordinate_type east, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type south, coordinate_type north)</font></td>
+polygon_90_set_data&amp;<br />
+<b>resize</b>(coordinate_type west, coordinate_type east, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type south, coordinate_type north)</font></td>
                 <td>Call bloat or shrink or shrink then bloat depending on whether the
                 resizing values are positive or negative.&nbsp; O( n log n) runtime
                 complexity and O(n) memory wrt vertices + intersections.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-polygon_90_set_data&amp; <b>move</b>(coordinate_type x_delta, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type
-y_delta) </font>
+polygon_90_set_data&amp; <b>move</b>(coordinate_type x_delta, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+coordinate_type y_delta) </font>
                 </td>
                 <td>Add x_delta to x values and y_delta to y values of vertices stored
                 within the polygon set.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename transformation_type&gt;<br>
-polygon_90_set_data&amp; <br><b>transform</b>(const transformation_type&amp; transformation) </font>
+template &lt;typename transformation_type&gt;<br />
+polygon_90_set_data&amp; <br /><b>transform</b>(const transformation_type&amp; transformation) </font>
                 </td>
                 <td>Applies transformation.transform() on vertices stored within the
                 polygon set.&nbsp; Linear wrt. vertices.</td>
@@ -835,14 +853,14 @@
         <tr>
                 <td width="586">
 <p><font face="Courier New">polygon_90_set_data&amp; <b>scale_down</b>(unsigned_area_type
-factor)</font>&nbsp;</td>
+factor)</font>&nbsp;</p></td>
                 <td>Scales vertices stored within the polygon set down by factor.&nbsp;
                 Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename scaling_type&gt;<br>
-polygon_90_set_data&amp;<br> <b>scale</b>(const anisotropic_scale_factor&lt;scaling_type&gt;&amp;
+template &lt;typename scaling_type&gt;<br />
+polygon_90_set_data&amp;<br /> <b>scale</b>(const anisotropic_scale_factor&lt;scaling_type&gt;&amp;
                 f)</font></td>
                 <td>Scales vertices stored within the polygon set by applying f.scale().&nbsp;
                 Linear wrt. vertices.</td>
@@ -865,23 +883,23 @@
                 intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">polygon_90_set_data&amp;<br> <b>interact</b>(const polygon_90_set_data&amp; that)</font></td>
+ <td width="586"><font face="Courier New">polygon_90_set_data&amp;<br /> <b>interact</b>(const polygon_90_set_data&amp; that)</font></td>
                 <td>Retain only regions that touch or overlap regions in argument.&nbsp;
                 O( n log n) runtime complexity and O(n) memory wrt vertices +
                 intersections.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table4">
+<table class="docinfo" id="table4" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -894,6 +912,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_90_with_holes_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_90_with_holes_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_90_with_holes_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon 90 With Holes Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon 90 With Holes Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,103 +40,118 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon 90 With Holes Concept</h1>
 
 <p>
-<p>The polygon_90_with_holes concept tag is <font face="Courier New">
+</p><p>The polygon_90_with_holes concept tag is <font face="Courier New">
 polygon_90_with_holes_concept</font></p>
 <p>
 To register a user defined type as a model of
 <font face="Times New Roman">polygon_90_with_holes </font>concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below CPolygon90WithHoles is registered as a model of
-polygon<font face="Times New Roman">_90_with_holes&nbsp;</font> concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CPolygon90WithHoles&gt; { typedef polygon_90_with_holes_concept type; };</font><p>
+polygon<font face="Times New Roman">_90_with_holes&nbsp;</font> concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CPolygon90WithHoles&gt; { typedef polygon_90_with_holes_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a polygon_90_with_holes is a
 polygon_90 that it can provide iterators over holes that are also polygon_90.&nbsp;
 A mutable polygon_90_with_holes must also be able to set its geometry based on
 an interator range over polygon_90 holes.&nbsp; There is no convention of
-winding of holes enforced within the library. </font><p>
+winding of holes enforced within the library. </font></p><p>
 <font face="Times New Roman">Below is shown the default polygon with holes
 traits.&nbsp; Specialization of these traits is required for types that don't
-conform to the default behavior.</font><p><font face="Courier New">template &lt;typename
-T, typename enable = void&gt;<br>
-struct polygon_with_holes_traits {<br>
+conform to the default behavior.</font></p><p><font face="Courier New">template &lt;typename
+T, typename enable = void&gt;<br />
+struct polygon_with_holes_traits {<br />
 &nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::iterator_holes_type
-iterator_holes_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::hole_type hole_type;<br>
+iterator_holes_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::hole_type hole_type;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_holes_type begin_holes(const T&amp;
-t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_holes_type end_holes(const T&amp; t)
-{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size_holes(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size_holes(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
-<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br>
-struct polygon_with_holes_mutable_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br>
+<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br />
+struct polygon_with_holes_mutable_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T&amp; set_holes(T&amp; t, iT inputBegin, iT
-inputEnd) {<br>
+inputEnd) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.set_holes(inputBegin,
-inputEnd);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+inputEnd);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
 <p>An object that is a model of <font face="Courier New">
 polygon_90_with_holes_concept</font> can be viewed as a model of any of its
 refinements if it is determined at runtime to conform to the restriction of
 those concepts.&nbsp; This concept casting is accomplished through the
 <font face="Courier New">view_as&lt;&gt;()</font> function.</p>
-<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_90_with_holes_object)</font><br>
+<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_90_with_holes_object)</font><br />
 <font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_90_with_holes_object)</font></p>
 <p>The return value of <font face="Courier New">view_as&lt;&gt;()</font> can be
 passed into any interface that expects an object of the conceptual type
 specified in its template parameter.</p>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 compact_iterator_type <b>begin_compact</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;
                 Returns the begin iterator over the range of coordinates that correspond
                 to horizontal and vertical edges.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 compact_iterator_type <b>end_compact</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_90.&nbsp;
                 Returns the end iterator over the range of coordinates that correspond
                 to horizontal and vertical edges.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>begin_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_90_with_holes.&nbsp;
@@ -140,7 +159,7 @@
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>end_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_90_with_holes.&nbsp;
@@ -148,7 +167,7 @@
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 hole_iterator_type <b>begin_holes</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_90_with_holes.&nbsp;
@@ -156,7 +175,7 @@
                 to horizontal and vertical edges.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 hole_iterator_type <b>end_</b><b>holes</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_90_with_holes.&nbsp;
@@ -165,7 +184,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_compact</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_90_with_holes.&nbsp;&nbsp;
@@ -174,7 +193,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_points</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_90_with_holes.&nbsp;&nbsp;
@@ -184,14 +203,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_holes</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of
                 polygon_90_with_holes.&nbsp;&nbsp;
                 Sets the polygon holes to the hole data range [b,e)</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 unsigned int <b>size</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Returns the number of edges in the
                 outer shell of the polygon_90_with_holes.&nbsp; Does not include sizes
@@ -199,7 +218,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models polygon_90_with_holes or
                 one of its refinements into left object
@@ -207,8 +226,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br>
+ typename point_type&gt;<br />
+ bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models polygon_90_with_holes and an object that models
@@ -219,86 +238,85 @@
                 the polygon or one of its holes.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename T, typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename T, typename point_type&gt;<br />
                 void <b>center</b>(point_type&amp; p, const T&amp; polygon)</font></td>
                 <td>Sets object that models point to the center point of the bounding
                 box of an object that models polygon_90_with_holes.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename rectangle_type&gt;<br>
+ typename rectangle_type&gt;<br />
                 bool <b>extents</b>(rectangle_type&amp; bbox, const T&amp; polygon)</font></td>
                 <td>Sets object that models rectangle to the bounding box of an object
                 that models polygon_90_with_holes and returns true.&nbsp; Returns false
                 and leaves bbox unchanged if polygon is empty.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 manhattan_area_type <b>area</b>(const T&amp; polygon)</font></td>
                 <td>Returns the area of an object
                 that models polygon_90_with_holes including subtracting the area of its
                 holes from the area of the outer shell polygon.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 direction_1d <b>winding</b>(const T&amp; polygon)</font></td>
                 <td>Returns the winding direction of an object
                 that models polygon_90_with_holes, LOW == CLOCKWISE, HIGH =
                 COUNTERCLOCKWISE.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_difference <b>perimeter</b>(const T&amp; polygon)</font></td>
                 <td>Returns the perimeter length of an object
                 that models polygon_90, including the perimeters of the holes.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename transform_type&gt;<br>
+ typename transform_type&gt;<br />
                 T&amp; <b>transform</b>(T&amp; polygon, const transform_type&amp;)</font></td>
                 <td>Applies transform() on the vertices of polygon and sets the polygon to that described by the result of
                 transforming its vertices.&nbsp; Also applies transform() on the holes
                 of the polygon.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_up</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales up outer shell and holes of an object that models
                 polygon_90 by unsigned factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_down</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales down outer shell and holes of an object that models
                 polygon_90 by unsigned factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br />
                 T&amp; <b>scale</b>(T&amp; rectangle, double scaling) </font></td>
                 <td>Scales outer shell and holes of an object that models polygon_90 by
                 floating point factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to coordinate indicated by orientation_2d of
                 vertices of an object that models polygon_90 .</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br>
- polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br />
+ polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Convolves coordinate values of point with the outer shell and holes of an
                 object that models polygon_90_with_holes.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon 90 With Holes Data</h1>
 
 <p>
-<p>The library provides a model of polygon 90 with holes concept declared
+</p><p>The library provides a model of polygon 90 with holes concept declared
 <font face="Courier New">
 template&lt;typename T&gt; polygon_90_with_holes_data </font>where T is the
 coordinate type.</p>
@@ -307,8 +325,8 @@
 library polygon data type instead of providing their own.&nbsp; The data type is
 implemented to be convenient to use with the library traits.</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">polygon_90_with_holes_concept</font></td>
         </tr>
@@ -343,12 +361,12 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">polygon_90_with_holes_data&amp; <b>
- <br>operator=</b>(const polygon_90_with_holes_data&amp; that)</font></td>
+ <br />operator=</b>(const polygon_90_with_holes_data&amp; that)</font></td>
                 <td>Assignment operator.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b> </b>polygon_90_with_holes_data&amp;<b>&nbsp;
- <br> operator=</b>(const T2&amp; that) const</font></td>
+ <br /> operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of polygon 90 with holes.</td>
         </tr>
         <tr>
@@ -396,14 +414,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
+ <br /> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
                 <td>Sets the polygon to the iterator range of points.&nbsp; No check is
                 performed to ensure the points describe a Manhattan figure, every other
                 x and y value of the points is used to initialize the polygon.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set_compact</b>(iT begin_coords, iT end_coords)</font></td>
+ <br /> </b>void <b>set_compact</b>(iT begin_coords, iT end_coords)</font></td>
                 <td>Sets the polygon to the iterator range of coordinates.&nbsp; These
                 coordinates correspond to the x values of vertical edges and y values of
                 horizontal edges.&nbsp; It is expected that the sequence start with an x
@@ -411,24 +429,24 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set_holes</b>(iT begin_holes, iT end_choless)</font></td>
+ <br /> </b>void <b>set_holes</b>(iT begin_holes, iT end_choless)</font></td>
                 <td>Sets the polygon holes the iterator range of hole polygons.&nbsp; These
                 polygons in the input range may be either polygon_90_data or
                 polygon_90_with_holes_data or any type that provides begin_compact and
                 end_compact member functions.</td>
         </tr>
-</table>
- <tr>
+</tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -441,6 +459,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,40 +40,55 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon Concept</h1>
 
 <p>
-<p>The polygon concept tag is <font face="Courier New">
+</p><p>The polygon concept tag is <font face="Courier New">
 polygon_concept</font></p>
 <p>
 To register a user defined type as a model of
 <font face="Times New Roman">polygon </font>concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below CPolygon is registered as a model of
-polygon&nbsp; concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CPolygon&gt; { typedef polygon_concept type; };</font><p>
+polygon&nbsp; concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CPolygon&gt; { typedef polygon_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a polygon is that it can provide
 iterators over the points that represent its vertices.&nbsp; It is acceptable to
 have the last edge explict with the first and last point equal to each other or
@@ -79,53 +98,53 @@
 &gt;
 could be made models of polygon_concept by simply providing access to their
 iterators through traits.&nbsp; Library functions that create polygon objects
-require that those objects provide a default constructor.</font><p>
+require that those objects provide a default constructor.</font></p><p>
 <font face="Times New Roman">Below is shown the default polygon traits.&nbsp;
 Specialization of these traits is required for types that don't conform to the
 default behavior.&nbsp; Note that these same traits are also used by several
 other polygon concepts through SFINE enable template parameter.&nbsp; The SFINE
 enable parameter also allows the library to provide default specialization that
-work for any object that models the 90 degree polygon concepts.</font><p>
-<font face="Courier New">template &lt;typename T, typename enable = gtl_yes&gt;<br>
-struct polygon_traits {};<br>
-<br>
-template &lt;typename T&gt;<br>
-struct polygon_traits&lt;T, <br>
-&nbsp; typename gtl_or_4&lt;<br>
+work for any object that models the 90 degree polygon concepts.</font></p><p>
+<font face="Courier New">template &lt;typename T, typename enable = gtl_yes&gt;<br />
+struct polygon_traits {};<br />
+<br />
+template &lt;typename T&gt;<br />
+struct polygon_traits&lt;T, <br />
+&nbsp; typename gtl_or_4&lt;<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_concept&gt;::type,<br>
+polygon_concept&gt;::type,<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_concept&gt;::type,<br>
+polygon_concept&gt;::type,<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_with_holes_concept&gt;::type,<br>
+polygon_with_holes_concept&gt;::type,<br />
 &nbsp;&nbsp;&nbsp; typename gtl_same_type&lt;typename geometry_concept&lt;T&gt;::type,
-polygon_with_holes_concept&gt;::type<br>
-&nbsp; &gt;::type&gt; {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::iterator_type iterator_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::point_type point_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type begin_points(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type end_points(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline winding_direction winding(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return unknown_winding;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+polygon_with_holes_concept&gt;::type<br />
+&nbsp; &gt;::type&gt; {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::iterator_type iterator_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::point_type point_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type begin_points(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_type end_points(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline winding_direction winding(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return unknown_winding;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
-<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br>
-struct polygon_mutable_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br>
+<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br />
+struct polygon_mutable_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T&amp; set_points(T&amp; t, iT input_begin, iT
-input_end) {<br>
+input_end) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.set(input_begin,
-input_end);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+input_end);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
 <p>Example code custom_polygon.cpp
 demonstrates mapping a
@@ -135,23 +154,23 @@
 refinements if it is determined at runtime to conform to the restriction of
 those concepts.&nbsp; This concept casting is accomplished through the
 <font face="Courier New">view_as&lt;&gt;()</font> function.</p>
-<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_object)</font><br>
-<font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_object)</font><br>
+<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_object)</font><br />
+<font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_object)</font><br />
 <font face="Courier New">view_as&lt;polygon_45_concept&gt;(polygon_object)</font></p>
 <p>The return value of <font face="Courier New">view_as&lt;&gt;()</font> can be
 passed into any interface that expects an object of the conceptual type
 specified in its template parameter. </p>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>begin_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon.&nbsp;
                 Returns the begin iterator over the range of points that correspond to
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>end_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon.&nbsp;
                 Returns the end iterator over the range of points that correspond to
@@ -159,29 +178,29 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_points</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon.&nbsp;&nbsp;
                 Sets the polygon to the point data range [b,e) that corresponds to
                 vertices of a manhattan polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 unsigned int <b>size</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Returns the number of edges in the
                 polygon.</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models polygon into left object
                 that models polygon.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br>
+ typename point_type&gt;<br />
+ bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models polygon and an object that models
@@ -191,84 +210,83 @@
                 the polygon.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename T, typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename T, typename point_type&gt;<br />
                 void <b>center</b>(point_type&amp; p, const T&amp; polygon)</font></td>
                 <td>Sets object that models point to the center point of the bounding
                 box of an object that models polygon.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename rectangle_type&gt;<br>
+ typename rectangle_type&gt;<br />
                 bool <b>extents</b>(rectangle_type&amp; bbox, const T&amp; polygon)</font></td>
                 <td>Sets object that models rectangle to the bounding box of an object
                 that models polygon and returns true.&nbsp; Returns false and leaves
                 bbox unchanged if polygon is empty.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 area_type <b>area</b>(const T&amp; polygon)</font></td>
                 <td>Returns the area of an object
                 that models polygon.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 direction_1d <b>winding</b>(const T&amp; polygon)</font></td>
                 <td>Returns the winding direction of an object
                 that models polygon, LOW == CLOCKWISE, HIGH = COUNTERCLOCKWISE.&nbsp;
                 Complexity depends upon winding trait.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_distance <b>perimeter</b>(const T&amp; polygon)</font></td>
                 <td>Returns the perimeter length of an object
                 that models polygon.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename transform_type&gt;<br>
+ typename transform_type&gt;<br />
                 T&amp; <b>transform</b>(T&amp; polygon, const transform_type&amp;)</font></td>
                 <td>Applies transform() on the vertices of polygon and sets the polygon to that described by the result of
                 transforming its vertices.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_up</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales up coordinate of an object that models
                 polygon by unsigned factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_down</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales down coordinates of an object that models
                 polygon by unsigned factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br />
                 T&amp; <b>scale</b>(T&amp; rectangle, double scaling) </font></td>
                 <td>Scales coordinates of an object that models polygon by floating
                 point factor.&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to coordinate indicated by orientation_2d of
                 vertices of an object that models polygon .&nbsp; Linear wrt. vertices.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br>
- polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br />
+ polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Convolves coordinate values of point with vertices of an
                 object that models polygon.&nbsp; Linear wrt. vertices.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon Data</h1>
 
 <p>
-<p>The library provides a model of polygon concept declared
+</p><p>The library provides a model of polygon concept declared
 <font face="Courier New">
 template&lt;typename T&gt; polygon_data </font>where T is the coordinate type.</p>
 <p>This data type is used internally when a polygon is needed and is available
@@ -279,8 +297,8 @@
 demonstrates using
                 the library provided polygon data types and functions</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">polygon_concept</font></td>
         </tr>
@@ -308,7 +326,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>&nbsp;
- <br> </b>polygon_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
+ <br /> </b>polygon_data&amp; <b>operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of polygon.</td>
         </tr>
         <tr>
@@ -328,21 +346,21 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
+ <br /> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
                 <td>Sets the polygon to the iterator range of points.&nbsp; </td>
         </tr>
-</table>
- <tr>
+</tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -355,6 +373,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_set_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_set_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_set_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon Set Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon Set Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,32 +40,47 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon Set Concept</h1>
 
 <p>
-<p>The polygon_set concept tag is <font face="Courier New">
+</p><p>The polygon_set concept tag is <font face="Courier New">
 polygon_set_concept</font></p>
 <p>
 <font face="Times New Roman">The semantic of a polygon_set is zero or more
@@ -69,9 +88,14 @@
 coordinates, but a snap rounding distance of one integer unit will still be
 applied, furthermore, geometry outside the domain where one integer unit is
 sufficient to provide robustness may lead to undefined behavior in algorithms.&nbsp;
-It is recommended to use 32-bit integer coordinates for robust operations.
-
-</font><p>Users are recommended to use std::vector and std::list of user defined polygons
+It is recommended to use integer coordinates for robust operations.&nbsp; In the
+case that data represented contains only Manhattan geometry a runtime check will
+default to the Manhattan algorithm.&nbsp; The results of which are identical to
+what the general algorithm would do, but obtained more efficiently.&nbsp; In the
+case that the data represented contains only Manhattan and 45-degree geometry a
+runtime check will default to the faster 45-degree algorithm.&nbsp; The results
+of which may differ slight from what the general algorithm would do because
+non-integer intersections will be handled differently.</font></p><p>Users are recommended to use std::vector and std::list of user defined polygons
 or library provided polygon_set_data&lt;coordinate_type&gt; objects.&nbsp; Lists
 and vectors of models of polygon_concept or polygon_with_holes_concept are automatically models of polygon_set_concept.</p>
 <p>Example code custom_polygon_set.cpp
@@ -82,7 +106,7 @@
 polygon_45_set_concept</font> if it is determined at runtime to conform to the
 restrictions of those concepts.&nbsp; This concept casting is accomplished
 through the <font face="Courier New">view_as&lt;&gt;()</font> function.</p>
-<p><font face="Courier New">view_as&lt;polygon_90_set_concept&gt;(polygon_set_object)<br>
+<p><font face="Courier New">view_as&lt;polygon_90_set_concept&gt;(polygon_set_object)<br />
 view_as&lt;polygon_45_set_concept&gt;(polygon_set_object)</font></p>
 <p>The return value of <font face="Courier New">view_as&lt;&gt;()</font> can be passed
 into any interface that expects an object of the conceptual type specified in
@@ -97,10 +121,10 @@
 eliminate temp copies of intermediate results when Boolean operators are chained
 together.</p>
 <p>Operators are declared inside the namespace <font face="Courier New">boost::polygon::operators</font>.</p>
-<table border="1" width="100%" id="table5">
- <tr>
+<table id="table5" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_set_view <b>operator</b>|(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean OR operation (polygon set union).&nbsp; Accepts two objects
                 that model polygon_set or one of its refinements.&nbsp; Returns an
@@ -111,7 +135,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_set_view <b>operator</b>+(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator|.&nbsp; The plus sign is also used for OR
                 operations in Boolean logic expressions.&nbsp; Expected n log n runtime,
@@ -119,7 +143,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_set_view <b>operator</b>&amp;(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean AND operation (polygon set intersection).&nbsp; Accepts two
                 objects that model polygon_set or one of its refinements.&nbsp; Expected
@@ -128,7 +152,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_set_view <b>operator</b>*(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator&amp;.&nbsp; The multiplication symbol is also used for
                 AND operations in Boolean logic expressions.&nbsp; Expected n log n
@@ -136,7 +160,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_set_view <b>operator</b>^(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean XOR operation (polygon set disjoint-union).&nbsp; Accepts
                 two objects that model polygon_set or one of its refinements.&nbsp;
@@ -145,7 +169,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 polygon_set_view <b>operator</b>-(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Boolean SUBTRACT operation (polygon set difference).&nbsp; Accepts
                 two objects that model polygon_set or one of its refinements.&nbsp;
@@ -154,7 +178,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>|=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator|, but with self assignment, left operand must model
                 polygon_set and not one of it's refinements.&nbsp; Expected n log n
@@ -162,7 +186,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>+=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator+, but with self assignment, left operand must model
                 polygon_set and not one of it's refinements.&nbsp; Expected n log n
@@ -170,7 +194,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>&amp;=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator&amp;, but with self assignment, left operand must model
                 polygon_set and not one of it's refinements.&nbsp; Expected n log n
@@ -178,7 +202,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>*=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator*, but with self assignment, left operand must model
                 polygon_set and not one of it's refinements.&nbsp; Expected n log n
@@ -186,7 +210,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>^=(const T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator^, but with self assignment, left operand must model
                 polygon_set and not one of it's refinements.&nbsp; Expected n log n
@@ -194,14 +218,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>-=(T1&amp; l, const T2&amp; r)</font></td>
                 <td>Same as operator-, but with self assignment, left operand must model
                 polygon_set and not one of it's refinements.&nbsp; Expected n log n
                 runtime, worst case quadratic runtime wrt. vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T1&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T1&gt;<br />
                 T1 <b>operator</b>+(const T1&amp;, coordinate_type bloating)</font></td>
                 <td>Performs resize operation, inflating by bloating ammount.&nbsp; If
                 negative the result is a shrink instead of bloat.&nbsp; Note: returns
@@ -210,7 +234,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1 <b>operator</b>-(const T1&amp;, coordinate_type shrinking)</font></td>
                 <td>Performs resize operation, deflating by bloating ammount.&nbsp; If
                 negative the result is a bloat instead of shrink.&nbsp; Note: returns
@@ -219,7 +243,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>+=(const T1&amp;, coordinate_type bloating)</font></td>
                 <td>Performs resize operation, inflating by bloating ammount.&nbsp; If
                 negative the result is a shrink instead of bloat.&nbsp; Returns
@@ -228,19 +252,19 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>operator</b>-=(const T1&amp;, coordinate_type shrinking)</font></td>
                 <td>Performs resize operation, deflating by bloating ammount.&nbsp; If
                 negative the result is a bloat instead of shrink.&nbsp; Returns
                 reference to modified argument.&nbsp; Expected n log n runtime, worst
                 case quadratic runtime wrt. vertices + intersections.</td>
         </tr>
- </table>
+ </tbody></table>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table6">
- <tr>
+<table id="table6" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; lvalue, const T2&amp; rvalue)</font></td>
                 <td>Eliminates overlaps in geometry and copies from an object that
                 models polygon_set or any of its refinements into an object that
@@ -249,7 +273,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>equivalence</b>(const T1&amp; lvalue, const T2&amp; rvalue) </font></td>
                 <td>Returns true if an object that models polygon_set or one of its
                 refinements covers the exact same geometric regions as another object
@@ -259,8 +283,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- output_container_type, typename T&gt;<br>
- void <b>get_trapezoids</b>(output_container_type&amp; output, <br>
+ output_container_type, typename T&gt;<br />
+ void <b>get_trapezoids</b>(output_container_type&amp; output, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 const T&amp; polygon_set)</font></td>
                 <td>Output container is expected to be a standard container.&nbsp;
@@ -273,10 +297,12 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- output_container_type, typename T&gt;<br>
- void <b>get_trapezoids</b>(output_container_type&amp; output, <br>
+ output_container_type, typename T&gt;<br />
+ void <b>get_trapezoids</b>(output_container_type&amp; output, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T&amp; polygon_set,<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d orient)</font></td>
+ const T&amp; polygon_set,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+orientation_2d orient)</font></td>
                 <td>Output container is expected to be a standard container.&nbsp;
                 Slices geometry of an object that models polygon_set or one of its
                 refinements into non overlapping trapezoids along a the specified slicing
@@ -287,13 +313,13 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- polygon_set_type&gt;<br>
+ polygon_set_type&gt;<br />
                 void <b>clear</b>(polygon_set_type&amp; polygon_set)</font></td>
                 <td>Makes the object empty of geometry.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- polygon_set_type&gt;<br>
+ polygon_set_type&gt;<br />
                 bool <b>empty</b>(const polygon_set_type&amp; polygon_set)</font></td>
                 <td>Checks whether the object is empty of geometry.&nbsp; Polygons that
                 are completely covered by holes will result in empty returning true.&nbsp;
@@ -302,8 +328,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- rectangle_type&gt;<br>
- bool <b>extents</b>(rectangle_type&amp; extents_rectangle, <br>
+ rectangle_type&gt;<br />
+ bool <b>extents</b>(rectangle_type&amp; extents_rectangle, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const
                 T&amp; polygon_set)</font></td>
                 <td>Computes bounding box of an object that models polygon_set and
@@ -314,21 +340,21 @@
                 intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 area_type <b>area</b>(const T&amp; polygon_set)</font></td>
                 <td>Computes the area covered by geometry in an object that models
                 polygon_set.&nbsp; Expected n log n runtime, worst case quadratic
                 runtime wrt. vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; polygon_set, unsigned_area_type bloating)</font></td>
                 <td>Same as getting all the polygons, bloating them and putting them
                 back.&nbsp; Expected n log n runtime, worst case quadratic runtime wrt.
                 vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; polygon_set, unsigned_area_type shrinking)</font></td>
                 <td>Same as getting all the polygons, shrinking them and overwriting
                 the polygon set with the resulting regions.&nbsp; Expected n log n
@@ -336,10 +362,10 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coord_type&gt;<br>
- T&amp; <b>resize</b>(T&amp; polygon_set, coord_type resizing,<br>
+ coord_type&gt;<br />
+ T&amp; <b>resize</b>(T&amp; polygon_set, coord_type resizing,<br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- bool corner_fill_arc = false, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ bool corner_fill_arc = false, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 unsigned int num_circle_segments = 0)</font></td>
                 <td>Same as bloat if resizing is positive, same as shrink if resizing is
                 negative.&nbsp; Original topology at acute angle vertices is preserved
@@ -350,31 +376,20 @@
                 runtime wrt. vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename
- coord_type&gt;<br>
- T&amp; <b>simplify</b>(T&amp; polygon_set, distance_type
- threshold)</font></td>
- <td>Simplify the polygon set by removing vertices that lie
- within threshold distance of the line segment that
- connects the two adjacent points in the polygon.&nbsp;
- Expected n log n runtime, worst case quadratic
- runtime wrt. vertices + intersections.</td>
- </tr>
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>scale_up</b>(T&amp; polygon_set, unsigned_area_type factor)</font></td>
                 <td>Scales geometry up by unsigned factor.&nbsp; Expected n log n
                 runtime, worst case quadratic runtime wrt. vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
 T&amp; <b>scale_down</b>(T&amp; polygon_set, unsigned_area_type factor)</font></td>
                 <td>Scales geometry down by unsigned factor.&nbsp; Expected n log n
                 runtime, worst case quadratic runtime wrt. vertices + intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, typename transformation_type&gt;<br>
-T&amp; <b>transform</b>(T&amp; polygon_set,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, typename transformation_type&gt;<br />
+T&amp; <b>transform</b>(T&amp; polygon_set,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const
 transformation_type&amp; transformation)</font></td>
                 <td>Applies transformation.transform() on all vertices.&nbsp; Expected n
@@ -382,24 +397,24 @@
                 intersections.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
-T&amp; <b>keep</b>(T&amp; polygon_set, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_area,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_area,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_width,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_width,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_height,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+T&amp; <b>keep</b>(T&amp; polygon_set, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_area,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_area,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_width,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_width,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type min_height,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type max_height)</font></td>
                 <td>Retains only regions that satisfy the min/max criteria in the
                 argument list.&nbsp; Note: useful for visualization to cull too small
                 polygons.&nbsp; Expected n log n runtime, worst case quadratic runtime
                 wrt. vertices + intersections.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon Set Data Object</h1>
 
 <p>
-<p>The polygon set data type encapsulates the internal data format that
+</p><p>The polygon set data type encapsulates the internal data format that
 serves as the input to the sweep-line algorithm that implements polygon-clipping
 Boolean operations.&nbsp; It also internally keeps track of whether that data
 has been sorted or scanned and maintains the invariant that when its flags
@@ -410,7 +425,7 @@
 maintain the data is sorted form rather than going all the way out to polygons
 then resorting those vertices for a subsequent operation.</p>
 <p>The declaration of Polygon Set Data is the following:</p>
-<p><font face="Courier New">template &lt;typename T&gt;<br>
+<p><font face="Courier New">template &lt;typename T&gt;<br />
 class polygon_set_data;</font></p>
 <p>The class is parameterized on the coordinate data type.&nbsp; Algorithms that
 benefit from knowledge of the invariants enforced by the class are implemented
@@ -420,13 +435,13 @@
 demonstrates using
                 the library provided polygon set data types and functions</p>
 <h2>Member Functions</h2>
-<table border="1" width="100%" id="table7">
- <tr>
+<table id="table7" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><font face="Courier New"><b>polygon_set_data</b>()</font></td>
                 <td>Default constructor. </td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename iT&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename iT&gt;<br />
         <b>polygon_set_data</b>(iT input_begin, iT
         input_end)</font></td>
                 <td>Construct with scanning orientation from an iterator range of
@@ -439,33 +454,33 @@
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br>
+<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br />
 <b>polygon_set_data</b>(const polygon_set_view&lt;l,r,op&gt;&amp;
 t)</font></td>
                 <td>Copy construct from a Boolean operator template.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">polygon_set_data&amp; <br><b>operator=</b>(const polygon_set_data&amp; that)</font></td>
+<font face="Courier New">polygon_set_data&amp; <br /><b>operator=</b>(const polygon_set_data&amp; that)</font></td>
                 <td>Assignment from another polygon set, may change scanning
                 orientation.</td>
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br>
-polygon_set_data&amp; <br><b>operator=</b>(const polygon_set_view&lt;l, r,
+<font face="Courier New">template &lt;typename l, typename r, typename op&gt;<br />
+polygon_set_data&amp; <br /><b>operator=</b>(const polygon_set_view&lt;l, r,
 op&gt;&amp; that)</font></td>
                 <td>Assignment from a Boolean operator template.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename geometry_object&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename geometry_object&gt;<br />
 polygon_set_data&amp; <b>operator=</b>(const geometry_object&amp; geo)</font></td>
                 <td>Assignment from an insertable object.</td>
         </tr>
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename iT&gt;<br>
+template &lt;typename iT&gt;<br />
 void <b>insert</b>(iT input_begin, iT input_end)</font></td>
                 <td>Insert objects of an iterator range.&nbsp; Linear wrt vertices
                 inserted.</td>
@@ -479,8 +494,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename geometry_type&gt;<br>
-void <b>insert</b>(const geometry_type&amp; geometry_object, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
+template &lt;typename geometry_type&gt;<br />
+void <b>insert</b>(const geometry_type&amp; geometry_object, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool is_hole
 = false)</font></td>
                 <td>Insert a geometry object, if is_hole is true then the inserted
                 region is subtractive rather than additive.&nbsp; Linear wrt vertices
@@ -488,7 +503,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of polygons objects.&nbsp; Will scan
                 and eliminate overlaps.&nbsp; Converts polygon set geometry to objects
@@ -505,7 +520,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename output_container&gt;<br>
+template &lt;typename output_container&gt;<br />
 void <b>get_trapezoids</b>(output_container&amp; output) const</font></td>
                 <td>Expects a standard container of polygon objects.&nbsp; Will scan
                 and eliminate overlaps.&nbsp; Slices polygon set geometry to trapezoids
@@ -515,8 +530,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename output_container&gt;<br>
-void <b>get_trapezoids</b>(output_container&amp; output, <br>&nbsp; orientation_2d
+template &lt;typename output_container&gt;<br />
+void <b>get_trapezoids</b>(output_container&amp; output, <br />&nbsp; orientation_2d
 slicing_orientation) const </font>
                 </td>
                 <td>Expects a standard container of polygon objects.&nbsp; Will scan
@@ -563,15 +578,15 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename input_iterator_type&gt;<br>
-void <b>set</b>(input_iterator_type input_begin, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_iterator_type input_end) </font>
+template &lt;typename input_iterator_type&gt;<br />
+void <b>set</b>(input_iterator_type input_begin, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_iterator_type input_end) </font>
                 </td>
                 <td>Overwrite geometry in polygon set with insertable objects in the
                 iterator range. </td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename rectangle_type&gt;<br>
+template &lt;typename rectangle_type&gt;<br />
 bool <b>extents</b>(rectangle_type&amp; extents_rectangle) const</font></td>
                 <td>Given an object that models rectangle, scans and eliminates overlaps
                 in the polygon set because subtractive regions may alter its extents
@@ -581,9 +596,9 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-polygon_set_data&amp;<br>
-<b>resize</b>(coord_type resizing,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool corner_fill_arc = false, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+polygon_set_data&amp;<br />
+<b>resize</b>(coord_type resizing,<br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool corner_fill_arc = false, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 unsigned int num_circle_segments = 0)</font></td>
                 <td>Inflates if resizing is positive, deflates if resizing is
                 negative.&nbsp; Original topology at acute angle vertices is preserved
@@ -597,8 +612,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename transformation_type&gt;<br>
-polygon_set_data&amp; <br><b>transform</b>(const transformation_type&amp; transformation) </font>
+template &lt;typename transformation_type&gt;<br />
+polygon_set_data&amp; <br /><b>transform</b>(const transformation_type&amp; transformation) </font>
                 </td>
                 <td>Applies transformation.transform() on vertices stored within the
                 polygon set.&nbsp; Expected n log n runtime, worst case quadratic
@@ -621,25 +636,25 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">
-template &lt;typename scaling_type&gt;<br>
-polygon_set_data&amp;<br> <b>scale</b>(const scaling_type&amp;
+template &lt;typename scaling_type&gt;<br />
+polygon_set_data&amp;<br /> <b>scale</b>(const scaling_type&amp;
                 f)</font></td>
                 <td>Scales vertices stored within the polygon set by applying f.scale().&nbsp;
                 Expected n log n runtime, worst case quadratic runtime wrt. vertices +
                 intersections.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table8">
+<table class="docinfo" id="table8" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -652,6 +667,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_polygon_with_holes_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_polygon_with_holes_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_polygon_with_holes_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Polygon With Holes Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Polygon With Holes Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,115 +40,130 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Polygon With Holes Concept</h1>
 
 <p>
-<p>The polygon_with_holes concept tag is <font face="Courier New">
+</p><p>The polygon_with_holes concept tag is <font face="Courier New">
 polygon_with_holes_concept</font></p>
 <p>
 To register a user defined type as a model of
 <font face="Times New Roman">polygon_with_holes </font>concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below
-CPolygonWithHoles is registered as a model of polygon<font face="Times New Roman">_with_holes&nbsp;</font> concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CPolygonWithHoles&gt; { typedef polygon_with_holes_concept type; };</font><p>
+CPolygonWithHoles is registered as a model of polygon<font face="Times New Roman">_with_holes&nbsp;</font> concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CPolygonWithHoles&gt; { typedef polygon_with_holes_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a polygon_with_holes is a polygon
 that it can provide iterators over holes that are also polygon.&nbsp; A mutable
 polygon_with_holes must also be able to set its geometry based on an interator
 range over polygon holes.&nbsp; There is no convention of winding of holes
-enforced within the library. </font><p>
+enforced within the library. </font></p><p>
 <font face="Times New Roman">Below is shown the default polygon with holes
 traits.&nbsp; Specialization of these traits is required for types that don't
 conform to the default behavior.&nbsp; Note, these traits are used by all
-polygon with holes concepts.</font><p><font face="Courier New">template &lt;typename
-T, typename enable = void&gt;<br>
-struct polygon_with_holes_traits {<br>
+polygon with holes concepts.</font></p><p><font face="Courier New">template &lt;typename
+T, typename enable = void&gt;<br />
+struct polygon_with_holes_traits {<br />
 &nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::iterator_holes_type
-iterator_holes_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::hole_type hole_type;<br>
+iterator_holes_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::hole_type hole_type;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_holes_type begin_holes(const T&amp;
-t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.begin_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline iterator_holes_type end_holes(const T&amp; t)
-{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size_holes(const T&amp; t) {<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size_holes();<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.end_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; static inline unsigned int size_holes(const T&amp; t) {<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t.size_holes();<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
-<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br>
-struct polygon_with_holes_mutable_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br>
+<p><font face="Courier New">template &lt;typename T, typename enable = void&gt;<br />
+struct polygon_with_holes_mutable_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename iT&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T&amp; set_holes(T&amp; t, iT inputBegin, iT
-inputEnd) {<br>
+inputEnd) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.set_holes(inputBegin,
-inputEnd);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; }<br>
+inputEnd);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; }<br />
 };</font></p>
 <p>An object that is a model of <font face="Courier New">
 polygon_with_holes_concept</font> can be viewed as a model of any of its
 refinements if it is determined at runtime to conform to the restriction of
 those concepts.&nbsp; This concept casting is accomplished through the
 <font face="Courier New">view_as&lt;&gt;()</font> function.</p>
-<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_with_holes_object)</font><br>
-<font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_with_holes_object)</font><br>
-<font face="Courier New">view_as&lt;polygon_90_with_holes_concept&gt;(polygon_with_holes_object)</font><br>
-<font face="Courier New">view_as&lt;polygon_45_concept&gt;(polygon_with_holes_object)</font><br>
-<font face="Courier New">view_as&lt;polygon_45_with_holes_concept&gt;(polygon_with_holes_object)</font><br>
+<p><font face="Courier New">view_as&lt;rectangle_concept&gt;(polygon_with_holes_object)</font><br />
+<font face="Courier New">view_as&lt;polygon_90_concept&gt;(polygon_with_holes_object)</font><br />
+<font face="Courier New">view_as&lt;polygon_90_with_holes_concept&gt;(polygon_with_holes_object)</font><br />
+<font face="Courier New">view_as&lt;polygon_45_concept&gt;(polygon_with_holes_object)</font><br />
+<font face="Courier New">view_as&lt;polygon_45_with_holes_concept&gt;(polygon_with_holes_object)</font><br />
 <font face="Courier New">view_as&lt;polygon_concept&gt;(polygon_with_holes_object)</font></p>
 <p>The return value of <font face="Courier New">view_as&lt;&gt;()</font> can be
 passed into any interface that expects an object of the conceptual type
 specified in its template parameter. </p>
 <h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>begin_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_with_holes.&nbsp;
                 Returns the begin iterator over the range of points that correspond to
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_iterator_type <b>end_points</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_with_holes.&nbsp;
                 Returns the end iterator over the range of points that correspond to
                 vertices of the polygon.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 hole_iterator_type <b>begin_holes</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_with_holes.&nbsp;
                 Returns the begin iterator over the range of coordinates that correspond
                 to horizontal and vertical edges.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 hole_iterator_type <b>end_holes</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_with_holes.&nbsp;
                 Returns the end iterator over the range of coordinates that correspond
@@ -152,7 +171,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_points</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_with_holes.&nbsp;&nbsp;
                 Sets the polygon to the point data range [b,e) that corresponds to
@@ -160,13 +179,13 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- iterator&gt;<br>
+ iterator&gt;<br />
                 void <b>set_holes</b>(T&amp; polygon, iterator b, iterator e)</font></td>
                 <td><font face="Times New Roman">Expects a model of polygon_with_holes.&nbsp;&nbsp;
                 Sets the polygon holes to the hole data range [b,e)</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 unsigned int <b>size</b>(const T&amp; polygon)</font></td>
                 <td><font face="Times New Roman">Returns the number of edges in the
                 outer shell of the polygon_with_holes.&nbsp; Does not include sizes of
@@ -174,7 +193,7 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models polygon_with_holes or one
                 of its refinements into left object
@@ -182,8 +201,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br>
+ typename point_type&gt;<br />
+ bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models polygon_with_holes and an object that models
@@ -194,86 +213,85 @@
                 the polygon or one of its holes.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename T, typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename T, typename point_type&gt;<br />
                 void <b>center</b>(point_type&amp; p, const T&amp; polygon)</font></td>
                 <td>Sets object that models point to the center point of the bounding
                 box of an object that models polygon_with_holes.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename rectangle_type&gt;<br>
+ typename rectangle_type&gt;<br />
                 bool <b>extents</b>(rectangle_type&amp; bbox, const T&amp; polygon)</font></td>
                 <td>Sets object that models rectangle to the bounding box of an object
                 that models polygon_with_holes and returns true.&nbsp; Returns false and
                 leaves bbox unchanged if polygon is empty.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 manhattan_area_type <b>area</b>(const T&amp; polygon)</font></td>
                 <td>Returns the area of an object
                 that models polygon_with_holes including subtracting the area of its
                 holes from the area of the outer shell polygon.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 direction_1d <b>winding</b>(const T&amp; polygon)</font></td>
                 <td>Returns the winding direction of an object
                 that models polygon_with_holes, LOW == CLOCKWISE, HIGH =
                 COUNTERCLOCKWISE.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_difference <b>perimeter</b>(const T&amp; polygon)</font></td>
                 <td>Returns the perimeter length of an object
                 that models polygon, including the perimeters of the holes.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename transform_type&gt;<br>
+ typename transform_type&gt;<br />
                 T&amp; <b>transform</b>(T&amp; polygon, const transform_type&amp;)</font></td>
                 <td>Applies transform() on the vertices of polygon and sets the polygon to that described by the result of
                 transforming its vertices.&nbsp; Also applies transform() on the holes
                 of the polygon.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_up</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales up outer shell and holes of an object that models
                 polygon by unsigned factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>scale_down</b>(T&amp; polygon, unsigned_area_type factor)</font></td>
                 <td>Scales down outer shell and holes of an object that models
                 polygon by unsigned factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T, scaling_type&gt;<br />
                 T&amp; <b>scale</b>(T&amp; rectangle, double scaling) </font></td>
                 <td>Scales outer shell and holes of an object that models polygon by
                 floating point factor.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>move</b>(T&amp; polygon, orientation_2d,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to coordinate indicated by orientation_2d of
                 vertices of an object that models polygon .</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br>
- polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ <td width="586"><font face="Courier New">template &lt;typename polygon_type, typename point_type&gt;<br />
+ polygon_type&amp; <b>convolve</b>(polygon_type&amp; polygon,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Convolves coordinate values of point with the outer shell and holes of an
                 object that models polygon_with_holes.</td>
         </tr>
- </table>
+ </tbody></table>
         <h1>Polygon With Holes Data</h1>
 
 <p>
-<p>The library provides a model of polygon with holes concept declared
+</p><p>The library provides a model of polygon with holes concept declared
 <font face="Courier New">
 template&lt;typename T&gt; polygon_with_holes_data </font>where T is the
 coordinate type.</p>
@@ -282,8 +300,8 @@
 library polygon data type instead of providing their own.&nbsp; The data type is
 implemented to be convenient to use with the library traits.</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">polygon_with_holes_concept</font></td>
         </tr>
@@ -311,13 +329,13 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">polygon_with_holes_data&amp; <b>
- <br>operator=</b>(const polygon_with_holes_data&amp; that)</font></td>
+ <br />operator=</b>(const polygon_with_holes_data&amp; that)</font></td>
                 <td>Assignment operator.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b> </b>
                 polygon_with_holes_data&amp;<b>&nbsp;
- <br> operator=</b>(const T2&amp; that) const</font></td>
+ <br /> operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of polygon with holes.</td>
         </tr>
         <tr>
@@ -353,29 +371,29 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
+ <br /> </b>void <b>set</b>(iT begin_points, iT end_points)</font></td>
                 <td>Sets the polygon to the iterator range of points. </td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename iT&gt;<b>&nbsp;
- <br> </b>void <b>set_holes</b>(iT begin_holes, iT end_choless)</font></td>
+ <br /> </b>void <b>set_holes</b>(iT begin_holes, iT end_choless)</font></td>
                 <td>Sets the polygon holes the iterator range of hole polygons.&nbsp; These
                 polygons in the input range may be either polygon_data or
                 polygon_with_holes_data or any type that provides begin and end member
                 functions to iterate over point_data&lt;T&gt;.</td>
         </tr>
-</table>
- <tr>
+</tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table3">
+<table class="docinfo" id="table3" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -388,6 +406,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_property_merge.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_property_merge.htm (original)
+++ branches/release/libs/polygon/doc/gtl_property_merge.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Property Merge</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Property Merge</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,35 +40,50 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Property Merge</h1>
 
 <p>
-<p>The following is the declaration of the property merge algorithm.<p>
+</p><p>The following is the declaration of the property merge algorithm.</p><p>
 <font face="Courier New">template &lt;typename coordinate_type, typename
-property_type&gt;<br>
-class property_merge;</font><p>The property algorithm computes the n-layer
+property_type&gt;<br />
+class property_merge;</font></p><p>The property algorithm computes the n-layer
 map overlay of input polygon sets.&nbsp; Each input geometry is inserted along
 with a property value.&nbsp; The property type can be anything suitable for use
 as an element of a std::set.&nbsp; Multiple geometry objects can be separately
@@ -72,13 +91,13 @@
 operation a fairly complex container is required.&nbsp; Resulting geometries are
 associated with unique subsets of property values of the input geometry.&nbsp;
 Two suitable containers for storing the result of a property merge operation
-are:<p><font face="Courier New">std::map&lt;std::set&lt;property_type&gt;, polygon_set_data&lt;coordinate_type&gt;
-&gt;<br>
-std::map&lt;std::vector&lt;property_type&gt;, polygon_set_data&lt;coordinate_type&gt; &gt;</font><p>
+are:</p><p><font face="Courier New">std::map&lt;std::set&lt;property_type&gt;, polygon_set_data&lt;coordinate_type&gt;
+&gt;<br />
+std::map&lt;std::vector&lt;property_type&gt;, polygon_set_data&lt;coordinate_type&gt; &gt;</font></p><p>
 Example code property_merge_usage.cpp
- demonstrates using the n-layer map-overlay algorithm on polygon data.<h2>Member Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+ demonstrates using the n-layer map-overlay algorithm on polygon data.</p><h2>Member Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">property_merge</font></b><font face="Courier New">()</font></td>
                 <td>Default constructor. </td>
         </tr>
@@ -89,7 +108,7 @@
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">void <br><b>insert</b>(const polygon_set_data&lt;coordinate_type&gt;&amp; ps,<br>
+<font face="Courier New">void <br /><b>insert</b>(const polygon_set_data&lt;coordinate_type&gt;&amp; ps,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 const property_type&amp; property)</font></td>
                 <td>I<font face="Times New Roman">nsert a polygon set with an associated
@@ -98,8 +117,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GeoObjT&gt;<br>
-void <b>insert</b>(const GeoObjT&amp; geoObj,<br>
+template &lt;class GeoObjT&gt;<br />
+void <b>insert</b>(const GeoObjT&amp; geoObj,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 const property_type&amp; property)</font></td>
                 <td>Insert a geometry object that is a refinement of polygon set with an
@@ -108,25 +127,25 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename result_type&gt;<br>
+template &lt;typename result_type&gt;<br />
 void <b>merge</b>(result_type&amp; result)</font></td>
                 <td>Accepts a container object that conforms to the expectations defined
                 above.&nbsp; Performs property merge and populates the container
                 object.&nbsp; Expected n log n runtime, worst case quadratic runtime wrt.
                 vertices + intersections.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table2">
+<table class="docinfo" id="table2" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -139,6 +158,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_property_merge_45.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_property_merge_45.htm (original)
+++ branches/release/libs/polygon/doc/gtl_property_merge_45.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Property Merge 90</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Property Merge 90</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,35 +40,50 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Property Merge 45</h1>
 
 <p>
-<p>The following is the declaration of the property merge algorithm.<p>
+</p><p>The following is the declaration of the property merge algorithm.</p><p>
 <font face="Courier New">template &lt;typename coordinate_type, typename
-property_type&gt;<br>
-class property_merge_45;</font><p>The property algorithm computes the n-layer
+property_type&gt;<br />
+class property_merge_45;</font></p><p>The property algorithm computes the n-layer
 map overlay of input polygon sets.&nbsp; Each input geometry is inserted along
 with a property value.&nbsp; The property type can be anything suitable for use
 as an element of a std::set.&nbsp; Multiple geometry objects can be separately
@@ -72,13 +91,13 @@
 operation a fairly complex container is required.&nbsp; Resulting geometries are
 associated with unique subsets of property values of the input geometry.&nbsp;
 Two suitable containers for storing the result of a property merge operation
-are:<p><font face="Courier New">std::map&lt;std::set&lt;property_type&gt;, polygon_45_set_data&lt;coordinate_type&gt;
-&gt;<br>
-std::map&lt;std::vector&lt;property_type&gt;, polygon_45_set_data&lt;coordinate_type&gt; &gt;</font><p>
+are:</p><p><font face="Courier New">std::map&lt;std::set&lt;property_type&gt;, polygon_45_set_data&lt;coordinate_type&gt;
+&gt;<br />
+std::map&lt;std::vector&lt;property_type&gt;, polygon_45_set_data&lt;coordinate_type&gt; &gt;</font></p><p>
 Example code property_merge_usage.cpp
- demonstrates using the n-layer map-overlay algorithm on polygon 90 data.<h2>Member Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+ demonstrates using the n-layer map-overlay algorithm on polygon 90 data.</p><h2>Member Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">property_merge_45</font></b><font face="Courier New">()</font></td>
                 <td>Default constructor. </td>
         </tr>
@@ -89,7 +108,7 @@
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">void <br><b>insert</b>(const polygon_45_set_data&lt;coordinate_type&gt;&amp; ps,<br>
+<font face="Courier New">void <br /><b>insert</b>(const polygon_45_set_data&lt;coordinate_type&gt;&amp; ps,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 const property_type&amp; property)</font></td>
                 <td>I<font face="Times New Roman">nsert a polygon set with an associated
@@ -98,8 +117,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GeoObjT&gt;<br>
-void <b>insert</b>(const GeoObjT&amp; geoObj,<br>
+template &lt;class GeoObjT&gt;<br />
+void <b>insert</b>(const GeoObjT&amp; geoObj,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 const property_type&amp; property)</font></td>
                 <td>Insert a geometry object that is a refinement of polygon 45 set with
@@ -108,24 +127,24 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename result_type&gt;<br>
+template &lt;typename result_type&gt;<br />
 void <b>merge</b>(result_type&amp; result)</font></td>
                 <td>Accepts a container object that conforms to the expectations defined
                 above.&nbsp; Performs property merge and populates the container
                 object.&nbsp; O(n log n) runtime wrt. vertices + intersections.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table2">
+<table class="docinfo" id="table2" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -138,6 +157,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_property_merge_90.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_property_merge_90.htm (original)
+++ branches/release/libs/polygon/doc/gtl_property_merge_90.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Property Merge 90</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Property Merge 90</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,35 +40,50 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
- <li>GTL Boostcon 2009 Paper</li>
- <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
                                 Presentation</a></li>
- <li>Performance Analysis</li>
- <li>Layout Versus Schematic Tutorial</li>
- <li>Minkowski Sum Tutorial</li>
- </ul>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+</ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Property Merge 90</h1>
 
 <p>
-<p>The following is the declaration of the property merge algorithm.<p>
+</p><p>The following is the declaration of the property merge algorithm.</p><p>
 <font face="Courier New">template &lt;typename coordinate_type, typename
-property_type&gt;<br>
-class property_merge_90;</font><p>The property algorithm computes the n-layer
+property_type&gt;<br />
+class property_merge_90;</font></p><p>The property algorithm computes the n-layer
 map overlay of input polygon sets.&nbsp; Each input geometry is inserted along
 with a property value.&nbsp; The property type can be anything suitable for use
 as an element of a std::set.&nbsp; Multiple geometry objects can be separately
@@ -72,13 +91,13 @@
 operation a fairly complex container is required.&nbsp; Resulting geometries are
 associated with unique subsets of property values of the input geometry.&nbsp;
 Two suitable containers for storing the result of a property merge operation
-are:<p><font face="Courier New">std::map&lt;std::set&lt;property_type&gt;, polygon_90_set_data&lt;coordinate_type&gt;
-&gt;<br>
-std::map&lt;std::vector&lt;property_type&gt;, polygon_90_set_data&lt;coordinate_type&gt; &gt;</font><p>
+are:</p><p><font face="Courier New">std::map&lt;std::set&lt;property_type&gt;, polygon_90_set_data&lt;coordinate_type&gt;
+&gt;<br />
+std::map&lt;std::vector&lt;property_type&gt;, polygon_90_set_data&lt;coordinate_type&gt; &gt;</font></p><p>
 Example code property_merge_usage.cpp
- demonstrates using the n-layer map-overlay algorithm on polygon 90 data.<h2>Member Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
+ demonstrates using the n-layer map-overlay algorithm on polygon 90 data.</p><h2>Member Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">property_merge_90</font></b><font face="Courier New">()</font></td>
                 <td>Default constructor. </td>
         </tr>
@@ -89,7 +108,7 @@
         </tr>
         <tr>
                 <td width="586">
-<font face="Courier New">void <br><b>insert</b>(const polygon_90_set_data&lt;coordinate_type&gt;&amp; ps,<br>
+<font face="Courier New">void <br /><b>insert</b>(const polygon_90_set_data&lt;coordinate_type&gt;&amp; ps,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 const property_type&amp; property)</font></td>
                 <td>I<font face="Times New Roman">nsert a polygon set with an associated
@@ -98,8 +117,8 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;class GeoObjT&gt;<br>
-void <b>insert</b>(const GeoObjT&amp; geoObj,<br>
+template &lt;class GeoObjT&gt;<br />
+void <b>insert</b>(const GeoObjT&amp; geoObj,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 const property_type&amp; property)</font></td>
                 <td>Insert a geometry object that is a refinement of polygon 90 set with
@@ -108,24 +127,24 @@
         <tr>
                 <td width="586">
 <font face="Courier New">
-template &lt;typename result_type&gt;<br>
+template &lt;typename result_type&gt;<br />
 void <b>merge</b>(result_type&amp; result)</font></td>
                 <td>Accepts a container object that conforms to the expectations defined
                 above.&nbsp; Performs property merge and populates the container
                 object.&nbsp; O(n log n) runtime wrt. vertices + intersections.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table2">
+<table class="docinfo" id="table2" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -138,6 +157,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Modified: branches/release/libs/polygon/doc/gtl_rectangle_concept.htm
==============================================================================
--- branches/release/libs/polygon/doc/gtl_rectangle_concept.htm (original)
+++ branches/release/libs/polygon/doc/gtl_rectangle_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,14 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Rectangle Concept</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Rectangle Concept</title>
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
@@ -20,6 +22,8 @@
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
                         <li>Point Concept</li>
+ <li>Segment Concept</li>
+
                         <li>Rectangle Concept</li>
                         <li>Polygon 90 Concept</li>
                         <li>Polygon 90 With Holes Concept</li>
@@ -36,6 +40,18 @@
                         <li>Property Merge 90</li>
                         <li>Property Merge 45</li>
                         <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
@@ -45,31 +61,35 @@
              <li>Performance Analysis</li>
                 <li>Layout Versus Schematic Tutorial</li>
                         <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
+
         </ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>Rectangle Concept</h1>
 
 <p>
-<p>The rectangle concept tag is <font face="Courier New">
+</p><p>The rectangle concept tag is <font face="Courier New">
 rectangle_concept</font></p>
 <p>
 To register a user defined type as a model of
 <font face="Times New Roman">rectangle </font>concept, specialize the
 geometry concept meta-function for that type.&nbsp; In the example below CRectangle is registered as a model of
-rectangle&nbsp; concept.<p>
-<font face="Courier New">template &lt;&gt;<br>
-struct geometry_concept&lt;CRectangle&gt; { typedef rectangle_concept type; };</font><p>
+rectangle&nbsp; concept.</p><p>
+<font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;CRectangle&gt; { typedef rectangle_concept type; };</font></p><p>
 <font face="Times New Roman">The semantic of a rectangle is that it has an x and
 a y interval and these intervals conform to the semantic of an interval
 including its invariant.&nbsp; This invariant on the intervals of a rectangle is enforced by the generic library functions that
@@ -77,7 +97,7 @@
 mapping of that data type to the rectangle concept through its traits.&nbsp; In
 this way a boost::tuple&lt;int, int, int, int&gt; or boost::array&lt;int, 4&gt;
 could be made models of rectangle by simply providing indirect access to their
-elements through traits.</font><p>
+elements through traits.</font></p><p>
 <font face="Times New Roman">Below is shown the default rectangle traits.&nbsp;
 Specialization of these traits is required for types that don't conform to the
 default behavior.&nbsp; The interested reader will note SFINAE is used on the
@@ -86,103 +106,104 @@
 necessary when refinements of concepts are used and it is undesirable to attempt
 to match default traits to non-rectangle types at compile time.&nbsp;
 Specializing rectangle_traits can be done easily by simply providing gtl_yes as
-the enable parameter.</font><p>
-<font face="Courier New">template &lt;typename T, typename enable = gtl_yes&gt;<br>
-struct rectangle_traits {};</font><p>
-<font face="Courier New">template &lt;typename T&gt;<br>
-struct rectangle_traits&lt;T, gtl_no&gt; {};<br>
-<br>
-template &lt;typename T&gt;<br>
+the enable parameter.</font></p><p>
+<font face="Courier New">template &lt;typename T, typename enable = gtl_yes&gt;<br />
+struct rectangle_traits {};</font></p><p>
+<font face="Courier New">template &lt;typename T&gt;<br />
+struct rectangle_traits&lt;T, gtl_no&gt; {};<br />
+<br />
+template &lt;typename T&gt;<br />
 struct rectangle_traits&lt;T, typename gtl_same_type&lt;typename T::interval_type,
-typename T::interval_type&gt;::type&gt; {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br>
-&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::interval_type interval_type;<br>
+typename T::interval_type&gt;::type&gt; {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::coordinate_type coordinate_type;<br />
+&nbsp;&nbsp;&nbsp;&nbsp; typedef typename T::interval_type interval_type;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline interval_type get(const T&amp; rectangle,
-orientation_2d orient) {<br>
+orientation_2d orient) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return
-rectangle.get(orient); }<br>
-};<br>
-<br>
-template &lt;typename T&gt;<br>
-struct rectangle_mutable_traits {<br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename T2&gt;<br>
+rectangle.get(orient); }<br />
+};<br />
+<br />
+template &lt;typename T&gt;<br />
+struct rectangle_mutable_traits {<br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename T2&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline void set(T&amp; rectangle, orientation_2d
-orient, const T2&amp; interval) {<br>
+orient, const T2&amp; interval) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rectangle.set(orient,
-interval); }<br>
-&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename T2, typename T3&gt;<br>
+interval); }<br />
+&nbsp;&nbsp;&nbsp;&nbsp; template &lt;typename T2, typename T3&gt;<br />
 &nbsp;&nbsp;&nbsp;&nbsp; static inline T construct(const T2&amp; interval_horizontal,
-const T3&amp; interval_vertical) {<br>
+const T3&amp; interval_vertical) {<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return
-T(interval_horizontal, interval_vertical); }<br>
-};</font><h2>Functions</h2>
-<table border="1" width="100%" id="table1">
- <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+T(interval_horizontal, interval_vertical); }<br />
+};</font></p><h2>Functions</h2>
+<table id="table1" border="1" width="100%">
+ <tbody><tr>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 interval_type <b>get</b>(const T&amp; rectangle, orientation_2d)</font></td>
                 <td><font face="Times New Roman">Expects a model of rectangle.&nbsp;
                 Returns the x interval or y interval of the rectangle, depending on the
- orientation_2d value.</font><font face="Courier New"><br>
+ orientation_2d value.</font><font face="Courier New"><br />
 &nbsp;</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coordinate_type&gt;<br>
+ coordinate_type&gt;<br />
                 void <b>set</b>(T&amp; rectangle, orientation_2d, coordinate_type)</font></td>
                 <td><font face="Times New Roman">Expects a model of rectangle.&nbsp;&nbsp;
                 Sets the x interval or y interval of the rectangle to the
                 coordinate, depending on the orientation_2d value.</font></td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 interval_type <b>get</b>(const T&amp; rectangle, orientation_2d,
- <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; direction_1d)</font></td>
- <td><font face="Times New Roman">Expects a model of rectangle.&nbsp;
- Returns the coordinate specificed by the direction_1d value of the x interval or y interval of the rectangle, depending on the
- orientation_2d value.</font><font face="Courier New"><br>
+ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; direction_1d)</font></td>
+ <td><font face="Times New Roman">Expects
+a model of rectangle.&nbsp; Returns the coordinate specificed by the
+direction_1d value of the x interval or y interval of the rectangle,
+depending on the orientation_2d value.</font><font face="Courier New"><br />
 &nbsp;</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- coordinate_type&gt;<br>
- void <b>set</b>(T&amp; rectangle, orientation_2d, direction_1d, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type)</font></td>
+ coordinate_type&gt;<br />
+ void <b>set</b>(T&amp; rectangle, orientation_2d, direction_1d, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type)</font></td>
                 <td><font face="Times New Roman">Expects a model of rectangle.&nbsp;&nbsp;
                 Sets the coordinate specified by the direction_1d value of the x interval or y interval of the rectangle to the
                 coordinate, depending on the orientation_2d value.</font></td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T <b>construct</b>(const T2&amp; h, const T2&amp; v)</font></td>
                 <td>Construct an object that is a model of rectangle given x interval
                 and y intervals.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- T2&gt;<br>
- T <b>construct</b>(coordinate_type xl, coordinate_type yl, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type
+ T2&gt;<br />
+ T <b>construct</b>(coordinate_type xl, coordinate_type yl, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type
                 xh, coordinate_type yh)</font></td>
                 <td>Construct an object that is a model of rectangle given four coordinate values.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>assign</b>(T1&amp; left, const T2&amp; right)</font></td>
                 <td>Copies data from right object that models rectangle into left object
                 that models rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>equivalence</b>(const T&amp; rectangle1, </font>
- <br><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const T2&amp; rectangle2)</font></td>
+ <br /><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const T2&amp; rectangle2)</font></td>
                 <td>Given two objects that model rectangle, compares and returns true if
                 their x and y intervals are respectively equivalent.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br>
+ typename point_type&gt;<br />
+ bool <b>contains</b>(const T&amp;, const point_type&amp; point, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch=true)</font></td>
                 <td>Given an object that models rectangle and an object that models
@@ -193,8 +214,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>contains</b>(const T1&amp; a, const T2&amp; b, <br>
+ T2&gt;<br />
+ bool <b>contains</b>(const T1&amp; a, const T2&amp; b, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch = true) </font></td>
                 <td>Returns true if model of rectangle a contains both intervals of
@@ -202,170 +223,174 @@
                 consider rectangle b contained even if it touches the boundary of a.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 interval_type <b>horizontal</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the x interval of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 interval_type <b>vertical</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the y interval of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_type <b>xl</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the west coordinate of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_type <b>xh</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the east coordinate of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_type <b>yl</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the south coordinate of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_type <b>yh</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the north coordinate of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_type <b>ll</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the lower left corner point of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_type <b>lr</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the lower right corner point of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_type <b>ul</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the upper left corner point of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 point_type <b>ur</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the upper right corner point of an object that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">// get the center coordinate<br>
- template &lt;typename T, typename point_type&gt;<br>
+ <td width="586"><font face="Courier New">// get the center coordinate<br />
+ template &lt;typename T, typename point_type&gt;<br />
                 void <b>center</b>(point_type&amp; p, const T&amp; rectangle)</font></td>
                 <td>Sets object that models point to the center point of an object that models rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename interval_type&gt;<br>
+ typename interval_type&gt;<br />
                 void <b>horizontal</b>(T&amp; rectangle, const interval_type&amp; i)</font></td>
                 <td>Sets the x interval of the object that models rectangle to be equal
                 to the value of an object that models interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename interval_type&gt;<br>
+ typename interval_type&gt;<br />
                 void <b>vertical</b>(T&amp; rectangle, const interval_type&amp; i )</font></td>
                 <td>Sets the y interval of the object that models rectangle to be equal
                 to the value of an object that models interval.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type&gt;<br>
+ rectangle_type&gt;<br />
                 void <b>xl</b>(rectangle_type&amp; rectangle, coordinate_type )</font></td>
                 <td>Sets the west coordinate of the object that models rectangle to be equal
                 to the coordinate value.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type&gt;<br>
+ rectangle_type&gt;<br />
                 void <b>xh</b>(rectangle_type&amp; rectangle, coordinate_type )</font></td>
                 <td>Sets the east coordinate of the object that models rectangle to be equal
                 to the coordinate value.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type&gt;<br>
+ rectangle_type&gt;<br />
                 void <b>yl</b>(rectangle_type&amp; rectangle, coordinate_type )</font></td>
                 <td>Sets the south coordinate of the object that models rectangle to be equal
                 to the coordinate value.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type&gt;<br>
+ rectangle_type&gt;<br />
                 void <b>yh</b>(rectangle_type&amp; rectangle, coordinate_type )</font></td>
                 <td>Sets the north coordinate of the object that models rectangle to be equal
                 to the coordinate value.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename T1, typename T2&gt;<br>
+ typename T1, typename T2&gt;<br />
                 T&amp; <b>set_points</b>(T&amp; rectangle, const T1&amp; p1, const T2&amp; p2)</font></td>
                 <td>Sets the rectangle to the rectangle fully described by the points p1
                 and p2.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_difference <b>delta</b>(const T&amp; rectangle,
- <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d)</font></td>
+ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+orientation_2d)</font></td>
                 <td>Returns the delta of the interval specified by orientation_2d of an object
                 that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 manhattan_area_type <b>area</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the area of an object
                 that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_difference <b>half_perimeter</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the length plus width of an object
                 that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 coordinate_difference <b>perimeter</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the perimeter length of an object
                 that models rectangle.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 orientation_2d <b>quess_orientation</b>(const T&amp; rectangle)</font></td>
                 <td>Returns the orientation in which the rectangle has a longer delta.&nbsp;
                 Returns HORIZONTAL if the rectangle is a square.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type&gt;<br>
- rectangle_type&amp; <b>transform</b>(rectangle_type&amp; rectangle,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_type axis = 0)</font></td>
+ rectangle_type&gt;<br />
+ rectangle_type&amp; <b>transform</b>(rectangle_type&amp; rectangle,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+coordinate_type axis = 0)</font></td>
                 <td>Applies transform() on the two points that fully describe the
                 rectangle and sets the rectangle to that described by the result of
                 transforming those points.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type&gt;<br>
- rectangle_type&amp; <b>scale_up</b>(rectangle_type&amp; rectangle, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type factor)</font></td>
+ rectangle_type&gt;<br />
+ rectangle_type&amp; <b>scale_up</b>(rectangle_type&amp; rectangle, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+unsigned_area_type factor)</font></td>
                 <td>Scales up x interval and y interval&nbsp; of an object that models
                 rectangle by unsigned factor.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type&gt;<br>
- rectangle_type&amp; <b>scale_down</b>(rectangle_type&amp; rectangle, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned_area_type factor)</font></td>
+ rectangle_type&gt;<br />
+ rectangle_type&amp; <b>scale_down</b>(rectangle_type&amp; rectangle, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+unsigned_area_type factor)</font></td>
                 <td>Scales down x interval and y interval&nbsp; of an object that models
                 rectangle by unsigned factor.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type, scaling_type&gt;<br>
- rectangle_type&amp; <b>scale</b>(rectangle_type&amp; rectangle,<br>
+ rectangle_type, scaling_type&gt;<br />
+ rectangle_type&amp; <b>scale</b>(rectangle_type&amp; rectangle,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 const scaling_type&amp; scaling) </font></td>
                 <td>Applies scale() on the two points that fully describe the rectangle
@@ -373,33 +398,33 @@
                 those points.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
- T&amp; <b>move</b>(T&amp; rectangle, orientation_2d,<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
+ T&amp; <b>move</b>(T&amp; rectangle, orientation_2d,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
                 <td>Adds displacement value to interval indicated by orientation_2d of an
                 object that models rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type, typename point_type&gt;<br>
- rectangle_type&amp; <b>convolve</b>(rectangle_type&amp; rectangle,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ rectangle_type, typename point_type&gt;<br />
+ rectangle_type&amp; <b>convolve</b>(rectangle_type&amp; rectangle,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Convolves coordinate values of point with x interval and y interval&nbsp; of an
                 object that models rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename
- rectangle_type, typename point_type&gt;<br>
- rectangle_type&amp; <b>deconvolve</b>(rectangle_type&amp; rectangle,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const point_type&amp; point)</font></td>
+ rectangle_type, typename point_type&gt;<br />
+ rectangle_type&amp; <b>deconvolve</b>(rectangle_type&amp; rectangle,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const point_type&amp; point)</font></td>
                 <td>Deconvolves coordinate values of point withx interval and y interval&nbsp; of
                 an object that models rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>convolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Convolves x interval&nbsp; of b with x interval&nbsp; of a and
                 convolves y
@@ -407,14 +432,14 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>deconvolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Deconvolves x interval&nbsp; of b with x interval&nbsp; of a and
                 deconvolves y interval&nbsp; of b with y interval&nbsp; of a. </td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>reflected_convolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Reflected convolves y interval&nbsp; of b with x interval&nbsp; of a and
                 reflected convolves x
@@ -422,15 +447,15 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T1&amp; <b>reflected_deconvolve</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Reflected deconvolves y interval&nbsp; of b with x interval&nbsp; of a and
                 reflected deconvolves x interval&nbsp; of b with y interval&nbsp; of a.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- coordinate_difference <b>euclidean_distance</b>(const T&amp;,<br>
+ typename point_type&gt;<br />
+ coordinate_difference <b>euclidean_distance</b>(const T&amp;,<br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const point_type&amp; point,
                 orienation_2d)</font></td>
                 <td>Returns the distance from an object that models rectangle to an
@@ -439,8 +464,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1,
- typename T2&gt;<br>
- coordinate_difference <b>euclidean_distance</b>(const T1&amp; a,<br>
+ typename T2&gt;<br />
+ coordinate_difference <b>euclidean_distance</b>(const T1&amp; a,<br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const T2&amp; b, orienation_2d)</font></td>
                 <td>Returns the distance from an object that models rectangle to an
                 object that models rectangle along the given orientation.&nbsp; Returns
@@ -448,8 +473,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- coordinate_difference <b>square_euclidean_distance</b>(const T&amp;,<br>
+ typename point_type&gt;<br />
+ coordinate_difference <b>square_euclidean_distance</b>(const T&amp;,<br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const point_type&amp; point)</font></td>
                 <td>Returns the square of the Euclidean distance between a point and a
                 rectangle.&nbsp; Returns zero if the point is contained within the
@@ -457,50 +482,50 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1,
- typename T2&gt;<br>
- coordinate_difference <b>square_euclidean_distance</b><br>
+ typename T2&gt;<br />
+ coordinate_difference <b>square_euclidean_distance</b><br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (const T1&amp; a, const T2&amp; b)</font></td>
                 <td>Returns the square of the Euclidean distance between rectangles a
                 and b.&nbsp; Returns zero if the rectangles intersect.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- coordinate_difference <b>manhattan_distance</b>(const T&amp;,<br>
+ typename point_type&gt;<br />
+ coordinate_difference <b>manhattan_distance</b>(const T&amp;,<br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const point_type&amp; point)</font></td>
                 <td>Returns the Manhattan distance between a point and a rectangle.&nbsp;
                 Returns zero if the point is contained within the rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1,
- typename T2&gt;<br>
- coordinate_difference <b>manhattan_distance</b>(const T1&amp; a, <br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T2&amp; b)</font></td>
+ typename T2&gt;<br />
+ coordinate_difference <b>manhattan_distance</b>(const T1&amp; a, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const T2&amp; b)</font></td>
                 <td>Returns the Manhattan distance between rectangles a and b.&nbsp;
                 Returns zero if the rectangles intersect.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T,
- typename point_type&gt;<br>
- coordinate_distance <b>euclidean_distance</b>(const T&amp;,<br>
+ typename point_type&gt;<br />
+ coordinate_distance <b>euclidean_distance</b>(const T&amp;,<br />
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const point_type&amp; point)</font></td>
                 <td>Returns the Euclidean distance between a point and a rectangle.&nbsp;
                 Returns zero if the point is contained within the rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1,
- typename T2&gt;<br>
- coordinate_distance <b>euclidean_distance</b>(const T1&amp; a, <br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- const T2&amp; b)</font></td>
+ typename T2&gt;<br />
+ coordinate_distance <b>euclidean_distance</b>(const T1&amp; a, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const T2&amp; b)</font></td>
                 <td>Returns the Euclidean distance between rectangles a and b.&nbsp;
                 Returns zero if the rectangles intersect.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>intersects</b>(const T1&amp; a, const T2&amp; b, <br>
+ T2&gt;<br />
+ bool <b>intersects</b>(const T1&amp; a, const T2&amp; b, <br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch = true)</font></td>
                 <td>Returns true if two objects that model rectangle overlap.&nbsp; If
@@ -509,10 +534,10 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>boundaries_intersect</b>(const T1&amp; a, const T2&amp; b, <br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- bool consider_touch = true)</font></td>
+ T2&gt;<br />
+ bool <b>boundaries_intersect</b>(const T1&amp; a, const T2&amp; b, <br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+bool consider_touch = true)</font></td>
                 <td>Returns true is two objects that model rectangle partially overlap
                 such that one there is an intersection between the edges of the two
                 rectangles&nbsp; If the consider_touch flag is true a coordinate is
@@ -521,8 +546,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>abuts</b>(const T1&amp; a, const T2&amp; b,<br>
+ T2&gt;<br />
+ bool <b>abuts</b>(const T1&amp; a, const T2&amp; b,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; direction_2d dir)
                 </font></td>
                 <td>Returns true if rectangle b abuts but down not overlap rectangle a
@@ -530,8 +555,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>abuts</b>(const T1&amp; a, const T2&amp; b,<br>
+ T2&gt;<br />
+ bool <b>abuts</b>(const T1&amp; a, const T2&amp; b,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d)
                 </font></td>
                 <td>Returns true if rectangle b abuts but down not overlap rectangle a
@@ -539,15 +564,15 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>abuts</b>(const T1&amp; a, const T2&amp; b)</font></td>
                 <td>Returns true if rectangle b abuts but down not overlap rectangle a
                 on any side.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>intersect</b>(T1&amp; a, const T2&amp; b, orientation_2d<br>
+ T2&gt;<br />
+ bool <b>intersect</b>(T1&amp; a, const T2&amp; b, orientation_2d<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch = true) </font></td>
                 <td>Sets rectangle a to the intersection of rectangle a and interval b
@@ -558,8 +583,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
- bool <b>intersect</b>(T1&amp; a, const T2&amp; b,<br>
+ T2&gt;<br />
+ bool <b>intersect</b>(T1&amp; a, const T2&amp; b,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 bool consider_touch = true) </font></td>
                 <td>Sets rectangle a to the intersection of rectangle a and rectangle b
@@ -569,84 +594,84 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 T&amp; <b>generalized_intersect</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>Same as intersect, but if they do not intersect set a to the
                 rectangle between a and b by applying generalized_intersect() on the
                 intervals of the rectangles.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; rectangle, coordinate_type)</font></td>
                 <td>Bloats x and y intervals of rectangle by coordinate value.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; rectangle, direction_2d, coordinate_type)</font></td>
                 <td>Bloats side of rectangle specified by direction_2d by coordinate
                 value.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>bloat</b>(T&amp; rectangle, orientation_2d, coordinate_type)</font></td>
                 <td>Bloats interval of rectangle specified by orientation_2d by
                 coordinate value.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; rectangle, coordinate_type)</font></td>
                 <td>Shrinks x and y intervals of rectangle by coordinate value.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; rectangle, direction_2d, coordinate_type)</font></td>
                 <td>Shrinks side of rectangle specified by direction_2d by coordinate
                 value.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T&gt;<br />
                 T&amp; <b>shrink</b>(T&amp; rectangle, orientation_2d, coordinate_type)</font></td>
                 <td>Shrinks interval of rectangle specified by orientation_2d by
                 coordinate value.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<br>
+ T2&gt;<br />
                 bool <b>encompass</b>(T1&amp; a, const T2&amp; b)</font></td>
                 <td>The x and y intervals of a are set to encompass the x and y
                 intervals of b respectively.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- point_type&gt;<br>
+ point_type&gt;<br />
                 bool <b>encompass</b>(T&amp; rectangle, const point_type&amp; point)</font></td>
                 <td>The x and y intervals of rectangle are set to encompass the x and y
                 coordinates of point respectively.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- interval_type&gt;<br>
+ interval_type&gt;<br />
                 bool <b>encompass</b>(T&amp; rectangle, const interval_type&amp; i,
- <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d)</font></td>
+ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation_2d)</font></td>
                 <td>The interval of rectangle specified by orientation_2d is set to encompass the
                 interval i.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T, typename
- point_type&gt;<br>
+ point_type&gt;<br />
                 bool <b>get_corner</b>(point_type&amp; point, const T&amp; rectangle,&nbsp;
- <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 direction_2d, direction_1d)</font></td>
                 <td>Sets point to the corner of the rectangle you reach if you look at
                 its side specified by direction_2d from within the rectangle and turn in
                 the direction_1d direction (low == left, high = right).&nbsp; Always
                 returns true.</td>
         </tr>
-</table>
+</tbody></table>
         <h1>Rectangle Data</h1>
 
 <p>
-<p>The library provides a model of rectangle concept declared
+</p><p>The library provides a model of rectangle concept declared
 <font face="Courier New">
 template&lt;typename T&gt; rectangle_data </font>where T is the coordinate type.</p>
 <p>This data type is used internally when a rectangle is needed and is available
@@ -654,8 +679,8 @@
 instead of providing their own.&nbsp; The data type is implemented to be
 convenient to use with the library traits.</p>
 <h2>Members</h2>
-<table border="1" width="100%" id="table2">
- <tr>
+<table id="table2" border="1" width="100%">
+ <tbody><tr>
                 <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
                 <td><font face="Times New Roman">rectangle_concept</font></td>
         </tr>
@@ -675,8 +700,8 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T1, typename
- T2&gt;<b><br>
- rectangle_data</b>(const T1&amp; horizontal_interval,<br>
+ T2&gt;<b><br />
+ rectangle_data</b>(const T1&amp; horizontal_interval,<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 const T2&amp; vertical_interval)</font></td>
                 <td><font face="Times New Roman">Constructs a rectangle with two objects
@@ -694,19 +719,19 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>rectangle_data& <b>
+ <br /> </b>rectangle_data&amp; <b>
                 operator=</b>(const T2&amp; that) const</font></td>
                 <td>Assign from an object that is a model of rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator==</b>(const T2&amp; that) const</font></td>
                 <td>Compare equality to an object that is a model of rectangle.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template &lt;typename T2&gt;<b>
- <br> </b>bool<b>
+ <br /> </b>bool<b>
                 operator!=</b>(const T2&amp; that) const</font></td>
                 <td>Compare inequality to an object that is a model of rectangle.</td>
         </tr>
@@ -716,35 +741,35 @@
                 <td>Get the interval in the given orientation.</td>
         </tr>
         <tr>
- <td width="586"><font face="Courier New">template &lt;typename T2&gt;<br>
+ <td width="586"><font face="Courier New">template &lt;typename T2&gt;<br />
                 void <b>set</b>(orientation_2d orient, const T2&amp; value)</font></td>
                 <td>Sets the interval in the given orientation to the value of an object
                 that models interval.</td>
         </tr>
- </table>
- <tr>
+ </tbody></table>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
+<table class="docinfo" id="table8" frame="void" rules="none">
+ <colgroup>
+ <col class="docinfo-name" /><col class="docinfo-content" />
+ </colgroup>
+ <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Intel Corporation 2008-2010.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software License,
+ Version 1.0. (See accompanying file <tt class="literal">
+ <span class="pre">LICENSE_1_0.txt</span></tt> or copy at
+ <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+ http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+</tbody></table>
 
-<table class="docinfo" rules="none" frame="void" id="table3">
- <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
- </colgroup>
- <tbody vAlign="top">
- <tr>
- <th class="docinfo-name">Copyright:</th>
- <td>Copyright © Intel Corporation 2008-2010.</td>
- </tr>
- <tr class="field">
- <th class="docinfo-name">License:</th>
- <td class="field-body">Distributed under the Boost Software License,
- Version 1.0. (See accompanying file <tt class="literal">
- <span class="pre">LICENSE_1_0.txt</span></tt> or copy at
- <a class="reference" target="_top" href="
http://www.boost.org/LICENSE_1_0.txt">
- http://www.boost.org/LICENSE_1_0.txt>)</td>
- </tr>
-</table>
-
-</html>
\ No newline at end of file
+</td></tr></tbody></table>
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/gtl_segment_concept.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/gtl_segment_concept.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,572 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
+<!--
+ Copyright 2009-2010 Intel Corporation
+ license banner
+--><title>Boost Polygon Library: Segment Concept</title>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body>
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+
+ <tbody>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;"> </a> </div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Contents</h3>
+ <ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept<br />
+ </li>
+ <li>Segment Concept</li>
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+ </a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+ </a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+ </ul>
+ </div>
+ <h3 class="navbar">Polygon Sponsor</h3>
+ <div style="padding: 5px;" align="center"> <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;"> </a> </div>
+ </td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%"><!-- End Header --><br />
+ <p> </p>
+ <h1>Segment Concept</h1>
+ <p> </p>
+ <p> The segment concept tag is <font face="Courier New">segment_concept</font></p>
+ <p> To register a user defined type as a model of the segment
+concept, specialize the geometry concept meta-function for that
+type.&nbsp; In the example below CSegment is registered as a model of
+the segment concept.</p>
+ <p> <font face="Courier New">template &lt;&gt;<br />
+struct geometry_concept&lt;</font>CSegment<font face="Courier New">&gt;
+{ typedef segment_concept type; };</font></p>
+ <p> The semantic of a segment is
+that it has a low and high point.&nbsp; A
+std::pair&lt;Point, Point&gt;,
+boost::tuple&lt;Point, Point&gt; or boost::array&lt;Point, 2&gt; could all be made models of
+segment by simply providing indirect access to their elements through
+traits, however, these objects cannot be made a model of both segment
+and rectangle in the same compilation unit, for obvious reason that
+duplicate specialization of the geometry_concept struct is illegal, but
+also because it would make overloading generic function by concept
+ambiguous if a type modeled more than one concept.</p>
+ <p> Below is shown the default
+segment traits. Specialization of these traits is required for
+types that don't conform to the default behavior.</p>
+
+
+ <p><span style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment&gt;</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">struct segment_traits {</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; typedef typename Segment::coordinate_type coordinate_type;</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; typedef typename Segment::point_type point_type;</span><br style="font-family: Courier New,Courier,monospace;" />
+ <br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; static inline point_type get(const Segment&amp; segment, direction_1d dir) {</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; return segment.get(dir);</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; }</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">};</span><br />
+ <br /><span style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment&gt;<br />
+struct segment_mutable_traits {<br />
+&nbsp; typedef typename segment_traits&lt;Segment&gt;::point_type point_type;<br />
+<br />
+&nbsp; static inline void set(Segment&amp; segment, direction_1d dir, const point_type&amp; point) {<br />
+&nbsp;&nbsp;&nbsp; segment.set(dir, p);<br />
+&nbsp; }<br />
+ <br />
+&nbsp; static inline Segment construct(const point_type&amp; low, const point_type&amp; high) {<br />
+&nbsp;&nbsp;&nbsp; return Segment(low, high);<br />
+&nbsp; }<br />
+};</span></span></p><h2>Functions</h2>
+ <table style="width: 100%;" id="table1" border="1">
+ <tbody>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename Segment&gt;<br />point_type <b>get</b>(const Segment&amp; segment, direction_1d dir)</font></td>
+ <td>Returns the low or high endpoint of an object that models segment, depending on
+the direction_1d value.<font face="Courier New">&nbsp;</font></td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><font face="Courier New">Segment</font><font face="Courier New">, typename Point&gt;<br />
+void <b>set</b>(</font><font face="Courier New">Segment</font><font face="Courier New">&amp; segment, direction_1d dir,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Point&amp; </font><span style="font-family: Courier New;">point</span><font face="Courier New">)</font></td>
+ <td>Sets
+the low or high endpoint of an object that models segment to an object
+that models point, depending on the direction_1d value.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template &lt;typename Segment, typename Point1, typename Point2&gt;<br />
+Segment<b> construct</b>(const Point1&amp; low, const Point2&amp; high)</font></td>
+ <td>Constructs an object that is a model of segment given the two objects that are models of point.</td>
+ </tr>
+ <tr>
+ <td><font face="Courier New">template &lt;typename Segment1, typename </font><font face="Courier New">Segment2</font><font face="Courier New">&gt;<br /></font><font face="Courier New">Segment1</font><font face="Courier New"> <span style="font-weight: bold;">copy_construct</span>(const </font><font face="Courier New">Segment2</font><font face="Courier New">&amp; segment)</font></td>
+ <td style="text-align: left;">Copy constructs an object that models segment given another segment.</td>
+ </tr>
+<tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><font face="Courier New">Segment1</font><font face="Courier New">, typename </font><font face="Courier New">Segment2&gt;</font><br />
+ <font face="Courier New">Segment1</font><font face="Courier New">&amp; <b>assign</b>(</font><font face="Courier New">Segment1</font><font face="Courier New">&amp; segment1,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const </font><font face="Courier New">Segment2</font><font face="Courier New">&amp; segment2)</font></td>
+ <td>Copies data from the second object that models segment into
+the first object that models segment.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><font face="Courier New">Segment1</font><font face="Courier New">, typename </font><font face="Courier New">Segment1</font><font face="Courier New">&gt;<br />
+bool <b>equivalence</b>(const </font><font face="Courier New">Segment1</font><font face="Courier New">&amp; segment1,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const </font><font face="Courier New">Segment1</font><font face="Courier New">&amp; segment2)</font></td>
+ <td>Given two objects that model segment, compares and
+returns true if their low and high values are respectively equal.</td>
+ </tr>
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment, typename Point&gt;</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">int <b>orientation</b></span><span style="font-family: Courier New,Courier,monospace;">(const </span><span style="font-family: Courier New,Courier,monospace;">Segment</span><span style="font-family: Courier New,Courier,monospace;">&amp; segment,</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Point&amp; point)</span><br />
+ </td>
+ <td>Implements
+a robust orientation test of two objects that model segment and point.
+Returns 0, if the point is collinear to the segment.<br />
+Returns 1, if the point lies to the left of the segment.<br />
+Returns -1, if the point lies to the right of the segment.<br />
+
+ </td>
+ </tr>
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment1, typename Segment2&gt;</span><br style="font-family: Courier New,Courier,monospace;" />
+
+ <span style="font-family: Courier New,Courier,monospace;">int <b>orientation</b></span><span style="font-family: Courier New,Courier,monospace;">(const </span><span style="font-family: Courier New,Courier,monospace;">Segment1</span><span style="font-family: Courier New,Courier,monospace;">&amp; segment1,</span><br style="font-family: Courier New,Courier,monospace;" />
+
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Segment2&amp; segment2)</span></td>
+ <td>Implements a robust orientation test of two objects
+that model segment. Note: segments are treated as math.
+vectors.<br />
+Returns 0, if segments are collinear.<br />
+Returns 1, if the second segment is CCW oriented to the first segment.<br />
+Returns -1, if the second segment is CW oriented to the first segment.<br />
+ </td>
+ </tr>
+<tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">template &lt;typename </span><font face="Courier New">Segment, typename Point</font><span style="font-family: Courier New,Courier,monospace;">&gt;</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">bool </span><span style="font-weight: bold; font-family: Courier New,Courier,monospace;">contains</span><span style="font-family: Courier New,Courier,monospace;">(const </span><font face="Courier New">Segment</font><span style="font-family: Courier New,Courier,monospace;">&amp; segment,</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; const Point&amp; value,</span><span style="font-family: Courier New,Courier,monospace;"> bool consider_touch)</span><br />
+ </td>
+ <td>Returns true if an object that models segment contains an object that models point, else false.<br />
+ </td>
+ </tr>
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment1, typename Segment2&gt;</span><br style="font-family: Courier New,Courier,monospace;" />
+
+ <span style="font-family: Courier New,Courier,monospace;">bool </span><span style="font-weight: bold; font-family: Courier New,Courier,monospace;">contains</span><span style="font-family: Courier New,Courier,monospace;">(const </span><span style="font-family: Courier New,Courier,monospace;">Segment1</span><span style="font-family: Courier New,Courier,monospace;">&amp; segment1,</span><br style="font-family: Courier New,Courier,monospace;" />
+
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; const </span><span style="font-family: Courier New,Courier,monospace;">Segment</span><span style="font-family: Courier New,Courier,monospace;">2&amp; segment2,</span> <span style="font-family: Courier New,Courier,monospace;">bool consider_touch)</span></td>
+ <td>Returns true if the first object contains the second one, else false. Both objects model segment.<br />
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename <span style="font-family: Courier New,Courier,monospace;">Segment</span>&gt;<br />
+point_type <span style="font-weight: bold;">low</span>(const <span style="font-family: Courier New,Courier,monospace;">Segment</span>&amp; segment)<br />
+ </td>
+ <td>Returns the low endpoint of an object that models segment.<br />
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename <span style="font-family: Courier New,Courier,monospace;">Segment</span>&gt;<br />
+point_type <span style="font-weight: bold;">high</span>(const <span style="font-family: Courier New,Courier,monospace;">Segment</span>&amp; segment)</td>
+ <td>Returns the high endpoint of an object that models segment.<br />
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename <span style="font-family: Courier New,Courier,monospace;">Segment</span>&gt;<br />
+point_type <span style="font-weight: bold;">center</span>(const <span style="font-family: Courier New,Courier,monospace;">Segment</span>&amp; segment)</td>
+ <td>Returns the central point of an object that models segment.<br />
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename <span style="font-family: Courier New,Courier,monospace;">Segment</span>, typename Point&gt;<br />void <span style="font-weight: bold;">low</span>(<span style="font-family: Courier New,Courier,monospace;">Segment</span>&amp; segment, const Point&amp; point)</td>
+ <td>Sets the low endpoint of an object that models segment.<br />
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename <span style="font-family: Courier New,Courier,monospace;">Segment, typename Point</span>&gt;<br />
+void <span style="font-weight: bold;">high</span>(<span style="font-family: Courier New,Courier,monospace;">Segment</span>&amp; segment, const Point&amp; point)</td>
+ <td>Sets the high endpoint of an object that models of segment.<br />
+ </td>
+ </tr>
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">template &lt;typename </span><span style="font-family: Courier New,Courier,monospace;">Segment</span><span style="font-family: Courier New,Courier,monospace;">&gt;</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">distance_type <span style="font-weight: bold;">length</span>(const </span><span style="font-family: Courier New,Courier,monospace;">Segment</span><span style="font-family: Courier New,Courier,monospace;">&amp; segment)</span><br />
+ </td>
+ <td>Returns length of an object that models segment.<br />
+ </td>
+ </tr>
+
+
+
+
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&gt;<br /></font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; <b>scale_up</b>(</font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; </font><font face="Courier New">segment</font><font face="Courier New">, <br />&nbsp;&nbsp;&nbsp; unsigned_area_type factor)</font></td>
+ <td>Multiplies x and y coordinates of both endpoints of an object that models segment by unsigned factor.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&gt;<br />
+ </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; <b>scale_down</b>(</font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; </font><font face="Courier New">segment</font><font face="Courier New">, <br />
+&nbsp;&nbsp;&nbsp; unsigned_area_type factor)</font></td>
+ <td>Divides x and y coordinates of both endpoints of an object that models segment by unsigned factor.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">, typename Scale&gt;<br />
+ </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; <b>scale</b>(</font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; </font><font face="Courier New">segment</font><font face="Courier New">, const Scale&amp; sc) </font></td>
+ <td>Calls
+the scale member function of the scaling type on the low and high endpoint of
+an object that models segment and updates the segment with the
+scaled endpoints.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">, typename Transform&gt;<br /></font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; <b>transform</b>(</font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; segment, const </font><font face="Courier New">Transform</font><font face="Courier New">&amp; tr) </font></td>
+ <td>Calls the transform member function of transform type
+on the low and high endpoints of an object that models segment and updates the segment with the transformed endpoints.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&gt;<br />
+ </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; <b>move</b>(</font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; segment, orientation_2d<br />
+&nbsp;&nbsp;&nbsp; coordinate_difference displacement)</font></td>
+ <td>Adds displacement value to the x or y coordinates of both endpoints of an object
+that models segment indicated by the orientation_2d.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;</font><span style="font-family: Courier New,Courier,monospace;">Segment, Point</span><font face="Courier New">&gt;<br />
+ </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; <b>convolve</b>(</font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; segment, const Point&amp; point)</font></td>
+ <td>Convolves both endpoints of an object that models segment with an object that models a point.<br />
+</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;</font><span style="font-family: Courier New,Courier,monospace;">Segment, Point</span><font face="Courier New">&gt;<br />
+ </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; <b>deconvolve</b>(</font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; segment, const Point&amp; point)</font></td>
+ <td>Deconvolves both endpoints of an object that models segment with an object that models a point. </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment1, typename Segment2&gt;<br />
+
+
+bool <span style="font-weight: bold;">abuts</span>(const Segment1&amp; segment1,<br />
+
+
+&nbsp;&nbsp;&nbsp; const Segment2&amp; segment2, direction_1d dir)</td>
+ <td>Returns true if two objects that model segment abut, depending on the direction_1d value.</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment1, typename Segment2&gt;<br />
+
+bool <span style="font-weight: bold;">abuts</span>(const Segment1&amp; segment1,<br />
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Segment2&amp; segment2)</td>
+ <td>Returns true if two objects that model segment abut: either the first one to the second one or vice versa.</td>
+ </tr>
+
+
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment1, typename Segment2&gt;</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">bool <span style="font-weight: bold;">intersects</span>(const Segment1&amp; segment1,</span><br style="font-family: Courier New,Courier,monospace;" />
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Segment2&amp; segment2,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool consider_touch)</span><br />
+ </td>
+ <td>Returns true if two objects that model segment intersect, else false.<br />
+ </td>
+ </tr>
+
+
+<tr>
+ <td style="font-family: Courier New,Courier,monospace;"><font face="Courier New">template
+&lt;typename </font><span style="font-family: Courier New,Courier,monospace;">Segment, typename Point</span><font face="Courier New">&gt;<br />distance_type <b>euclidean_distance</b>(<br />
+&nbsp;&nbsp;&nbsp; const </font><span style="font-family: Courier New,Courier,monospace;">Segment</span><font face="Courier New">&amp; segment, const Point&amp; point)</font>
+ </td>
+ <td>Returns distance from an object that models segment
+to an object that models point.
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;"><font face="Courier New">template
+&lt;typename Segment1, typename </font><font face="Courier New">Segment2</font><font face="Courier New">&gt;<br />distance_type <b>euclidean_distance</b>(<br />
+&nbsp;&nbsp;&nbsp; const </font><font face="Courier New">Segment1</font><font face="Courier New">&amp; segment1, const </font><font face="Courier New">Segment2</font><font face="Courier New">&amp; segment2)</font>
+ </td>
+ <td>Returns distance between two objects that model segment.
+ </td>
+ </tr>
+
+
+
+
+ </tbody>
+ </table>
+ <h1>Segment Data</h1>
+ <p> </p>
+ <p>The library provides a model of the segment concept declared <font face="Courier New">template&lt;typename T&gt; segment_data</font>, where
+T is the coordinate type.</p>
+ <p>This data type is used internally when a segment is needed and
+is available to the library user, who finds it convenient to use a
+library segment data type instead of providing their own.&nbsp; The data
+type is implemented to be convenient to use with the library traits.</p><h2>Members</h2>
+ <table style="width: 100%;" id="table2" border="1">
+ <tbody>
+ <tr>
+ <td width="586"><b><font face="Courier New">geometry_type</font></b></td>
+ <td>segment_concept</td>
+ </tr>
+ <tr>
+ <td width="586"><b><font face="Courier New">coordinate_type</font></b></td>
+ <td>T</td>
+ </tr>
+ <tr>
+ <td><b><font face="Courier New">point_type</font></b></td>
+ <td>point_data&lt;T&gt;<br />
+ </td>
+ </tr>
+<tr>
+ <td width="586"><font face="Courier New"><b>segment_data</b>()</font></td>
+ <td>Default constructor.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New"><b>segment_data</b>(const point_type&amp; low,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const point_type&amp; high)</font></td>
+ <td>Constructs a segment from the given endpoints.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New"><b>segment_data</b>(const segment_data&amp; that)</font></td>
+ <td>Copy constructor.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">segment_data&amp; <b>operator=</b>(const segment_data&amp; that)</font></td>
+ <td>Assignment operator.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;typename Segment&gt;<b><br />
+ </b>segment_data&amp; <b>operator=</b>(const Segment&amp; that)
+const</font></td>
+ <td>Assign from an object that is a model of segment.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">bool<b> operator==</b>(const segment_data&amp; that) const</font></td>
+ <td>Equality operator overload.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New"><b> </b>bool<b> operator!=</b>(const segment_data&amp; that) const</font></td>
+ <td>Inequality operator overload.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New"><b> </b>bool<b> operator&lt;</b>(const segment_data&amp; that) const</font></td>
+ <td>Less operator overload. Compares low endpoints then high endpoints to break ties.<br />
+</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New"><b> </b>bool<b> operator&lt;=</b>(const segment_data&amp; that) const</font></td>
+ <td>Less or equal operator overload. Compares low endpoints then high endpoints to break ties.<br />
+</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New"><b> </b>bool<b> operator&gt;</b>(const segment_data&amp; that) const</font></td>
+ <td>Greater operator overload. Compares low endpoints then high endpoints to break ties.<br />
+</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New"><b> </b>bool<b> operator&gt;=</b>(const segment_data&amp; that) const</font></td>
+ <td>Greater or equal operator overload. Compares low endpoints then high endpoints to break ties.<br />
+</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">point_type <b>get</b>(direction_1d dir) const</font></td>
+ <td>Retrieves the low/high endpoint considering direction value.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">point_type <span style="font-weight: bold;">low</span>() const</font></td>
+ <td>Retrieves the low endpoint.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">point_type <span style="font-weight: bold;">high</span>() const</font></td>
+ <td>Retrieves the high endpoint.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">void <b>set</b></font><font face="Courier New">(direction_1d dir</font><font face="Courier New">, const point_type&amp; point)</font></td>
+ <td>Sets the endpoint in the given direction.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">segment_data&amp; <span style="font-weight: bold;">low</span>(const point_type&amp; point)</font></td>
+ <td>Sets the low endpoint.</td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">segment_data&amp; <span style="font-weight: bold;">high(</span>const point_type&amp; point)</font></td>
+ <td>Sets the high endpoint.</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h1>Segment Utils</h1>
+ <p> </p>
+ <p>The library provides several algorithms for the manipulation of
+ sets of segment data. In particular, the generalize line segment
+ intersection algorithm used for polygon set operations is exposed
+ through several interfaces to allow it to be used with any
+ collection or sequence of objects that model the <font face="Courier New">segment_concept</font>.
+ </p><h2>Functions</h2>
+ <table style="width: 100%;" id="table2" border="1">
+ <tbody>
+
+
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;</font><font face="Courier New">typename SegmentContainer</font><font face="Courier New">,</font><font face="Courier New"><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typename SegmentIterator</font><font face="Courier New">&gt;<b><br />
+ </b>void <b>intersect_segments</b>(<br />
+&nbsp;&nbsp;&nbsp; </font><font face="Courier New">SegmentContainer* result,</font><br />
+ <font face="Courier New">
+&nbsp;&nbsp;&nbsp; SegmentIterator first,<br />
+&nbsp;&nbsp;&nbsp; SegmentIterator last)
+ </font></td>
+ <td>Accumulates
+the result of splitting the segments in the iterator range at their
+intersection points into the result container. Preconditions: segment
+type used by all the input structures should model segment concept.Postconditions: no segments intersect except at their end
+ points. Useful to satisfy the precondition of voronoi diagram
+ construction.
+ Expected n log n runtime, worst case quadratic runtime wrt. vertices + intersections.
+ </td>
+ </tr>
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;</font><font face="Courier New">typename Segment,</font><font face="Courier New"><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font face="Courier New">typename SegmentIterator</font><font face="Courier New">&gt;<b><br />
+ </b>void <b>intersect_segments</b>(<br />
+&nbsp;&nbsp;&nbsp; </font><font face="Courier New">vector&lt;pair&lt;size_t, Segment&gt;* result,</font><br />
+ <font face="Courier New">
+&nbsp;&nbsp;&nbsp; SegmentIterator first,<br />
+&nbsp;&nbsp;&nbsp; SegmentIterator last)</font></td>
+ <td>Accumulates
+the result of splitting the segments in the iterator range at their
+intersection points into the result container. Preconditions: segment
+type used by all the input structures should model segment concept.
+Postconditions: no segments intersect except at their end points. The
+index of the input segment is paired with each resultant segment that
+was split to produce it to associate the result segments with the
+inputs segments. Expected n log n runtime, worst case quadratic runtime
+wrt. vertices + intersections. </td>
+ </tr>
+
+ <tr>
+ <td width="586"><font face="Courier New">template
+&lt;</font><font face="Courier New">typename Rectangle,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font face="Courier New">typename </font><font face="Courier New">SegmentIterator</font><font face="Courier New">&gt;<b><br />
+ </b>void <span style="font-weight: bold;">envelope_segments</span>(<br />
+&nbsp;&nbsp;&nbsp; </font><font face="Courier New">Rectangle* rect,</font><br />
+ <font face="Courier New">
+&nbsp;&nbsp;&nbsp; </font><font face="Courier New">SegmentIterator first,<br />&nbsp; &nbsp; SegmentIterator last</font><font face="Courier New">)
+ </font></td>
+ <td>Computes
+the bounding rectangle of the iterator range of line segments.
+Preconditions: segment type and rectangle type used by the input
+structures should model segment concept and rectangle concept
+respectively. Linear runtime. </td>
+ </tr>
+
+
+
+
+ </tbody>
+ </table>
+
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top"> &nbsp;</td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+ <table class="docinfo" id="table3" frame="void" rules="none">
+ <colgroup> <col class="docinfo-name" /><col class="docinfo-content" /> </colgroup> <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Intel Corporation 2008-2010.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"> <span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/images/benchmark_points_10.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_points_100.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_points_1000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_points_10000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_points_100000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_points_1000000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_points_all.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_points_memory.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_10.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_100.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_1000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_10000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_100000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_1000000.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_all.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/benchmark_segments_memory.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/rover.jpg
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/vlsi.jpg
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/voronoi.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/voronoi2.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/voronoi3.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/doc/images/voronoi4.png
==============================================================================
Binary file. No diff available.

Modified: branches/release/libs/polygon/doc/index.htm
==============================================================================
--- branches/release/libs/polygon/doc/index.htm (original)
+++ branches/release/libs/polygon/doc/index.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,42 +1,72 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
+<!--
     Copyright 2009-2010 Intel Corporation
     license banner
--->
-<title>Boost Polygon Library: Main Page</title>
- <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
-<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+--><title>Boost Polygon Library: Main Page</title>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/boost.png" width="277" height="86"><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="images/boost.png" border="0" height="86" width="277" /><a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
             </a>
     </div>
     <div style="margin: 5px;">
         <h3 class="navbar">Contents</h3>
         <ul>
             <li>Boost.Polygon Main Page</li>
- <li>Design Overview</li>
- <li>Isotropy</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
             <li>Coordinate Concept</li>
             <li>Interval Concept</li>
- <li>
- Point Concept</li>
- <li>Rectangle Concept</li>
- <li>Polygon 90 Concept</li>
- <li>Polygon 90 With Holes Concept</li>
- <li>Polygon 45 Concept</li>
- <li>Polygon 45 With Holes Concept</li>
- <li>Polygon Concept</li>
- <li>Polygon With Holes Concept</li>
- <li>Polygon 90 Set Concept</li>
- <li>Polygon 45 Set Concept</li>
- <li>Polygon Set Concept</li>
- <li>Connectivity Extraction 90</li>
- <li>Connectivity Extraction 45</li>
- <li>Connectivity Extraction</li>
- <li>Property Merge 90</li>
- <li>Property Merge 45</li>
- <li>Property Merge</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li>Polygon 90 With Holes Concept</li>
+ <li>Polygon 45 Concept</li>
+ <li>Polygon 45 With Holes Concept</li>
+ <li>Polygon Concept</li>
+ <li>Polygon With Holes Concept</li>
+ <li>Polygon 90 Set Concept</li>
+ <li>Polygon 45 Set Concept</li>
+ <li>Polygon Set Concept</li>
+ <li>Connectivity Extraction 90</li>
+ <li>Connectivity Extraction 45</li>
+ <li>Connectivity Extraction</li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br />
+</a></li>
+ <li>Voronoi Benchmark<br />
+ </li>
+
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br />
+</a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br />
+ </li>
+
+
+
+
         </ul>
         <h3 class="navbar">Other Resources</h3>
         <ul>
@@ -46,18 +76,21 @@
              <li>Performance Analysis</li>
                         <li>Layout Versus Schematic Tutorial</li>
                         <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li>Voronoi Advanced Tutorial</li>
         </ul>
     </div>
         <h3 class="navbar">Polygon Sponsor</h3>
     <div style="padding: 5px;" align="center">
- <img border="0" src="images/intlogo.gif" width="127" height="51">
+ <img src="images/intlogo.gif" border="0" height="51" width="127" /><a title="www.adobe.com home page" href="http://www.adobe.com/" tabindex="2" style="border: medium none ;">
+ </a>
     </div>
 </td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 <!-- End Header -->
 
-<br>
+<br />
 <p>
 </p><h1>THE BOOST.POLYGON LIBRARY</h1>
 <p>The Boost.Polygon library provides algorithms focused on manipulating planar
@@ -67,21 +100,38 @@
 An example of the disjoint-union (XOR) of figure a and figure b is shown below
 in figure c.&nbsp;
 These so-called Boolean algorithms are of significant interest in GIS (Geospatial Information
-Systems), VLSI CAD as well al other fields of CAD, and many more application
+Systems), VLSI CAD as well all other fields of CAD, and many more application
 areas, and providing them is the primary focus of this library.&nbsp; The
 Boost.Polygon library is not intended to cover all of computational
 geometry in its scope, and provides a set of capabilities for working with
 coordinates, points, intervals and rectangles that are needed to support
-implementing and interacting with polygon data structures and algorithms.&nbsp; </p><img border="0" src="images/hand.png" width="837" height="277"><p>
-The coordinate data type is a template parameter of all data types and
-algorithms provided by the library, and is expected to be integral.&nbsp;
-Floating point coordinate data types are not supported by the algorithms
-implemented in the library due to the fact that the achieving floating point
-robustness implies a different set of algorithms and generally platform specific
-assumptions about floating point representations.&nbsp;
-For additional detailed discussion of the library and its implementation
-including benchmark comparisons with other open source alternatives please see
-the paper and
+implementing and interacting with polygon data structures and algorithms.&nbsp; </p><img src="images/hand.png" border="0" height="277" width="837" /><p>
+One of the important features of the library is the implementation of
+the generic sweepline algorithm to construct Voronoi diagrams of points and linear segments in 2D (developed
+as part of the GSoC 2010 program). Voronoi diagram data structure has
+applications in image segmentation, optical character recognition,
+nearest neighbor queries execution. It is closely related with the other
+computational geometry concepts: Delaunay triangulation, medial axis,
+straight skeleton, the largest empty circle. The Boost.Polygon library
+provides interface to construct Voronoi diagram of points figure a and
+line segments figure b (the last could be used to discretize any
+two-dimensional curve). Figure c contains the example of the medial axis of the
+non-convex polygon. The implementation outperforms most of the known
+commercial and non-commercial libraries in both efficiency and
+numerical robustness aspects. You may find more details on the topic at the Voronoi main page.<br />
+
+</p>
+<p><img src="images/voronoi.png" border="0" height="300" width="900" /></p>
+<p>The coordinate data type is a template parameter of all data types
+and algorithms provided by the library, and is expected to be integral.
+Floating point coordinate data types are not supported by the
+algorithms implemented in the library due to the fact that the
+achieving floating point robustness implies a different set of
+algorithms and generally platform specific assumptions about floating
+point representations.&nbsp;
+For additional detailed discussion of the library and its
+implementation including benchmark comparisons with other open source
+alternatives please see the paper and
 <a href="GTL_boostcon_draft03.pdf">presentation</a> from
 <a href="http://www.boostcon.com/home">boostcon</a> 2009 as well as a detailed
 <a href="analysis.htm">analysis</a> of the runtime complexity of
@@ -95,40 +145,39 @@
 intended to demonstrate what could be achieved with ease by a C++-concepts based
 library interface, but is implemented based on current language features.&nbsp; This API makes
 the following code snippet that operates on non-library geometry types possible:</p>
-<p:colorscheme
- colors="#ffffff,#000000,#808080,#000000,#bbe0e3,#333399,#009999,#99cc00"/>
+<p:colorscheme colors="#ffffff,#000000,#808080,#000000,#bbe0e3,#333399,#009999,#99cc00">
 
-<div v:shape="_x0000_s1026" class="O">
- <div style="text-align:justify;mso-char-wrap:1;mso-kinsoku-overflow:1">
+</p:colorscheme><div v:shape="_x0000_s1026" class="O">
+ <div style="text-align: justify;">
                 <nobr>
- <span style="font-family: Courier New; mso-ascii-font-family: Courier New; mso-bidi-font-family: Arial; mso-hansi-font-family: Courier New">
- void foo(list&lt;CPolygon&gt;&amp; result, const list&lt;CPolygon&gt;&amp; a, </span></nobr><br>
- <span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="font-family: Courier New;">
+ void foo(list&lt;CPolygon&gt;&amp; result, const list&lt;CPolygon&gt;&amp; a, </span></nobr><br />
+ <span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 </span><nobr>
- <span style="font-family: Courier New; mso-ascii-font-family: Courier New; mso-bidi-font-family: Arial; mso-hansi-font-family: Courier New">
+ <span style="font-family: Courier New;">
                 const list&lt;CPolygon&gt;&amp;
                 b, int deflateValue) { </span></nobr></div>
- <div style="text-align:justify;mso-char-wrap:1;mso-kinsoku-overflow:1">
+ <div style="text-align: justify;">
                 <nobr>
-<span style="font-family: Courier New; mso-ascii-font-family: Courier New; mso-bidi-font-family: Arial; mso-hansi-font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;
+<span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;
                 CBoundingBox domainExtent; </span></nobr></div>
- <div style="text-align:justify;mso-char-wrap:1;mso-kinsoku-overflow:1">
+ <div style="text-align: justify;">
                 <nobr>
- <span style="font-family: Courier New; mso-ascii-font-family: Courier New; mso-bidi-font-family: Arial; mso-hansi-font-family: Courier New">
- <span style="mso-spacerun:yes">&nbsp; </span>&nbsp;&nbsp; using namespace boost::polygon::operators; </span></nobr></div>
- <div style="text-align:justify;mso-char-wrap:1;mso-kinsoku-overflow:1">
+ <span style="font-family: Courier New;">
+ <span style="">&nbsp; </span>&nbsp;&nbsp; using namespace boost::polygon::operators; </span></nobr></div>
+ <div style="text-align: justify;">
                 <nobr>
- <span style="font-family: Courier New; mso-ascii-font-family: Courier New; mso-bidi-font-family: Arial; mso-hansi-font-family: Courier New">
- <span style="mso-spacerun:yes">&nbsp; </span>&nbsp;&nbsp;
+ <span style="font-family: Courier New;">
+ <span style="">&nbsp; </span>&nbsp;&nbsp;
                 boost::polygon::extents(domainExtent, a); </span></nobr></div>
- <div style="text-align:justify;mso-char-wrap:1;mso-kinsoku-overflow:1">
+ <div style="text-align: justify;">
                 <nobr>
- <span style="font-family: Courier New; mso-ascii-font-family: Courier New; mso-bidi-font-family: Arial; mso-hansi-font-family: Courier New">
- <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>result += (b &amp;
+ <span style="font-family: Courier New;">
+ <span style="">&nbsp;&nbsp;&nbsp;&nbsp; </span>result += (b &amp;
                 domainExtent) ^ (a - deflateValue); </span></nobr></div>
- <div style="text-align:justify;mso-char-wrap:1;mso-kinsoku-overflow:1">
+ <div style="text-align: justify;">
                 <nobr>
- <span style="font-family: Courier New; mso-ascii-font-family: Courier New; mso-bidi-font-family: Arial; mso-hansi-font-family: Courier New">
+ <span style="font-family: Courier New;">
                 }</span></nobr></div>
 </div>
 <p>In the code snippet above the hypothetical polygon type CPolygon has been
@@ -139,10 +188,11 @@
 It is considerably more typing to describe this usage of the API than to code
 it, and the description is not much clearer than the code itself.&nbsp;
 A picture is worth a thousand words.</p>
-<p><img border="0" src="images/foo.PNG" width="432" height="371"></p>
-<p>In Boost.Polygon operations such as those shown above are free functions named for what they do, or are overloads of C++ operators that make it
-easy to infer from reading the code what to expect.&nbsp; Operators are
-contained in the namespace <font face="Courier New">boost::polygon::operators</font>
+<p><img src="images/foo.PNG" border="0" height="371" width="432" /></p>
+<p>In Boost.Polygon operations such as those shown above are free
+functions named for what they do, or are overloads of C++ operators
+that make it easy to infer from reading the code what to expect.&nbsp;
+Operators are contained in the namespace <font face="Courier New">boost::polygon::operators</font>
 so that they can be used outside the <font face="Courier New">boost::polygon</font>
 namespace without bringing in the entire <font face="Courier New">boost::polygon</font>
 namespace.&nbsp; Following the
@@ -179,20 +229,27 @@
                 <li>connectivity_extraction_usage.cpp
                 Using the connectivity extraction algorithm to build a connectivity
                 graph on polygons</li>
- <li>property_merge_usage.cpp
+
+ <li>property_merge_usage.cpp
                 Using the n-layer map-overlay algorithm on polygon data</li>
+
     </ul>
 
-<li>Tutorials:
+</li><li>Tutorials:
 <ul>
         <li>Layout Versus Schematic Learn how to
         apply Boost.Polygon capabilities to implement a simplified circuit
         extraction application</li>
         <li>Minkowski Sum Learn how to
         apply Boost.Polygon capabilities to implement Minkowski sum of polygon sets</li>
+ <li>Voronoi Basic Tutorial Learn how
+ to construct, traverse, visualize, associate data with Voronoi diagrams without digging into the library details.</li>
+ <li>Voronoi Advanced Tutorial
+ Learn how to configure the Voronoi builder and Voronoi diagram
+ data structure with the user provided coordinate types. </li>
 </ul>
 
-</ul>
+</li></ul>
 
 
 <p>We would like to thank: Thomas Klimpel, Frank Mori Hess, Barend Gehrels,
@@ -206,17 +263,17 @@
 process and Fernando Cacciola for graciously serving as review manager.</p>
 
 
- <tr>
+ </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     &nbsp;</td>
 <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
 
 
-<table class="docinfo" rules="none" frame="void" id="table2">
+<table class="docinfo" id="table2" frame="void" rules="none">
         <colgroup>
- <col class="docinfo-name"><col class="docinfo-content">
+ <col class="docinfo-name" /><col class="docinfo-content" />
         </colgroup>
- <tbody vAlign="top">
+ <tbody valign="top">
                 <tr>
                         <th class="docinfo-name">Copyright:</th>
                         <td>Copyright © Intel Corporation 2008-2010.</td>
@@ -229,6 +286,6 @@
                         <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
                         http://www.boost.org/LICENSE_1_0.txt>)</td>
                 </tr>
-</table>
+</tbody></table>
 
-</html>
\ No newline at end of file
+</td></tr></tbody></table></body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/voronoi_advanced_tutorial.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_advanced_tutorial.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,462 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Advanced Tutorial</title></head><body>
+<h1>Voronoi Advanced Tutorial<br>
+</h1>
+
+This tutorial consists of two parts. The first one provides two
+examples of a real world problems that default configuration of Voronoi
+library is capable to solve. By default configuration we mean the one
+that accepts
+signed 32-bit integer and outputs floating-point (64-bit
+double) coordinates. We provide those examples to convince even the
+most skeptical users that they probably don't need to configure library
+for higher-precision input or output coordinate types. However if the
+posed problem really requires those, fully featured configuration of
+both input and output coordinate types is provided in the second part
+of this tutorial.<br>
+
+<h2>Red Planet</h2>
+
+<h3>Problem Statement</h3>
+
+<img style="width: 665px; height: 369px;" alt="" src="images/rover.jpg"><br>
+
+<br>Lets imagine that NASA is
+planning to send a new robot to Mars. Each day the center situated on Earth
+will send a destination point coordinates the robot needs to reach by
+the end of the day. Of course we'd like to save as much energy as
+possible thus choosing the shortest possible path. This would be a
+straight line in a perfect world (we don't consider curvature of
+surface), but situation becomes more complicated as there are some
+rocks and wells on Mars our robot can't go through. Behind of those our
+robot has some dimensions that might not allow it to pass narrow places.<br>
+
+<h3>Application of Voronoi diagram</h3>
+
+The problem above could be solved using Voronoi diagram. The first
+stage would be to discretize obstacles (rocks and wells) with
+polylines. Afterwards we will compute Voronoi diagram of the input set
+of segments. As each Voronoi edge is equidistant from the two closest
+sites we are able to filter edges the robot won't be able to pass due
+to it's dimensions. The last step would be to run a bit optimized A*
+algorithm to find
+the shortest or at least suboptimal path and we are done.<br>
+
+<h3>Discretization of input geometries</h3>
+
+To show how good is the default input coordinate type provided by the
+Voronoi library
+we will discretize the whole area of Mars. That will be approximately
+1.44 *&nbsp; 10^8&nbsp; square kilometres that is equal to 1.44 *&nbsp;
+10^18&nbsp; square centimetres, which could be snapped to the integer
+grid with a side of 1.2 * 10^9 centimetres.&nbsp; To make the Voronoi
+graph
+precise on the boundaries of that grid we will replicate input map 9
+times (3x3), thus Voronoi diagram within a central piece will
+provide us with a correct connectivity graph. This step will increase
+the size of our grid to 3.6 * 10^9 centimetres that is less than 2^32.
+So we are able to discretize the Red Planet's surface within a 1
+centimetre
+precision using the default input coordinate type (signed 32-bit
+integer). That would imply maximum absolute error to be
+equal up to 0.5 centimetres per coordinate. Considering the radius of
+our robot to be
+0.3 metres and for security reasons avoiding any large enough obstacles
+that are within 1 metre distance from it that error would be irrelevant.<br>
+
+<span style="color: rgb(0, 0, 0); font-family: sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: rgb(249, 249, 249); display: inline ! important; float: none;"></span>
+<h3>Output analysis</h3>
+
+Estimates of the resulting Voronoi diagram precision were already
+explained
here.
+So to avoid those computations again we will simply state that the
+maximum absolute error of the output geometries will be on the grid
+boundaries and will be equal to 2^-16 centimetres, which is
+approximately equal to 150 nanometres and is 100 times larger than
+a radius of a complex molecule. We would like to notice that the
+absolute error of the discretization step is much higher than the one
+produced by the Voronoi diagram construction algorithm.
+<h2>VLSI Design</h2>
+
+<h3>Problem Statement</h3>
+
+<img style="width: 400px; height: 283px;" alt="" src="images/vlsi.jpg"><br>
+
+<br>
+
+Very-large-scale integration (VLSI) is the
+process of creating
+integrated circuits by combining thousands of transistors into a single
+chip. Considering the fact that it may take weeks or months to get an
+integrated circuit manufactured, designers often spend large amounts of
+time analyzing their layouts to avoid costly mistakes. One of the
+common static analysis checks is minimum distance requirement between
+the components of an integrated circuit (distance should be greater
+than
+specified value).<br>
+
+<h3>Application of Voronoi diagram</h3>
+
+It appears that the minimum distance between components of the input
+set of points and segments corresponds to the one of the Voronoi
+diagram edges. This means that we can iterate through each edge of
+the Voronoi graph, extract the pair of input geometries that form it
+and find
+the distance between those. As the total amount of such edges is O(N)
+value
+(N - is the number of input geometries) the minimum distance could be
+efficiently find in a linear time once we construct the diagram.<br>
+
+<h3>Discretization of input geometries</h3>
+
+The average size of the modern CPUs is around 2.5 x 2.5 centimetres.
+Snapping this to the 32-bit integer grid will give discretization
+precision of 2.5 / 2^33 centimetres or 3 picometres that is 10 times
+smaller value than radius of an atom. That would be probably good
+enough precision even for a few next generations of processors.<br>
+
+<h3>Output analysis</h3>
+
+The maximum absolute error of the output geometries will be 2.5 / 2^47
+centimetres or 0.2 femtometres that is 10 times smaller value than
+the radius of an electron. However in this particular case we are not
+interested in the precision of the output, rather in its topology. As
+it was noticed on
+the Voronoi main page very small edges
+are removed from the Voronoi diagram. However user should not worry
+because the edge that correspond to the minimal distance won't be among
+those. That means that we would be able to 100% correctly identify a
+pair of closest objects within the discretization precision.<br>
+
+<h2>Conclusions</h2>
+
+The above two examples show usage of the default Voronoi coordinate
+types
+in the macro and micro world. The main point of those was to give the user
+understanding of a scale that the default coordinate types provide. There
+are
+two main points we didn't mention before, but that would be relevant to
+the most real world problems:<br>
+
+<ul>
+
+ <li>The absolute error of the coordinates of the output Voronoi
+diagram
+inside the 32-bit integer discretization grid is slightly smaller than
+the absolute error of discretization itself, thus could be neglected at
+all.</li>
+ <li>In both problems above we didn't consider error of measurement.
+For example: is it possible to construct a map of the Mars within the
+0.5
+centimetres precision, or to get coordinates of the circuit parts
+withing the subatomic precision? I guess the answer for both questions
+would be "No". And that actually means that the error of the
+discretization
+step could be neglected comparing to the error produced by the
+measuring
+devices.<br>
+ </li>
+</ul>
+The second statement means that there is actually no point to provide
+implementation that operates with floating-point input coordinates,
+because those always could be snapped to the integer grid. In case the
+user is not satisfied with the precision that the 32-bit integer grid
+provides or would like to retrieve coordinates of the output geometries
+within a smaller
+relative error, follow the next paragraph.<br>
+
+<h2>Voronoi Coordinate Types Configuration</h2>
+
+In the following chapter we are going to extend input coordinate type
+to the 48-bit signed
+integer and output coordinate type to the 80-bit IEEE floating-point
+type
+(long double). The code for this chapter is available in voroni_advanced_tutorial.cpp.
+While it won't be possible to compile it using the MSVC compiler (it
+doesn't
+support 80-bit long double type; ieee754.h header is required), it
+should give a clear understanding of how the library supports the user
+provided coordinate types.<br>
+
+<br>
+
+So the main step would be to declare the voronoi coordinate type traits
+that satisfy set of restrictions explained here:<br>
+
+<br>
+
+<span style="font-family: Courier New,Courier,monospace;">struct
+my_voronoi_ctype_traits {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef boost::int64_t int_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef detail::extended_int&lt;3&gt; int_x2_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef detail::extended_int&lt;3&gt; uint_x2_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef detail::extended_int&lt;128&gt; big_int_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef fpt80 fpt_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef fpt80 efpt_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef my_ulp_comparison ulp_cmp_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef my_fpt_converter to_fpt_converter_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef my_fpt_converter to_efpt_converter_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">};<br>
+<br>
+</span>It is always better to use C++ built-in types wherever it's
+possible. That's why we use the 64-bit signed integer type to handle
+our
+input coordinates. <span style="font-family: Courier New,Courier,monospace;">int_x2_type</span>
+and <span style="font-family: Courier New,Courier,monospace;">uint_x2_type</span>
+is required to handle 96-bit signed/unsigned integers. As there is no
+such built-in type we use library provided efficient fixed integer
+type.
+The big integer type should be capable to handle 48 * 64 bit integers,
+that is
+less than 32 * 128, and so far we are good with <span style="font-family: Courier New,Courier,monospace;">extended_int&lt;128&gt;</span>
+type. We use the same floating point type for both <span style="font-family: Courier New,Courier,monospace;">fpt_type</span>
+and <span style="font-family: Courier New,Courier,monospace;">efpt_type</span>
+as it has enough exponent bits to represent both 48 * 32 bit and 48 *
+64 bit integers (that is also the reason we don't need two
+floating-point converter structures). The <span style="font-family: Courier New,Courier,monospace;">ulp_cmp_type</span>
+structure checks weather two IEEE floating-point values are within the
+given signed integer ulp range (we won't analyze corresponding code
+here as it requires deep understanding of the <a href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html">floating-point
+architecture</a> and its <a href="../../../boost/polygon/detail/voronoi_ctypes.hpp">usage to compare
+floating-point values</a>), but just to mention the declaration is
+following:<br>
+
+<span style="font-family: Courier New,Courier,monospace;"></span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">struct
+my_ulp_comparison {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; enum
+Result {</span><span style="font-family: Courier New,Courier,monospace;"><br>
+&nbsp;&nbsp;&nbsp; LESS = -1,</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+EQUAL = 0,</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+MORE = 1</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; };</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; Result
+operator()(fpt80 a, fpt80 b, unsigned int maxUlps) const;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">};<br>
+<br>
+</span>The last step would be to declare the <span style="font-family: Courier New,Courier,monospace;">my_fpt_converter</span>
+structure (converts the integer types to the floating-point type):<br>
+
+<br>
+
+<span style="font-family: Courier New,Courier,monospace;">struct
+my_fpt_converter {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+template &lt;typename T&gt;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; fpt80
+operator()(const T&amp; that) const {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+return static_cast&lt;fpt80&gt;(that);</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; }</span><br style="font-family: Courier New,Courier,monospace;">
+
+<br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+template &lt;size_t N&gt;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; fpt80
+operator()(const typename detail::extended_int&lt;N&gt;&amp; that)
+const {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+fpt80 result = 0.0;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+for (size_t i = 1; i &lt;= (std::min)((size_t)3, that.size()); ++i) {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+if (i != 1)</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+result *= static_cast&lt;fpt80&gt;(0x100000000ULL);</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+result += that.chunks()[that.size() - i];</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+}</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+return (that.count() &lt; 0) ? -result : result;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; }</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">};<br>
+<br>
+</span>At this point we are done with declaration of the Voronoi
+coordinate type traits. The next step is to declare the Voronoi diagram
+traits:<br>
+
+<br>
+
+<span style="font-family: Courier New,Courier,monospace;">struct
+my_voronoi_diagram_traits {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef fpt80 coordinate_type;</span><span style="font-family: Courier New,Courier,monospace;"></span><span style="font-family: Courier New,Courier,monospace;"></span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef voronoi_cell&lt;coordinate_type&gt; cell_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef voronoi_vertex&lt;coordinate_type&gt; vertex_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef voronoi_edge&lt;coordinate_type&gt; edge_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+typedef struct {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; public:</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+enum { ULPS = 128 };</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+bool operator()(const point_type &amp;v1, const point_type &amp;v2)
+const {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+return (ulp_cmp(v1.x(), v2.x(), ULPS) == my_ulp_comparison::EQUAL
+&amp;&amp;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ulp_cmp(v1.y(), v2.y(), ULPS) == my_ulp_comparison::EQUAL);</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+}</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+private:</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;
+my_ulp_comparison ulp_cmp;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; }
+vertex_equality_predicate_type;</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">};</span><br>
+
+<span style="font-family: Courier New,Courier,monospace;"></span><br>
+
+Above we simply declared the Voronoi primitive types
+and vertex
+equality predicate using the new coordinate type and corresponding ulp
+comparison structure. As we are done with the declaration of the
+coordinate
+type specific structures we are ready to proceed to the construction
+step itself. The first step would be to initialize voronoi_builder
+structure with a set of random points:<br>
+
+<br>
+
+<span style="font-family: Courier New,Courier,monospace;">// Random
+generator and distribution. MAX is equal to 2^48.</span><br>
+
+<span style="font-family: Courier New,Courier,monospace;">boost::mt19937_64
+gen(std::time(0));</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">boost::random::uniform_int_distribution&lt;boost::int64_t&gt;
+distr(-MAX, MAX-1);<br>
+<br>
+</span><span style="font-family: Courier New,Courier,monospace;">
+// Declaring and configuring Voronoi builder with the new coordinate
+type traits.<br>
+voronoi_builder&lt;boost::int64_t, my_voronoi_ctype_traits&gt; vb;</span><br>
+<span style="font-family: Courier New,Courier,monospace;"></span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">// Voronoi
+builder initialization step.<br>
+for (size_t i = 0; i &lt; GENERATED_POINTS; ++i) {</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+boost::int64_t x = distr(gen);</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+boost::int64_t y = distr(gen);</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;
+vb.insert_point(x, y);</span><br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">}<br>
+<br>
+</span>The second step would be to generate the Voronoi diagram and
+this is done as before with the two lines of code:<br>
+
+<br>
+
+<span style="font-family: Courier New,Courier,monospace;">// Declaring
+and configuring Voronoi diagram structure with the new coordinate type
+traits.<br>
+voronoi_diagram&lt;fpt80, my_voronoi_diagram_traits&gt; vd;</span><br>
+
+<span style="font-family: Courier New,Courier,monospace;">vb.construct(&amp;vd);<br>
+<br>
+</span>From this point the user can operate with the Voronoi diagram
+data structure
+and in our tutorial we output some simple stats of the resulting
+Voronoi graph. Probably the hardest part of this tutorial is
+the declaration of the ulp comparison structure. The library provides
+efficient well-commented cross-platform implementation for 64-bit
+floating-point type (double). So the best advice would be to follow
+that implementation, but before doing that really consider thoughtfully if the
+default
+coordinate types are not capable to deal with your problem.<br>
+
+<br>
+
+<table class="docinfo" id="table1" frame="void" rules="none">
+
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup>
+ <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"> <span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/voronoi_basic_tutorial.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_basic_tutorial.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,336 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Basic Tutorial</title><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>
+<h1>Voronoi Basic Tutorial<br>
+</h1>
+
+<p>In this tutorial we will cover the basic usage of the Boost.Polygon
+Voronoi library that should be enough for the 95% of cases. Below we will
+discuss the following topics:<br>
+</p>
+
+<ul>
+
+ <li>preparing input geometries<br>
+ </li>
+ <li>Voronoi diagram construction</li>
+
+ <li>Voronoi graph traversal<br>
+ </li>
+
+ <li>associating the user data with the Voronoi primitives</li>
+ <li>accessing input site inside the Voronoi cell</li>
+ <li>Voronoi diagram rendering<br>
+ </li>
+
+
+</ul>
+
+In the example that goes through this tutorial (
voronoi_basic_tutorial.cpp)
+we
+are going to construct the Voronoi diagram of a few points and
+segments.
+On the image below one may see the corresponding rendered Voronoi
+graph. The primary Voronoi edges
+are marked with
+the black color, non-primary with green, input geometries have blue
+color. We split each input segment onto three sites (segment
+itself and both endpoints), edges that go between the sites corresponding to the same segment are
+considered to be non-primary.<br>
+
+<br>
+
+<img style="border: 2px solid ; width: 300px; height: 300px;" alt="" src="images/voronoi4.png"><br>
+
+<br>
+
+And before you proceed don't forget to:<span style="font-family: Courier New,Courier,monospace;"><br>
+</span><span style="font-family: Courier New,Courier,monospace;"></span><br>
+<span style="font-family: Courier New,Courier,monospace;">#include "boost/polygon/voronoi.hpp"<br>
+using boost::polygon::voronoi_builder;<br>
+using boost::polygon::voronoi_diagram;<br>
+</span>
+
+<h2>Preparing Input Geometries</h2>Below is the example of how the user provided point and segment classes might look like:<br>
+<br><span style="font-family: Courier New,Courier,monospace;">struct Point {<br>&nbsp; int a;<br>
+&nbsp; int b;<br>
+&nbsp; Point (int x, int y) : a(x), b(y) {}<br>
+
+};</span><span style="font-family: Courier New,Courier,monospace;"><br>
+<br>struct Segment {</span><span style="font-family: Courier New,Courier,monospace;"></span><br>
+<span style="font-family: Courier New,Courier,monospace;">
+&nbsp; Point p0;<br>
+&nbsp; Point p1;<br>
+&nbsp; Segment (int x1, int y1, int x2, int y2) : p0(x1, y1), p1(x2, y2) {}<br>
+</span><span style="font-family: Courier New,Courier,monospace;"></span>
+
+<span style="font-family: Courier New,Courier,monospace;">};<br>
+<br>
+</span>As we are going to use the default routines defined in the
+voronoi.hpp header to construct the Voronoi diagram, we are required to map
+our point and segment classes to the corresponding Boost.Polygon concepts:<br>
+<br>
+<span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">template &lt;&gt;</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;"><br>
+struct geometry_concept&lt;Point&gt; { typedef point_concept type; };</span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;"></span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! imp
ortant; float: none;">&nbsp;&nbsp; <span class="Apple-converted-space"></span></span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;"></span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inli
ne ! important; float: none;">template &lt;&gt;</span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">struct point_traits&lt;</span><span style="font-family: Courier New,Courier,monospace;">Point</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&gt; {</span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&nbsp; typedef int coordinate_type;</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows:
 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;"><br>
+&nbsp; &nbsp;<span class="Apple-converted-space"> </span></span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&nbsp; static inline coordinate_type get(const </span><span style="font-family: Courier New,Courier,monospace;">Point</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-tra
nsform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&amp; point,<span class="Apple-converted-space"> </span></span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">orientation_2d orient) {<br>
+&nbsp;&nbsp;&nbsp; return </span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">(orient == HORIZONTAL) ? point.a : point.b;</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;"></span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spaci
ng: 0px; font-size: medium;"><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&nbsp; }<br>
+};</span><br>
+<span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">
+<br>
+template &lt;&gt;<br>
+</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">struct geometry_concept&lt;Segment&gt; { typedef segment_concept type; };<br>
+<br>
+</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">template &lt;&gt;</span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
+<span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">struct point_traits&lt;</span><span style="font-family: Courier New,Courier,monospace;">Segment</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&gt; {</span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: norm
al; widows: 2; word-spacing: 0px; font-size: medium;">
+<span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&nbsp; typedef int coordinate_type;<br>
+&nbsp; typedef Point point_type;<br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
+</span>
+<span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
+<span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&nbsp; static inline coordinate_type get(const </span><span style="font-family: Courier New,Courier,monospace;">Segment</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&amp; segment,<span class="Apple-converted-space"> direction_1d dir</span></span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: norm
al; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">) {<br>
+&nbsp;&nbsp;&nbsp; return </span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">dir.to_int() ? segment.p1() : segment.p0();</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;"></span><br style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spaci
ng: 0px; font-size: medium;">
+<span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; display: inline ! important; float: none;">&nbsp; }<br>};</span><br>
+<br>
+It's also possible to use the native Boost.Polygon types as point_data and segment_data, that won't require the above mapping.<br>
+<br>
+So once we are done we can create the sample input:<br>
+
+<br>
+
+<span style="font-family: Courier New,Courier,monospace;">std::vector&lt;Point&gt;
+points;<br>
+points.push_back(Point(0, 0));<br>
+points.push_back(Point(1, 6));<br>
+std::vector&lt;Segment&gt; segments;<br>
+segments.push_back(Segment(-4, 5, 5, -1));<br>
+segments.push_back(Segment(3, -11, 13, -1));</span><span style="font-family: Courier New,Courier,monospace;"><br>
+</span>
+<h2>Construction of the Voronoi Diagram<br>
+</h2>At this point we are ready to construct the Voronoi diagram:<br>
+<span style="font-family: Courier New,Courier,monospace;"><br>
+</span><span style="font-family: Courier New,Courier,monospace;">
+voronoi_diagram&lt;double&gt; vd;<br>
+construct_voronoi(points.begin(), points.end(), segments.begin(), segments.end(), &amp;vd);</span><br>
+
+<h2>Traversing Voronoi Graph</h2>
+
+Voronoi graph traversal is the basic
+operation one would like to do once the Voronoi diagram is constructed.
+There are three ways to do that and we are going to cover all of them:<br>
+
+<ul>
+
+ <li>simply iterating over the Voronoi edges (counts each edge twice):<br>
+ <span style="font-family: Courier New,Courier,monospace;"><br>
+int iterate_primary_edges1(const voronoi_diagram&lt;double&gt; &amp;vd)
+{<br>
+&nbsp; int result = 0;<br>
+&nbsp; for (voronoi_diagram&lt;double&gt;::const_edge_iterator it =
+vd.edges().begin();<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it != vd.edges().end(); ++it) {<br>
+&nbsp;&nbsp;&nbsp; if (it-&gt;is_primary())<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++result;<br>
+&nbsp; }<br>
+&nbsp; return result;<br>
+}</span><br>
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;</span><br>
+ </li>
+ <li>iterating over the Voronoi cells and then traversing edges around
+each cell (counts each edge twice):<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">int
+iterate_primary_edges2(const voronoi_diagram&lt;double&gt; &amp;vd) {<br>
+&nbsp; int result = 0;<br>
+&nbsp; for (voronoi_diagram&lt;double&gt;::const_cell_iterator it =
+vd.cells().begin();<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it != vd.cells().end(); ++it) {<br>
+&nbsp;&nbsp;&nbsp; const voronoi_diagram&lt;double&gt;::cell_type
+&amp;cell = *it;<br>
+&nbsp;&nbsp;&nbsp; const voronoi_diagram&lt;double&gt;::edge_type *edge
+= cell.incident_edge();<br>
+&nbsp;&nbsp;&nbsp; // This is convenient way to iterate edges around
+Voronoi cell.<br>
+&nbsp;&nbsp;&nbsp; do {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (edge-&gt;is_primary())<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++result;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edge = edge-&gt;next();<br>
+&nbsp;&nbsp;&nbsp; } while (edge != cell.incident_edge());<br>
+&nbsp; }<br>
+&nbsp; return result;<br>
+}</span><br>
+ <br>
+ </li>
+ <li>iterating over the Voronoi
+vertices and then traversing edges around each vertex (the number of the
+iterations through each edge is equal to the number of finite endpoints
+of the edge):<span style="font-family: Courier New,Courier,monospace;"></span><br>
+ <span style="font-family: Courier New,Courier,monospace;">int
+iterate_primary_edges3(const voronoi_diagram&lt;double&gt; &amp;vd) {<br>
+&nbsp; int result = 0;<br>
+&nbsp; for (voronoi_diagram&lt;double&gt;::const_vertex_iterator it =
+vd.vertices().begin();<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it != vd.vertices().end(); ++it) {<br>
+&nbsp;&nbsp;&nbsp; const voronoi_diagram&lt;double&gt;::vertex_type
+&amp;vertex = *it;<br>
+&nbsp;&nbsp;&nbsp; const voronoi_diagram&lt;double&gt;::edge_type *edge
+= vertex.incident_edge();<br>
+&nbsp;&nbsp;&nbsp; // This is convenient way to iterate edges around
+Voronoi vertex.<br>
+&nbsp;&nbsp;&nbsp; do {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (edge-&gt;is_primary())<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++result;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edge = edge-&gt;rot_next();<br>
+&nbsp;&nbsp;&nbsp; } while (edge != vertex.incident_edge());<br>
+&nbsp; }<br>
+&nbsp; return result;<br>
+}</span></li>
+</ul>
+
+This should give a very nice idea on how to do the Voronoi
+diagram traversal. Notice that while the output from the first two methods should
+be the same, it wouldn't for the third one. The reason is that in the
+last case we will iterate only once through the edges with a single
+finite endpoint and will skip all the edges with no finite endpoints.<br>
+
+<h2>Associating User Data with Voronoi Primitives</h2>
+
+A few simple cases of associating the user data with the Voronoi primitives are
+following:<br>
+
+<ul>
+
+ <li>associating number of incident edges with each cell, vertex;</li>
+ <li>associating color information with each edge;</li>
+ <li>using DFS or BFS on the Voronoi graph requires to mark visited
+edges/vertices/cells.</li>
+</ul>
+
+We will consider the first example and will associate the total number
+of incident edges with each cell.<br>
+
+Note: Each Voronoi primitive contains mutable color member,
+that allows to use it for the graph algorithms or associate user data via array indices.<br>
+
+<br style="font-family: Courier New,Courier,monospace;">
+
+<span style="font-family: Courier New,Courier,monospace;">// Using color member of the Voronoi primitives to store the average number<br>
+// of edges around each cell (including secondary edges).<br>
+{<br>
+&nbsp; printf("Number of edges (including secondary) around the Voronoi cells:\n");<br>
+&nbsp; for (voronoi_diagram&lt;double&gt;::const_edge_iterator it = vd.edges().begin();<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it != vd.edges().end(); ++it) {<br>
+&nbsp;&nbsp;&nbsp; std::size_t cnt = it-&gt;cell()-&gt;color();<br>
+&nbsp;&nbsp;&nbsp; it-&gt;cell()-&gt;color(cnt + 1);<br>
+&nbsp; }<br>
+&nbsp; for (voronoi_diagram&lt;double&gt;::const_cell_iterator it = vd.cells().begin();<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it != vd.cells().end(); ++it) {<br>
+&nbsp;&nbsp;&nbsp; printf("%lu ", it-&gt;color());<br>
+&nbsp; }<br>
+&nbsp; printf("\n");<br>
+&nbsp; printf("\n");<br>
+}</span><span style="font-family: Courier New,Courier,monospace;"></span><br>
+
+<h2>Accessing Input Site inside the Voronoi Cell</h2>
+As explained in the Voronoi diagram
+section, Voronoi cells don't contain coordinates of the input
+geometries directly. Instead they contains source index and source
+category that uniquely identify input site. The below routines
+traverses over the all Voronoi cells, fetches input geometry
+corresponding to the Voronoi cell and prints coordinates of the input
+site.<br>
+<br>
+<span style="font-family: Courier New,Courier,monospace;">unsigned int cell_index = 0;</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">for (voronoi_diagram&lt;double&gt;::const_cell_iterator it = vd.cells().begin();</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp; it != vd.cells().end(); ++it) {</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; if (it-&gt;contains_point()) {</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; std::size_t index = it-&gt;source_index();</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; Point p = points[index];</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; printf("Cell #%ud contains a point: (%d, %d).\n",</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cell_index, x(p), y(p));</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; } else {</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; std::size_t index = it-&gt;source_index() - points.size();</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; Point p0 = low(segments[index]);</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; Point p1 = high(segments[index]);</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; if (it-&gt;source_category() ==</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boost::polygon::SOURCE_CATEGORY_SEGMENT_START_POINT) {</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("Cell #%ud contains segment start point: (%d, %d).\n",</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cell_index, x(p0), y(p0));</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; } else if (it-&gt;source_category() ==</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+boost::polygon::SOURCE_CATEGORY_SEGMENT_END_POINT) {</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("Cell #%ud contains segment end point: (%d, %d).\n",</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cell_index, x(p0), y(p0));</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; } else {</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("Cell #%ud contains a segment: ((%d, %d), (%d, %d)). \n",</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cell_index, x(p0), y(p0), x(p1), y(p1));</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; }</span><br style="font-family: Courier New,Courier,monospace;">
+<span style="font-family: Courier New,Courier,monospace;">&nbsp; ++cell_index;</span><br style="font-family: Courier New,Courier,monospace;">
+}<br>
+<h2>Voronoi Diagram Rendering<br>
+</h2>
+
+
+There are two main issues that don't allow to strictly render the resulting
+Voronoi diagram using such rendering tools as OpenGL or DirectX.
+Those are:<br>
+
+<ul>
+
+ <li>Some of the Voronoi edges are infinite, so should be clipped;</li>
+ <li>Some of the Voronoi edge are parabolic arcs, so should be
+discretized.</li>
+</ul>
+
+Note: This would be the issues not only for rendering tools.
+Basically every task that requires diagram to be represented as a set
+of finite segments will fall into this category. voronoi_visualizer.cpp
+contains a simple fully featured implementation of the Voronoi diagram
+renderer using the Qt libraries. It was used to generate all the .png
+drawings under the boost/libs/polygon/example directory.<span style="text-decoration: underline;"></span><span style="font-family: Courier New,Courier,monospace;"><br>
+</span>
+<h2>Summary<br>
+</h2>
+<span style="font-family: Courier New,Courier,monospace;">
+</span>I hope the reader managed to get to this point and found the
+basic tutorial to be useful (in the end it's not so basic). Worth
+to notice that construction of the Voronoi diagram takes only two lines
+of code, everything else is about initializing input data structures,
+traversing Voronoi graph, associating data with the diagram primitives. In the
+default mode the Voronoi diagram operates with the signed int (32-bit) input
+coordinate type and double (64-bit) output coordinate type. In the advanced Voronoi tutorial we
+explain why this is enough for the 95% of cases and how to expand the
+algorithm coordinate types for the other 5%.<br>
+
+<span style="font-family: Courier New,Courier,monospace;"></span><br>
+
+<table class="docinfo" id="table1" frame="void" rules="none">
+
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup>
+ <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"> <span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/voronoi_benchmark.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_benchmark.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,534 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+
+
+
+
+
+
+
+ <meta http-equiv="Content-Language" content="en-us">
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Benchmark</title></head><body>
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+
+ <tbody>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277"><a title="www.boost.org home page" tabindex="2" style="border: medium none ;" href="
http://www.boost.org/"> </a></div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Contents</h3>
+ <ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br>
+ </a></li>
+ <li>Voronoi Benchmark<br>
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br>
+ </a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br>
+ </li>
+
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+ </ul>
+ </div>
+ <h3 class="navbar">Polygon Sponsor</h3>
+ <div style="padding: 5px;" align="center"> <img src="images/intlogo.gif" border="0" height="51" width="127"><a title="www.adobe.com home page" tabindex="2" style="border: medium none ;" href="http://www.adobe.com/"> </a></div>
+ </td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%"><!-- End Header --> <br>
+
+ <h1>Voronoi Benchmark</h1>
+There are not many known Voronoi libraries that are capable to satisfy the
+following set of conditions:<br>
+ <ul>
+ <li>could handle input data sets of points and segments<br>
+</li>
+ <li>give exact warranties about the algorithm robustness and
+output topology<br>
+ </li>
+ <li>compute coordinates of the output geometries within the fixed relative precision<br>
+</li>
+ </ul>Below is the list of libraries included in this benchmark sorted by the number of conditions each of them satisfies:<br>
+ <ul>
+ <li>Boost.Polygon Voronoi - satisfies all the conditions above, implements sweep-line algorithm.<br>
+ </li>
+ <li>CGAL - satisfies the first two conditions, implements incremental algorithm. CGAL is a well-known
+library in the computational geometry area, especially for its
+robustness.<br>
+</li>
+ <li>S-Hull
+- doesn't satisfy any of the above conditions. S-Hull is a non-robust
+implementation of the sweep-hull algorithm used to construct Delaunay
+triangulation of a set of points.<br>
+ </li>
+ </ul>At the moment this benchmark includes only two robust implementations:
+Boost.Polygon Voronoi and CGAL. Thus we are considering comparison of
+those two to be of the most interest. <br>
+ <br>
+Other libraries (OpenVoronoi, Triangle) would be added to this benchmark
+incrementally (we are open for suggestions).<br>
+ <h2>Important<br>
+ </h2>While results of this benchmark show complete dominance of
+the Boost.Polygon Voronoi over the CGAL Delaunay Graph implementation,
+we would like to make it clear
+that both libraries use different approach to construct Voronoi
+diagram. Thus there are problems where the CGAL's incremental approach would
+be still more vital than the sweep-line algorithm (e.g. input sites are
+inserted as a live stream
+data).<br>
+ <h2>Voronoi Benchmark Details<br>
+ </h2>
+The benchmark consists of the two parts:<br>
+ <ul>
+ <li>The first one constructs the Voronoi diagram of a set of random points (voronoi_benchmark_points.cpp)</li>
+ <li>The second one constructs the Voronoi diagram of a set of random
+segments (voronoi_benchmark_segments.cpp)</li>
+ </ul>
+Below we list important benchmark details that should be considered while reviewing its results:<br>
+ <ul>
+ <li>We ensure that input data sets are the same for all
+libraries by initializing random generator with the same seed</li>
+ <li>We ensure that input data sets that consist of segments
+don't contain intersections using Boost.Polygon functionality</li>
+ <li>S-Hull's implementation doesn't process duplicate points
+properly, thus those are eliminated before the algorithm execution
+explicitly (Boost.Polygon Voronoi and CGAL do that&nbsp; implicitly) <br>
+ </li>
+
+ <li>There is no Voronoi diagram data structure in CGAL/S-Hull. That's why we use the segment Delaunay graph which is topologically
+dual to the Voronoi diagram</li>
+ <li>CGAL's and S-Hull's output Delaunay triangulation doesn't contain information
+about coordinates of the Voronoi vertices. We didn't include time to compute Voronoi vertices and memory
+storage required for those in this benchmark.<br>
+ </li>
+ <li>Both Boost.Polygon Voronoi and CGAL process each input
+segment
+as 3 input objects (segment itself and its endpoints), thus the running
+time and memory usage for Voronoi of segments would be at
+least 3 times
+slower than for Voronoi of points</li>
+
+
+ </ul>
+
+The benchmark was executed on the following two system configurations:<br>
+ <br>
+Hardware: Intel i5-7600 2.8 GHz, 4GiB RAM.<br>
+OS: Windows 7 Professional 32-bit.<br>
+Libraries: Boost 1.48.0, CGAL-4.0.<br>
+ <br>
+Hardware: Intel i5-7600 2.8 GHz, 4GiB RAM.<br>
+OS: Ubuntu 11.10 64-bit.<br>
+Libraries: Boost 1.48.0, CGAL-4.0, GMP 5.0.4, MPFR 3.1.0 + cumulative
+patch.<br>
+ <h2>Voronoi Benchmark Results</h2>
+ <h3>Random Points Benchmark</h3>
+ <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td colspan="2" rowspan="1" style="vertical-align: top; text-align: center;">Test specification<br>
+ </td>
+ <td colspan="6" rowspan="1" style="vertical-align: top; text-align: center;">Average construction
+time (in secs)<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: center;">Number
+of Points<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">Number
+of Runs<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">Boost
+Win-32<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">CGAL
+Win-32<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">S-Hull Win-32<br>
+ </td>
+<td style="vertical-align: top; text-align: center;">Boost
+Linux-64<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">CGAL
+Linux-64<br>
+ </td><td style="vertical-align: top; text-align: center;">S-Hull Linux-64<br>
+ </td>
+
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">10<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">100000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000027<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000116<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000043<br>
+ </td>
+<td style="vertical-align: top; text-align: right;">0.000013<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000052<br>
+ </td><td style="vertical-align: top; text-align: right;">0.000012<br>
+ </td>
+
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">100<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">10000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000392<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.002649<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000521<br>
+ </td>
+<td style="vertical-align: top; text-align: right;">0.000192<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">&nbsp;0.001150<br>
+ </td><td style="vertical-align: top; text-align: right;">0.000139<br>
+ </td>
+
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">1000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">1000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.004541<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.039140<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.007125<br>
+ </td>
+<td style="vertical-align: top; text-align: right;">0.002130<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.016680<br>
+ </td><td style="vertical-align: top; text-align: right;">0.002010<br>
+ </td>
+
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">10000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">100<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.047540<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.684090<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.091640<br>
+ </td>
+<td style="vertical-align: top; text-align: right;">0.022900<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.297900<br>
+ </td><td style="vertical-align: top; text-align: right;">0.028300<br>
+ </td>
+
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">100000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">10<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.530200<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">&nbsp;16.904600<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">1.218000<br>
+ </td>
+<td style="vertical-align: top; text-align: right;">0.274000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">8.047000<br>
+ </td><td style="vertical-align: top; text-align: right;">0.432000<br>
+ </td>
+
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">1000000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">1<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">5.882000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">566.056000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">15.394000<br>
+ </td>
+<td style="vertical-align: top; text-align: right;">3.290000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">315.740000<br>
+ </td><td style="vertical-align: top; text-align: right;">6.350000<br>
+ </td>
+
+ </tr>
+ </tbody>
+ </table>
+ <br>
+ <table style="text-align: left;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_10.png"></td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_100.png"></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_1000.png"></td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_10000.png"></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_100000.png"></td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_1000000.png"></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_memory.png"><br>
+ </td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_points_all.png"><br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h3>Random Segments Benchmark</h3>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td colspan="2" rowspan="1" style="vertical-align: top; text-align: center;">Test specification<br>
+ </td>
+ <td colspan="4" rowspan="1" style="vertical-align: top; text-align: center;">Average construction
+time (in secs)</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: center;">Number
+of Segments<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">Number
+of Runs<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">Boost
+Win-32<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">CGAL
+Win-32<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">Boost
+Linux-64<br>
+ </td>
+ <td style="vertical-align: top; text-align: center;">CGAL
+Linux-64<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">10<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">100000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000290<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.001047<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000165<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.000483<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">100<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">10000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.003655<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.014812<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.002006<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.007006<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">1000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">1000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.038158<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.177315<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.020440<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.084000<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">10000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">100<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">0.389470<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">2.561340<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">&nbsp;0.209700<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">1.191900<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">100000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">10<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">4.031300<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">49.314600<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">2.228000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">23.538000<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: right;">1000000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">1<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">40.912000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">1640.830000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">22.250000<br>
+ </td>
+ <td style="vertical-align: top; text-align: right;">856.650000<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br>
+ <table style="text-align: left;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_10.png"></td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_100.png"></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_1000.png"></td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_10000.png"></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_100000.png"></td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_1000000.png"></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_memory.png"><br>
+ </td>
+ <td style="vertical-align: top;"><img style="width: 500px; height: 300px;" alt="" src="images/benchmark_segments_all.png"><br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <span style="font-weight: bold;"></span>
+ <h2>Voronoi Benchmark Summary</h2>
+The main conclusions for the benchmark results above are following:<br>
+ <ul>
+ <li>There is no input size range were CGAL would outperform
+Boost.Polygon Voronoi. Even considering the fact that we didn't include
+time it would take CGAL to compute coordinates of the Voronoi vertices.</li>
+ <li>The more interesting fact is that robust implementation of
+the Boost.Polygon Voronoi is faster than non-robust of
+S-Hull (except small input sets of around 100 points on Linux-64).<br>
+ </li>
+
+ <li>Logarithmic execution time shows that Boost.Polygon Voronoi and S-Hull
+have clear N*log(N) complexity, while this doesn't seem to be true for
+CGAL (at least for large input data sets).<br>
+ </li>
+ <li>Boost.Polygon Voronoi computes coordinates of the output
+Voronoi vertices within 64 machine epsilon precision. There are no such
+warranties for the CGAL library.<br>
+ </li>
+ <li>Boost.Polygon Voronoi of points is 4 times faster for small
+input data sets (10 points) and this factor grows up to 100 for large
+input data sets (1000000 points).</li>
+ <li>Boost.Polygon Voronoi of segments is 3 times faster for
+small input data sets (10 segments) and this factor grows up to 40 for
+large input data sets (1000000 segments).</li>
+ <li>Boost.Polygon
+Voronoi is capable to construct Voronoi of 10000 points or 1000
+segments in 0.02 seconds. This allows to produce real time frame rate
+for those quantities.</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+ <table class="docinfo" id="table2" frame="void" rules="none">
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup> <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/voronoi_builder.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_builder.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,389 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta http-equiv="Content-Language" content="en-us">
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Builder</title></head><body>
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+
+ <tbody>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277"><a title="www.boost.org home page" tabindex="2" style="border: medium none ;" href="
http://www.boost.org/"> </a></div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Contents</h3>
+ <ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br>
+ </a></li>
+ <li>Voronoi Benchmark<br>
+ </li>
+ <li>Voronoi Builder</li>
+ <li><a href="voronoi_diagram.htm">Voronoi Diagram<br>
+ </a></li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br>
+ </li>
+
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+ </ul>
+ </div>
+ <h3 class="navbar">Polygon Sponsor</h3>
+ <div style="padding: 5px;" align="center"> <img src="images/intlogo.gif" border="0" height="51" width="127"><a title="www.adobe.com home page" tabindex="2" style="border: medium none ;" href="http://www.adobe.com/"> </a></div>
+ </td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%"><!-- End Header --> <br>
+ <h1>Voronoi Builder<br>
+ </h1>
+
+Voronoi builder is the event generator structure. It implements the <a href="http://www.ams.org/samplings/feature-column/fcarc-voronoi">sweepline
+algorithm</a>
+that scans a 2D space and generates two types of events:
+site events and circle events (we won't go into details what those are
+exactly). Each event is reported to the output data structure builder.
+The structure shares Voronoi name as the events generated by it
+correspond to the Voronoi diagram edges and vertices, thus giving
+enough information to construct the Voronoi diagram of a set of points
+and linear segments. The requirements for the input/output
+coordinate type of
+the builder geometries are not the same as for the rest of the
+Boost.Polygon library. The main differences are in the following:<br>
+ <ul>
+ <li>The input coordinate type is not required to be integral (while it
+still should be an integer type)</li>
+ <li>The output coordinate type (for
+Voronoi vertices) is required to be IEEE-754 floating point type</li>
+ </ul>
+ <h2>Important</h2>
+
+
+We encourage users to use default static methods defined in the voronoi.hpp
+header to construct Voronoi diagram, however it's always possible to
+use Voronoi builder explicitly, especially if the user wants to drop
+the external dependencies such as MPL (metaprogramming library). So the
+following include set woudn't depend on any heavy external headers (except STL and boost/cstdint.hpp), even
+Boost.Polygon itself:<br>
+
+ <br>
+
+ <span style="font-family: Courier New,Courier,monospace;">#include &lt;voronoi_builder.hpp&gt;</span><br style="font-family: Courier New,Courier,monospace;">
+
+ <span style="font-family: Courier New,Courier,monospace;">#include &lt;voronoi_diagram.hpp&gt;</span><span style="font-family: Courier New,Courier,monospace;"><br>
+ <br>
+ </span>This
+also gives a way to build Voronoi construction API on top of the
+Voronoi builder data structure for the other Boost libraries.<br>
+ <h2>Declaration<br>
+ </h2>
+
+
+
+
+ <font face="Courier New"> <span style="font-family: 'Courier New',Courier,monospace;">template
+&lt;typename T,</span><br style="font-family: 'Courier New',Courier,monospace;">
+ <span style="font-family: 'Courier New',Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+typename CTT = detail::voronoi_ctype_traits&lt;T&gt;,</span><br style="font-family: 'Courier New',Courier,monospace;">
+ <span style="font-family: 'Courier New',Courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+typename VP = detail::voronoi_predicates&lt;CTT&gt; &gt;</span><br style="font-family: 'Courier New',Courier,monospace;">
+ <span style="font-family: 'Courier New',Courier,monospace;">class
+voronoi_builder;</span><br>
+ <br>
+ <span style="font-family: 'Courier New',Courier,monospace;">T</span></font>
+- specifies the coordinate type of the input geometries (points and
+segments).<br>
+
+ <font face="Courier New"> <span style="font-family: 'Courier New',Courier,monospace;">CTT</span></font>
+- defines input/output coordinate type traits used by Voronoi predicates (VP).<br>
+
+ <font face="Courier New"> <span style="font-family: 'Courier New',Courier,monospace;">VP</span></font>
+- predicate kernel, that provides builder with robust and
+efficient predicates and functors.<br>
+
+The Voronoi builder data structure is ready to use from the box with
+32-bit signed integer input coordinate type. The user may extend the
+input coordinate range to the other integer types (e.g. 64-bit
+integer), however this will also require manual set up of the
+coordinate type traits. Default voronoi_predicates&lt;<font face="Courier New"><span style="font-family: 'Courier New',Courier,monospace;">CTT</span></font>&gt;
+structure provides correct and efficient predicates as soon as types defined by <font face="Courier New"> <span style="font-family: 'Courier New',Courier,monospace;">CTT</span></font>
+satisfy the requirements explained at the end of this page. In case those
+requirements are not satisfied for the user provided coordinate type traits,<font face="Courier New"><span style="font-family: 'Courier New',Courier,monospace;"></span></font>
+the proper predicates kernel
+implementation is required.<span style="font-family: Courier New,Courier,monospace;"></span><br>
+<h2>Member Functions</h2>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-family: 'Courier New',Courier,monospace;"><span style="font-weight: bold;">
+voronoi_builder</span>()</td>
+ <td width="693">Default
+constructor.</td>
+ </tr>
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">size_t <span style="font-weight: bold;">insert_point</span>(const int_type&amp; x,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const int_type&amp; y)</span><br>
+ </td>
+ <td>Inserts a point object with
+the specified coordinates into the Voronoi builder.<br>
+Returns index number of the inserted site.<br>
+
+ </td>
+ </tr>
+
+
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;">size_t <span style="font-weight: bold;">insert_segment</span>(const int_type&amp; x1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const int_type&amp; y1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const int_type&amp; x2,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+const int_type&amp; y2)</span><br>
+ </td>
+ <td>Inserts a segment object
+with the specified coordinates into the Voronoi builder.<br>
+Returns index number of the inserted site.<br>
+
+ </td>
+ </tr>
+
+
+
+
+ <tr>
+ <td style="font-family: 'Courier New',Courier,monospace;">
+template &lt;typename OUTPUT&gt;<br>
+void <span style="font-weight: bold;">construct</span>(OUTPUT* output)<br>
+ </td>
+ <td width="693">Runs sweepline
+algorithm over the set of the inserted geometries, outputs site and
+circle events to the OUTPUT data structure. It's responsibility of the
+output data structure to process them.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: 'Courier New',Courier,monospace;">
+void <span style="font-weight: bold;">clear</span>()<br>
+ </td>
+ <td width="693">Clears the
+list of the inserted geometries. Sets index counter to zero.<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h1>Voronoi Coordinate Type Traits</h1>
+
+
+ <p>The library provides the default coordinate type traits specialization for the
+32-bit signed integer type:</p>
+
+ <font style="font-family: 'Courier New',Courier,monospace;" face="Courier New">
+ <p>template &lt;typename T&gt;<br>
+struct voronoi_ctype_traits;<br>
+ <br>
+template &lt;&gt;<br>
+struct voronoi_ctype_traits&lt;int32&gt; {<br>
+&nbsp;&nbsp;&nbsp; typedef int32 int_type;<br>
+&nbsp;&nbsp;&nbsp; typedef int64 int_x2_type;<br>
+&nbsp;&nbsp;&nbsp; typedef uint64 uint_x2_type;<br>
+&nbsp;&nbsp;&nbsp; typedef extended_int&lt;128&gt; big_int_type;<br>
+&nbsp;&nbsp;&nbsp; typedef fpt64 fpt_type;<br>
+&nbsp;&nbsp;&nbsp; typedef extended_exponent_fpt&lt;fpt_type&gt;
+efpt_type;<br>
+&nbsp;&nbsp;&nbsp; typedef ulp_comparison&lt;fpt_type&gt; ulp_cmp_type;<br>
+&nbsp;&nbsp;&nbsp; typedef type_converter_fpt to_fpt_converter_type;<br>
+&nbsp;&nbsp;&nbsp; typedef type_converter_efpt to_efpt_converter_type;<br>
+};</p>
+ </font>
+ One
+of the most important features of the library is that Voronoi builder
+output geometries are constructed within defined relative error (64
+machine epsilons). That means the more mantissa bits the user provided
+fpt_type has the better precision of the output geometries will be. In
+order for the user defined traits to be consistent with the default
+Voronoi builder predicates user should define following set of
+coordinate types (the assumption is made that input geometries have
+X-bit signed integer coordinate type):<br>
+ <br>
+<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">int_type<br>
+ </td>
+ <td style="vertical-align: top;">At least X-bit signed
+integer type. <br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+int_x2_type<br>
+ </td>
+ <td style="vertical-align: top;">At least 2X-bit signed
+integer type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+uint_x2_type<br>
+ </td>
+ <td style="vertical-align: top;">At least 2X-bit unsigned
+integer type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+big_int_type<br>
+ </td>
+ <td style="vertical-align: top;">At least 8X-bit signed
+integer type for voronoi of points.<br>
+At least 64X-bit signed integer type for voronoi of segments.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+fpt_type<br>
+ </td>
+ <td style="vertical-align: top;">IEEE-754 floating point
+type, with mantissa at least (X+16) bits and exponent able to handle
+32X-bit unsigned integer type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+efpt_type<br>
+ </td>
+ <td style="vertical-align: top;">IEEE-754 floating point
+type, with mantissa at least (X+16) bits and exponent able to handle
+64X-bit unsigned integer type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+ulp_cmp_type<br>
+ </td>
+ <td style="vertical-align: top;">Ulp comparison structure
+that checks if two fpt_type values are within the given ulp range
+(relative error range).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+to_fpt_converter_type<br>
+ </td>
+ <td style="vertical-align: top;">Type converter structure
+that converts any of the integer types above plus efpt_type to the
+fpt_type using operator().<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-weight: bold;">
+to_efpt_converter_type<br>
+ </td>
+ <td style="vertical-align: top;">Type converter structure
+that converts any of the integer types above to the efpt_type using
+operator().<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p>Notes:<br></p>
+ <ul>
+ <li>
+Four different integer types are used (instead of a single
+big_int_type) to slightly improve algorithm performance and memory
+usage.</li>
+ <li>As the maximum required size of the big_int_type is known in advance
+(based on the size of the integer type), library provided
+implementation of a fixed integer could be used (it is much faster than
+heap-allocated big integers).</li>
+ <li>
+Two separate floating-point types are defined because for the input
+with
+32-bit signed integer coordinates double won't be able to handle
+2048-bit (64 * 32) integers as they will overflow its exponent. On the
+gcc compiler it's possible to use 80-bit long doubles for both fpt
+types, however this is not supported by MSVC compiler.</li>
+ <li>efpt_type and to_efpt_converter_type are not used to construct Voronoi diagram of points (mocks will work fine).</li>
+ <li>
+For an example of the user defined coordinate type traits
+see advanced Voronoi tutorial.</li>
+ </ul>
+
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+ <table class="docinfo" id="table2" frame="void" rules="none">
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup> <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>

Added: branches/release/libs/polygon/doc/voronoi_diagram.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_diagram.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,994 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta http-equiv="Content-Language" content="en-us">
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Diagram</title>
+
+
+
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+
+ <tbody>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277"><a title="www.boost.org home page" tabindex="2" style="border: medium none ;" href="
http://www.boost.org/"> </a></div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Contents</h3>
+ <ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br>
+ </a></li>
+ <li>Voronoi Benchmark</li>
+ <li>Voronoi Builder<br>
+ </li>
+ <li>Voronoi Diagram</li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br>
+ </li>
+
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+ </ul>
+ </div>
+ <h3 class="navbar">Polygon Sponsor</h3>
+ <div style="padding: 5px;" align="center"> <img src="images/intlogo.gif" border="0" height="51" width="127"><a title="www.adobe.com home page" tabindex="2" style="border: medium none ;" href="http://www.adobe.com/"> </a></div>
+ </td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%"><!-- End Header --> <br>
+
+ <h1>Voronoi Diagram</h1>
+Voronoi
+diagram is the computational geometry concept that represents partition
+of the given space onto regions, with bounds determined by distances to a
+specified family of objects. The application area of this concept vary <a href="http://www.ics.uci.edu/%7Eeppstein/gina/scot.drysdale.html">from
+Archaeology to Zoology</a>. The Boost.Polygon library provides implementation of
+the Voronoi diagram data structure in 2D space. The internal representation
+consists of the three arrays, that respectively contain: Voronoi cells
+(represent the area around the input sites bounded by the Voronoi edges), Voronoi vertices
+(points where three or more Voronoi edges intersect), Voronoi edges
+(the one dimensional curves containing points equidistant from the two
+closest input sites). Each of the primitives (cell, vertex, edge)
+contains pointers to the other linked primitives, so that it's always
+possible to efficiently traverse Voronoi graph. The picture below shows
+the Voronoi vertices in red, Voronoi edges in black, input sites that
+correspond to the Voronoi cells in blue. It is considered that each
+input segment consists of the three sites: segment itself and its
+endpoints. As the result two additional
+Voronoi edges are constructed per each input segment. This is made to
+simplify the representation of the Voronoi diagram.<br>
+ <br>
+
+
+ <img style="border: 1px solid ; width: 300px; height: 300px;" alt="" src="images/voronoi2.png"><br>
+ <h2>Important</h2>All
+the Voronoi primitive data structures (edge, vertex, cell) contain
+mutable color member. Color type is equivalent to the std::size_t type,
+except that the upper five bits are reserved for the internal usage.
+That would mean that the maximum supported value by color member is 32
+times less than the one supported by std::size_t.<br>
+ <h2>Declaration<br>
+ </h2>
+
+
+
+
+
+ <span style="font-family: Courier New,Courier,monospace;">template
+&lt;typename T, typename TRAITS = voronoi_diagram_traits&lt;T&gt; &gt;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">class
+voronoi_diagram;<br>
+ <br>
+</span><font face="Courier New"><span style="font-family: 'Courier New',Courier,monospace;">T</span></font>
+- specifies the coordinate type of the Voronoi vertices.<br>
+ <span style="font-family: Courier New,Courier,monospace;">TRAITS</span><font face="Courier New"><span style="font-family: 'Courier New',Courier,monospace;"></span></font>
+- Voronoi diagram traits (explained in the end of this chapter).<br>
+ <h2>Member Functions</h2>
+
+ <span style="font-family: Courier New,Courier,monospace;">
+
+ </span>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;"><span style="font-weight: bold;">voronoi_diagram</span>()<br>
+ </td>
+ <td>Default constructor.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">clear</span>()<br>
+ </td>
+ <td>Clears diagram.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+cell_container_type&amp; <span style="font-weight: bold;">cells</span>() const<br>
+ </td>
+ <td>Returns the const
+reference to the cell container.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+vertex_container_type&amp; <span style="font-weight: bold;">vertices</span>() const<br>
+ </td>
+ <td>Returns the const
+reference to the vertex container.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+edge_container_type&amp; <span style="font-weight: bold;">edges</span>() const<br>
+ </td>
+ <td>Returns the const
+reference to the edge container.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">size_t <span style="font-weight: bold;">num_cells</span>() const<br>
+ </td>
+ <td>Returns the number of the
+cells in the Voronoi diagram.<br>
+This value should be the same as the size of the cell container.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">size_t <span style="font-weight: bold;">num_edges</span>() const<br>
+ </td>
+ <td>Returns the number of the
+edges (half-edges) in the Voronoi diagram.<br>This value should be the same as the size of the edge container.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">size_t <span style="font-weight: bold;">num_vertices</span>() const<br>
+ </td>
+ <td>Returns the number of the
+vertices in the Voronoi diagram.<br>
+This value should be the same as the size of the vertex container.<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h2>Member Types</h2>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-weight: bold;">coordinate_type<br>
+ </td>
+ <td>Coordinate type.<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="font-weight: bold;">cell_type<br>
+ </td>
+ <td>Voronoi cell.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">vertex_type<br>
+ </td>
+ <td>Voronoi vertex.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">edge_type<br>
+ </td>
+ <td>Voronoi edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">cell_container_type<br>
+ </td>
+ <td>Container of Voronoi cells.<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="font-weight: bold;">const_cell_iterator<br>
+ </td>
+ <td>Const cell container iterator.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">vertex_container_type<br>
+ </td>
+ <td>Container of Voronoi vertices.<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="font-weight: bold;">const_vertex_iterator<br>
+ </td>
+ <td>Const vertex container iterator.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">edge_container_type<br>
+ </td>
+ <td>Container of Voronoi edges.<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="font-weight: bold;">const_edge_iterator<br>
+ </td>
+ <td>Const edge container iterator.<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+ <h1>Voronoi Geometry Type<br>
+ </h1>
+ <h2>GeometryCategory<br>
+ </h2>
+Defines geometry type of the input objects.<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">enum GeometryCategory {</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; GEOMETRY_CATEGORY_POINT = 0x0,</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; GEOMETRY_CATEGORY_SEGMENT = 0x1</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">};</span><br>
+ <h2>SourceCategory</h2>
+
+Defines category of the input site that forms Voronoi cell.<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">enum SourceCategory {</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; // Point subtypes.</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; SOURCE_CATEGORY_SINGLE_POINT = 0x0,</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; SOURCE_CATEGORY_SEGMENT_START_POINT = 0x1,</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; SOURCE_CATEGORY_SEGMENT_END_POINT = 0x2,</span><br style="font-family: Courier New,Courier,monospace;">
+ <br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; // Segment subtypes.</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; SOURCE_CATEGORY_INITIAL_SEGMENT = 0x8,</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; SOURCE_CATEGORY_REVERSE_SEGMENT = 0x9,</span><br style="font-family: Courier New,Courier,monospace;">
+ <br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; SOURCE_CATEGORY_GEOMETRY_SHIFT = 0x3,</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; SOURCE_CATEGORY_BITMASK = 0x1F</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">};</span><br>
+ <br>
+Voronoi
+diagram data structure doesn't store coordinates of the input
+geometries.
+Instead it links with those via source index and source category method
+of the Voronoi cell primitive. Source index is incrementally given
+(starting from zero) to each input site inserted into Voronoi builder.
+Considering the fact that each input segment is splitted onto three
+separate sites with the same index, we distinguish between them using
+SourceCategory. For the example see Voronoi basic tutorial.<br>
+ <h2>Member Functions</h2>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;"><span style="font-family: Courier New,Courier,monospace;">bool <span style="font-weight: bold;">belongs</span>(</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp; &nbsp; SourceCategory source_category,</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;&nbsp;&nbsp; GeometryCategory geometry_category)</span><br>
+ </td>
+ <td style="vertical-align: middle;">Returns true if source category belongs to the given geometry category.<br>
+Returns false else.<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h1>Voronoi Edge</h1>
+
+
+Voronoi edge is represented as enhanced classical half-edge
+data structure.<br>
+ <h2>Declaration</h2>
+
+
+
+ <span style="font-family: Courier New,Courier,monospace;">template
+&lt;typename T&gt;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">class
+voronoi_edge;<br>
+ <br>
+T</span> - coordinate type.<br>
+ <h2>Member Functions</h2>
+
+ <span style="font-family: Courier New,Courier,monospace;">
+
+ </span>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;"><span style="font-weight: bold;">voronoi_edge</span>(bool is_linear, bool is_primary)</span><br>
+ </td>
+ <td>Voronoi edge constructor.<br>
+ </td>
+ </tr>
+<tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_cell_type* <span style="font-weight: bold;">cell</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+Voronoi <span style="font-family: Courier New,Courier,monospace;"></span>cell
+that edge belongs to.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_cell_type* <span style="font-weight: bold;">cell</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the Voronoi cell that edge belongs to.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">cell</span>(voronoi_cell_type* c)<br>
+ </td>
+ <td>Sets the Voronoi cell
+pointer for the cell current edge belongs to.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_vertex_type* <span style="font-weight: bold;">vertex0</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+start point of the edge.<br>
+If the edge is infinite in that direction returns NULL.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_vertex_type* <span style="font-weight: bold;">vertex0</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the point vertex of the edge.<br>
+If the edge is infinite in that direction returns NULL.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">vertex0</span>(voronoi_vertex_type* v)<br>
+ </td>
+ <td>Sets the start point
+pointer of the edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_vertex_type* <span style="font-weight: bold;">vertex1</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+end point of the edge.<br>
+If the edge is infinite in that direction returns NULL.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_vertex_type* <span style="font-weight: bold;">vertex1</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the end point of the edge.<br>
+If the edge is infinite in that direction returns NULL.<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_edge_type* <span style="font-weight: bold;">twin</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+twin edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge_type* <span style="font-weight: bold;">twin</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the twin edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">twin</span>(voronoi_edge_type* e)<br>
+ </td>
+ <td>Sets the twin edge pointer
+of the edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_edge_type* <span style="font-weight: bold;">next</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+CCW next edge within the corresponding Voronoi cell.<br>
+Edges not necessarily share a common vertex (e.g. infinite edges).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge_type* <span style="font-weight: bold;">next</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the CCW next edge within the corresponding Voronoi cell.<br>
+Edges not necessarily share a common vertex (e.g. infinite edges).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">next</span>(voronoi_edge_type* e)<br>
+ </td>
+ <td>Sets the CCW next edge
+pointer of the edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_edge_type* <span style="font-weight: bold;">prev</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+CCW prev edge within the corresponding Voronoi cell.<br>
+Edges not necessarily share a common vertex (e.g. infinite edges).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge_type* <span style="font-weight: bold;">prev</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the CCW prev edge within the corresponding Voronoi cell.<br>
+Edges not necessarily share a common vertex (e.g. infinite edges).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">prev</span>(voronoi_edge_type* e)<br>
+ </td>
+ <td>Sets the CCW prev edge
+pointer of the edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">color_type <span style="font-weight: bold;">color</span>() const<br>
+ </td>
+ <td>Returns the color value.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void <span style="font-weight: bold;">color</span>(color_type color) const<br>
+ </td>
+ <td>Sets the color of
+the edge.<br>
+Allows to execute graph algorithms and associate data.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_edge_type* <span style="font-weight: bold;">rot_next</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+CCW next edge rotated around the edge start point.<br>Works for infinite
+ edges as well.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge_type* <span style="font-weight: bold;">rot_next</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the CCW next edge rotated around the edge start point.<br>Works for infinite edges as well.</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_edge_type* <span style="font-weight: bold;">rot_prev</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+CCW prev edge rotated around the edge start point.<br>Works for infinite edges as well.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge_type* <span style="font-weight: bold;">rot_prev</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the CCW prev edge rotated around the edge start point.<br>Works for infinite edges as well.</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">is_finite</span>() const<br>
+ </td>
+ <td>Returns true if the both
+end points of the edge are finite, else false.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">is_infinite</span>() const</td>
+ <td>Returns true if one of the
+end points of the edge is infinite, else false.</td>
+ </tr>
+<tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">is_linear</span>() const<br>
+ </td>
+ <td>Returns true if the edge
+is linear (segment, ray, line), else false.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">is_curved</span>() const<br>
+ </td>
+ <td>Returns true if the edge
+is curved (parabolic arc), else false.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">is_primary</span>() const<br>
+ </td>
+ <td>Returns false if the edge
+goes through the endpoint of the segment site, else true.<br>
+ </td>
+ </tr><tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">is_secondary</span>() const</td>
+ <td>Returns true if the edge
+goes through the endpoint of the segment site, else false.</td>
+ </tr>
+
+ </tbody>
+ </table>
+ <span style="font-family: Courier New,Courier,monospace;"><br>
+ </span>All
+the above methods have O(1) complexity. The size of
+the Voronoi edge structure is equal to: 5 * sizeof(void *) + sizeof(size_t).<span style="font-family: Courier New,Courier,monospace;"></span><br>
+ <h2>Member Types</h2>
+
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-weight: bold;">coordinate_type<br>
+ </td>
+ <td>Coordinate type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">voronoi_cell_type<br>
+ </td>
+ <td>Voronoi cell type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">voronoi_vertex_type<br>
+ </td>
+ <td>Voronoi vertex type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">voronoi_edge_type<br>
+ </td>
+ <td>Voronoi edge type.<br>
+ </td>
+ </tr><tr>
+ <td style="vertical-align: top; font-weight: bold;">color_type<br>
+ </td>
+ <td style="vertical-align: top;">Color type (check the Important section).<br>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ <h1>Voronoi Cell</h1>
+
+Voronoi cell is represented by a site the cell contains and a pointer
+to the incident edge.<br>
+ <h2>Declaration</h2>
+
+
+
+ <span style="font-family: Courier New,Courier,monospace;">template
+&lt;typename T&gt;<br>
+class voronoi_cell;<br>
+ <br>
+</span><span style="font-family: Courier New,Courier,monospace;">T</span> - coordinate type.<br>
+ <h2>Member Functions</h2>
+
+ <span style="font-family: Courier New,Courier,monospace;">
+
+ </span>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+
+
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;"><span style="font-weight: bold;">voronoi_cell</span>(source_index_type source_index,</span><span style="font-family: Courier New,Courier,monospace;"><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source_category_type source_category)</span><br>
+ </td>
+ <td>Voronoi cell constructor.<br>
+ </td>
+ </tr>
+<tr>
+ <td style="font-family: Courier New,Courier,monospace;">source_index_type <span style="font-weight: bold;">source_index</span>() const<br>
+ </td>
+ <td>Returns input site index among the other sites.<br>
+Both segment endpoints and segment itself will have the same index.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">source_category_type <span style="font-weight: bold;">source_category</span>() const<br>
+ </td>
+ <td>Returns input site category among the other sites.<br>
+Allows to distinguish between segment site and its endpoints.<br>
+
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_edge_type* <span style="font-weight: bold;">incident_edge</span>()<br>
+ </td>
+ <td>Returns the pointer to the
+one of the boundary edges.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge_type* <span style="font-weight: bold;">incident_edge</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the one of the boundary edges.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">incident_edge</span>(voronoi_edge_type* e)<br>
+ </td>
+ <td>Sets the incident boundary
+edge pointer of the cell.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">color_type <span style="font-weight: bold;">color</span>() const<br>
+ </td>
+ <td>Returns the color associated with the cell.</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void <span style="font-weight: bold;">color</span>(color_type color) const<br>
+ </td>
+ <td>Sets the color of
+the cell.<br>
+
+Allows to execute graph algorithms and associate data.<br>
+</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">contains_point</span>() const</td>
+ <td>Returns true if the cell
+contains a point site, else false.</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">contains_segment</span>() const</td>
+ <td>Returns true if the cell
+contains a segment site, else false.</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">bool
+ <span style="font-weight: bold;">is_degenerate</span>() const </td>
+ <td>Returns true if the cell
+doesn't have an incident edge.<br>
+Could happen if a few input segments share a common endpoint.</td>
+ </tr>
+ </tbody>
+ </table>
+ <span style="font-family: Courier New,Courier,monospace;"><br>
+ </span>All the above methods have O(1) complexity. The size of
+the Voronoi cell structure is equal to: sizeof(void *) + 2 * sizeof(size_t).<span style="font-family: Courier New,Courier,monospace;"></span>
+ <h2>Member Types</h2>
+
+
+
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-weight: bold;">coordinate_type<br>
+ </td>
+ <td>Coordinate type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-weight: bold;">source_index_type</td>
+ <td>Source index type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-weight: bold;">source_category_type<br>
+ </td>
+ <td style="vertical-align: top;">Source category type.<br>
+ </td>
+ </tr>
+<tr>
+ <td style="vertical-align: top; font-weight: bold;">voronoi_edge_type
+ </td>
+ <td style="vertical-align: top;">Voronoi edge type.
+ </td>
+ </tr>
+<tr>
+ <td style="font-weight: bold;">color_type
+ </td>
+ <td>Color type (check the Important section).
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h2>Miscellaneous</h2>
+
+The following code snippet effectively traverses the Voronoi edges around the
+Voronoi cell:<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge&lt;double&gt;* edge = cell-&gt;incident_edge();</span><br>
+ <span style="font-family: Courier New,Courier,monospace;">do {</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;
+edge = edge-&gt;next();</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;
+// Do smth. with edge.</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">} while
+(edge != cell-&gt;incident_edge());</span><br>
+ <h1>Voronoi Vertex</h1>
+Voronoi vertex is represented by a point that corresponds to the vertex
+and a pointer to the incident edge.<br>
+ <h2>Declaration</h2>
+
+
+
+ <span style="font-family: Courier New,Courier,monospace;">template
+&lt;typename T&gt;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">class
+voronoi_vertex;<br>
+ <br>
+</span><span style="font-family: Courier New,Courier,monospace;">T</span> - coordinate type.<br>
+ <h2>Member Functions</h2>
+
+ <span style="font-family: Courier New,Courier,monospace;">
+
+ </span>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace;"><span style="font-weight: bold;">voronoi_vertex</span>(const coordinate_type&amp; x,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const coordinate_type&amp; y)</span><span style="font-family: Courier New,Courier,monospace;"></span><br>
+ </td>
+ <td>Voronoi vertex constructor.<br>
+ </td>
+ </tr>
+<tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+point_type&amp; <span style="font-weight: bold;">x</span>() const<br>
+ </td>
+ <td>Returns the x-coordinate of the point that represents the vertex.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+point_type&amp; <span style="font-weight: bold;">y</span>() const</td>
+ <td>Returns the y-coordinate of the point that represents the vertex.<br>
+ </td>
+ </tr>
+<tr>
+ <td style="font-family: Courier New,Courier,monospace;">voronoi_edge_type* <span style="font-weight: bold;">incident_edge</span>()<br>
+ </td>
+ <td>Returns the incident edge
+pointer.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge_type* <span style="font-weight: bold;">incident_edge</span>() const<br>
+ </td>
+ <td>Returns the const pointer
+to the incident edge.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void
+ <span style="font-weight: bold;">incident_edge</span>(voronoi_edge_type* e)<br>
+ </td>
+ <td>Sets the incident edge
+pointer.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">color_type <span style="font-weight: bold;">color</span>() const<br>
+ </td>
+ <td>Returns the color associated with the vertex.</td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">void <span style="font-weight: bold;">color</span>(color_type color) const<br>
+ </td>
+ <td>Sets the color of
+the vertex.<br>
+Allows to executegraph algorithms and associate data.</td>
+ </tr>
+ </tbody>
+ </table>
+ <span style="font-family: Courier New,Courier,monospace;"><br>
+ </span>All the above methods have O(1) complexity. The size of
+the Voronoi vertex structure is equal to: sizeof(void *) + sizeof(size_t) + 2 *
+sizeof(coordinate_type).<span style="font-family: Courier New,Courier,monospace;"></span>
+ <h2>Member Types</h2>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-weight: bold;">coordinate_type<br>
+ </td>
+ <td>Coordainte type.<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="vertical-align: top; font-weight: bold;">voronoi_edge_type<br>
+ </td>
+ <td style="vertical-align: top;">Voronoi edge type.<br>
+ </td>
+ </tr>
+<tr>
+ <td style="font-weight: bold;">color_type
+ </td>
+ <td>Color type (check the Important section).
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h2>Miscellaneous</h2>The following code snippet effectively traverses the Voronoi edges around the
+Voronoi vertex:<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">const
+voronoi_edge&lt;double&gt;* edge = vertex-&gt;incident_edge();</span><br>
+ <span style="font-family: Courier New,Courier,monospace;">do {</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;
+edge = edge-&gt;next();</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;
+// Do smth. with edge.</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">} while
+(edge != vertex-&gt;incident_edge());<br>
+</span>
+ <h1>Voronoi Diagram Traits<br>
+ </h1>
+Voronoi diagram traits are used to configure Voronoi diagram data
+structure.<br>
+ <h2>Declaration</h2>
+
+
+
+ <span style="font-family: Courier New,Courier,monospace;">template
+&lt;typename T&gt;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">struct
+voronoi_diagram_traits;<br>
+ <br>
+</span><span style="font-family: Courier New,Courier,monospace;">T</span> - coordinate type.<br>
+ <h2>Member Types</h2>
+
+ <span style="font-family: Courier New,Courier,monospace;">
+
+ </span>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace; font-weight: bold;">coordinate_type<br>
+ </td>
+ <td>The main coordinate type
+of the Voronoi diagram primitives.<br>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace; font-weight: bold;">cell_type<br>
+ </td>
+ <td>Voronoi cell type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace; font-weight: bold;">vertex_type<br>
+ </td>
+ <td>Voronoi vertex_type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace; font-weight: bold;">edge_type<br>
+ </td>
+ <td>Voronoi edge_type.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace; font-weight: bold;">vertex_equality_predicate_type<br>
+ </td>
+ <td>Predicate that returns
+true if two points are considered to be equal.<br>
+This is used to unite nearby Voronoi vertices.<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+ <table class="docinfo" id="table2" frame="void" rules="none">
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup> <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/voronoi_main.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_main.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,419 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta http-equiv="Content-Language" content="en-us">
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Main</title>
+
+
+
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+
+ <tbody>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277"><a title="www.boost.org home page" tabindex="2" style="border: medium none ;" href="
http://www.boost.org/"> </a></div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Contents</h3>
+ <ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li>Voronoi Main Page<br>
+ </li>
+ <li>Voronoi Benchmark</li>
+ <li>Voronoi Builder<br>
+ </li>
+ <li>Voronoi Diagram</li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br>
+ </li>
+
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+ </ul>
+ </div>
+ <h3 class="navbar">Polygon Sponsor</h3>
+ <div style="padding: 5px;" align="center"> <img src="images/intlogo.gif" border="0" height="51" width="127"><a title="www.adobe.com home page" tabindex="2" style="border: medium none ;" href="http://www.adobe.com/"> </a></div>
+ </td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%"><!-- End Header --> <br>
+
+ <h1>THE BOOST.POLYGON VORONOI LIBRARY<br>
+ </h1>
+ <img style="width: 900px; height: 300px;" alt="" src="images/voronoi3.png"><br>
+The Boost.Polygon Voronoi library provides functionality to construct the Voronoi diagram
+of a set of points and linear segments in 2D space with the following
+set of
+limitations:<br>
+ <ul>
+ <li>coordinates of the input points and endpoints of the
+segments
+should be of the integer type;</li>
+ <li>input segments should not overlap
+except their endpoints.</li>
+ </ul>
+While the first restriction is permanent (it
+allows to give the exact warranties about the output precision and
+algorithm execution),
+the second one may be resolved using the Boost.Polygon functionality.
+The strong sides of the
+library and main benefits comparing to the other implementations are
+discussed in the following paragraphs.<span style="font-weight: bold;"></span><br>
+ <h2>Robustness and Efficiency</h2>
+Let's explain a bit those terms. The efficiency is simply measured by
+the time it takes the algorithm to execute. The robustness is a bit
+more harder to explain. But those of you who had the experience with
+the following situations would understand what it doesn't mean: application segfaults randomly, algorithm output contains
+degeneracies or is completely invalid (e.g. a point is considered to be outside of the polygon,
+while should be inside). In other words robust implementation doesn't
+fail and produces expected output in 100% of cases, thus user can rely
+on
+it. Robustness is a weak place of the most non-commercial
+implementations of any complex geometric algorithm. The main issues could be divided onto two main categories: memory management
+issues, numeric stability issues. Our implementation avoids the
+first type of issues using pure STL data structures, thus you won't find
+any operator new in the code. The second category of problems is
+resolved using multiprecision <a href="voronoi_predicates.htm">geometric
+predicates</a>.
+Even for commercial implementations usage of such predicates usually
+results in a huge performance slowdown. Here is another strong side of
+the Boost.Polygon
+Voronoi library: we avoid multiprecision computations in 95% of cases
+using
+extremely fast floating-point predicates. Yes, those are not always
+exact, but we developed the <a href="voronoi_robust_fpt.htm">relative
+error arithmetic apparatus</a> to identify them and switch to the
+higher precision predicates when required.<br>
+ <h2>Precision of the Output Structures<br>
+ </h2>
+One of the extremely important results of using two types of predicates
+is that library efficiently computes relatively precise coordinates of
+the output geometries. Here we will explain a bit what exactly
+"relatively precise" means and how the received output may differ from
+the theoretically correct one (here and after we assume that output
+coordinate type is the IEEE-754 floating-point type).<br>
+ <br>
+Voronoi implementation guaranties that the relative error of the
+coordinates of the output
+geometries is always not higher than 64 machine epsilons (6
+bits of mantissa), while in many cases it is slightly less. That also
+means that using floating-point type with the larger mantissa will
+produce more precise output. Let's consider
+the following example: the output Voronoi
+vertex has double (53-bit mantissa) x-coordinate equal to 1.0, then the
+absolute error is at most 2^-53 * 2^6 = 2^-47 and the exact value of
+x-coordinate lies in the range [1.0 - 2^-47, 1.0 + 2^-47]. For
+x-coordinate equal to 2^31, the absolute error will be at most 2^-53 *
+2^31 * 2^6 = 2^-16 and the exact value of x-coordinate lies in the
+range
+[2^31 - 2^-16, 2^31 + 2^16]. For the output Voronoi vertex with long
+double
+(64-bit mantissa) x-coordinate equal to 2^31, the absolute error will
+be at most 2^-64 * 2 ^31 * 2^6 = 2^-27 and the exact value of
+x-coordinate
+lies in the range [2^31-2^-27, 2^31+2^-27]. If you'd like to become
+master of the absolute and relative error try this article.<br>
+ <br>
+During the finalization step the implementation unites Voronoi vertices whose both
+coordinates are situated within the relative error range equal to 128
+machine epsilons and removes any Voronoi edges between them. That is
+the only case that might cause differences between the algorithm output
+topology and theoretically precise one.&nbsp; Now let's see what is the practical
+impact of this. Consider the following example: we are going to construct the
+Voronoi diagram of our Solar System. The radius of our Solar System is
+approximately 2^42 metres, and we are going to snap it to the integer
+grid of [-2^42; 2^42] x [-2^42; 2^42].&nbsp; Let's choose the long double
+(64 bit mantissa) output coordinate type, then the maximum absolute error
+for the output geometries within our Solar System will be on its boundaries
+and equal to 2^-64 * 2^42 * 2^6 = 2^-18 metres. In the output we are going to
+consider vertices with both coordinates that are within 2^-17 metres (8
+micrometres) distance to be equal. That distance is equal to
+the size of a bacteria and is relative to the Solar System size.<br>
+ <h2>Fully Functional with Segments</h2>
+There are not many implementations of the Voronoi diagram construction
+algorithm that could
+handle linear segment inputs, even considering the commercial libraries.
+Support of the
+segments allows to discretize any input geometry (circle, ellipse,
+parabola). Of course as the result those might have floating-point
+coordinates, but that is resolved using scaling and snapping to the
+integer grid. This functionality is very handy as it allows to compute
+the medial axis transform of the arbitrary set of input geometries. So
+one may start
+using it for the next generation pattern recognition or computer vision
+project.<br>
+ <h2>Basic and Advanced Usage Cases</h2>
+The main library header <span style="font-family: Courier New,Courier,monospace;">voronoi.hpp</span>
+defines the following static functions to integrate the Voronoi library functionality with the Boost.Polygon interfaces:<br>
+ <br>
+ <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename Point, typename VB&gt;<br>
+size_t <span style="font-weight: bold;">insert</span>(const Point &amp;point, VB *vb)<br>
+ </td>
+ <td>Inserts a point into the Voronoi builder data structure.<br>
+Point type should model the point concept.<br>
+
+Returns index number of the inserted site.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename PointIterator, typename VB&gt;<br>
+void <span style="font-weight: bold;">insert</span>(PointIterator first, <br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PointIterator last,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VB *vb)<br>
+ </td>
+ <td>Inserts an iterator range of points into the Voronoi builder data structure.<br>
+Corresponding point type should model the point concept.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename Segment, typename VB&gt;<br>
+size_t <span style="font-weight: bold;">insert</span>(const Segment &amp;segment, VB *vb)<br>
+ </td>
+ <td>Inserts a segment into the Voronoi builder data structure.<br>
+Segment type should model the segment concept.<br>
+
+Returns index number of the inserted site.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename SegmentIterator, typename VB&gt;<br>
+void <span style="font-weight: bold;">insert</span>(SegmentIterator first,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SegmentIterator last,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VB *vb)<br>
+ </td>
+ <td>Inserts an iterator range of segments into the Voronoi builder data structure.<br>
+Corresponding segment type should model the segment concept.<br>
+ </td>
+ </tr>
+<tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename PointIterator, typename VD&gt;<br>
+void <span style="font-weight: bold;">construct_voronoi</span>(PointIterator first,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+PointIterator last,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+VD *vd)<br>
+ </td>
+ <td>Constructs Voronoi diagram of a set of points.<br>Corresponding point type should model the point concept.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename SegmentIterator, typename VD&gt;<br>
+void <span style="font-weight: bold;">construct_voronoi</span>(SegmentIterator first,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+SegmentIterator last,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+VD *vd)<br>
+ </td>
+ <td>Constructs Voronoi diagram of a set of segments.<br>Corresponding segment type should model the segment concept.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="font-family: Courier New,Courier,monospace;">template &lt;typename PointIterator,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typename SegmentIterator,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typename VD&gt;<br>void <span style="font-weight: bold;">construct_voronoi</span>(PointIterator p_first,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+PointIterator p_last,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+SegmentIterator s_first,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+SegmentIterator s_last,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+VD *vd)<br>
+ </td>
+ <td>Constructs Voronoi
+diagram of a set of points and segments.<br>Corresponding point type should model the point concept.<br>
+Corresponding segment type should model the segment concept.<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br>This
+means that it's possible to construct the Voronoi diagram with the
+following two lines of code (if corresponding input types satisfy the Boost.Polygon concept model):<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">voronoi_diagram&lt;double&gt;
+vd;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">construct_voronoi(points.begin(), points.end(), &amp;vd);</span><br>
+ <br>The library also provides the clear interfaces to
+ associate user data with the output geometries and efficiently traverse Voronoi graph.
+More details on those are covered in the basic Voronoi tutorial. Advanced usage of the library with the configuration of the coordinate
+types is explained in the <a href="voronoi_advanced_tutorial.htm">advanced
+Voronoi tutorial</a>.
+The library also allows users to implement their own Voronoi diagram /
+Delaunay triangulation construction routines based on the Voronoi builder API.<br>
+ <h2>No Third Party Dependencies<br>
+ </h2>Yes,
+the library doesn't depend on any 3rd party code. Even more than that
+there is only one dependency on the Boost libraries: boost/cstdint.hpp.
+All the required multiprecision types functionality is implemented as
+part of the library and is not exposed to the user. Considering the
+fact that Voronoi implementation consists of just 7 headers (3 public
+and 4 private) it is easy to compile it within a minute after download.
+On the other hand voronoi.hpp header provides integration routines with
+the Boost.Polygon concepts and models with a drawback of additional
+dependencies. <h2>Extensible for the User Provided Coordinate Types</h2>
+Our implementation is coordinate type agnostic. That means that as soon
+as user provided types satisfy the set of restrictions of the Voronoi builder coordinate type traits
+and implement methods required by the library, no changes are required
+neither to the algorithm, nor to the implementation of the predicates. So it's
+possible to
+construct Voronoi diagram for the 256-bit integer input coordinate type
+and
+512-bit output floating-point type without making any changes to the
+internal code.<br>
+ <h2>Bright Future<br>
+ </h2>
+Below one may find the list of the main directions for the future
+development of the library.<br>
+High-priority tasks that already have approximate implementation plan
+are the following (some of those may be proposed as future GSoC projects):<br>
+ <ul>
+ <li>Implementing Delaunay triangulation data structure.<br>
+Note: only data structure needs to be implemented that properly
+processes events provided by the Voronoi builder.</li>
+ <li>Implementing medial axis transform data structure.<br>
+Note: in general case the Voronoi diagram has completely the same
+geometry
+as the medial axis (they are 100% equal), however for many applications
+user is not interested in the Voronoi edges inside the hole regions.
+The main point
+of this data structure is to automatically filter Voronoi edges that
+belong to those areas.</li>
+ <li>Voronoi
+diagram data structure could be used to find K nearest neighbors of N
+sites in O(N*K*log(K) + N*log(N)) time. The return value would be a
+list of the k nearest neighbors for each site.<br>
+</li>
+ <li>Using the r-tree data structure built on top of the
+bounding rectangles around the Voronoi cells to answer the nearest
+neighbor queries in log(N) time, where N is the number of the Voronoi cells.<br>
+Note: there should be r-tree data structure available soon as part of
+the Boost libraries.</li>
+
+ <li>Providing interface to retrieve the convex hull of a set of
+points and segments from the Voronoi builder once the Voronoi diagram is
+constructed in O(N) time.</li>
+ <li>Providing serialization utilities for the Voronoi diagram data structure.<br>
+ </li>
+
+
+ </ul>
+High-priority tasks to be considered:<br>
+ <ul>
+ <li>Dropping the restriction on the non-intersecting input
+geometries.</li>
+ <li>Integration of the Voronoi diagram data structure with the BGL (Boost
+Graph Library).</li>
+ <li>Support of the other types of distance metrics.</li>
+ <li>Construction of the constrained Delaunay triangulation.</li>
+ <li>Support of the circular input geometries.</li>
+ </ul>
+Based on the community suggestions priorities may be changed.<br>
+ <h2>Theoretical Research<br>
+ </h2>Voronoi
+was developed as part of the Google Summer of Code 2010. The
+library was actively maintained for the last two years and involved
+strong mathematical research in the field of algorithms, data
+structures,
+relative error arithmetic and numerical robustness. Nowadays one can
+often read a scientific article that contains non-practical theoretical
+results or implementation with
+benchmarks nobody else can reproduce. The opposite story is with
+the Boost.Polygon Voronoi library. We provide pure implementation and
+benchmarks one may run on
+his PC. In case community finds it useful we will incrementally
+add more documentation on the theoretical side of our implementation. The
+authors would like to acknowledge the Steven Fortune's article <span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-weight: bold;"></span></span>"<a href="http://dl.acm.org/citation.cfm?id=10549">A Sweepline algorithm
+for Voronoi diagrams</a>", that contains the fundamental ideas of the
+current implementation.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+ <table class="docinfo" id="table2" frame="void" rules="none">
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup> <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/voronoi_predicates.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_predicates.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,251 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+
+
+
+
+ <meta http-equiv="Content-Language" content="en-us">
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Predicates</title>
+
+
+
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+
+ <tbody>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277"><a title="www.boost.org home page" tabindex="2" style="border: medium none ;" href="
http://www.boost.org/"> </a></div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Contents</h3>
+ <ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br>
+ </a></li>
+ <li>Voronoi Benchmark</li>
+ <li>Voronoi Builder<br>
+ </li>
+ <li>Voronoi Diagram</li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br>
+ </li>
+
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+ </ul>
+ </div>
+ <h3 class="navbar">Polygon Sponsor</h3>
+ <div style="padding: 5px;" align="center"> <img src="images/intlogo.gif" border="0" height="51" width="127"><a title="www.adobe.com home page" tabindex="2" style="border: medium none ;" href="http://www.adobe.com/"> </a></div>
+ </td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%"><!-- End Header --> <br>
+
+
+ <h1>Voronoi Predicates<br>
+ </h1>
+
+In mathematical theory predicate is an operator which returns true
+or false (e.g. it may answer a question: "is it sunny today?").<br>
+
+Voronoi predicates contain implementation of a set of the geometric
+predicates used by the Voronoi builder.
+Except of those they also provide
+functors that allow to compute the coordinates of the centers of the
+inscribed
+circles (those correspond to the Voronoi vertices) within the given
+relative error precision range (64 machine epsilons). This means that
+the more mantissa bits
+your floating point type has the better precision of the output
+geometries you'll get. This
+is a very handy functionality as it allows to improve output precision
+simply providing 3rd party IEEE-754 like floating-point types.<br>
+
+
+ <h2>Geometric Predicates</h2>
+
+The main issues with the implementation of any complex geometric
+algorithm arise when dealing with the robustness of the geometric
+predicates.
+Usually this
+is also the point where the commercial projects stand strong against
+noncommercial implementations (it's not the case with our
+implementation).
+For the short example let's consider the following code snippet, that
+could
+be used to compute orientation of the three points:<br>
+
+ <br>
+
+ <span style="font-family: Courier New,Courier,monospace;">double
+cross_product(double dx1, double dy1, double dx2, double dy2) {</span><br style="font-family: Courier New,Courier,monospace;">
+
+ <span style="font-family: Courier New,Courier,monospace;">&nbsp;
+return dx1 * dy2 - dx2 * dy1;</span><br style="font-family: Courier New,Courier,monospace;">
+
+ <span style="font-family: Courier New,Courier,monospace;">}<br>
+ <br>
+int main() {<br>
+&nbsp; int v = 1 &lt;&lt; 30;&nbsp; // 2 ^ 30<br>
+&nbsp; double result = </span><span style="font-family: Courier New,Courier,monospace;">cross_product</span><span style="font-family: Courier New,Courier,monospace;">(v, v - 1, v + 1,
+v);<br>
+&nbsp; printf("%.3f", result);<br>
+&nbsp; return 0;<br>
+}<br>
+ <br>
+ </span>The
+output of this simple program will be "0.000", while
+the correct one is "1.000". In terms of the orientation test this means
+that points are collinear instead of being CCW oriented. This is one of
+the basic predicates used in any geometric algorithm and taking wrong
+output from it may influence the further algorithm execution:
+corrupting algorithm underlying structures or producing completely
+invalid output. Voronoi uses
+slightly more complex predicates. To insure that they are robust and
+efficient the approach that combines two known techniques (lazy
+arithmetic and multiple
+precision computations) is used.<br>
+
+
+ <h2>Lazy Arithmetic</h2>
+
+Lazy
+arithmetic is based on the usage of IEEE-754 floating-point types to
+quickly evaluate the result of the expression. While this approach has
+a good speed
+performance it doesn't produce reliable results all the time (as in the
+example above). The way to solve the issue is apart from computing
+result of the expression compute the relative error of it as well. This
+will
+give us the range of values the evaluated result belongs to and based
+on that we can
+come up with two decisions: 1) output the value; 2) recompute the
+expression using multiprecision type. The way relative errors are
+evaluated is explained in the <a href="voronoi_robust_fpt.htm">Voronoi
+Robust FPT</a> section.<br>
+
+
+ <h2>Multiple Precision Arithmetic</h2>
+
+In the vast majority of cases
+the lazy arithmetic approach produces correct result thus further
+processing is not required. In other cases the Voronoi library defined
+or user
+provided multiple precision types are used to produce correct result.
+However even that doesn't solve all the cases. Multiprecision geometric
+predicates could be divided onto two categories:<br>
+
+ <br>
+
+1) mathematical transformation of the predicate exists that evaluates
+the exact result:<span style="font-family: Courier New,Courier,monospace;"><br>
+ <br>
+Predicate: A/B + C/D ?&lt; 0;<br>
+After math. transform: (A*D + B*C) / (B * D) ?&lt; 0;<br>
+ <br>
+Predicate: sqrt(A) ?&lt; 1.2;<br>
+After math. transform: A ?&lt; 1.44;<br>
+ <br>
+ </span>2) the correct result could be produced only by increasing
+precision of the multiprecision type and with defined relative error
+for the output type:<br>
+
+ <br>
+
+ <span style="font-family: Courier New,Courier,monospace;">Predicate:
+sqrt(A) + sqrt(B) + sqrt(C) + sqrt(D) + sqrt(E) ?&lt; 1.2;<br>
+Imagine that value of the expression to the left is very close to 1.2;<br>
+ </span><br>
+
+ <span style="font-family: Courier New,Courier,monospace;">Predicate:
+sin(x) ?&lt; 0.57;<br>
+Relative error of sin function should be known;<br>
+ <br>
+ </span>The Voronoi of points could be completely
+implemented using predicates of the first type, however the Voronoi of
+segments could not.
+The predicate that doesn't fall into the first category is responsible
+for comparison of the Voronoi circle events. However it appears that
+properly used
+this predicate can't corrupt algorithm internal structures and produces
+output technically the same as produced in case this predicate fell in
+the first category.&nbsp; The main reasons for this are: 1) algorithm
+operates with integer coordinate type of the input geometries; 2)
+closely
+situated Voronoi vertices are considered to be the same in the output
+data structure (this won't influence main targets algorithm is used
+for).<span style="font-family: Courier New,Courier,monospace;"></span><span style="font-family: Courier New,Courier,monospace;"></span><br>
+</td>
+ </tr>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+ <table class="docinfo" id="table2" frame="void" rules="none">
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup> <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012.</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/doc/voronoi_robust_fpt.htm
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/doc/voronoi_robust_fpt.htm 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,212 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+
+
+
+
+ <meta http-equiv="Content-Language" content="en-us">
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Voronoi Robust FPT</title></head><body>
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0">
+
+ <tbody>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center"> <img src="images/boost.png" border="0" height="86" width="277"><a title="www.boost.org home page" tabindex="2" style="border: medium none ;" href="
http://www.boost.org/"> </a></div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Contents</h3>
+ <ul>
+ <li>Boost.Polygon Main Page</li>
+ <li>Design Overview</li>
+ <li>Isotropy</li>
+ <li>Coordinate Concept</li>
+ <li>Interval Concept</li>
+ <li>Point Concept</li>
+ <li>Segment Concept</li>
+
+ <li>Rectangle Concept</li>
+ <li>Polygon 90 Concept</li>
+ <li><a href="gtl_polygon_90_with_holes_concept.htm">Polygon 90
+With Holes Concept</a></li>
+ <li>Polygon 45 Concept</li>
+ <li><a href="gtl_polygon_45_with_holes_concept.htm">Polygon 45
+With Holes Concept</a></li>
+ <li>Polygon Concept</li>
+ <li><a href="gtl_polygon_with_holes_concept.htm">Polygon With
+Holes Concept</a></li>
+ <li><a href="gtl_polygon_90_set_concept.htm">Polygon 90 Set
+Concept</a></li>
+ <li><a href="gtl_polygon_45_set_concept.htm">Polygon 45 Set
+Concept</a></li>
+ <li>Polygon Set Concept</li>
+ <li><a href="gtl_connectivity_extraction_90.htm">Connectivity
+Extraction 90</a></li>
+ <li><a href="gtl_connectivity_extraction_45.htm">Connectivity
+Extraction 45</a></li>
+ <li><a href="gtl_connectivity_extraction.htm">Connectivity
+Extraction</a></li>
+ <li>Property Merge 90</li>
+ <li>Property Merge 45</li>
+ <li>Property Merge</li>
+ <li><a href="voronoi_main.htm">Voronoi Main Page<br>
+ </a></li>
+ <li>Voronoi Benchmark</li>
+ <li>Voronoi Builder<br>
+ </li>
+ <li>Voronoi Diagram</li>
+ <li>Voronoi Predicates</li>
+ <li>Voronoi Robust FPT<br>
+ </li>
+
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>GTL Boostcon 2009 Paper</li>
+ <li><a href="GTL_boostcon_draft03.pdf">GTL Boostcon 2009
+Presentation</a></li>
+ <li>Performance Analysis</li>
+ <li>Layout Versus Schematic Tutorial</li>
+ <li>Minkowski Sum Tutorial</li>
+ <li>Voronoi Basic Tutorial</li>
+ <li><a href="voronoi_advanced_tutorial.htm">Voronoi Advanced
+Tutorial</a></li>
+ </ul>
+ </div>
+ <h3 class="navbar">Polygon Sponsor</h3>
+ <div style="padding: 5px;" align="center"> <img src="images/intlogo.gif" border="0" height="51" width="127"><a title="www.adobe.com home page" tabindex="2" style="border: medium none ;" href="http://www.adobe.com/"> </a></div>
+ </td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%"><!-- End Header --> <br>
+
+ <h1>Voronoi Robust FPT</h1>
+The Voronoi
+robust floating-point types are the set of classes and tools that
+allow to estimate relative error of the arithmetic expressions. It is
+assumed that the other Boost libraries may find this unit functionality
+extremely useful, as it can be used to implement robust and efficient
+arithmetic predicates or functors that compute values within known
+relative error.<br>
+ <h2>Robust Fpt Type</h2>
+The robust
+fpt type (robust floating-point type)
+- represents the IEEE-754 floating-point type wrapper that also
+contains
+information about the relative error of the underlying value. The
+implementation overloads 5 standard operations: +, -, *, /, sqrt and
+apart from the evaluating value of the expression also computes its
+relative
+error. Let's consider two values A and B; C - rounding error, re(X)
+- relative error of the X expression, then following rules apply:<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">re(A+B)
+&lt;= max(re(A), re(B)) + C, if A * B &gt;= 0;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">re(A-B)
+&lt;= (B * re(A) + A * re(B)) / |A - B| + C, if A * B &lt; 0;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">re(A*B)
+&lt;= re(A) + re(B) + C;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">re(A/B)
+&lt;= re(A) + re(B) + C;</span><br style="font-family: Courier New,Courier,monospace;">
+ <span style="font-family: Courier New,Courier,monospace;">re(sqrt(A))
+&lt;= re(A) * 0.5 + C;<br>
+ <br>
+ </span>The constant C is equal to the rounding error,
+which for the above set of arithmetic operations in the IEEE-754
+floating-point implementation should be equal to 1 machine epsilon. <br>
+ <h2>Robust Difference Type</h2>
+The robust
+difference type -
+represents expression wrapper that holds the positive and negative
+partial
+sums of the expression in a separate values in order to avoid
+the cancellation errors before evaluating the final difference.
+Following
+arithmetic operators are overloaded for the robust difference type: +,
+-, *, / (division operator is not overloaded for the case were both
+arguments have robust difference type).<br>
+Looking at the relative error formulas above one may notice a few facts:<br>
+1) all of the formulas evaluate upper bound of the relative error, the
+actual value could be a lot smaller;<br>
+2) relative error estimate for the expression depends on the order
+operations are evaluated;<br>
+3) relative error of&nbsp; the difference of two positive numbers may
+be
+extremely large in case their values are close to each other (this is
+also known as the cancellation error).<br>
+To explain this a bit, consider the following expression (~ - stands for
+almost equal, &lt;&lt; - many times larger than):<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">A - B +
+C, where A ~ B and C &lt;&lt; B;</span><br>
+ <br>
+Computing the relative error of this expression from left to right will
+produce extremely large relative error:<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">re(A-B+C)
+= max(re(A-B), re(C)) = re(A-B) = (B * re(A) + A * re(B)) / 0 = INF;<br>
+ <br>
+ </span>While doing this from right to left will keep the relative
+error value small:<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">re(A-B+C)
+= re(C-B+A) = max(re(C-B), re(A)) = max(re(A), re(B));<br>
+ <br>
+ </span>While both estimates are valid (they define upper bound of
+the relative error), of course the second one is preferable.<br>
+Here is the place where robust difference type comes useful. Basically
+it splits expression onto positive and negative partial sums and
+evaluates the
+difference only when the result is required. And did I mention that
+positive and negative values might be of the robust fpt type, that's
+why
+the relative error is always known for the expression result.<br>
+ <h2>Robust Sqrt Expression Structure</h2>
+The robust square root expression structure allows to compute the
+result of
+the expression that contains square roots within defined relative
+error.
+As an example, consider the following expression:<br>
+ <br>
+ <span style="font-family: Courier New,Courier,monospace;">A *
+sqrt(a) - B * sqrt(b), A * B &gt; 0, a &gt;= 0, b &gt;= 0;</span><br>
+ <br>
+Computing this expressions directly may apply huge cancellation error,
+however it may be transformed to the next equivalent expression:<br>
+ <span style="font-family: Courier New,Courier,monospace;"><br>
+(A * A * a - B * B * b) / (A * sqrt(a) + B * sqrt(b));</span><br>
+ <br>
+The numerator and denominator of this expression could be computed
+directly as those won't lead to the cancellation errors.<br>
+ <br>
+In general case the robust sqrt expression structure allows to evaluate
+the following set of expressions:<br>
+ <span style="font-family: Courier New,Courier,monospace;"><br>
+sum(A[i] * sqrt(a[i]), i = 1 .. N), N &lt;= 4;</span><br>
+ <br>
+This appears to be enough for the Boost.Polygon Voronoi.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">&nbsp;</td>
+ <td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+ <table class="docinfo" id="table2" frame="void" rules="none">
+ <colgroup> <col class="docinfo-name"><col class="docinfo-content"> </colgroup> <tbody valign="top">
+ <tr>
+ <th class="docinfo-name">Copyright:</th>
+ <td>Copyright © Andrii Sydorchuk 2010-2012</td>
+ </tr>
+ <tr class="field">
+ <th class="docinfo-name">License:</th>
+ <td class="field-body">Distributed under the Boost Software
+License, Version 1.0. (See accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at <a class="reference" target="_top" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+</body></html>
\ No newline at end of file

Added: branches/release/libs/polygon/example/Jamfile.v2
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/Jamfile.v2 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,37 @@
+# Copyright Andrii Sydorchuk 2010-2012.
+# Distributed under 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)
+
+import cast ;
+import testing ;
+
+lib opengl : : <name>opengl32 ;
+
+project voronoi_example
+ :
+ requirements
+ <include>.
+ <toolset>msvc:<asynch-exceptions>on
+ <library>$(BOOST_ROOT)/libs/timer/build//boost_timer
+ ;
+
+exe voronoi-visualizer
+ :
+ voronoi_visualizer.cpp
+ [ cast _ moccable-cpp : voronoi_visualizer.cpp ]
+ /qt//QtOpenGL
+ :
+ <target-os>windows:<library>opengl
+ ;
+
+alias "basic-tutorial"
+ :
+ [ run voronoi_basic_tutorial.cpp ]
+ ;
+
+alias "advanced-tutorial"
+ :
+ [ run voronoi_advanced_tutorial.cpp ]
+ ;
+

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_001.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_001.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,10 @@
+0
+8
+0 0 -3 5
+-3 5 2 10
+2 10 4 6
+4 6 10 12
+10 12 13 6
+13 6 11 1
+11 1 5 1
+5 1 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_002.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_002.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,16 @@
+0
+14
+0 0 -3 5
+-3 5 2 10
+2 10 4 6
+4 6 10 12
+10 12 13 6
+13 6 11 1
+11 1 5 1
+5 1 0 0
+1 2 0 5
+0 5 5 2
+5 2 1 2
+10 3 8 6
+8 6 10 8
+10 8 10 3
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_003.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_003.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,10 @@
+0
+8
+0 0 0 8
+0 8 4 12
+4 12 9 13
+9 13 13 13
+13 13 13 4
+13 4 10 0
+10 0 5 -1
+5 -1 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_004.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_004.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,10 @@
+0
+8
+0 0 0 8
+0 8 4 12
+4 12 9 13
+9 13 7 7
+7 7 13 4
+13 4 10 0
+10 0 5 -1
+5 -1 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_005.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_005.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,8 @@
+0
+6
+0 0 10 0
+10 0 16 -6
+16 -6 22 0
+22 0 22 -12
+22 -12 10 -12
+10 -12 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_006.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_006.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,9 @@
+0
+7
+0 0 0 10
+0 10 6 10
+6 10 10 7
+10 7 14 10
+14 10 20 10
+20 10 20 0
+20 0 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_007.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_007.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,14 @@
+0
+12
+0 0 8 3
+8 3 10 13
+10 13 16 6
+16 6 16 15
+16 15 25 10
+25 10 15 1
+15 1 27 -1
+27 -1 14 -4
+14 -4 13 3
+13 3 11 -5
+11 -5 10 0
+10 0 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_008.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_008.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,12 @@
+0
+10
+0 0 1 8
+1 8 10 7
+10 7 20 10
+20 10 25 9
+25 9 28 5
+28 5 23 -2
+23 -2 24 -7
+24 -7 13 -9
+13 -9 10 -3
+10 -3 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_009.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_009.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+0 0 0 10
+0 10 30 10
+30 10 30 0
+30 0 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_010.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_010.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,25 @@
+0
+23
+-12 4 -12 -4
+-12 -4 -8 -4
+-8 -4 -8 -1
+-8 -1 -9 0
+-9 0 -8 1
+-8 1 -8 4
+-8 4 -12 4
+-4 4 -4 -4
+-4 -4 0 -4
+0 -4 0 4
+0 4 -4 4
+4 4 4 -4
+4 -4 8 -4
+8 -4 8 4
+8 4 4 4
+-4 -8 -8 -8
+-8 -8 -8 -12
+-8 -12 -4 -12
+-4 -12 -4 -16
+-4 -16 -8 -16
+0 -8 2 -8
+2 -8 4 -8
+2 -8 2 -16

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_011.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_011.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+0
+9
+0 0 1 10
+1 10 4 9
+4 9 4 2
+4 2 0 0
+5 5 6 8
+6 8 10 10
+10 10 9 1
+9 1 6 2
+6 2 5 5
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/polygon/polygon_012.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/polygon/polygon_012.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,14 @@
+0
+12
+0 0 100 0
+100 0 100 100
+100 100 0 100
+0 100 0 0
+15 15 60 20
+60 20 87 23
+60 20 57 47
+15 85 30 80
+30 80 25 65
+30 80 60 70
+60 70 75 65
+60 70 65 85
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_001.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_001.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,2 @@
+1
+0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_002.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_002.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,3 @@
+2
+0 0
+1 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_003.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_003.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,3 @@
+2
+0 0
+0 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_004.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_004.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,3 @@
+2
+0 0
+1 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_005.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_005.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+0 0
+0 1
+0 2
+0 3
+0 4
+0 -1
+0 -2
+0 -3
+0 -4
+0 -5
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_006.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_006.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+0 0
+1 0
+2 0
+3 0
+4 0
+5 0
+-1 0
+-2 0
+-3 0
+-4 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_007.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_007.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,12 @@
+11
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_008.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_008.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+-46 -37
+-40 -30
+-34 -23
+-28 -16
+-22 -09
+-16 -02
+-10 05
+-04 12
+02 19
+08 26
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_009.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_009.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+33333 11111
+66666 0
+99999 -11111
+133332 -22222
+166665 -33333
+199998 -44444
+233331 -55555
+266664 -66666
+299997 -77777
+333330 -88888
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_010.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_010.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+3
+0 0
+2005 2005
+10025 10025
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_011.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_011.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+3
+0 0
+0 4
+1 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_012.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_012.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+4
+0 0
+0 1
+1 0
+1 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_013.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_013.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,14 @@
+13
+0 5
+0 -5
+-4 -3
+4 -3
+4 3
+-4 3
+3 -4
+-3 4
+-3 -4
+3 4
+-5 0
+5 0
+0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_014.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_014.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,13 @@
+12
+0 5
+0 -5
+-4 -3
+4 -3
+4 3
+-4 3
+3 -4
+-3 4
+-3 -4
+3 4
+-5 0
+5 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_015.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_015.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+4
+4 3
+4 8
+9 2
+9 9
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_016.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_016.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,101 @@
+100
+100 0
+99 6
+99 12
+98 18
+96 24
+95 30
+92 36
+90 42
+87 48
+84 53
+80 58
+77 63
+72 68
+68 72
+63 77
+58 80
+53 84
+48 87
+42 90
+36 92
+30 95
+24 96
+18 98
+12 99
+6 99
+0 99
+-6 99
+-12 99
+-18 98
+-24 96
+-30 95
+-36 93
+-42 90
+-48 87
+-53 84
+-58 80
+-63 77
+-68 72
+-72 68
+-76 63
+-80 58
+-84 53
+-87 48
+-90 42
+-92 36
+-95 31
+-96 25
+-98 18
+-99 12
+-99 6
+-99 0
+-99 -6
+-99 -12
+-98 -18
+-96 -24
+-95 -30
+-93 -36
+-90 -42
+-87 -48
+-84 -53
+-81 -58
+-77 -63
+-73 -68
+-68 -72
+-63 -76
+-58 -80
+-53 -84
+-48 -87
+-42 -90
+-37 -92
+-31 -95
+-25 -96
+-18 -98
+-12 -99
+-6 -99
+0 -99
+6 -99
+12 -99
+18 -98
+24 -96
+30 -95
+36 -93
+42 -90
+47 -87
+53 -84
+58 -81
+63 -77
+68 -73
+72 -68
+76 -63
+80 -59
+84 -53
+87 -48
+90 -42
+92 -37
+95 -31
+96 -25
+98 -19
+99 -12
+99 -6
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_017.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_017.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,3 @@
+0
+1
+0 0 1 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_018.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_018.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+2
+3 1
+1 3
+1
+0 0
+4 4
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_019.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_019.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+2
+3 2
+2 3
+1
+4 0 0 4
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_020.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_020.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+3
+-2 -2
+-2 4
+-2 10
+1
+0 0
+0 8
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_021.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_021.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+1
+-1 1
+1
+1 0 1 2
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_022.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_022.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+0 0 4 0
+4 0 0 4
+0 4 4 4
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_023.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_023.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+0 0 4 0
+4 0 4 4
+4 4 0 4
+0 4 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_024.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_024.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+0
+2
+0 0 4 0
+2 2 2 4
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_025.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_025.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+1
+5 6
+2
+0 0 4 0
+2 2 2 4
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_026.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_026.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+2
+0 0
+1 6
+2
+-4 5 5 -1
+3 -11 13 -1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_027.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_027.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,12 @@
+2
+0 0
+1 6
+8
+-6 5 2 -7
+3 -11 13 -1
+-4 5 5 -1
+4 4 11 4
+4 4 8 10
+11 4 8 10
+8 10 5 13
+8 10 11 13
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_028.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_028.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+0 0 4 2
+4 2 4 -2
+4 -2 0 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_029.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_029.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,10 @@
+0
+8
+0 0 0 1
+0 0 1 0
+0 0 -1 0
+0 0 0 -1
+0 0 1 1
+0 0 1 -1
+0 0 -1 1
+0 0 -1 -1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_030.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_030.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,14 @@
+0
+12
+-1 10 1 10
+10 -1 10 1
+-1 -10 1 -10
+-10 -1 -10 1
+-6 8 -2 11
+-8 6 -11 2
+6 8 2 11
+8 6 11 2
+6 -8 2 -11
+8 -6 11 -2
+-6 -8 -2 -11
+-8 -6 -11 -2
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_031.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_031.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,15 @@
+1
+0 0
+12
+-1 10 1 10
+10 -1 10 1
+-1 -10 1 -10
+-10 -1 -10 1
+-6 8 -2 11
+-8 6 -11 2
+6 8 2 11
+8 6 11 2
+6 -8 2 -11
+8 -6 11 -2
+-6 -8 -2 -11
+-8 -6 -11 -2
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_032.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_032.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+3
+0 -4
+2 8
+-16 15
+1
+7 20 7 -20

Added: branches/release/libs/polygon/example/input_data/primary/primary_033.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_033.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+4
+-6 6
+-5 6
+-4 6
+-3 6
+1
+0 0 0 7
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_034.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_034.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+0 -4 2 8
+2 8 -16 15
+0 -4 -16 15
+7 20 7 -20

Added: branches/release/libs/polygon/example/input_data/primary/primary_035.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_035.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,22 @@
+0
+20
+100 0 95 30
+95 30 80 58
+80 58 58 80
+58 80 30 95
+30 95 0 99
+0 99 -30 95
+-30 95 -58 80
+-58 80 -80 58
+-80 58 -95 30
+-95 30 -99 0
+-99 0 -95 -30
+-95 -30 -80 -58
+-80 -58 -58 -80
+-58 -80 -30 -95
+-30 -95 0 -99
+0 -99 30 -95
+30 -95 58 -80
+58 -80 80 -58
+80 -58 95 -30
+95 -30 100 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_036.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_036.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,102 @@
+0
+100
+100 0 99 6
+99 6 99 12
+99 12 98 18
+98 18 96 24
+96 24 95 30
+95 30 92 36
+92 36 90 42
+90 42 87 48
+87 48 84 53
+84 53 80 58
+80 58 77 63
+77 63 72 68
+72 68 68 72
+68 72 63 77
+63 77 58 80
+58 80 53 84
+53 84 48 87
+48 87 42 90
+42 90 36 92
+36 92 30 95
+30 95 24 96
+24 96 18 98
+18 98 12 99
+12 99 6 99
+6 99 0 99
+0 99 -6 99
+-6 99 -12 99
+-12 99 -18 98
+-18 98 -24 96
+-24 96 -30 95
+-30 95 -36 92
+-36 92 -42 90
+-42 90 -48 87
+-48 87 -53 84
+-53 84 -58 80
+-58 80 -63 77
+-63 77 -68 72
+-68 72 -72 68
+-72 68 -77 63
+-77 63 -80 58
+-80 58 -84 53
+-84 53 -87 48
+-87 48 -90 42
+-90 42 -92 36
+-92 36 -95 30
+-95 30 -96 24
+-96 24 -98 18
+-98 18 -99 12
+-99 12 -99 6
+-99 6 -99 0
+-99 0 -99 -6
+-99 -6 -99 -12
+-99 -12 -98 -18
+-98 -18 -96 -24
+-96 -24 -95 -30
+-95 -30 -92 -36
+-92 -36 -90 -42
+-90 -42 -87 -48
+-87 -48 -84 -53
+-84 -53 -80 -58
+-80 -58 -77 -63
+-77 -63 -72 -68
+-72 -68 -68 -72
+-68 -72 -63 -77
+-63 -77 -58 -80
+-58 -80 -53 -84
+-53 -84 -48 -87
+-48 -87 -42 -90
+-42 -90 -36 -92
+-36 -92 -30 -95
+-30 -95 -24 -96
+-24 -96 -18 -98
+-18 -98 -12 -99
+-12 -99 -6 -99
+-6 -99 0 -99
+0 -99 6 -99
+6 -99 12 -99
+12 -99 18 -98
+18 -98 24 -96
+24 -96 30 -95
+30 -95 36 -92
+36 -92 42 -90
+42 -90 48 -87
+48 -87 53 -84
+53 -84 58 -80
+58 -80 63 -77
+63 -77 68 -72
+68 -72 72 -68
+72 -68 77 -63
+77 -63 80 -58
+80 -58 84 -53
+84 -53 87 -48
+87 -48 90 -42
+90 -42 92 -36
+92 -36 95 -30
+95 -30 96 -24
+96 -24 98 -18
+98 -18 99 -12
+99 -12 99 -6
+99 -6 100 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_037.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_037.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,102 @@
+80
+99 6
+99 12
+98 18
+96 24
+92 36
+90 42
+87 48
+84 53
+77 63
+72 68
+68 72
+63 77
+53 84
+48 87
+42 90
+36 92
+24 96
+18 98
+12 99
+6 99
+-6 99
+-12 99
+-18 98
+-24 96
+-36 92
+-42 90
+-48 87
+-53 84
+-63 77
+-68 72
+-72 68
+-77 63
+-84 53
+-87 48
+-90 42
+-92 36
+-96 24
+-98 18
+-99 12
+-99 6
+-99 -6
+-99 -12
+-98 -18
+-96 -24
+-92 -36
+-90 -42
+-87 -48
+-84 -53
+-77 -63
+-72 -68
+-68 -72
+-63 -77
+-53 -84
+-48 -87
+-42 -90
+-36 -92
+-24 -96
+-18 -98
+-12 -99
+-6 -99
+6 -99
+12 -99
+18 -98
+24 -96
+36 -92
+42 -90
+48 -87
+53 -84
+63 -77
+68 -72
+72 -68
+77 -63
+84 -53
+87 -48
+90 -42
+92 -36
+96 -24
+98 -18
+99 -12
+99 -6
+20
+100 0 99 6
+95 30 92 36
+80 58 77 63
+58 80 53 84
+30 95 24 96
+0 99 -6 99
+-30 95 -36 92
+-58 80 -63 77
+-80 58 -84 53
+-95 30 -96 24
+-99 0 -99 -6
+-95 -30 -92 -36
+-80 -58 -77 -63
+-58 -80 -53 -84
+-30 -95 -24 -96
+0 -99 6 -99
+30 -95 36 -92
+58 -80 63 -77
+80 -58 84 -53
+95 -30 96 -24
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_038.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_038.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,222 @@
+0
+220
+0 0 0 10
+0 0 10 0
+0 10 0 20
+0 10 10 10
+0 20 0 30
+0 20 10 20
+0 30 0 40
+0 30 10 30
+0 40 0 50
+0 40 10 40
+0 50 0 60
+0 50 10 50
+0 60 0 70
+0 60 10 60
+0 70 0 80
+0 70 10 70
+0 80 0 90
+0 80 10 80
+0 90 0 100
+0 90 10 90
+0 100 10 100
+10 0 10 10
+10 0 20 0
+10 10 10 20
+10 10 20 10
+10 20 10 30
+10 20 20 20
+10 30 10 40
+10 30 20 30
+10 40 10 50
+10 40 20 40
+10 50 10 60
+10 50 20 50
+10 60 10 70
+10 60 20 60
+10 70 10 80
+10 70 20 70
+10 80 10 90
+10 80 20 80
+10 90 10 100
+10 90 20 90
+10 100 20 100
+20 0 20 10
+20 0 30 0
+20 10 20 20
+20 10 30 10
+20 20 20 30
+20 20 30 20
+20 30 20 40
+20 30 30 30
+20 40 20 50
+20 40 30 40
+20 50 20 60
+20 50 30 50
+20 60 20 70
+20 60 30 60
+20 70 20 80
+20 70 30 70
+20 80 20 90
+20 80 30 80
+20 90 20 100
+20 90 30 90
+20 100 30 100
+30 0 30 10
+30 0 40 0
+30 10 30 20
+30 10 40 10
+30 20 30 30
+30 20 40 20
+30 30 30 40
+30 30 40 30
+30 40 30 50
+30 40 40 40
+30 50 30 60
+30 50 40 50
+30 60 30 70
+30 60 40 60
+30 70 30 80
+30 70 40 70
+30 80 30 90
+30 80 40 80
+30 90 30 100
+30 90 40 90
+30 100 40 100
+40 0 40 10
+40 0 50 0
+40 10 40 20
+40 10 50 10
+40 20 40 30
+40 20 50 20
+40 30 40 40
+40 30 50 30
+40 40 40 50
+40 40 50 40
+40 50 40 60
+40 50 50 50
+40 60 40 70
+40 60 50 60
+40 70 40 80
+40 70 50 70
+40 80 40 90
+40 80 50 80
+40 90 40 100
+40 90 50 90
+40 100 50 100
+50 0 50 10
+50 0 60 0
+50 10 50 20
+50 10 60 10
+50 20 50 30
+50 20 60 20
+50 30 50 40
+50 30 60 30
+50 40 50 50
+50 40 60 40
+50 50 50 60
+50 50 60 50
+50 60 50 70
+50 60 60 60
+50 70 50 80
+50 70 60 70
+50 80 50 90
+50 80 60 80
+50 90 50 100
+50 90 60 90
+50 100 60 100
+60 0 60 10
+60 0 70 0
+60 10 60 20
+60 10 70 10
+60 20 60 30
+60 20 70 20
+60 30 60 40
+60 30 70 30
+60 40 60 50
+60 40 70 40
+60 50 60 60
+60 50 70 50
+60 60 60 70
+60 60 70 60
+60 70 60 80
+60 70 70 70
+60 80 60 90
+60 80 70 80
+60 90 60 100
+60 90 70 90
+60 100 70 100
+70 0 70 10
+70 0 80 0
+70 10 70 20
+70 10 80 10
+70 20 70 30
+70 20 80 20
+70 30 70 40
+70 30 80 30
+70 40 70 50
+70 40 80 40
+70 50 70 60
+70 50 80 50
+70 60 70 70
+70 60 80 60
+70 70 70 80
+70 70 80 70
+70 80 70 90
+70 80 80 80
+70 90 70 100
+70 90 80 90
+70 100 80 100
+80 0 80 10
+80 0 90 0
+80 10 80 20
+80 10 90 10
+80 20 80 30
+80 20 90 20
+80 30 80 40
+80 30 90 30
+80 40 80 50
+80 40 90 40
+80 50 80 60
+80 50 90 50
+80 60 80 70
+80 60 90 60
+80 70 80 80
+80 70 90 70
+80 80 80 90
+80 80 90 80
+80 90 80 100
+80 90 90 90
+80 100 90 100
+90 0 90 10
+90 0 100 0
+90 10 90 20
+90 10 100 10
+90 20 90 30
+90 20 100 20
+90 30 90 40
+90 30 100 30
+90 40 90 50
+90 40 100 40
+90 50 90 60
+90 50 100 50
+90 60 90 70
+90 60 100 60
+90 70 90 80
+90 70 100 70
+90 80 90 90
+90 80 100 80
+90 90 90 100
+90 90 100 90
+90 100 100 100
+100 0 100 10
+100 10 100 20
+100 20 100 30
+100 30 100 40
+100 40 100 50
+100 50 100 60
+100 60 100 70
+100 70 100 80
+100 80 100 90
+100 90 100 100
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_039.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_039.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,322 @@
+100
+5 5
+5 15
+5 25
+5 35
+5 45
+5 55
+5 65
+5 75
+5 85
+5 95
+15 5
+15 15
+15 25
+15 35
+15 45
+15 55
+15 65
+15 75
+15 85
+15 95
+25 5
+25 15
+25 25
+25 35
+25 45
+25 55
+25 65
+25 75
+25 85
+25 95
+35 5
+35 15
+35 25
+35 35
+35 45
+35 55
+35 65
+35 75
+35 85
+35 95
+45 5
+45 15
+45 25
+45 35
+45 45
+45 55
+45 65
+45 75
+45 85
+45 95
+55 5
+55 15
+55 25
+55 35
+55 45
+55 55
+55 65
+55 75
+55 85
+55 95
+65 5
+65 15
+65 25
+65 35
+65 45
+65 55
+65 65
+65 75
+65 85
+65 95
+75 5
+75 15
+75 25
+75 35
+75 45
+75 55
+75 65
+75 75
+75 85
+75 95
+85 5
+85 15
+85 25
+85 35
+85 45
+85 55
+85 65
+85 75
+85 85
+85 95
+95 5
+95 15
+95 25
+95 35
+95 45
+95 55
+95 65
+95 75
+95 85
+95 95
+220
+0 0 0 10
+0 0 10 0
+0 10 0 20
+0 10 10 10
+0 20 0 30
+0 20 10 20
+0 30 0 40
+0 30 10 30
+0 40 0 50
+0 40 10 40
+0 50 0 60
+0 50 10 50
+0 60 0 70
+0 60 10 60
+0 70 0 80
+0 70 10 70
+0 80 0 90
+0 80 10 80
+0 90 0 100
+0 90 10 90
+0 100 10 100
+10 0 10 10
+10 0 20 0
+10 10 10 20
+10 10 20 10
+10 20 10 30
+10 20 20 20
+10 30 10 40
+10 30 20 30
+10 40 10 50
+10 40 20 40
+10 50 10 60
+10 50 20 50
+10 60 10 70
+10 60 20 60
+10 70 10 80
+10 70 20 70
+10 80 10 90
+10 80 20 80
+10 90 10 100
+10 90 20 90
+10 100 20 100
+20 0 20 10
+20 0 30 0
+20 10 20 20
+20 10 30 10
+20 20 20 30
+20 20 30 20
+20 30 20 40
+20 30 30 30
+20 40 20 50
+20 40 30 40
+20 50 20 60
+20 50 30 50
+20 60 20 70
+20 60 30 60
+20 70 20 80
+20 70 30 70
+20 80 20 90
+20 80 30 80
+20 90 20 100
+20 90 30 90
+20 100 30 100
+30 0 30 10
+30 0 40 0
+30 10 30 20
+30 10 40 10
+30 20 30 30
+30 20 40 20
+30 30 30 40
+30 30 40 30
+30 40 30 50
+30 40 40 40
+30 50 30 60
+30 50 40 50
+30 60 30 70
+30 60 40 60
+30 70 30 80
+30 70 40 70
+30 80 30 90
+30 80 40 80
+30 90 30 100
+30 90 40 90
+30 100 40 100
+40 0 40 10
+40 0 50 0
+40 10 40 20
+40 10 50 10
+40 20 40 30
+40 20 50 20
+40 30 40 40
+40 30 50 30
+40 40 40 50
+40 40 50 40
+40 50 40 60
+40 50 50 50
+40 60 40 70
+40 60 50 60
+40 70 40 80
+40 70 50 70
+40 80 40 90
+40 80 50 80
+40 90 40 100
+40 90 50 90
+40 100 50 100
+50 0 50 10
+50 0 60 0
+50 10 50 20
+50 10 60 10
+50 20 50 30
+50 20 60 20
+50 30 50 40
+50 30 60 30
+50 40 50 50
+50 40 60 40
+50 50 50 60
+50 50 60 50
+50 60 50 70
+50 60 60 60
+50 70 50 80
+50 70 60 70
+50 80 50 90
+50 80 60 80
+50 90 50 100
+50 90 60 90
+50 100 60 100
+60 0 60 10
+60 0 70 0
+60 10 60 20
+60 10 70 10
+60 20 60 30
+60 20 70 20
+60 30 60 40
+60 30 70 30
+60 40 60 50
+60 40 70 40
+60 50 60 60
+60 50 70 50
+60 60 60 70
+60 60 70 60
+60 70 60 80
+60 70 70 70
+60 80 60 90
+60 80 70 80
+60 90 60 100
+60 90 70 90
+60 100 70 100
+70 0 70 10
+70 0 80 0
+70 10 70 20
+70 10 80 10
+70 20 70 30
+70 20 80 20
+70 30 70 40
+70 30 80 30
+70 40 70 50
+70 40 80 40
+70 50 70 60
+70 50 80 50
+70 60 70 70
+70 60 80 60
+70 70 70 80
+70 70 80 70
+70 80 70 90
+70 80 80 80
+70 90 70 100
+70 90 80 90
+70 100 80 100
+80 0 80 10
+80 0 90 0
+80 10 80 20
+80 10 90 10
+80 20 80 30
+80 20 90 20
+80 30 80 40
+80 30 90 30
+80 40 80 50
+80 40 90 40
+80 50 80 60
+80 50 90 50
+80 60 80 70
+80 60 90 60
+80 70 80 80
+80 70 90 70
+80 80 80 90
+80 80 90 80
+80 90 80 100
+80 90 90 90
+80 100 90 100
+90 0 90 10
+90 0 100 0
+90 10 90 20
+90 10 100 10
+90 20 90 30
+90 20 100 20
+90 30 90 40
+90 30 100 30
+90 40 90 50
+90 40 100 40
+90 50 90 60
+90 50 100 50
+90 60 90 70
+90 60 100 60
+90 70 90 80
+90 70 100 70
+90 80 90 90
+90 80 100 80
+90 90 90 100
+90 90 100 90
+90 100 100 100
+100 0 100 10
+100 10 100 20
+100 20 100 30
+100 30 100 40
+100 40 100 50
+100 50 100 60
+100 60 100 70
+100 70 100 80
+100 80 100 90
+100 90 100 100
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_040.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_040.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+858993458 1717986916
+-429496729 1288490187
+-2147483645 -1288490187
+-2147483645 -858993458
+-1717986916 858993458
+-2147483645 -429496729
+429496729 -2147483645
+858993458 -429496729
+-429496729 1717986916
+1717986916 -858993458
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_041.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_041.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,8 @@
+0
+6
+0 0 0 10
+-5 0 -1 0
+-6 2 -1 2
+-4 5 -2 5
+-8 8 -1 8
+-7 -2 -7 7
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_042.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_042.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-6 -1 -5 3
+-1 0 4 -1
+3 0 4 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_043.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_043.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-5 -2 -4 2
+-5 3 -2 2
+-5 5 -2 2
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_044.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_044.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-9 -8 -4 -3
+-8 -3 -4 -3
+-2 7 -1 3
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_045.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_045.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+14 76 38 29
+37 47 61 50
+39 37 41 35

Added: branches/release/libs/polygon/example/input_data/primary/primary_046.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_046.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+2
+2 -5
+3 -3
+1
+0 0 2 -7
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_047.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_047.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+1
+-35 -49
+2
+-48 -29 -46 -78
+-46 -46 -45 -42
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_048.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_048.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+0
+9
+-50 -29 -49 -73
+-48 -29 -46 -78
+-46 -46 -45 -42
+-35 -49 -34 -49
+-30 -2 -29 3
+-43 16 -40 6
+-36 38 -34 49
+-35 39 -31 37
+-28 34 -27 -9
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_049.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_049.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+0
+9
+-5 4 -7 8
+-5 4 -5 2
+-5 4 -2 7
+-1 -6 -5 -2
+-1 -6 -3 -10
+-1 -6 5 -6
+5 -1 5 -4
+5 -1 3 4
+5 -1 8 6
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_050.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_050.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0 4
+2134582590 2134582590 2134582590 2141031480
+2134582590 2134582590 2141031480 2134582590
+2141031480 2134582590 2141031480 2141031480
+2134582590 2141031480 2141031480 2141031480
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_051.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_051.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0 4
+-1073741800 -1073741800 -687194752 -1159641144
+-1073741800 -1073741800 -408021884 -923417948
+-1073741800 -1073741800 -343597376 -2061584256
+-2147483600 -837518604 -1073741800 -1073741800
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_052.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_052.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+0 0 0 -1
+0 0 1 1
+0 0 1 -1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_053.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_053.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+2
+1 0
+0 10
+1
+-2 10 -1 0
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_054.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_054.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+0 3
+-1073741800 -1073741800 -687194752 -1159641144
+-1073741800 -1073741800 -408021884 -923417948
+-1073741800 -1073741800 -343597376 -2061584256
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_055.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_055.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-3 -4 -1 -2
+-2 4 4 -1
+0 -2 0 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_056.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_056.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+1
+9 72
+2
+-2 0 -1 -50
+-1 -50 0 -99
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_057.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_057.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+5
+-4 -4
+-6 0
+-2 2
+0 4
+-10 2
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_058.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_058.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,9 @@
+0 8
+644245092 214748364 858993456 214748364
+-644245092 -214748364 0 644245092
+-858993456 -214748364 -429496728 -644245092
+0 644245092 -214748364 644245092
+644245092 644245092 0 644245092
+858993456 858993456 644245092 644245092
+644245092 214748364 644245092 644245092
+858993456 214748364 644245092 214748364

Added: branches/release/libs/polygon/example/input_data/primary/primary_059.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_059.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,12 @@
+0 11
+214748364 -214748364 1073741820 -1073741820
+-858993456 -214748364 -858993456 0
+-214748364 -644245092 -858993456 -214748364
+0 -644245092 -214748364 -644245092
+214748364 -644245092 0 -644245092
+-858993456 0 -858993456 -214748364
+-644245092 214748364 -858993456 0
+-214748364 214748364 -214748364 0
+-214748364 0 429496728 0
+-214748364 0 -214748364 -644245092
+-214748364 -644245092 0 -644245092

Added: branches/release/libs/polygon/example/input_data/primary/primary_060.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_060.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,12 @@
+0 11
+1 -1 5 -5
+-4 -1 -4 0
+-1 -3 -4 -1
+0 -3 -1 -3
+1 -3 0 -3
+-4 0 -4 -1
+-3 1 -4 0
+-1 1 -1 0
+-1 0 2 0
+-1 0 -1 -3
+-1 -3 0 -3

Added: branches/release/libs/polygon/example/input_data/primary/primary_061.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_061.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,9 @@
+0 8
+-858993456 644245092 0 -429496728
+644245092 214748364 -214748364 214748364
+0 429496728 214748364 644245092
+214748364 644245092 429496728 644245092
+429496728 644245092 644245092 858993456
+-858993456 644245092 -429496728 214748364
+-429496728 644245092 214748364 644245092
+214748364 644245092 429496728 644245092

Added: branches/release/libs/polygon/example/input_data/primary/primary_062.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_062.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+0 3
+644245092 214748364 -214748364 214748364
+0 429496728 214748364 644245092
+-429496728 644245092 214748364 644245092

Added: branches/release/libs/polygon/example/input_data/primary/primary_063.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_063.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+0
+2
+-5 0 -1 -1
+-4 0 -6 3

Added: branches/release/libs/polygon/example/input_data/primary/primary_064.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_064.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+0 3
+-8 15 24 28
+-37 4 -39 36
+12 -30 44 8

Added: branches/release/libs/polygon/example/input_data/primary/primary_065.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_065.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,89 @@
+0
+87
+-50061 -49176 -49997 -49195
+-50024 -49880 -49980 -49904
+-50001 -49559 -49983 -49632
+-49990 -49437 -49931 -49440
+-49971 -49300 -49894 -49240
+-49938 -49762 -49923 -49826
+-49938 -49133 -49864 -49064
+-49923 -49874 -49852 -49836
+-49897 -49640 -49866 -49683
+-49895 -49859 -49840 -49829
+-49889 -49210 -49828 -49159
+-49857 -49380 -49795 -49428
+-49841 -49551 -49836 -49502
+-49833 -49320 -49791 -49333
+-49828 -49707 -49779 -49627
+-49821 -49526 -49800 -49565
+-49817 -49714 -49729 -49752
+-49806 -49111 -49733 -49060
+-49796 -49803 -49787 -49787
+-49761 -49652 -49679 -49721
+-49756 -49266 -49727 -49249
+-49754 -49465 -49656 -49532
+-49740 -49146 -49706 -49152
+-49726 -49236 -49710 -49163
+-49717 -49215 -49617 -49303
+-49702 -49809 -49680 -49735
+-49702 -49370 -49678 -49415
+-49677 -49849 -49636 -49917
+-49641 -49057 -49560 -49083
+-49632 -49692 -49548 -49776
+-49627 -49640 -49627 -49572
+-49626 -49932 -49565 -49834
+-49605 -49426 -49547 -49466
+-49597 -49185 -49526 -49250
+-49542 -49652 -49454 -49751
+-49540 -49283 -49471 -49298
+-49537 -49845 -49500 -49927
+-49527 -49420 -49473 -49518
+-49519 -49092 -49483 -49162
+-49517 -49235 -49442 -49292
+-49511 -49972 -49504 -49938
+-49504 -49827 -49458 -49784
+-49494 -49323 -49485 -49413
+-49481 -49509 -49443 -49578
+-49461 -49606 -49427 -49598
+-49435 -49153 -49403 -49183
+-49419 -49762 -49376 -49792
+-49417 -49832 -49334 -49899
+-49408 -49887 -49398 -49973
+-49388 -49221 -49365 -49277
+-49381 -49444 -49374 -49522
+-49379 -49434 -49336 -49457
+-49373 -49220 -49367 -49171
+-49369 -49140 -49317 -49239
+-49367 -49538 -49291 -49562
+-49364 -49102 -49293 -49109
+-49346 -49652 -49332 -49605
+-49343 -49810 -49295 -49850
+-49337 -49198 -49292 -49238
+-49322 -49092 -49309 -49041
+-49317 -49349 -49315 -49396
+-49312 -49203 -49294 -49126
+-49297 -49988 -49256 -49977
+-49295 -49580 -49213 -49491
+-49291 -49641 -49278 -49656
+-49286 -49601 -49250 -49672
+-49283 -49914 -49281 -49847
+-49281 -49590 -49250 -49601
+-49273 -49379 -49232 -49312
+-49257 -49616 -49231 -49621
+-49245 -49884 -49202 -49841
+-49234 -49059 -49156 -49135
+-49225 -49336 -49164 -49360
+-49207 -49354 -49204 -49372
+-49188 -49136 -49160 -49168
+-49171 -49946 -49108 -49855
+-49169 -49415 -49101 -49453
+-49158 -49164 -49136 -49122
+-49130 -49925 -49097 -49841
+-49127 -49675 -49047 -49676
+-49109 -49435 -49011 -49528
+-49104 -49909 -49084 -49859
+-49082 -49602 -48992 -49566
+-49073 -49130 -49002 -49081
+-49064 -49936 -49025 -49978
+-49044 -49020 -49028 -49012
+-49010 -49234 -48949 -49210

Added: branches/release/libs/polygon/example/input_data/primary/primary_066.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_066.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,195 @@
+0
+193
+-50004 -49132 -49976 -49143
+-50000 -49669 -49975 -49629
+-49998 -49048 -49946 -49035
+-49992 -49789 -49931 -49697
+-49987 -49783 -49900 -49859
+-49986 -49922 -49973 -49927
+-49986 -49478 -49972 -49515
+-49984 -49089 -49938 -49107
+-49983 -49675 -49963 -49734
+-49975 -49538 -49940 -49498
+-49971 -49867 -49918 -49886
+-49964 -49980 -49952 -50034
+-49952 -49566 -49904 -49592
+-49952 -49236 -49859 -49215
+-49945 -49509 -49921 -49460
+-49941 -49836 -49865 -49921
+-49940 -49321 -49932 -49403
+-49933 -49797 -49837 -49806
+-49929 -49381 -49858 -49388
+-49928 -49608 -49872 -49696
+-49927 -49805 -49902 -49825
+-49909 -49026 -49858 -48938
+-49898 -49229 -49851 -49251
+-49895 -49633 -49808 -49721
+-49886 -49687 -49837 -49759
+-49878 -49348 -49846 -49395
+-49875 -49084 -49837 -49109
+-49861 -49927 -49842 -49904
+-49857 -49151 -49830 -49181
+-49856 -49372 -49846 -49393
+-49855 -49515 -49784 -49607
+-49851 -49037 -49844 -49073
+-49845 -49220 -49790 -49301
+-49838 -49482 -49826 -49430
+-49836 -49490 -49770 -49397
+-49829 -49370 -49738 -49326
+-49805 -49616 -49781 -49647
+-49802 -49947 -49754 -49975
+-49802 -49824 -49782 -49751
+-49800 -49734 -49712 -49767
+-49795 -49462 -49730 -49430
+-49788 -49139 -49728 -49156
+-49786 -49538 -49747 -49514
+-49783 -49261 -49742 -49187
+-49775 -49133 -49752 -49051
+-49772 -49826 -49770 -49755
+-49770 -49737 -49715 -49701
+-49768 -49969 -49737 -49988
+-49768 -49289 -49708 -49270
+-49756 -49890 -49745 -49906
+-49732 -50045 -49659 -49957
+-49726 -49961 -49689 -49933
+-49725 -49584 -49701 -49520
+-49717 -49454 -49665 -49408
+-49713 -49620 -49696 -49597
+-49705 -49300 -49688 -49280
+-49702 -48946 -49619 -49011
+-49701 -49797 -49672 -49733
+-49699 -49730 -49640 -49673
+-49696 -49538 -49668 -49562
+-49695 -49454 -49644 -49509
+-49683 -49845 -49613 -49847
+-49676 -49455 -49614 -49455
+-49676 -49165 -49665 -49131
+-49669 -49436 -49618 -49397
+-49667 -49273 -49611 -49341
+-49664 -49941 -49644 -49853
+-49655 -49426 -49593 -49405
+-49650 -49039 -49592 -48996
+-49645 -49762 -49558 -49819
+-49642 -49918 -49629 -49925
+-49638 -49409 -49582 -49328
+-49636 -49743 -49559 -49805
+-49629 -49529 -49549 -49487
+-49627 -49096 -49577 -49054
+-49626 -49940 -49562 -50025
+-49612 -49466 -49574 -49398
+-49606 -49583 -49532 -49633
+-49606 -49288 -49556 -49356
+-49600 -49856 -49556 -49907
+-49594 -49166 -49546 -49148
+-49593 -49160 -49557 -49119
+-49586 -49533 -49534 -49534
+-49576 -49655 -49527 -49733
+-49571 -49468 -49564 -49410
+-49555 -49534 -49505 -49544
+-49555 -49314 -49503 -49289
+-49547 -49413 -49535 -49473
+-49543 -49984 -49462 -49886
+-49537 -49835 -49489 -49866
+-49536 -49256 -49515 -49237
+-49530 -49940 -49503 -49875
+-49510 -49342 -49485 -49366
+-49505 -49287 -49455 -49308
+-49499 -49909 -49475 -49880
+-49499 -49648 -49486 -49612
+-49489 -49785 -49482 -49851
+-49488 -49690 -49469 -49624
+-49484 -49727 -49441 -49650
+-49477 -49146 -49461 -49149
+-49474 -49433 -49401 -49411
+-49471 -49873 -49451 -49780
+-49471 -49725 -49415 -49775
+-49460 -49998 -49361 -49980
+-49458 -49621 -49448 -49561
+-49448 -49432 -49420 -49438
+-49443 -49942 -49353 -49975
+-49441 -49662 -49360 -49721
+-49439 -49313 -49375 -49361
+-49438 -49826 -49378 -49771
+-49437 -49884 -49427 -49849
+-49432 -49713 -49416 -49748
+-49423 -49035 -49363 -48938
+-49411 -49201 -49312 -49232
+-49410 -49095 -49399 -49034
+-49399 -49547 -49342 -49497
+-49399 -49230 -49390 -49259
+-49394 -49445 -49361 -49429
+-49393 -49615 -49360 -49660
+-49392 -49185 -49371 -49185
+-49392 -49020 -49390 -49005
+-49369 -49816 -49324 -49864
+-49368 -49828 -49342 -49845
+-49355 -50082 -49274 -49996
+-49354 -49414 -49270 -49512
+-49350 -49378 -49324 -49448
+-49349 -49027 -49317 -49012
+-49345 -49337 -49315 -49263
+-49344 -49983 -49278 -49977
+-49341 -49596 -49321 -49518
+-49338 -49054 -49329 -49121
+-49337 -49788 -49267 -49727
+-49333 -49258 -49320 -49275
+-49329 -49596 -49276 -49520
+-49325 -49228 -49232 -49257
+-49316 -49037 -49266 -49136
+-49313 -49612 -49267 -49604
+-49310 -49276 -49305 -49362
+-49306 -49704 -49294 -49652
+-49302 -49872 -49216 -49849
+-49286 -49089 -49225 -49139
+-49284 -49119 -49278 -49117
+-49276 -49306 -49209 -49406
+-49271 -49927 -49196 -49833
+-49264 -49696 -49176 -49674
+-49253 -49909 -49245 -49992
+-49252 -49804 -49161 -49822
+-49251 -49757 -49177 -49747
+-49249 -49603 -49150 -49595
+-49239 -49989 -49200 -49929
+-49239 -49202 -49205 -49178
+-49233 -49713 -49169 -49751
+-49225 -49327 -49210 -49359
+-49223 -49037 -49158 -48993
+-49219 -49243 -49181 -49336
+-49212 -49235 -49199 -49267
+-49211 -49912 -49138 -49959
+-49210 -49462 -49123 -49497
+-49206 -49814 -49151 -49905
+-49201 -49527 -49188 -49481
+-49190 -49120 -49173 -49206
+-49178 -49656 -49174 -49598
+-49172 -49616 -49110 -49600
+-49164 -49673 -49157 -49768
+-49161 -49414 -49096 -49406
+-49159 -49013 -49077 -49078
+-49154 -49000 -49086 -49047
+-49151 -49787 -49151 -49693
+-49143 -49651 -49123 -49683
+-49141 -49982 -49100 -49949
+-49138 -49607 -49117 -49583
+-49128 -49565 -49115 -49499
+-49123 -49412 -49040 -49426
+-49121 -49732 -49103 -49690
+-49117 -49724 -49102 -49688
+-49114 -49206 -49075 -49124
+-49110 -49937 -49030 -49889
+-49109 -49215 -49071 -49305
+-49092 -49527 -49056 -49604
+-49091 -49133 -49057 -49070
+-49089 -49036 -49022 -49076
+-49079 -49254 -49019 -49331
+-49077 -49768 -49042 -49804
+-49060 -49611 -49029 -49677
+-49060 -49083 -49052 -49170
+-49054 -49751 -49041 -49789
+-49047 -49846 -48991 -49882
+-49045 -49567 -48976 -49528
+-49043 -49787 -49000 -49864
+-49038 -49415 -49028 -49463
+-49033 -49721 -48973 -49756
+-49009 -49823 -48919 -49827
+-49008 -49022 -48959 -49051

Added: branches/release/libs/polygon/example/input_data/primary/primary_067.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_067.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,193 @@
+0
+191
+-50042 -49987 -49958 -49945
+-50038 -49880 -49984 -49840
+-50037 -49252 -49945 -49166
+-50037 -49056 -49996 -49148
+-50032 -49217 -49997 -49201
+-50026 -49270 -49960 -49312
+-50015 -49525 -49981 -49615
+-49999 -49338 -49906 -49318
+-49987 -49179 -49967 -49165
+-49979 -49752 -49915 -49671
+-49969 -49530 -49933 -49592
+-49951 -49784 -49879 -49749
+-49951 -49221 -49901 -49194
+-49946 -49228 -49884 -49303
+-49945 -49017 -49892 -49044
+-49942 -49455 -49940 -49549
+-49935 -49727 -49867 -49646
+-49935 -49357 -49857 -49444
+-49929 -49561 -49868 -49576
+-49927 -49909 -49877 -49866
+-49917 -49237 -49913 -49230
+-49914 -49291 -49888 -49357
+-49911 -49876 -49902 -49845
+-49898 -49977 -49854 -49895
+-49898 -49495 -49817 -49490
+-49894 -50000 -49824 -50069
+-49893 -49680 -49865 -49692
+-49882 -49217 -49795 -49150
+-49873 -49323 -49831 -49278
+-49865 -49067 -49777 -49100
+-49859 -49115 -49822 -49170
+-49856 -49764 -49847 -49787
+-49855 -49475 -49796 -49446
+-49847 -49503 -49826 -49601
+-49847 -49227 -49774 -49288
+-49838 -49679 -49810 -49646
+-49821 -49704 -49807 -49760
+-49818 -49528 -49797 -49532
+-49812 -49585 -49753 -49537
+-49805 -49866 -49749 -49911
+-49803 -49243 -49742 -49282
+-49795 -49351 -49763 -49446
+-49790 -49322 -49768 -49409
+-49788 -49759 -49766 -49695
+-49780 -49048 -49765 -49147
+-49773 -49459 -49741 -49530
+-49764 -49068 -49746 -49104
+-49762 -49163 -49758 -49119
+-49760 -49208 -49715 -49126
+-49756 -49583 -49713 -49539
+-49754 -49728 -49690 -49715
+-49752 -49643 -49686 -49622
+-49748 -49983 -49653 -49989
+-49735 -49490 -49710 -49475
+-49733 -49426 -49649 -49404
+-49730 -49073 -49701 -49052
+-49727 -49005 -49681 -48996
+-49722 -49757 -49687 -49773
+-49702 -49179 -49668 -49222
+-49701 -49141 -49666 -49086
+-49698 -49353 -49683 -49290
+-49696 -49526 -49669 -49525
+-49692 -49988 -49637 -50061
+-49691 -49859 -49676 -49844
+-49690 -49445 -49637 -49414
+-49682 -49552 -49675 -49610
+-49679 -49853 -49671 -49918
+-49677 -49383 -49616 -49389
+-49673 -49827 -49666 -49784
+-49663 -49990 -49626 -50052
+-49661 -49742 -49639 -49842
+-49655 -49070 -49627 -48996
+-49650 -49495 -49585 -49491
+-49649 -49907 -49584 -49945
+-49645 -49253 -49640 -49189
+-49644 -49285 -49555 -49253
+-49643 -49740 -49592 -49686
+-49640 -49281 -49602 -49182
+-49630 -49389 -49536 -49479
+-49622 -49335 -49554 -49292
+-49619 -49538 -49606 -49522
+-49606 -49039 -49535 -49096
+-49602 -49383 -49599 -49328
+-49600 -49700 -49596 -49691
+-49599 -49612 -49531 -49514
+-49599 -49560 -49546 -49483
+-49592 -49206 -49563 -49198
+-49588 -49783 -49564 -49811
+-49575 -49789 -49486 -49772
+-49570 -49179 -49482 -49278
+-49557 -49225 -49506 -49269
+-49552 -49621 -49524 -49654
+-49540 -49058 -49532 -49085
+-49534 -49873 -49522 -49964
+-49532 -49626 -49502 -49607
+-49530 -49638 -49432 -49539
+-49527 -49420 -49478 -49505
+-49526 -49716 -49439 -49744
+-49508 -49372 -49498 -49454
+-49508 -49301 -49468 -49382
+-49507 -49275 -49459 -49371
+-49497 -49840 -49422 -49895
+-49494 -49252 -49451 -49251
+-49480 -49732 -49452 -49803
+-49472 -49036 -49460 -49129
+-49459 -49831 -49391 -49775
+-49456 -49427 -49390 -49409
+-49453 -49001 -49452 -48918
+-49441 -48971 -49380 -49025
+-49438 -49914 -49388 -49964
+-49430 -49525 -49342 -49457
+-49427 -49116 -49393 -49180
+-49424 -49378 -49339 -49293
+-49420 -49667 -49378 -49577
+-49419 -49208 -49392 -49286
+-49417 -49885 -49407 -49797
+-49417 -49327 -49345 -49285
+-49404 -49689 -49389 -49637
+-49399 -49430 -49320 -49375
+-49399 -49238 -49370 -49259
+-49394 -49946 -49367 -49866
+-49388 -49703 -49362 -49664
+-49385 -49785 -49311 -49789
+-49382 -49166 -49378 -49154
+-49375 -49211 -49344 -49286
+-49374 -49997 -49313 -50051
+-49367 -49941 -49348 -49969
+-49364 -49787 -49340 -49887
+-49359 -49232 -49315 -49203
+-49351 -49957 -49323 -49869
+-49349 -48969 -49303 -49026
+-49344 -49030 -49342 -49116
+-49333 -49248 -49326 -49316
+-49304 -49695 -49210 -49737
+-49301 -49643 -49244 -49656
+-49300 -49907 -49242 -49908
+-49295 -49272 -49231 -49194
+-49293 -49026 -49291 -48987
+-49290 -49992 -49244 -49950
+-49287 -49539 -49265 -49542
+-49278 -49142 -49261 -49117
+-49277 -49304 -49216 -49313
+-49272 -49800 -49251 -49769
+-49270 -49894 -49239 -49809
+-49269 -49397 -49196 -49319
+-49268 -49911 -49171 -49902
+-49257 -49050 -49208 -49086
+-49250 -49780 -49178 -49731
+-49239 -49113 -49166 -49120
+-49237 -49247 -49203 -49166
+-49230 -49019 -49194 -49061
+-49217 -49465 -49215 -49528
+-49213 -49605 -49116 -49548
+-49212 -49846 -49211 -49815
+-49209 -49912 -49171 -49955
+-49203 -49685 -49188 -49672
+-49203 -49234 -49147 -49333
+-49201 -49854 -49116 -49916
+-49200 -49087 -49190 -49045
+-49188 -49258 -49133 -49220
+-49179 -49615 -49150 -49581
+-49179 -49568 -49137 -49507
+-49168 -49326 -49114 -49385
+-49164 -50078 -49090 -49990
+-49164 -49498 -49157 -49409
+-49160 -49807 -49085 -49875
+-49158 -49601 -49136 -49624
+-49156 -49015 -49063 -49081
+-49155 -49894 -49135 -49907
+-49150 -49949 -49107 -49930
+-49150 -49143 -49147 -49210
+-49149 -49896 -49076 -49946
+-49147 -49219 -49094 -49155
+-49132 -49474 -49113 -49509
+-49129 -49400 -49052 -49347
+-49114 -49721 -49082 -49630
+-49113 -49663 -49106 -49585
+-49109 -49241 -49091 -49330
+-49107 -49230 -49067 -49179
+-49106 -49585 -49097 -49487
+-49104 -49006 -49077 -49043
+-49083 -49910 -49080 -49941
+-49069 -49028 -49010 -48971
+-49068 -49800 -49050 -49796
+-49045 -49223 -49029 -49273
+-49043 -49598 -48998 -49619
+-49037 -49738 -49031 -49678
+-49037 -49062 -49024 -49129
+-49033 -49407 -49023 -49483
+-49008 -49795 -48973 -49798
+-49003 -49428 -48993 -49376

Added: branches/release/libs/polygon/example/input_data/primary/primary_068.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_068.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,98 @@
+0
+87
+-50021 -49808 -49940 -49833
+-50019 -49363 -49964 -49351
+-49963 -49703 -49912 -49721
+-49948 -49289 -49940 -49212
+-49916 -49137 -49870 -49141
+-49906 -49419 -49873 -49349
+-49903 -49328 -49899 -49307
+-49897 -49741 -49852 -49675
+-49895 -49638 -49828 -49568
+-49893 -49251 -49855 -49313
+-49871 -49502 -49801 -49551
+-49866 -49431 -49834 -49524
+-49861 -49122 -49812 -49030
+-49852 -49901 -49814 -49872
+-49815 -49601 -49716 -49652
+-49799 -49916 -49785 -49916
+-49766 -49501 -49745 -49523
+-49765 -49266 -49672 -49282
+-49763 -49207 -49681 -49170
+-49756 -49650 -49744 -49699
+-49748 -49703 -49663 -49657
+-49736 -49581 -49683 -49534
+-49736 -49463 -49700 -49534
+-49732 -49049 -49674 -49119
+-49722 -49992 -49694 -49963
+-49710 -49415 -49648 -49378
+-49710 -49298 -49670 -49339
+-49688 -49985 -49652 -50004
+-49684 -49416 -49634 -49459
+-49659 -49561 -49573 -49550
+-49654 -49211 -49613 -49161
+-49638 -49058 -49576 -49104
+-49624 -49012 -49543 -49051
+-49621 -49341 -49619 -49317
+-49608 -49406 -49593 -49379
+-49599 -49228 -49538 -49293
+-49598 -49634 -49527 -49534
+-49594 -49713 -49523 -49729
+-49586 -49735 -49580 -49724
+-49564 -49184 -49531 -49109
+-49560 -49651 -49528 -49579
+-49552 -49739 -49457 -49829
+-49549 -49938 -49543 -49953
+-49517 -49670 -49480 -49763
+-49508 -49076 -49493 -49008
+-49507 -49467 -49451 -49459
+-49478 -49308 -49439 -49383
+-49477 -48995 -49393 -49025
+-49468 -49237 -49401 -49183
+-49464 -49517 -49393 -49532
+-49453 -49670 -49395 -49751
+-49448 -49430 -49367 -49380
+-49434 -49371 -49403 -49302
+-49422 -49836 -49384 -49882
+-49408 -49095 -49396 -49110
+-49387 -49237 -49366 -49277
+-49368 -49766 -49365 -49777
+-49366 -49860 -49280 -49911
+-49359 -49526 -49355 -49554
+-49352 -49281 -49275 -49187
+-49346 -49424 -49327 -49370
+-49346 -48957 -49257 -49045
+-49344 -49529 -49311 -49595
+-49344 -49131 -49270 -49077
+-49331 -49505 -49276 -49470
+-49275 -49446 -49269 -49529
+-49274 -48994 -49239 -49083
+-49269 -49530 -49266 -49579
+-49268 -49916 -49229 -49923
+-49254 -49830 -49233 -49777
+-49214 -49820 -49168 -49806
+-49214 -49246 -49207 -49200
+-49209 -49470 -49159 -49503
+-49203 -49239 -49121 -49256
+-49186 -49302 -49156 -49306
+-49185 -49612 -49130 -49664
+-49158 -49718 -49100 -49653
+-49155 -49271 -49056 -49347
+-49138 -49437 -49061 -49374
+-49137 -49475 -49136 -49540
+-49126 -49059 -49069 -49056
+-49113 -49751 -49072 -49794
+-49102 -49977 -49024 -49998
+-49070 -49161 -49052 -49212
+-49053 -49902 -49030 -49948
+-49048 -49413 -49004 -49497
+-49021 -49751 -49015 -49668
+-49478.582149386399 -49780.216848801821
+-49394.596858638746 -49830.083115183246
+-49404.712650811380 -49872.695164891658
+-49392.218561523550 -49808.669479018703
+../../SOC_2010/sweepline/libs/sweepline/test/sweepline_test.cpp(703): error in "segment_random_test2<double>": check verify_output(test_output_small, NO_HALF_EDGE_INTERSECTIONS) == true failed [false != true]
+-49478.582149386399 -49780.216848801821
+-49394.596858638746 -49830.083115183246
+-49404.712650811380 -49872.695164891658
+-49392.218561523550 -49808.669479018703

Added: branches/release/libs/polygon/example/input_data/primary/primary_069.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_069.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,83 @@
+0
+81
+-50026 -49688 -49978 -49701
+-49998 -49860 -49969 -49782
+-49974 -49744 -49897 -49748
+-49972 -49661 -49971 -49727
+-49971 -49845 -49902 -49789
+-49967 -49338 -49934 -49244
+-49947 -49670 -49896 -49744
+-49939 -49502 -49885 -49564
+-49937 -49150 -49874 -49115
+-49930 -49608 -49885 -49665
+-49925 -48976 -49888 -49019
+-49919 -49430 -49851 -49399
+-49909 -49052 -49908 -49015
+-49902 -49341 -49895 -49344
+-49899 -49717 -49827 -49792
+-49878 -49284 -49790 -49223
+-49844 -49250 -49784 -49171
+-49792 -49805 -49708 -49872
+-49781 -49381 -49727 -49379
+-49772 -49162 -49702 -49126
+-49768 -49290 -49696 -49324
+-49764 -49266 -49705 -49194
+-49737 -49279 -49659 -49200
+-49701 -49846 -49640 -49812
+-49699 -49415 -49670 -49409
+-49694 -49710 -49670 -49623
+-49688 -49732 -49653 -49759
+-49682 -49014 -49675 -49030
+-49679 -49421 -49641 -49428
+-49671 -49124 -49659 -49117
+-49642 -49113 -49599 -49063
+-49639 -49409 -49547 -49439
+-49629 -49070 -49595 -49043
+-49616 -49830 -49532 -49887
+-49616 -49438 -49544 -49519
+-49615 -49093 -49574 -49097
+-49610 -49583 -49587 -49491
+-49608 -49736 -49550 -49812
+-49599 -49403 -49520 -49408
+-49588 -49924 -49576 -49918
+-49579 -50064 -49483 -49994
+-49559 -49800 -49506 -49870
+-49552 -49543 -49534 -49570
+-49541 -49937 -49469 -49920
+-49513 -49782 -49494 -49816
+-49509 -49996 -49472 -49955
+-49509 -49892 -49452 -49796
+-49482 -50051 -49468 -49972
+-49419 -49411 -49371 -49424
+-49411 -49494 -49328 -49567
+-49407 -49584 -49358 -49547
+-49399 -49236 -49341 -49168
+-49370 -49205 -49284 -49121
+-49364 -49032 -49355 -49119
+-49363 -49029 -49302 -49048
+-49340 -49544 -49242 -49472
+-49335 -49800 -49325 -49866
+-49334 -49786 -49282 -49798
+-49323 -49685 -49229 -49765
+-49311 -49777 -49247 -49789
+-49305 -49633 -49283 -49631
+-49300 -49574 -49261 -49601
+-49295 -49245 -49286 -49278
+-49275 -49861 -49223 -49778
+-49261 -49054 -49235 -49029
+-49260 -49355 -49228 -49436
+-49248 -49991 -49198 -49926
+-49236 -49618 -49152 -49637
+-49225 -50042 -49179 -49961
+-49190 -49250 -49108 -49308
+-49189 -49609 -49168 -49578
+-49164 -49936 -49133 -49922
+-49124 -49640 -49057 -49695
+-49117 -49169 -49041 -49213
+-49111 -49802 -49099 -49894
+-49105 -49697 -49053 -49738
+-49082 -49532 -49031 -49559
+-49063 -49321 -49007 -49234
+-49032 -49130 -48987 -49200
+-49025 -49437 -48988 -49427
+-49008 -49119 -48968 -49214

Added: branches/release/libs/polygon/example/input_data/primary/primary_070.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_070.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+1
+-49400 -49572
+2
+-49431 -49703 -49427 -49798
+-49427 -49798 -49423 -49892
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/primary/primary_071.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/primary/primary_071.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,94 @@
+0
+90
+-50051 -49552 -49991 -49625
+-50042 -49515 -49976 -49442
+-50024 -49188 -49996 -49221
+-50007 -49191 -49933 -49159
+-50000 -49509 -49989 -49549
+-49991 -49047 -49950 -49120
+-49984 -49938 -49909 -49904
+-49959 -49631 -49908 -49568
+-49954 -49626 -49887 -49595
+-49949 -49320 -49859 -49414
+-49916 -49188 -49859 -49241
+-49906 -49611 -49830 -49675
+-49905 -49754 -49847 -49843
+-49892 -49327 -49848 -49239
+-49882 -49416 -49872 -49486
+-49871 -49640 -49797 -49703
+-49846 -49283 -49821 -49368
+-49767 -49927 -49707 -49928
+-49765 -49619 -49762 -49671
+-49764 -49476 -49721 -49531
+-49753 -49486 -49691 -49491
+-49738 -49590 -49712 -49679
+-49736 -49108 -49686 -49138
+-49736 -49008 -49671 -48932
+-49724 -49802 -49627 -49770
+-49717 -49691 -49694 -49699
+-49714 -49152 -49708 -49200
+-49707 -49875 -49621 -49790
+-49700 -49062 -49648 -49109
+-49684 -49680 -49611 -49740
+-49654 -49456 -49562 -49400
+-49611 -49270 -49584 -49339
+-49585 -49234 -49567 -49210
+-49578 -49012 -49527 -49080
+-49561 -49658 -49538 -49670
+-49536 -49144 -49445 -49082
+-49523 -49784 -49500 -49868
+-49509 -49742 -49424 -49733
+-49508 -49070 -49472 -49092
+-49490 -49176 -49439 -49082
+-49477 -49856 -49475 -49779
+-49467 -49051 -49446 -49014
+-49462 -49793 -49457 -49818
+-49460 -49642 -49381 -49620
+-49444 -49977 -49349 -50073
+-49444 -49973 -49396 -49915
+-49425 -49114 -49363 -49182
+-49424 -49002 -49351 -49096
+-49400 -49470 -49311 -49557
+-49392 -49631 -49324 -49704
+-49375 -49195 -49281 -49123
+-49361 -49096 -49314 -49143
+-49345 -49402 -49256 -49437
+-49339 -49476 -49298 -49437
+-49324 -49287 -49242 -49273
+-49290 -49579 -49252 -49548
+-49280 -49601 -49217 -49612
+-49268 -49108 -49169 -49112
+-49257 -49481 -49241 -49480
+-49248 -49521 -49233 -49580
+-49246 -49802 -49245 -49893
+-49236 -49292 -49205 -49336
+-49220 -49157 -49210 -49143
+-49209 -49367 -49171 -49405
+-49205 -49883 -49176 -49926
+-49204 -49128 -49131 -49099
+-49200 -49252 -49128 -49166
+-49194 -49507 -49189 -49496
+-49185 -49344 -49140 -49354
+-49183 -49895 -49144 -49867
+-49183 -49289 -49135 -49213
+-49177 -49192 -49168 -49158
+-49140 -49876 -49120 -49924
+-49140 -49855 -49116 -49874
+-49138 -49132 -49081 -49142
+-49127 -49293 -49090 -49363
+-49096 -49761 -49037 -49744
+-49096 -49101 -49081 -49093
+-49090 -49308 -49083 -49401
+-49086 -49605 -49074 -49539
+-49084 -49865 -49059 -49795
+-49084 -49124 -48989 -49171
+-49077 -49034 -49067 -49009
+-49069 -49979 -49067 -49965
+-49063 -49317 -49050 -49248
+-49036 -49851 -49002 -49942
+-49032 -49126 -49003 -49097
+-49025 -49181 -48951 -49179
+-49022 -49065 -48973 -49118
+-49018 -49876 -48988 -49875
+../../SOC_2010/sweepline/libs/sweepline/test/sweepline_test.cpp(723): error in "segment_random_test2<double>": check test_output_small.num_vertex_records() == test_output_large.num_vertex_records() failed [476 != 526]
+../../SOC_2010/sweepline/libs/sweepline/test/sweepline_test.cpp(725): error in "segment_random_test2<double>": check test_output_small.num_edge_records() == test_output_large.num_edge_records() failed [734 != 795]

Added: branches/release/libs/polygon/example/input_data/random/random_001.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_001.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+9 1
+4 3
+9 6
+9 8
+3 9
+6 8
+0 5
+9 5
+3 0
+2 1
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/random/random_002.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_002.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+9 9
+2 6
+3 1
+6 4
+9 1
+9 7
+6 2
+2 4
+3 7
+6 7
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/random/random_003.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_003.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,11 @@
+10
+4 1
+5 4
+5 5
+2 6
+3 4
+0 7
+2 5
+8 9
+0 4
+2 7
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/random/random_004.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_004.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,101 @@
+100
+29 76
+99 94
+74 20
+53 26
+95 55
+94 21
+50 70
+19 93
+31 30
+73 61
+87 23
+60 66
+51 29
+82 51
+74 40
+31 77
+1 82
+43 0
+58 67
+63 32
+19 90
+68 31
+49 63
+76 83
+72 20
+70 11
+80 23
+4 90
+32 56
+63 75
+51 71
+62 10
+80 57
+71 47
+2 8
+67 85
+64 72
+85 6
+53 91
+92 25
+95 79
+24 6
+1 10
+10 85
+11 30
+22 14
+48 55
+82 8
+14 54
+84 60
+33 91
+85 60
+65 81
+60 23
+10 44
+29 32
+21 11
+90 15
+73 71
+41 62
+9 36
+44 80
+27 39
+41 38
+25 23
+86 15
+4 76
+52 6
+39 97
+42 25
+93 93
+97 24
+13 16
+58 62
+48 78
+43 74
+99 85
+13 42
+8 82
+13 9
+51 50
+85 83
+30 11
+58 42
+44 32
+88 74
+37 21
+65 28
+79 94
+50 94
+38 83
+82 13
+30 88
+16 92
+73 66
+24 0
+40 82
+57 25
+55 88
+13 33
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/random/random_005.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_005.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,101 @@
+100
+-901943112 1116691472
+2104533928 1889785568
+1030792128 -1288490160
+128849016 -1030792128
+1932735240 214748360
+1889785568 -1245540488
+0 858993440
+-1331439832 1846835896
+-816043768 -858993440
+987842456 472446392
+1589137864 -1159641144
+429496720 687194752
+42949672 -901943112
+1374389504 42949672
+1030792128 -429496720
+-816043768 1159641144
+-2104533928 1374389504
+-300647704 -2147483600
+343597376 730144424
+558345736 -773094096
+-1331439832 1717986880
+773094096 -816043768
+-42949672 558345736
+1116691472 1417339176
+944892784 -1288490160
+858993440 -1675037208
+1288490160 -1159641144
+-1975684912 1717986880
+-773094096 257698032
+558345736 1073741800
+42949672 901943112
+515396064 -1717986880
+1288490160 300647704
+901943112 -128849016
+-2061584256 -1803886224
+730144424 1503238520
+601295408 944892784
+1503238520 -1889785568
+128849016 1760936552
+1803886224 -1073741800
+1932735240 1245540488
+-1116691472 -1889785568
+-2104533928 -1717986880
+-1717986880 1503238520
+-1675037208 -858993440
+-1202590816 -1546188192
+-85899344 214748360
+1374389504 -1803886224
+-1546188192 171798688
+1460288848 429496720
+-730144424 1760936552
+1503238520 429496720
+644245080 1331439832
+429496720 -1159641144
+-1717986880 -257698032
+-901943112 -773094096
+-1245540488 -1675037208
+1717986880 -1503238520
+987842456 901943112
+-386547048 515396064
+-1760936552 -601295408
+-257698032 1288490160
+-987842456 -472446392
+-386547048 -515396064
+-1073741800 -1159641144
+1546188192 -1503238520
+-1975684912 1116691472
+85899344 -1889785568
+-472446392 2018634584
+-343597376 -1073741800
+1846835896 1846835896
+2018634584 -1116691472
+-1589137864 -1460288848
+343597376 515396064
+-85899344 1202590816
+-300647704 1030792128
+2104533928 1503238520
+-1589137864 -343597376
+-1803886224 1374389504
+-1589137864 -1760936552
+42949672 0
+1503238520 1417339176
+-858993440 -1675037208
+343597376 -343597376
+-257698032 -773094096
+1632087536 1030792128
+-558345736 -1245540488
+644245080 -944892784
+1245540488 1889785568
+0 1889785568
+-515396064 1417339176
+1374389504 -1589137864
+-858993440 1632087536
+-1460288848 1803886224
+987842456 687194752
+-1116691472 -2147483600
+-429496720 1374389504
+300647704 -1073741800
+214748360 1632087536
+-1589137864 -730144424
\ No newline at end of file

Added: branches/release/libs/polygon/example/input_data/random/random_006.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_006.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+-27 -32 5 -21
+-18 41 27 9
+-17 -25 12 9
+27 0 40 -20

Added: branches/release/libs/polygon/example/input_data/random/random_007.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_007.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+-48 10 -17 19
+-35 -30 -33 -2
+13 -45 18 46
+31 -14 47 18

Added: branches/release/libs/polygon/example/input_data/random/random_008.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_008.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+-34 7 -21 13
+-9 37 39 10
+7 21 26 -18
+8 45 47 22

Added: branches/release/libs/polygon/example/input_data/random/random_009.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_009.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-21 -9 -9 -34
+-20 1 11 43
+-3 -1 21 18
+34 -18 40 15
+47 43 48 -7

Added: branches/release/libs/polygon/example/input_data/random/random_010.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_010.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-39 -43 -6 -22
+13 -21 33 38
+24 -42 42 43

Added: branches/release/libs/polygon/example/input_data/random/random_011.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_011.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-22 -18 -13 -26
+-16 -36 23 -28
+-12 -11 6 19
+-4 -3 44 -30
+15 -5 47 17

Added: branches/release/libs/polygon/example/input_data/random/random_012.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_012.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+-27 -24 -20 -45
+-15 29 28 20
+-12 -36 19 -21
+1 -21 3 -1

Added: branches/release/libs/polygon/example/input_data/random/random_013.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_013.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+-47 11 -25 -20
+-17 2 3 -46
+-13 29 32 -35
+25 -3 42 37

Added: branches/release/libs/polygon/example/input_data/random/random_014.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_014.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-36 -8 -18 24
+-17 44 -2 18
+-16 -7 -9 -28
+-14 5 -2 -20
+31 42 33 36

Added: branches/release/libs/polygon/example/input_data/random/random_015.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_015.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-24 17 -19 -12
+-21 -40 3 -17
+28 1 38 -38

Added: branches/release/libs/polygon/example/input_data/random/random_016.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_016.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,8 @@
+0
+6
+-44 -29 -36 -40
+-40 0 -5 -43
+-7 37 -3 -23
+-4 18 14 30
+6 39 38 32
+12 -20 27 -15

Added: branches/release/libs/polygon/example/input_data/random/random_017.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_017.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-46 -50 -36 -14
+-5 46 -4 -40
+21 45 49 -45

Added: branches/release/libs/polygon/example/input_data/random/random_018.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_018.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-45 44 -36 -29
+-36 41 -32 -14
+-16 44 23 9
+13 -4 19 -29
+18 -3 48 39

Added: branches/release/libs/polygon/example/input_data/random/random_019.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_019.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-29 22 -6 18
+-6 -20 18 19
+-5 28 44 22
+9 -48 22 -15
+11 32 11 39

Added: branches/release/libs/polygon/example/input_data/random/random_020.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_020.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-14 -43 37 -49
+-12 41 -10 -43
+-7 -20 18 -38
+7 34 47 -38
+23 26 42 -3

Added: branches/release/libs/polygon/example/input_data/random/random_021.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_021.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-47 32 0 28
+-20 -22 9 -13
+-13 37 21 30
+-7 47 2 47
+26 47 32 1

Added: branches/release/libs/polygon/example/input_data/random/random_022.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_022.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,5 @@
+0
+3
+-19 17 -10 9
+-1 -50 25 40
+26 15 48 -3

Added: branches/release/libs/polygon/example/input_data/random/random_023.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_023.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,8 @@
+0
+6
+-41 -46 -20 -48
+-41 -22 10 -46
+-27 36 28 19
+-10 -10 28 -15
+13 -28 48 -19
+41 -20 47 1

Added: branches/release/libs/polygon/example/input_data/random/random_024.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_024.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-29 26 24 -46
+-24 -48 -15 -19
+-15 -20 -2 -23
+-9 -30 0 -42
+3 21 24 43

Added: branches/release/libs/polygon/example/input_data/random/random_025.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_025.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,4 @@
+0
+2
+-8 -34 29 22
+37 10 48 7

Added: branches/release/libs/polygon/example/input_data/random/random_026.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_026.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,6 @@
+0
+4
+-35 -28 19 26
+-21 16 -19 -4
+9 -34 27 3
+25 48 47 -31

Added: branches/release/libs/polygon/example/input_data/random/random_027.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_027.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,8 @@
+0
+6
+-45 46 -24 24
+-37 30 -36 -7
+-18 -47 -4 -14
+-3 -34 40 -33
+5 17 44 -26
+35 -16 45 9

Added: branches/release/libs/polygon/example/input_data/random/random_028.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/input_data/random/random_028.txt 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,7 @@
+0
+5
+-30 -27 -18 16
+-14 47 0 -46
+-13 42 13 20
+-10 26 7 -42
+-2 22 22 -42

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_001.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_002.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_003.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_004.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_005.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_006.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_007.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_008.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_009.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_010.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_011.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/polygon/polygon_012.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_001.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_002.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_003.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_004.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_005.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_006.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_007.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_008.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_009.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_010.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_011.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_012.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_013.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_014.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_015.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_016.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_017.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_018.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_019.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_020.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_021.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_022.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_023.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_024.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_025.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_026.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_027.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_028.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_029.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_030.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_031.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_032.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_033.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_034.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_035.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_036.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_037.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_038.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_039.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_040.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_041.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_042.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_043.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_044.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_045.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_046.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_047.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_048.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_049.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_050.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_051.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_052.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_053.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_054.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_055.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_056.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_057.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_058.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_059.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_060.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_061.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_062.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_063.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_064.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_065.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_066.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_067.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_068.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_069.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_070.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/primary/primary_071.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_001.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_002.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_003.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_004.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_005.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_006.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_007.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_008.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_009.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_010.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_011.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_012.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_013.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_014.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_015.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_016.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_017.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_018.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_019.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_020.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_021.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_022.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_023.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_024.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_025.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_026.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_027.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/output_data/random/random_028.png
==============================================================================
Binary file. No diff available.

Added: branches/release/libs/polygon/example/voronoi_advanced_tutorial.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/voronoi_advanced_tutorial.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,145 @@
+// Boost.Polygon library voronoi_advanced_tutorial.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <cmath>
+#include <cstdio>
+#include <ctime>
+#include <string>
+
+// This will work properly only with GCC compiler.
+#include <ieee754.h>
+typedef long double fpt80;
+
+// Random generators and distributions.
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/random/uniform_int_distribution.hpp>
+#include <boost/timer/timer.hpp>
+
+#include <boost/polygon/voronoi.hpp>
+using namespace boost::polygon;
+
+struct my_ulp_comparison {
+ enum Result {
+ LESS = -1,
+ EQUAL = 0,
+ MORE = 1
+ };
+
+ Result operator()(fpt80 a, fpt80 b, unsigned int maxUlps) const {
+ if (a == b)
+ return EQUAL;
+ if (a > b) {
+ Result res = operator()(b, a, maxUlps);
+ if (res == EQUAL) return res;
+ return (res == LESS) ? MORE : LESS;
+ }
+ ieee854_long_double lhs, rhs;
+ lhs.d = a;
+ rhs.d = b;
+ if (lhs.ieee.negative ^ rhs.ieee.negative)
+ return lhs.ieee.negative ? LESS : MORE;
+ boost::uint64_t le = lhs.ieee.exponent; le =
+ (le << 32) + lhs.ieee.mantissa0;
+ boost::uint64_t re = rhs.ieee.exponent; re =
+ (re << 32) + rhs.ieee.mantissa0;
+ if (lhs.ieee.negative) {
+ if (le - 1 > re)
+ return LESS;
+ le = (le == re) ? 0 : 1;
+ le = (le << 32) + lhs.ieee.mantissa1;
+ re = rhs.ieee.mantissa1;
+ return (re + maxUlps < le) ? LESS : EQUAL;
+ } else {
+ if (le + 1 < re)
+ return LESS;
+ le = lhs.ieee.mantissa0;
+ re = (le == re) ? 0 : 1;
+ re = (re << 32) + rhs.ieee.mantissa1;
+ return (le + maxUlps < re) ? LESS : EQUAL;
+ }
+ }
+};
+
+struct my_fpt_converter {
+ template <typename T>
+ fpt80 operator()(const T& that) const {
+ return static_cast<fpt80>(that);
+ }
+
+ template <std::size_t N>
+ fpt80 operator()(const typename detail::extended_int<N> &that) const {
+ fpt80 result = 0.0;
+ for (std::size_t i = 1; i <= (std::min)((std::size_t)3, that.size()); ++i) {
+ if (i != 1)
+ result *= static_cast<fpt80>(0x100000000ULL);
+ result += that.chunks()[that.size() - i];
+ }
+ return (that.count() < 0) ? -result : result;
+ }
+};
+
+// Voronoi diagram traits.
+struct my_voronoi_diagram_traits {
+ typedef fpt80 coordinate_type;
+ typedef voronoi_cell<coordinate_type> cell_type;
+ typedef voronoi_vertex<coordinate_type> vertex_type;
+ typedef voronoi_edge<coordinate_type> edge_type;
+ typedef class {
+ public:
+ enum { ULPS = 128 };
+ bool operator()(const vertex_type &v1, const vertex_type &v2) const {
+ return (ulp_cmp(v1.x(), v2.x(), ULPS) == my_ulp_comparison::EQUAL &&
+ ulp_cmp(v1.y(), v2.y(), ULPS) == my_ulp_comparison::EQUAL);
+ }
+ private:
+ my_ulp_comparison ulp_cmp;
+ } vertex_equality_predicate_type;
+};
+
+// Voronoi ctype traits for 48-bit signed integer input coordinates.
+struct my_voronoi_ctype_traits {
+ typedef boost::int64_t int_type;
+ typedef detail::extended_int<3> int_x2_type;
+ typedef detail::extended_int<3> uint_x2_type;
+ typedef detail::extended_int<128> big_int_type;
+ typedef fpt80 fpt_type;
+ typedef fpt80 efpt_type;
+ typedef my_ulp_comparison ulp_cmp_type;
+ typedef my_fpt_converter to_fpt_converter_type;
+ typedef my_fpt_converter to_efpt_converter_type;
+};
+
+const unsigned int GENERATED_POINTS = 100;
+const boost::int64_t MAX = 0x1000000000000LL;
+
+int main() {
+ boost::mt19937_64 gen(std::time(0));
+ boost::random::uniform_int_distribution<boost::int64_t> distr(-MAX, MAX-1);
+ voronoi_builder<boost::int64_t, my_voronoi_ctype_traits> vb;
+ for (size_t i = 0; i < GENERATED_POINTS; ++i) {
+ boost::int64_t x = distr(gen);
+ boost::int64_t y = distr(gen);
+ vb.insert_point(x, y);
+ }
+
+ printf("Constructing Voronoi diagram of %d points...\n", GENERATED_POINTS);
+ boost::timer::cpu_timer t;
+ voronoi_diagram<fpt80, my_voronoi_diagram_traits> vd;
+ t.start();
+ vb.construct(&vd);
+ boost::timer::cpu_times times = t.elapsed();
+ std::string ftime = boost::timer::format(times, 5, "%w");
+
+ printf("Construction done in: %s seconds.\n", ftime.c_str());
+ printf("Resulting Voronoi graph has the following stats:\n");
+ printf("Number of Voronoi cells: %lu.\n", vd.num_cells());
+ printf("Number of Voronoi vertices: %lu.\n", vd.num_vertices());
+ printf("Number of Voronoi edges: %lu.\n", vd.num_edges());
+ return 0;
+}

Added: branches/release/libs/polygon/example/voronoi_basic_tutorial.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/voronoi_basic_tutorial.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,193 @@
+// Boost.Polygon library voronoi_basic_tutorial.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <cstdio>
+#include <vector>
+
+#include <boost/polygon/voronoi.hpp>
+using boost::polygon::voronoi_builder;
+using boost::polygon::voronoi_diagram;
+using boost::polygon::x;
+using boost::polygon::y;
+using boost::polygon::low;
+using boost::polygon::high;
+
+#include "voronoi_visual_utils.hpp"
+
+struct Point {
+ int a;
+ int b;
+ Point(int x, int y) : a(x), b(y) {}
+};
+
+struct Segment {
+ Point p0;
+ Point p1;
+ Segment(int x1, int y1, int x2, int y2) : p0(x1, y1), p1(x2, y2) {}
+};
+
+namespace boost {
+namespace polygon {
+
+template <>
+struct geometry_concept<Point> {
+ typedef point_concept type;
+};
+
+template <>
+struct point_traits<Point> {
+ typedef int coordinate_type;
+
+ static inline coordinate_type get(
+ const Point& point, orientation_2d orient) {
+ return (orient == HORIZONTAL) ? point.a : point.b;
+ }
+};
+
+template <>
+struct geometry_concept<Segment> {
+ typedef segment_concept type;
+};
+
+template <>
+struct segment_traits<Segment> {
+ typedef int coordinate_type;
+ typedef Point point_type;
+
+ static inline point_type get(const Segment& segment, direction_1d dir) {
+ return dir.to_int() ? segment.p1 : segment.p0;
+ }
+};
+} // polygon
+} // boost
+
+// Traversing Voronoi edges using edge iterator.
+int iterate_primary_edges1(const voronoi_diagram<double>& vd) {
+ int result = 0;
+ for (voronoi_diagram<double>::const_edge_iterator it = vd.edges().begin();
+ it != vd.edges().end(); ++it) {
+ if (it->is_primary())
+ ++result;
+ }
+ return result;
+}
+
+// Traversing Voronoi edges using cell iterator.
+int iterate_primary_edges2(const voronoi_diagram<double> &vd) {
+ int result = 0;
+ for (voronoi_diagram<double>::const_cell_iterator it = vd.cells().begin();
+ it != vd.cells().end(); ++it) {
+ const voronoi_diagram<double>::cell_type& cell = *it;
+ const voronoi_diagram<double>::edge_type* edge = cell.incident_edge();
+ // This is convenient way to iterate edges around Voronoi cell.
+ do {
+ if (edge->is_primary())
+ ++result;
+ edge = edge->next();
+ } while (edge != cell.incident_edge());
+ }
+ return result;
+}
+
+// Traversing Voronoi edges using vertex iterator.
+// As opposite to the above two functions this one will not iterate through
+// edges without finite endpoints and will iterate only once through edges
+// with single finite endpoint.
+int iterate_primary_edges3(const voronoi_diagram<double> &vd) {
+ int result = 0;
+ for (voronoi_diagram<double>::const_vertex_iterator it =
+ vd.vertices().begin(); it != vd.vertices().end(); ++it) {
+ const voronoi_diagram<double>::vertex_type& vertex = *it;
+ const voronoi_diagram<double>::edge_type* edge = vertex.incident_edge();
+ // This is convenient way to iterate edges around Voronoi vertex.
+ do {
+ if (edge->is_primary())
+ ++result;
+ edge = edge->rot_next();
+ } while (edge != vertex.incident_edge());
+ }
+ return result;
+}
+
+int main() {
+ // Preparing Input Geometries.
+ std::vector<Point> points;
+ points.push_back(Point(0, 0));
+ points.push_back(Point(1, 6));
+ std::vector<Segment> segments;
+ segments.push_back(Segment(-4, 5, 5, -1));
+ segments.push_back(Segment(3, -11, 13, -1));
+
+ // Construction of the Voronoi Diagram.
+ voronoi_diagram<double> vd;
+ construct_voronoi(points.begin(), points.end(),
+ segments.begin(), segments.end(),
+ &vd);
+
+ // Traversing Voronoi Graph.
+ {
+ printf("Traversing Voronoi graph.\n");
+ printf("Number of visited primary edges using edge iterator: %d\n",
+ iterate_primary_edges1(vd));
+ printf("Number of visited primary edges using cell iterator: %d\n",
+ iterate_primary_edges2(vd));
+ printf("Number of visited primary edges using vertex iterator: %d\n",
+ iterate_primary_edges3(vd));
+ printf("\n");
+ }
+
+ // Using color member of the Voronoi primitives to store the average number
+ // of edges around each cell (including secondary edges).
+ {
+ printf("Number of edges (including secondary) around the Voronoi cells:\n");
+ for (voronoi_diagram<double>::const_edge_iterator it = vd.edges().begin();
+ it != vd.edges().end(); ++it) {
+ std::size_t cnt = it->cell()->color();
+ it->cell()->color(cnt + 1);
+ }
+ for (voronoi_diagram<double>::const_cell_iterator it = vd.cells().begin();
+ it != vd.cells().end(); ++it) {
+ printf("%lu ", it->color());
+ }
+ printf("\n");
+ printf("\n");
+ }
+
+ // Linking Voronoi cells with input geometries.
+ {
+ unsigned int cell_index = 0;
+ for (voronoi_diagram<double>::const_cell_iterator it = vd.cells().begin();
+ it != vd.cells().end(); ++it) {
+ if (it->contains_point()) {
+ std::size_t index = it->source_index();
+ Point p = points[index];
+ printf("Cell #%ud contains a point: (%d, %d).\n",
+ cell_index, x(p), y(p));
+ } else {
+ std::size_t index = it->source_index() - points.size();
+ Point p0 = low(segments[index]);
+ Point p1 = high(segments[index]);
+ if (it->source_category() ==
+ boost::polygon::SOURCE_CATEGORY_SEGMENT_START_POINT) {
+ printf("Cell #%ud contains segment start point: (%d, %d).\n",
+ cell_index, x(p0), y(p0));
+ } else if (it->source_category() ==
+ boost::polygon::SOURCE_CATEGORY_SEGMENT_END_POINT) {
+ printf("Cell #%ud contains segment end point: (%d, %d).\n",
+ cell_index, x(p0), y(p0));
+ } else {
+ printf("Cell #%ud contains a segment: ((%d, %d), (%d, %d)). \n",
+ cell_index, x(p0), y(p0), x(p1), y(p1));
+ }
+ }
+ ++cell_index;
+ }
+ }
+ return 0;
+}

Added: branches/release/libs/polygon/example/voronoi_visual_utils.hpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/voronoi_visual_utils.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,186 @@
+// Boost.Polygon library voronoi_graphic_utils.hpp header file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_POLYGON_VORONOI_VISUAL_UTILS
+#define BOOST_POLYGON_VORONOI_VISUAL_UTILS
+
+#include <stack>
+#include <vector>
+
+#include <boost/polygon/isotropy.hpp>
+#include <boost/polygon/point_concept.hpp>
+#include <boost/polygon/segment_concept.hpp>
+#include <boost/polygon/rectangle_concept.hpp>
+
+namespace boost {
+namespace polygon {
+// Utilities class, that contains set of routines handful for visualization.
+template <typename CT>
+class voronoi_visual_utils {
+ public:
+ // Discretize parabolic Voronoi edge.
+ // Parabolic Voronoi edges are always formed by one point and one segment
+ // from the initial input set.
+ //
+ // Args:
+ // point: input point.
+ // segment: input segment.
+ // max_dist: maximum discretization distance.
+ // discretization: point discretization of the given Voronoi edge.
+ //
+ // Template arguments:
+ // InCT: coordinate type of the input geometries (usually integer).
+ // Point: point type, should model point concept.
+ // Segment: segment type, should model segment concept.
+ //
+ // Important:
+ // discretization should contain both edge endpoints initially.
+ template <class InCT1, class InCT2,
+ template<class> class Point,
+ template<class> class Segment>
+ static
+ typename enable_if<
+ typename gtl_and<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept< Point<InCT1> >::type
+ >::type
+ >::type,
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept< Segment<InCT2> >::type
+ >::type
+ >::type
+ >::type,
+ void
+ >::type discretize(
+ const Point<InCT1>& point,
+ const Segment<InCT2>& segment,
+ const CT max_dist,
+ std::vector< Point<CT> >* discretization) {
+ // Apply the linear transformation to move start point of the segment to
+ // the point with coordinates (0, 0) and the direction of the segment to
+ // coincide the positive direction of the x-axis.
+ CT segm_vec_x = cast(x(high(segment))) - cast(x(low(segment)));
+ CT segm_vec_y = cast(y(high(segment))) - cast(y(low(segment)));
+ CT sqr_segment_length = segm_vec_x * segm_vec_x + segm_vec_y * segm_vec_y;
+
+ // Compute x-coordinates of the endpoints of the edge
+ // in the transformed space.
+ CT projection_start = sqr_segment_length *
+ get_point_projection((*discretization)[0], segment);
+ CT projection_end = sqr_segment_length *
+ get_point_projection((*discretization)[1], segment);
+
+ // Compute parabola parameters in the transformed space.
+ // Parabola has next representation:
+ // f(x) = ((x-rot_x)^2 + rot_y^2) / (2.0*rot_y).
+ CT point_vec_x = cast(x(point)) - cast(x(low(segment)));
+ CT point_vec_y = cast(y(point)) - cast(y(low(segment)));
+ CT rot_x = segm_vec_x * point_vec_x + segm_vec_y * point_vec_y;
+ CT rot_y = segm_vec_x * point_vec_y - segm_vec_y * point_vec_x;
+
+ // Save the last point.
+ Point<CT> last_point = (*discretization)[1];
+ discretization->pop_back();
+
+ // Use stack to avoid recursion.
+ std::stack<CT> point_stack;
+ point_stack.push(projection_end);
+ CT cur_x = projection_start;
+ CT cur_y = parabola_y(cur_x, rot_x, rot_y);
+
+ // Adjust max_dist parameter in the transformed space.
+ const CT max_dist_transformed = max_dist * max_dist * sqr_segment_length;
+ while (!point_stack.empty()) {
+ CT new_x = point_stack.top();
+ CT new_y = parabola_y(new_x, rot_x, rot_y);
+
+ // Compute coordinates of the point of the parabola that is
+ // furthest from the current line segment.
+ CT mid_x = (new_y - cur_y) / (new_x - cur_x) * rot_y + rot_x;
+ CT mid_y = parabola_y(mid_x, rot_x, rot_y);
+
+ // Compute maximum distance between the given parabolic arc
+ // and line segment that discretize it.
+ CT dist = (new_y - cur_y) * (mid_x - cur_x) -
+ (new_x - cur_x) * (mid_y - cur_y);
+ dist = dist * dist / ((new_y - cur_y) * (new_y - cur_y) +
+ (new_x - cur_x) * (new_x - cur_x));
+ if (dist <= max_dist_transformed) {
+ // Distance between parabola and line segment is less than max_dist.
+ point_stack.pop();
+ CT inter_x = (segm_vec_x * new_x - segm_vec_y * new_y) /
+ sqr_segment_length + cast(x(low(segment)));
+ CT inter_y = (segm_vec_x * new_y + segm_vec_y * new_x) /
+ sqr_segment_length + cast(y(low(segment)));
+ discretization->push_back(Point<CT>(inter_x, inter_y));
+ cur_x = new_x;
+ cur_y = new_y;
+ } else {
+ point_stack.push(mid_x);
+ }
+ }
+
+ // Update last point.
+ discretization->back() = last_point;
+ }
+
+ private:
+ // Compute y(x) = ((x - a) * (x - a) + b * b) / (2 * b).
+ static CT parabola_y(CT x, CT a, CT b) {
+ return ((x - a) * (x - a) + b * b) / (b + b);
+ }
+
+ // Get normalized length of the distance between:
+ // 1) point projection onto the segment
+ // 2) start point of the segment
+ // Return this length divided by the segment length. This is made to avoid
+ // sqrt computation during transformation from the initial space to the
+ // transformed one and vice versa. The assumption is made that projection of
+ // the point lies between the start-point and endpoint of the segment.
+ template <class InCT,
+ template<class> class Point,
+ template<class> class Segment>
+ static
+ typename enable_if<
+ typename gtl_and<
+ typename gtl_if<
+ typename is_point_concept<
+ typename geometry_concept< Point<int> >::type
+ >::type
+ >::type,
+ typename gtl_if<
+ typename is_segment_concept<
+ typename geometry_concept< Segment<long> >::type
+ >::type
+ >::type
+ >::type,
+ CT
+ >::type get_point_projection(
+ const Point<CT>& point, const Segment<InCT>& segment) {
+ CT segment_vec_x = cast(x(high(segment))) - cast(x(low(segment)));
+ CT segment_vec_y = cast(y(high(segment))) - cast(y(low(segment)));
+ CT point_vec_x = x(point) - cast(x(low(segment)));
+ CT point_vec_y = y(point) - cast(y(low(segment)));
+ CT sqr_segment_length =
+ segment_vec_x * segment_vec_x + segment_vec_y * segment_vec_y;
+ CT vec_dot = segment_vec_x * point_vec_x + segment_vec_y * point_vec_y;
+ return vec_dot / sqr_segment_length;
+ }
+
+ template <typename InCT>
+ static CT cast(const InCT& value) {
+ return static_cast<CT>(value);
+ }
+};
+}
+}
+
+#endif // BOOST_POLYGON_VORONOI_VISUAL_UTILS

Added: branches/release/libs/polygon/example/voronoi_visualizer.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/example/voronoi_visualizer.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,509 @@
+// Boost.Polygon library voronoi_visualizer.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <iostream>
+#include <vector>
+
+#include <QtOpenGL/QGLWidget>
+#include <QtGui/QtGui>
+
+#include <boost/polygon/polygon.hpp>
+#include <boost/polygon/voronoi.hpp>
+using namespace boost::polygon;
+
+#include "voronoi_visual_utils.hpp"
+
+class GLWidget : public QGLWidget {
+ Q_OBJECT
+
+ public:
+ explicit GLWidget(QMainWindow* parent = NULL) :
+ QGLWidget(QGLFormat(QGL::SampleBuffers), parent),
+ primary_edges_only_(false),
+ internal_edges_only_(false) {
+ startTimer(40);
+ }
+
+ QSize sizeHint() const {
+ return QSize(600, 600);
+ }
+
+ void build(const QString& file_path) {
+ // Clear all containers.
+ clear();
+
+ // Read data.
+ read_data(file_path);
+
+ // No data, don't proceed.
+ if (!brect_initialized_) {
+ return;
+ }
+
+ // Construct bounding rectangle.
+ construct_brect();
+
+ // Construct voronoi diagram.
+ construct_voronoi(
+ point_data_.begin(), point_data_.end(),
+ segment_data_.begin(), segment_data_.end(),
+ &vd_);
+
+ // Color exterior edges.
+ for (const_edge_iterator it = vd_.edges().begin();
+ it != vd_.edges().end(); ++it) {
+ if (!it->is_finite()) {
+ color_exterior(&(*it));
+ }
+ }
+
+ // Update view port.
+ update_view_port();
+ }
+
+ void show_primary_edges_only() {
+ primary_edges_only_ ^= true;
+ }
+
+ void show_internal_edges_only() {
+ internal_edges_only_ ^= true;
+ }
+
+ protected:
+ void initializeGL() {
+ glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glEnable(GL_POINT_SMOOTH);
+ }
+
+ void paintGL() {
+ qglClearColor(QColor::fromRgb(255, 255, 255));
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ draw_points();
+ draw_segments();
+ draw_vertices();
+ draw_edges();
+ }
+
+ void resizeGL(int width, int height) {
+ int side = qMin(width, height);
+ glViewport((width - side) / 2, (height - side) / 2, side, side);
+ }
+
+ void timerEvent(QTimerEvent* e) {
+ update();
+ }
+
+ private:
+ typedef double coordinate_type;
+ typedef point_data<coordinate_type> point_type;
+ typedef segment_data<coordinate_type> segment_type;
+ typedef rectangle_data<coordinate_type> rect_type;
+ typedef voronoi_builder<int> VB;
+ typedef voronoi_diagram<coordinate_type> VD;
+ typedef VD::cell_type cell_type;
+ typedef VD::cell_type::source_index_type source_index_type;
+ typedef VD::cell_type::source_category_type source_category_type;
+ typedef VD::edge_type edge_type;
+ typedef VD::cell_container_type cell_container_type;
+ typedef VD::cell_container_type vertex_container_type;
+ typedef VD::edge_container_type edge_container_type;
+ typedef VD::const_cell_iterator const_cell_iterator;
+ typedef VD::const_vertex_iterator const_vertex_iterator;
+ typedef VD::const_edge_iterator const_edge_iterator;
+
+ static const std::size_t EXTERNAL_COLOR = 1;
+
+ void clear() {
+ brect_initialized_ = false;
+ point_data_.clear();
+ segment_data_.clear();
+ vd_.clear();
+ }
+
+ void read_data(const QString& file_path) {
+ QFile data(file_path);
+ if (!data.open(QFile::ReadOnly)) {
+ QMessageBox::warning(
+ this, tr("Voronoi Visualizer"),
+ tr("Disable to open file ") + file_path);
+ }
+ QTextStream in_stream(&data);
+ std::size_t num_points, num_segments;
+ int x1, y1, x2, y2;
+ in_stream >> num_points;
+ for (std::size_t i = 0; i < num_points; ++i) {
+ in_stream >> x1 >> y1;
+ point_type p(x1, y1);
+ update_brect(p);
+ point_data_.push_back(p);
+ }
+ in_stream >> num_segments;
+ for (std::size_t i = 0; i < num_segments; ++i) {
+ in_stream >> x1 >> y1 >> x2 >> y2;
+ point_type lp(x1, y1);
+ point_type hp(x2, y2);
+ update_brect(lp);
+ update_brect(hp);
+ segment_data_.push_back(segment_type(lp, hp));
+ }
+ in_stream.flush();
+ }
+
+ void update_brect(const point_type& point) {
+ if (brect_initialized_) {
+ encompass(brect_, point);
+ } else {
+ set_points(brect_, point, point);
+ brect_initialized_ = true;
+ }
+ }
+
+ void construct_brect() {
+ double side = (std::max)(xh(brect_) - xl(brect_), yh(brect_) - yl(brect_));
+ center(shift_, brect_);
+ set_points(brect_, shift_, shift_);
+ bloat(brect_, side * 1.2);
+ }
+
+ void color_exterior(const VD::edge_type* edge) {
+ if (edge->color() == EXTERNAL_COLOR) {
+ return;
+ }
+ edge->color(EXTERNAL_COLOR);
+ edge->twin()->color(EXTERNAL_COLOR);
+ const VD::vertex_type* v = edge->vertex1();
+ if (v == NULL || !edge->is_primary()) {
+ return;
+ }
+ v->color(EXTERNAL_COLOR);
+ const VD::edge_type* e = v->incident_edge();
+ do {
+ color_exterior(e);
+ e = e->rot_next();
+ } while (e != v->incident_edge());
+ }
+
+ void update_view_port() {
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ rect_type view_rect = brect_;
+ deconvolve(view_rect, shift_);
+ glOrtho(xl(view_rect), xh(view_rect),
+ yl(view_rect), yh(view_rect),
+ -1.0, 1.0);
+ glMatrixMode(GL_MODELVIEW);
+ }
+
+ void draw_points() {
+ // Draw input points and endpoints of the input segments.
+ glColor3f(0.0f, 0.5f, 1.0f);
+ glPointSize(9);
+ glBegin(GL_POINTS);
+ for (std::size_t i = 0; i < point_data_.size(); ++i) {
+ point_type point = point_data_[i];
+ deconvolve(point, shift_);
+ glVertex2f(point.x(), point.y());
+ }
+ for (std::size_t i = 0; i < segment_data_.size(); ++i) {
+ point_type lp = low(segment_data_[i]);
+ lp = deconvolve(lp, shift_);
+ glVertex2f(lp.x(), lp.y());
+ point_type hp = high(segment_data_[i]);
+ hp = deconvolve(hp, shift_);
+ glVertex2f(hp.x(), hp.y());
+ }
+ glEnd();
+ }
+
+ void draw_segments() {
+ // Draw input segments.
+ glColor3f(0.0f, 0.5f, 1.0f);
+ glLineWidth(2.7f);
+ glBegin(GL_LINES);
+ for (std::size_t i = 0; i < segment_data_.size(); ++i) {
+ point_type lp = low(segment_data_[i]);
+ lp = deconvolve(lp, shift_);
+ glVertex2f(lp.x(), lp.y());
+ point_type hp = high(segment_data_[i]);
+ hp = deconvolve(hp, shift_);
+ glVertex2f(hp.x(), hp.y());
+ }
+ glEnd();
+ }
+
+ void draw_vertices() {
+ // Draw voronoi vertices.
+ glColor3f(0.0f, 0.0f, 0.0f);
+ glPointSize(6);
+ glBegin(GL_POINTS);
+ for (const_vertex_iterator it = vd_.vertices().begin();
+ it != vd_.vertices().end(); ++it) {
+ if (internal_edges_only_ && (it->color() == EXTERNAL_COLOR)) {
+ continue;
+ }
+ point_type vertex(it->x(), it->y());
+ vertex = deconvolve(vertex, shift_);
+ glVertex2f(vertex.x(), vertex.y());
+ }
+ glEnd();
+ }
+ void draw_edges() {
+ // Draw voronoi edges.
+ glColor3f(0.0f, 0.0f, 0.0f);
+ glLineWidth(1.7f);
+ for (const_edge_iterator it = vd_.edges().begin();
+ it != vd_.edges().end(); ++it) {
+ if (primary_edges_only_ && !it->is_primary()) {
+ continue;
+ }
+ if (internal_edges_only_ && (it->color() == EXTERNAL_COLOR)) {
+ continue;
+ }
+ std::vector<point_type> samples;
+ if (!it->is_finite()) {
+ clip_infinite_edge(*it, &samples);
+ } else {
+ point_type vertex0(it->vertex0()->x(), it->vertex0()->y());
+ samples.push_back(vertex0);
+ point_type vertex1(it->vertex1()->x(), it->vertex1()->y());
+ samples.push_back(vertex1);
+ if (it->is_curved()) {
+ sample_curved_edge(*it, &samples);
+ }
+ }
+ glBegin(GL_LINE_STRIP);
+ for (std::size_t i = 0; i < samples.size(); ++i) {
+ point_type vertex = deconvolve(samples[i], shift_);
+ glVertex2f(vertex.x(), vertex.y());
+ }
+ glEnd();
+ }
+ }
+
+ void clip_infinite_edge(
+ const edge_type& edge, std::vector<point_type>* clipped_edge) {
+ const cell_type& cell1 = *edge.cell();
+ const cell_type& cell2 = *edge.twin()->cell();
+ point_type origin, direction;
+ // Infinite edges could not be created by two segment sites.
+ if (cell1.contains_point() && cell2.contains_point()) {
+ point_type p1 = retrieve_point(cell1);
+ point_type p2 = retrieve_point(cell2);
+ origin.x((p1.x() + p2.x()) * 0.5);
+ origin.y((p1.y() + p2.y()) * 0.5);
+ direction.x(p1.y() - p2.y());
+ direction.y(p2.x() - p1.x());
+ } else {
+ origin = cell1.contains_segment() ?
+ retrieve_point(cell2) :
+ retrieve_point(cell1);
+ segment_type segment = cell1.contains_segment() ?
+ retrieve_segment(cell1) :
+ retrieve_segment(cell2);
+ coordinate_type dx = high(segment).x() - low(segment).x();
+ coordinate_type dy = high(segment).y() - low(segment).y();
+ if ((low(segment) == origin) ^ cell1.contains_point()) {
+ direction.x(dy);
+ direction.y(-dx);
+ } else {
+ direction.x(-dy);
+ direction.y(dx);
+ }
+ }
+ coordinate_type side = xh(brect_) - xl(brect_);
+ coordinate_type koef =
+ side / (std::max)(fabs(direction.x()), fabs(direction.y()));
+ if (edge.vertex0() == NULL) {
+ clipped_edge->push_back(point_type(
+ origin.x() - direction.x() * koef,
+ origin.y() - direction.y() * koef));
+ } else {
+ clipped_edge->push_back(
+ point_type(edge.vertex0()->x(), edge.vertex0()->y()));
+ }
+ if (edge.vertex1() == NULL) {
+ clipped_edge->push_back(point_type(
+ origin.x() + direction.x() * koef,
+ origin.y() + direction.y() * koef));
+ } else {
+ clipped_edge->push_back(
+ point_type(edge.vertex1()->x(), edge.vertex1()->y()));
+ }
+ }
+
+ void sample_curved_edge(
+ const edge_type& edge,
+ std::vector<point_type>* sampled_edge) {
+ coordinate_type max_dist = 1E-3 * (xh(brect_) - xl(brect_));
+ point_type point = edge.cell()->contains_point() ?
+ retrieve_point(*edge.cell()) :
+ retrieve_point(*edge.twin()->cell());
+ segment_type segment = edge.cell()->contains_point() ?
+ retrieve_segment(*edge.twin()->cell()) :
+ retrieve_segment(*edge.cell());
+ voronoi_visual_utils<coordinate_type>::discretize(
+ point, segment, max_dist, sampled_edge);
+ }
+
+ point_type retrieve_point(const cell_type& cell) {
+ source_index_type index = cell.source_index();
+ source_category_type category = cell.source_category();
+ if (category == SOURCE_CATEGORY_SINGLE_POINT) {
+ return point_data_[index];
+ }
+ index -= point_data_.size();
+ if (category == SOURCE_CATEGORY_SEGMENT_START_POINT) {
+ return low(segment_data_[index]);
+ } else {
+ return high(segment_data_[index]);
+ }
+ }
+
+ segment_type retrieve_segment(const cell_type& cell) {
+ source_index_type index = cell.source_index() - point_data_.size();
+ return segment_data_[index];
+ }
+
+ point_type shift_;
+ std::vector<point_type> point_data_;
+ std::vector<segment_type> segment_data_;
+ rect_type brect_;
+ VB vb_;
+ VD vd_;
+ bool brect_initialized_;
+ bool primary_edges_only_;
+ bool internal_edges_only_;
+};
+
+class MainWindow : public QWidget {
+ Q_OBJECT
+
+ public:
+ MainWindow() {
+ glWidget_ = new GLWidget();
+ file_dir_ = QDir(QDir::currentPath(), tr("*.txt"));
+ file_name_ = tr("");
+
+ QHBoxLayout* centralLayout = new QHBoxLayout;
+ centralLayout->addWidget(glWidget_);
+ centralLayout->addLayout(create_file_layout());
+ setLayout(centralLayout);
+
+ update_file_list();
+ setWindowTitle(tr("Voronoi Visualizer"));
+ layout()->setSizeConstraint(QLayout::SetFixedSize);
+ }
+
+ private slots:
+ void primary_edges_only() {
+ glWidget_->show_primary_edges_only();
+ }
+
+ void internal_edges_only() {
+ glWidget_->show_internal_edges_only();
+ }
+
+ void browse() {
+ QString new_path = QFileDialog::getExistingDirectory(
+ 0, tr("Choose Directory"), file_dir_.absolutePath());
+ if (new_path.isEmpty()) {
+ return;
+ }
+ file_dir_.setPath(new_path);
+ update_file_list();
+ }
+
+ void build() {
+ file_name_ = file_list_->currentItem()->text();
+ QString file_path = file_dir_.filePath(file_name_);
+ message_label_->setText("Building...");
+ glWidget_->build(file_path);
+ message_label_->setText("Double click the item to build voronoi diagram:");
+ setWindowTitle(tr("Voronoi Visualizer - ") + file_path);
+ }
+
+ void print_scr() {
+ if (!file_name_.isEmpty()) {
+ QImage screenshot = glWidget_->grabFrameBuffer(true);
+ QString output_file = file_dir_.absolutePath() + tr("/") +
+ file_name_.left(file_name_.indexOf('.')) + tr(".png");
+ screenshot.save(output_file, 0, -1);
+ }
+ }
+
+ private:
+ QGridLayout* create_file_layout() {
+ QGridLayout* file_layout = new QGridLayout;
+
+ message_label_ = new QLabel("Double click item to build voronoi diagram:");
+
+ file_list_ = new QListWidget();
+ file_list_->connect(file_list_,
+ SIGNAL(itemDoubleClicked(QListWidgetItem*)),
+ this,
+ SLOT(build()));
+
+ QCheckBox* primary_checkbox = new QCheckBox("Show primary edges only.");
+ connect(primary_checkbox, SIGNAL(clicked()),
+ this, SLOT(primary_edges_only()));
+
+ QCheckBox* internal_checkbox = new QCheckBox("Show internal edges only.");
+ connect(internal_checkbox, SIGNAL(clicked()),
+ this, SLOT(internal_edges_only()));
+
+ QPushButton* browse_button =
+ new QPushButton(tr("Browse Input Directory"));
+ connect(browse_button, SIGNAL(clicked()), this, SLOT(browse()));
+ browse_button->setMinimumHeight(50);
+
+ QPushButton* print_scr_button = new QPushButton(tr("Make Screenshot"));
+ connect(print_scr_button, SIGNAL(clicked()), this, SLOT(print_scr()));
+ print_scr_button->setMinimumHeight(50);
+
+ file_layout->addWidget(message_label_, 0, 0);
+ file_layout->addWidget(file_list_, 1, 0);
+ file_layout->addWidget(primary_checkbox, 2, 0);
+ file_layout->addWidget(internal_checkbox, 3, 0);
+ file_layout->addWidget(browse_button, 4, 0);
+ file_layout->addWidget(print_scr_button, 5, 0);
+
+ return file_layout;
+ }
+
+ void update_file_list() {
+ QFileInfoList list = file_dir_.entryInfoList();
+ file_list_->clear();
+ if (file_dir_.count() == 0) {
+ return;
+ }
+ QFileInfoList::const_iterator it;
+ for (it = list.begin(); it != list.end(); it++) {
+ file_list_->addItem(it->fileName());
+ }
+ file_list_->setCurrentRow(0);
+ }
+
+ QDir file_dir_;
+ QString file_name_;
+ GLWidget* glWidget_;
+ QListWidget* file_list_;
+ QLabel* message_label_;
+};
+
+int main(int argc, char* argv[]) {
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
+
+#include "voronoi_visualizer.moc"

Modified: branches/release/libs/polygon/test/Jamfile.v2
==============================================================================
--- branches/release/libs/polygon/test/Jamfile.v2 (original)
+++ branches/release/libs/polygon/test/Jamfile.v2 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -13,10 +13,24 @@
     requirements
         <include>.
         <toolset>msvc:<asynch-exceptions>on
+ <library>/boost/test//boost_unit_test_framework
     ;
 
 test-suite polygon-unit
     :
- [ run gtl_boost_unit_test.cpp ]
+ [ run polygon_segment_test.cpp ]
+ [ run gtl_boost_unit_test.cpp ]
     ;
 
+test-suite voronoi-unit
+ :
+ [ run voronoi_builder_test.cpp ]
+ [ run voronoi_ctypes_test.cpp ]
+ [ run voronoi_diagram_test.cpp ]
+ [ run voronoi_geometry_type_test.cpp ]
+ [ run voronoi_predicates_test.cpp ]
+ [ run voronoi_robust_fpt_test.cpp ]
+ [ run voronoi_structures_test.cpp ]
+ ;
+
+

Modified: branches/release/libs/polygon/test/gtl_boost_unit_test.cpp
==============================================================================
--- branches/release/libs/polygon/test/gtl_boost_unit_test.cpp (original)
+++ branches/release/libs/polygon/test/gtl_boost_unit_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -1,30 +1,38 @@
 /*
   Copyright 2008 Intel Corporation
-
+
   Use, modification and distribution are 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 <iostream>
+//#define BOOST_POLYGON_NO_DEPS
 #include <boost/polygon/polygon.hpp>
+
 namespace gtl = boost::polygon;
 using namespace boost::polygon::operators;
 #include <time.h>
 #include <stdlib.h>
 
+void assert_s(bool c, std::string msg) {
+ if(!c) {
+ std::cout << msg << std::endl;
+ exit( 1);
+ }
+}
+
 namespace boost { namespace polygon{
- void addpoly(polygon_45_set_data<int>& pset,
- int* pts, int numpts) {
- std::vector<point_data<int> > mppts;
- for(unsigned int i = 0; i < numpts*2; i += 2) {
- point_data<int> pt(pts[i], pts[i+1]);
- mppts.push_back(pt);
- }
- polygon_45_data<int> poly;
- poly.set(mppts.begin(), mppts.end());
- pset += poly;
+ void addpoly(polygon_45_set_data<int>& pset,
+ int* pts, unsigned int numpts) {
+ std::vector<point_data<int> > mppts;
+ for(unsigned int i = 0; i < numpts*2; i += 2) {
+ point_data<int> pt(pts[i], pts[i+1]);
+ mppts.push_back(pt);
     }
-
+ polygon_45_data<int> poly;
+ poly.set(mppts.begin(), mppts.end());
+ pset += poly;
+ }
 
   template <class T>
   std::ostream& operator << (std::ostream& o, const interval_data<T>& i)
@@ -39,11 +47,11 @@
   template <typename T>
   std::ostream& operator<<(std::ostream& o, const polygon_45_data<T>& poly) {
     o << "Polygon { ";
- for(typename polygon_45_data<T>::iterator_type itr = poly.begin();
+ for(typename polygon_45_data<T>::iterator_type itr = poly.begin();
         itr != poly.end(); ++itr) {
       if(itr != poly.begin()) o << ", ";
       o << (*itr).get(HORIZONTAL) << " " << (*itr).get(VERTICAL);
- }
+ }
     o << " } ";
     return o;
   }
@@ -82,7 +90,7 @@
   std::istream& operator >> (std::istream& i, polygon_90_data<T>& r)
   {
     std::size_t size;
- i >> size;
+ i >> size;
     std::vector<T> vec;
     vec.reserve(size);
     for(std::size_t ii = 0; ii < size; ++ii) {
@@ -93,12 +101,12 @@
     r.set_compact(vec.begin(), vec.end());
     return i;
   }
-
+
   template <typename T>
   std::ostream& operator << (std::ostream& o, const std::vector<polygon_90_data<T> >& r) {
     o << r.size() << ' ';
     for(std::size_t ii = 0; ii < r.size(); ++ii) {
- o << (r[ii]);
+ o << (r[ii]);
     }
     return o;
   }
@@ -118,14 +126,14 @@
   template <typename T>
   std::ostream& operator<<(std::ostream& o, const polygon_data<T>& poly) {
     o << "Polygon { ";
- for(typename polygon_data<T>::iterator_type itr = poly.begin();
+ for(typename polygon_data<T>::iterator_type itr = poly.begin();
         itr != poly.end(); ++itr) {
       if(itr != poly.begin()) o << ", ";
       o << (*itr).get(HORIZONTAL) << " " << (*itr).get(VERTICAL);
- }
+ }
     o << " } ";
     return o;
- }
+ }
   template <typename T>
   std::ostream& operator << (std::ostream& o, const polygon_set_data<T>& r)
   {
@@ -139,7 +147,7 @@
   template <typename T>
   std::ostream& operator<<(std::ostream& o, const polygon_90_with_holes_data<T>& poly) {
     o << "Polygon With Holes { ";
- for(typename polygon_90_with_holes_data<T>::iterator_type itr = poly.begin();
+ for(typename polygon_90_with_holes_data<T>::iterator_type itr = poly.begin();
         itr != poly.end(); ++itr) {
       if(itr != poly.begin()) o << ", ";
       o << (*itr).get(HORIZONTAL) << " " << (*itr).get(VERTICAL);
@@ -154,7 +162,7 @@
   template <typename T>
   std::ostream& operator<<(std::ostream& o, const polygon_45_with_holes_data<T>& poly) {
     o << "Polygon With Holes { ";
- for(typename polygon_45_with_holes_data<T>::iterator_type itr = poly.begin();
+ for(typename polygon_45_with_holes_data<T>::iterator_type itr = poly.begin();
         itr != poly.end(); ++itr) {
       if(itr != poly.begin()) o << ", ";
       o << (*itr).get(HORIZONTAL) << " " << (*itr).get(VERTICAL);
@@ -169,7 +177,7 @@
   template <typename T>
   std::ostream& operator<<(std::ostream& o, const polygon_with_holes_data<T>& poly) {
     o << "Polygon With Holes { ";
- for(typename polygon_with_holes_data<T>::iterator_type itr = poly.begin();
+ for(typename polygon_with_holes_data<T>::iterator_type itr = poly.begin();
         itr != poly.end(); ++itr) {
       if(itr != poly.begin()) o << ", ";
       o << (*itr).get(HORIZONTAL) << " " << (*itr).get(VERTICAL);
@@ -186,6 +194,11 @@
   {
     return o << r.get(HORIZONTAL) << ' ' << r.get(VERTICAL);
   }
+ template <class T>
+ std::ostream& operator << (std::ostream& o, const segment_data<T>& r)
+ {
+ return o << r.get(LOW) << ' ' << r.get(HIGH);
+ }
 
 
   template <typename T>
@@ -204,7 +217,7 @@
       booleanOr.processInterval(container, interval_data<Unit>(0, 10), 1);
       booleanOr.advanceScan();
       booleanOr.processInterval(container, interval_data<Unit>(0, 10), -1);
- if(container.size() != 2) {
+ if(container.size() != 2) {
         std::cout << "Test one rectangle, wrong output size\n";
         return false;
       }
@@ -339,7 +352,7 @@
     polygon_90_set_data<int> ps90;
     polygon_45_set_data<int> ps45;
     polygon_set_data<int> ps;
-
+
     assign(p, rect);
     assign(p90, view_as<polygon_90_concept>(p));
     if(!equivalence(p90, rect))
@@ -373,7 +386,7 @@
       std::cout << "fail 11\n";
     assign(p90wh, view_as<polygon_90_with_holes_concept>(p45wh));
     if(!equivalence(p90wh, rect))
- std::cout << "fail 12\n";
+ std::cout << "fail 12\n";
     assign(p90, view_as<polygon_90_concept>(pwh));
     if(!equivalence(p90, rect))
       std::cout << "fail 13\n";
@@ -579,7 +592,7 @@
     //poly.set(points.begin(), points.end());
     //ps.insert(poly);
     polygon_45_set_data<int> preps(polys[0]);
-
+
     ps.insert(polys[0]);
     convolve(polys[0], point_data<int>(0, 1) );
 
@@ -910,18 +923,18 @@
   //assign(p_90, p_wh);
   //assign(p_90, p_45_wh);
   //assign(p_90, p_90_wh);
- assign(p_wh, p);
- assign(p_wh, p_45);
- assign(p_wh, p_90);
+ assign(p_wh, p);
+ assign(p_wh, p_45);
+ assign(p_wh, p_90);
   assign(p_wh1, p_wh);
   assign(p_wh, p_45_wh);
   assign(p_wh, p_90_wh);
- //assign(p_45_wh, p);
- assign(p_45_wh, p_45);
- assign(p_45_wh, p_90);
+ //assign(p_45_wh, p);
+ assign(p_45_wh, p_45);
+ assign(p_45_wh, p_90);
   //assign(p_45_wh, p_wh);
   assign(p_45_wh1, p_45_wh);
- //assign(p_90_wh, p);
+ //assign(p_90_wh, p);
   //assign(p_90_wh, p_45);
   assign(p_90_wh, p_90);
   assign(p_90_wh1, p_90_wh);
@@ -1026,7 +1039,7 @@
   x(pts[1], x(pts[1]) + disp);
   if(dir)
     y(pts[1], y(pts[1]) + disp);
- else
+ else
     y(pts[1], y(pts[1]) - disp);
   return Polygon45(pts, pts+3);
 }
@@ -2138,23 +2151,23 @@
 // inline iterator_type begin() const {
 // return polygon_traits<T>::begin_points(*t);
 // }
-
+
 // /// Get the end iterator
 // inline iterator_type end() const {
 // return polygon_traits<T>::end_points(*t);
 // }
-
+
 // /// Get the number of sides of the polygon
 // inline unsigned int size() const {
 // return polygon_traits<T>::size(*t);
 // }
-
+
 // /// Get the winding direction of the polygon
 // inline winding_direction winding() const {
 // return polygon_traits<T>::winding(*t);
 // }
 // };
-
+
 // template <typename T1, typename T2>
 // view_of<T1, T2> view_as(const T2& obj) { return view_of<T1, T2>(obj); }
 
@@ -2177,18 +2190,18 @@
 // return compact_iterator_type(polygon_traits<T>::begin_points(*t),
 // polygon_traits<T>::end_points(*t));
 // }
-
+
 // /// Get the end iterator
 // inline compact_iterator_type end_compact() const {
 // return compact_iterator_type(polygon_traits<T>::end_points(*t),
 // polygon_traits<T>::end_points(*t));
 // }
-
+
 // /// Get the number of sides of the polygon
 // inline unsigned int size() const {
 // return polygon_traits<T>::size(*t);
 // }
-
+
 // /// Get the winding direction of the polygon
 // inline winding_direction winding() const {
 // return polygon_traits<T>::winding(*t);
@@ -2220,7 +2233,7 @@
 
 bool test_extents() {
   PolygonSet psT(gtl::VERTICAL);
- //int xy[] = { 126, 69, 54, 69, 54, 81, 126, 81 };
+ //int xy[] = { 126, 69, 54, 69, 54, 81, 126, 81 };
   //CPolygonQuery polygon(0, 4, xy);
   //Rectangle rectIn(54, 69, 126, 81);
   polygon_data<int> polygon;
@@ -2231,11 +2244,11 @@
   pts.push_back(Point(126, 81));
   set_points(polygon, pts.begin(), pts.end());
   psT.insert(view_as<polygon_90_concept>(polygon));
-
+
   Rectangle rect, rect2;
   psT.extents(rect2);
   gtl::extents(rect, psT);
-
+
   if (rect != rect2) {
     std::cout << "gtl::Rectangles differ: " << gtl::xl(rect) << " " << gtl::xh(rect) << " " << gtl::yl(rect) << " " << gtl::yh(rect) << std::endl;
         std::cout << " " << gtl::xl(rect2) << " " << gtl::xh(rect2) << " " << gtl::yl(rect2) << " " << gtl::yh(rect2) << std::endl;
@@ -2246,23 +2259,23 @@
 
 bool test_extents2() {
   Polygon45Set psT;
- Point xy[] = { Point(130, 50), Point(50, 50), Point(50, 100), Point(119, 100),
+ Point xy[] = { Point(130, 50), Point(50, 50), Point(50, 100), Point(119, 100),
                  Point(119, 59), Point(89, 89), Point(59, 59), Point(119, 59), Point(119, 100), Point(130, 100) };
   Polygon45 polygon(xy, xy+10);
-
+
   psT.insert(polygon);
   psT += 2;
-
+
   Rectangle rect, rect2;
   psT.extents(rect2);
- gtl::extents(rect, psT);
+ gtl::extents(rect, psT);
   std::cout << "Extents: " << gtl::xl(rect) << " " << gtl::xh(rect) << " " << gtl::yl(rect) << " " << gtl::yh(rect) << std::endl;
     std::cout << "Extents: " << gtl::xl(rect2) << " " << gtl::xh(rect2) << " " << gtl::yl(rect2) << " " << gtl::yh(rect2) << std::endl;
     std::vector<Polygon45WithHoles> pwhs;
     psT.get(pwhs);
     for(unsigned int i = 0; i < pwhs.size(); ++i) {
       std::cout << pwhs[i] << std::endl;
- }
+ }
   return gtl::equivalence(rect, rect2);
 }
 
@@ -2398,7 +2411,7 @@
   point_data<int> pt(1, 1);
   std::cout << contains(p, pt) << std::endl;
   std::cout << contains(p90, pt) << std::endl;
-
+
   interval_data<int> ivl = construct<interval_data<int> >(0, 10);
   std::cout << get(ivl, LOW) << std::endl;
   set(ivl, HIGH, 20);
@@ -2646,7 +2659,7 @@
     }
     std::cout << area(rv) << std::endl;
     std::cout << area(rv) << std::endl;
-
+
     scale_up(rv, 10);
     std::cout << area(rv) << std::endl;
     scale_down(rv, 7);
@@ -2720,7 +2733,7 @@
      std::cout << pwh << std::endl;
      std::cout << area(pwh) << std::endl;
      if(area(pwh) != 9900) return 1;
-
+
     //test point scale up / down
     Point pt(10, 10);
     scale_up(pt, 25);
@@ -2964,7 +2977,7 @@
     ps451.transform(tr);
     std::cout << (ps451 == ps452) << std::endl;
     if(ps451 != ps452) return 1;
-
+
     //test polygon45set area
     std::cout << area(ps451) << std::endl;
     if(area(ps451) != 12.5) return 1;
@@ -3219,7 +3232,7 @@
     ps45.insert(ps90);
     ps45.insert(p90whv);
     ps45.insert(p90whv + p90whv);
-
+
     ps45.insert(polygon_90_with_holes_data<int>());
     polygon_with_holes_data<int> pwh;
     snap_to_45(pwh);
@@ -3451,7 +3464,7 @@
     //if(!equivalence(ps, ps45)) {
     // std::cout << "test 45 vs general resize up failed\n";
     // return 1;
- //}
+ //}
     ps.shrink(9);
     ps45.resize(-9);
     if(!equivalence(ps, ps45)) {
@@ -3474,16 +3487,16 @@
     std::cout << rupolys[0] << std::endl;
     std::cout << rupolys45[0] << std::endl;
     pts.clear();
- pts.push_back(point_data<int>(12, -1));
- pts.push_back(point_data<int>(5, 6));
- pts.push_back(point_data<int>(5, 2));
- pts.push_back(point_data<int>(2, 2));
- pts.push_back(point_data<int>(2, 5));
- pts.push_back(point_data<int>(5, 2));
- pts.push_back(point_data<int>(5, 6));
- pts.push_back(point_data<int>(-1, 12));
- pts.push_back(point_data<int>(-1, -1));
- pts.push_back(point_data<int>(12, -1));
+ pts.push_back(point_data<int>(12, -1));
+ pts.push_back(point_data<int>(5, 6));
+ pts.push_back(point_data<int>(5, 2));
+ pts.push_back(point_data<int>(2, 2));
+ pts.push_back(point_data<int>(2, 5));
+ pts.push_back(point_data<int>(5, 2));
+ pts.push_back(point_data<int>(5, 6));
+ pts.push_back(point_data<int>(-1, 12));
+ pts.push_back(point_data<int>(-1, -1));
+ pts.push_back(point_data<int>(12, -1));
     set_points(poly, pts.begin(), pts.end());
     //waived
     //if(!equivalence(ps, poly)) {
@@ -3494,64 +3507,64 @@
     //if(!equivalence(ps, ps45)) {
     // std::cout << "test 45 vs general resize up with holes failed\n";
     // return 1;
- //}
+ //}
     ps.shrink(1);
     ps45.resize(-1);
     if(!equivalence(ps, ps45)) {
       std::cout << "test 45 vs general resize down with holes failed\n";
       return 1;
- }
+ }
     ps.shrink(10);
     ps45.resize(-10);
     if(!equivalence(ps, ps45)) {
       std::cout << "test 45 vs general resize down 2 with holes failed\n";
       return 1;
- }
+ }
   }
 
   {
 
- Point pts[] = {construct<Point>(1565, 5735),
- construct<Point>(915, 5735),
- construct<Point>(915, 7085),
- construct<Point>(1565, 7085) };
- Polygon poly;
- set_points(poly, pts, pts+4);
- bool ret=gtl::contains(poly,gtl::construct<Point>(920, 7080));
+ Point pts[] = {construct<Point>(1565, 5735),
+ construct<Point>(915, 5735),
+ construct<Point>(915, 7085),
+ construct<Point>(1565, 7085) };
+ Polygon poly;
+ set_points(poly, pts, pts+4);
+ bool ret=gtl::contains(poly,gtl::construct<Point>(920, 7080));
     if(!ret) {
       std::cout << "contains failed!" << std::endl;
       return 1;
     }
     polygon_data<int> poly_aa;
     set_points(poly_aa, pts, pts+4);
- ret=gtl::contains(poly,gtl::construct<Point>(920, 7080));
+ ret=gtl::contains(poly,gtl::construct<Point>(920, 7080));
     if(!ret) {
       std::cout << "contains 90 failed!" << std::endl;
       return 1;
     }
     polygon_with_holes_data<int> pwh;
     polygon_90_with_holes_data<int> p90wh;
- Point pts2[] = {construct<Point>(565, 15735),
- construct<Point>(15, 15735),
- construct<Point>(15, 17085),
- construct<Point>(565, 17085) };
- set_points(pwh, pts2, pts2+4);
- set_points(p90wh, pts2, pts2+4);
+ Point pts2[] = {construct<Point>(565, 15735),
+ construct<Point>(15, 15735),
+ construct<Point>(15, 17085),
+ construct<Point>(565, 17085) };
+ set_points(pwh, pts2, pts2+4);
+ set_points(p90wh, pts2, pts2+4);
     pwh.set_holes(&poly_aa, (&poly_aa)+1);
     p90wh.set_holes(&poly, (&poly)+1);
- ret=gtl::contains(pwh,gtl::construct<Point>(920, 7080));
+ ret=gtl::contains(pwh,gtl::construct<Point>(920, 7080));
     if(ret) {
       std::cout << "contains wh failed!" << std::endl;
       return 1;
     }
- ret=gtl::contains(p90wh,gtl::construct<Point>(920, 7080));
+ ret=gtl::contains(p90wh,gtl::construct<Point>(920, 7080));
     if(ret) {
       std::cout << "contains 90wh failed!" << std::endl;
       return 1;
     }
     std::reverse(pts, pts+4);
- set_points(poly, pts, pts+4);
- ret=gtl::contains(poly,gtl::construct<Point>(920, 7080));
+ set_points(poly, pts, pts+4);
+ ret=gtl::contains(poly,gtl::construct<Point>(920, 7080));
     if(!ret) {
       std::cout << "reverse contains failed!" << std::endl;
       return 1;
@@ -3618,8 +3631,8 @@
     testbug.insert(orr);
     std::cout << area(testbug) << std::endl;
     polygon_set_data<int> testbug2;
- for(int i = 0; i < polys.size(); ++i) {
- for(int j = 0; j < polys.size(); ++j) {
+ for(size_t i = 0; i < polys.size(); ++i) {
+ for(size_t j = 0; j < polys.size(); ++j) {
         testbug2.clear();
         testbug2.insert(polys[i]);
         testbug2.insert(polys[j]);
@@ -3634,7 +3647,75 @@
       }
     }
   }
+
+ {
+ polygon_set_data<int> t_eq;
+ t_eq.insert(rectangle_data<int>(0, 0, 5, 10));
+ t_eq.insert(rectangle_data<int>(0, 5, 5, 10));
+ std::cout << t_eq <<std::endl;
+ polygon_set_data<int> t_eq2;
+ t_eq2 += rectangle_data<int>(0, 0, 5, 10);
+ std::cout << area(t_eq) <<std::endl;
+ std::cout << area(t_eq2) <<std::endl;
+ std::cout << t_eq <<std::endl;
+ std::cout << t_eq2 <<std::endl;
+ if(t_eq != t_eq2) {
+ std::cout << "equivalence failed" << std::endl;
+ return 1;
+ }
+ }
+
+ if (1) {
+ using namespace boost::polygon;
+ typedef point_data<int> Point;
+ typedef segment_data<int> Dls;
+ Point pt1(0, 0);
+ Point pt2(10, 10);
+ Point pt3(20, 20);
+ Point pt4(20, 0);
+ Dls dls1(pt1, pt2);
+ Dls dls2(pt1, pt3);
+ Dls dls3(pt1, pt4);
+ Dls dls4(pt2, pt1);
+ typedef std::vector<segment_data<int> > Dlss;
+ Dlss dlss, result;
+ dlss.push_back(dls1);
+ dlss.push_back(dls2);
+ dlss.push_back(dls3);
+ dlss.push_back(dls4);
+ rectangle_data<int> rect;
+ envelope_segments(rect, dlss.begin(), dlss.end());
+ assert_s(area(rect) == 400.0, "envelope");
+ intersect_segments(result, dlss.begin(), dlss.end());
+ dlss.swap(result);
+ for (Dlss::iterator itr = dlss.begin(); itr != dlss.end(); ++itr) {
+ std::cout << *itr << std::endl;
+ }
+ assert_s(dlss.size() == 5, "intersection");
+ Dls dls5(Point(0,5), Point(5,0));
+ dlss.push_back(dls5);
+ std::cout << std::endl;
+ result.clear();
+ intersect_segments(result, dlss.begin(), dlss.end());
+ dlss.swap(result);
+ for (Dlss::iterator itr = dlss.begin(); itr != dlss.end(); ++itr) {
+ std::cout << *itr << std::endl;
+ }
+ assert_s(dlss.size() == 11, "intersection2");
+ }
+
+ if (1) {
+ using namespace boost::polygon;
+ std::vector<std::pair<std::size_t, segment_data<int> > > segs;
+ segment_data<int> sarray[2];
+ sarray[0] = segment_data<int>(point_data<int>(0,0), point_data<int>(10,10));
+ sarray[1] = segment_data<int>(point_data<int>(10,0), point_data<int>(0,10));
+ std::iterator_traits<segment_data<int>*>::value_type s = sarray[0];
+ intersect_segments(segs, sarray, sarray+2);
+ std::cout << segs.size() << std::endl;
+ assert_s(segs.size() == 4, "intersection3");
+ }
+
   std::cout << "ALL TESTS COMPLETE\n";
   return 0;
 }
-

Added: branches/release/libs/polygon/test/polygon_segment_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/polygon_segment_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,431 @@
+// Boost.Polygon library polygon_segment_test.cpp file
+
+// Copyright Andrii Sydorchuk 2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <algorithm>
+#include <list>
+
+#define BOOST_TEST_MODULE POLYGON_SEGMENT_TEST
+#include <boost/mpl/list.hpp>
+#include <boost/test/test_case_template.hpp>
+
+#include "boost/polygon/polygon.hpp"
+using namespace boost::polygon;
+
+typedef boost::mpl::list<int> test_types;
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_data_test, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef segment_data<T> segment_type;
+ point_type point1(1, 2);
+ point_type point2(3, 4);
+ segment_type segment1(point1, point2);
+ segment_type segment2 = segment1;
+
+ BOOST_CHECK(segment1.low() == point1);
+ BOOST_CHECK(segment1.high() == point2);
+ BOOST_CHECK(segment1.get(LOW) == point1);
+ BOOST_CHECK(segment1.get(HIGH) == point2);
+ BOOST_CHECK(segment1 == segment2);
+ BOOST_CHECK(!(segment1 != segment2));
+ BOOST_CHECK(!(segment1 < segment2));
+ BOOST_CHECK(!(segment1 > segment1));
+ BOOST_CHECK(segment1 <= segment2);
+ BOOST_CHECK(segment1 >= segment2);
+
+ segment1.low(point2);
+ segment1.high(point1);
+ BOOST_CHECK(segment1.low() == point2);
+ BOOST_CHECK(segment1.high() == point1);
+ BOOST_CHECK(!(segment1 == segment2));
+ BOOST_CHECK(segment1 != segment2);
+
+ segment2.set(LOW, point2);
+ segment2.set(HIGH, point1);
+ BOOST_CHECK(segment1 == segment2);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_traits_test, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef segment_data<T> segment_type;
+
+ point_type point1(1, 2);
+ point_type point2(3, 4);
+ segment_type segment = segment_mutable_traits<segment_type>::construct(point1, point2);
+
+ BOOST_CHECK(segment_traits<segment_type>::get(segment, LOW) == point1);
+ BOOST_CHECK(segment_traits<segment_type>::get(segment, HIGH) == point2);
+
+ segment_mutable_traits<segment_type>::set(segment, LOW, point2);
+ segment_mutable_traits<segment_type>::set(segment, HIGH, point1);
+
+ BOOST_CHECK(segment_traits<segment_type>::get(segment, LOW) == point2);
+ BOOST_CHECK(segment_traits<segment_type>::get(segment, HIGH) == point1);
+}
+
+template <typename T>
+struct Segment {
+ point_data<T> p0;
+ point_data<T> p1;
+};
+
+namespace boost {
+namespace polygon {
+ template <typename T>
+ struct geometry_concept< Segment<T> > {
+ typedef segment_concept type;
+ };
+
+ template <typename T>
+ struct segment_traits< Segment<T> > {
+ typedef T coordinate_type;
+ typedef point_data<T> point_type;
+
+ static point_type get(const Segment<T>& segment, direction_1d dir) {
+ return dir.to_int() ? segment.p1 : segment.p0;
+ }
+ };
+
+ template <typename T>
+ struct segment_mutable_traits< Segment<T> > {
+ typedef point_data<T> point_type;
+
+ static inline void set(Segment<T>& segment, direction_1d dir, const point_type& point) {
+ if (dir.to_int()) {
+ segment.p1 = point;
+ } else {
+ segment.p0 = point;
+ }
+ }
+
+ static inline Segment<T> construct(const point_type& point1, const point_type& point2) {
+ Segment<T> segment;
+ segment.p0 = point1;
+ segment.p1 = point2;
+ return segment;
+ }
+ };
+}
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test1, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ point_type point1(1, 2);
+ point_type point2(3, 4);
+ point_type point3(2, 3);
+ segment_type segment1 = construct<segment_type>(point1, point2);
+ BOOST_CHECK(segment1.p0 == point1);
+ BOOST_CHECK(segment1.p1 == point2);
+ BOOST_CHECK(get(segment1, LOW) == point1);
+ BOOST_CHECK(low(segment1) == point1);
+ BOOST_CHECK(get(segment1, HIGH) == point2);
+ BOOST_CHECK(high(segment1) == point2);
+ BOOST_CHECK(center(segment1) == point3);
+
+ set(segment1, LOW, point2);
+ set(segment1, HIGH, point1);
+ BOOST_CHECK(segment1.p0 == point2);
+ BOOST_CHECK(segment1.p1 == point1);
+ BOOST_CHECK(get(segment1, LOW) == point2);
+ BOOST_CHECK(get(segment1, HIGH) == point1);
+ low(segment1, point1);
+ high(segment1, point2);
+ BOOST_CHECK(segment1.p0 == point1);
+ BOOST_CHECK(segment1.p1 == point2);
+
+ segment_data<T> segment2 = copy_construct< segment_data<T> >(segment1);
+ BOOST_CHECK(segment1.p0 == segment2.low());
+ BOOST_CHECK(segment1.p1 == segment2.high());
+ BOOST_CHECK(equivalence(segment1, segment2));
+
+ segment_data<T> segment3 = construct< segment_data<T> >(point2, point1);
+ assign(segment1, segment3);
+ BOOST_CHECK(segment1.p0 == point2);
+ BOOST_CHECK(segment1.p1 == point1);
+ BOOST_CHECK(!equivalence(segment1, segment2));
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test2, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ point_type point1(1, 2);
+ point_type point2(2, 4);
+ point_type point3(0, 0);
+ point_type point4(5, 10);
+ point_type point5(1, 3);
+ point_type point6(2, 3);
+ point_type point7(100, 201);
+ point_type point8(100, 200);
+ point_type point9(100, 199);
+ segment_type segment1 = construct<segment_type>(point1, point2);
+ segment_type segment2 = construct<segment_type>(point2, point1);
+ segment_type segment3 = construct<segment_type>(point1, point5);
+
+ BOOST_CHECK(orientation(segment1, point1) == 0);
+ BOOST_CHECK(orientation(segment1, point2) == 0);
+ BOOST_CHECK(orientation(segment1, point3) == 0);
+ BOOST_CHECK(orientation(segment1, point4) == 0);
+ BOOST_CHECK(orientation(segment1, point5) == 1);
+ BOOST_CHECK(orientation(segment2, point5) == -1);
+ BOOST_CHECK(orientation(segment1, point6) == -1);
+ BOOST_CHECK(orientation(segment2, point6) == 1);
+ BOOST_CHECK(orientation(segment1, point7) == 1);
+ BOOST_CHECK(orientation(segment2, point7) == -1);
+ BOOST_CHECK(orientation(segment1, point8) == 0);
+ BOOST_CHECK(orientation(segment1, point9) == -1);
+ BOOST_CHECK(orientation(segment2, point9) == 1);
+ BOOST_CHECK(orientation(segment3, point6) == -1);
+ BOOST_CHECK(orientation(segment3, point3) == 1);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test3, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ segment_type segment1 = construct<segment_type>(point_type(0, 0), point_type(1, 2));
+ segment_type segment2 = construct<segment_type>(point_type(0, 0), point_type(2, 4));
+ segment_type segment3 = construct<segment_type>(point_type(0, 0), point_type(2, 3));
+ segment_type segment4 = construct<segment_type>(point_type(0, 0), point_type(2, 5));
+ segment_type segment5 = construct<segment_type>(point_type(0, 2), point_type(2, 0));
+
+ BOOST_CHECK(orientation(segment1, segment2) == 0);
+ BOOST_CHECK(orientation(segment1, segment3) == -1);
+ BOOST_CHECK(orientation(segment3, segment1) == 1);
+ BOOST_CHECK(orientation(segment1, segment4) == 1);
+ BOOST_CHECK(orientation(segment4, segment1) == -1);
+ BOOST_CHECK(orientation(segment1, segment5) == -1);
+ BOOST_CHECK(orientation(segment5, segment1) == 1);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test4, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ point_type point1(1, 2);
+ point_type point2(3, 6);
+ point_type point3(2, 4);
+ point_type point4(4, 8);
+ point_type point5(0, 0);
+ segment_type segment = construct<segment_type>(point1, point2);
+
+ BOOST_CHECK(contains(segment, point1, true));
+ BOOST_CHECK(contains(segment, point2, true));
+ BOOST_CHECK(!contains(segment, point1, false));
+ BOOST_CHECK(!contains(segment, point2, false));
+ BOOST_CHECK(contains(segment, point3, false));
+ BOOST_CHECK(!contains(segment, point4, true));
+ BOOST_CHECK(!contains(segment, point5, true));
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test5, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ point_type point1(0, 0);
+ point_type point2(10, 0);
+ point_type point3(5, 0);
+ point_type point4(-1, 0);
+ point_type point5(11, 0);
+ segment_type segment = construct<segment_type>(point1, point2);
+
+ BOOST_CHECK(contains(segment, point1, true));
+ BOOST_CHECK(contains(segment, point2, true));
+ BOOST_CHECK(!contains(segment, point1, false));
+ BOOST_CHECK(!contains(segment, point2, false));
+ BOOST_CHECK(contains(segment, point3, false));
+ BOOST_CHECK(!contains(segment, point4, true));
+ BOOST_CHECK(!contains(segment, point5, true));
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test6, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ point_type point1(0, 0);
+ point_type point2(1, 2);
+ point_type point3(2, 4);
+ point_type point4(3, 6);
+ point_type point5(4, 8);
+ point_type point6(5, 10);
+ segment_type segment1 = construct<segment_type>(point2, point5);
+ segment_type segment2 = construct<segment_type>(point3, point4);
+ segment_type segment3 = construct<segment_type>(point1, point3);
+ segment_type segment4 = construct<segment_type>(point4, point6);
+
+ BOOST_CHECK(contains(segment1, segment2, false));
+ BOOST_CHECK(!contains(segment2, segment1, true));
+ BOOST_CHECK(!contains(segment1, segment3, true));
+ BOOST_CHECK(!contains(segment1, segment4, true));
+ BOOST_CHECK(contains(segment1, segment1, true));
+ BOOST_CHECK(!contains(segment1, segment1, false));
+}
+
+template<typename T>
+struct Transformer {
+ void scale(T& x, T& y) const {
+ x *= 2;
+ y *= 2;
+ }
+
+ void transform(T& x, T& y) const {
+ T tmp = x;
+ x = y;
+ y = tmp;
+ }
+};
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test7, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ point_type point1(1, 2);
+ point_type point2(4, 6);
+ segment_type segment1 = construct<segment_type>(point1, point2);
+
+ scale_up(segment1, 3);
+ BOOST_CHECK(low(segment1) == point_type(3, 6));
+ BOOST_CHECK(high(segment1) == point_type(12, 18));
+
+ scale_down(segment1, 3);
+ BOOST_CHECK(low(segment1) == point1);
+ BOOST_CHECK(high(segment1) == point2);
+ BOOST_CHECK(length(segment1) == 5);
+
+ move(segment1, HORIZONTAL, 1);
+ move(segment1, VERTICAL, 2);
+ BOOST_CHECK(low(segment1) == point_type(2, 4));
+ BOOST_CHECK(high(segment1) == point_type(5, 8));
+ BOOST_CHECK(length(segment1) == 5);
+
+ convolve(segment1, point_type(1, 2));
+ BOOST_CHECK(low(segment1) == point_type(3, 6));
+ BOOST_CHECK(high(segment1) == point_type(6, 10));
+
+ deconvolve(segment1, point_type(2, 4));
+ BOOST_CHECK(low(segment1) == point1);
+ BOOST_CHECK(high(segment1) == point2);
+
+ scale(segment1, Transformer<T>());
+ BOOST_CHECK(low(segment1) == point_type(2, 4));
+ BOOST_CHECK(high(segment1) == point_type(8, 12));
+ transform(segment1, Transformer<T>());
+ BOOST_CHECK(low(segment1) == point_type(4, 2));
+ BOOST_CHECK(high(segment1) == point_type(12, 8));
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test8, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ segment_type segment1 = construct<segment_type>(point_type(0, 0), point_type(1, 2));
+ segment_type segment2 = construct<segment_type>(point_type(1, 2), point_type(2, 4));
+ segment_type segment3 = construct<segment_type>(point_type(2, 4), point_type(0, 4));
+ segment_type segment4 = construct<segment_type>(point_type(0, 4), point_type(0, 0));
+
+ BOOST_CHECK(abuts(segment1, segment2, HIGH));
+ BOOST_CHECK(abuts(segment2, segment3, HIGH));
+ BOOST_CHECK(abuts(segment3, segment4, HIGH));
+ BOOST_CHECK(abuts(segment4, segment1, HIGH));
+
+ BOOST_CHECK(!abuts(segment1, segment2, LOW));
+ BOOST_CHECK(!abuts(segment2, segment3, LOW));
+ BOOST_CHECK(!abuts(segment3, segment4, LOW));
+ BOOST_CHECK(!abuts(segment4, segment1, LOW));
+
+ BOOST_CHECK(abuts(segment2, segment1));
+ BOOST_CHECK(abuts(segment3, segment2));
+ BOOST_CHECK(abuts(segment4, segment3));
+ BOOST_CHECK(abuts(segment1, segment4));
+
+ BOOST_CHECK(!abuts(segment1, segment3));
+ BOOST_CHECK(!abuts(segment2, segment4));
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test9, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ segment_type segment1 = construct<segment_type>(point_type(0, 0), point_type(2, 2));
+ segment_type segment2 = construct<segment_type>(point_type(1, 1), point_type(3, 3));
+ segment_type segment3 = construct<segment_type>(point_type(2, 2), point_type(-1, -1));
+ segment_type segment4 = construct<segment_type>(point_type(1, 3), point_type(3, 1));
+ segment_type segment5 = construct<segment_type>(point_type(2, 2), point_type(1, 3));
+
+ BOOST_CHECK(intersects(segment1, segment2, false));
+ BOOST_CHECK(intersects(segment1, segment2, true));
+ BOOST_CHECK(intersects(segment1, segment3, false));
+ BOOST_CHECK(intersects(segment1, segment3, true));
+ BOOST_CHECK(intersects(segment2, segment3, false));
+ BOOST_CHECK(intersects(segment2, segment3, true));
+ BOOST_CHECK(intersects(segment4, segment3, false));
+ BOOST_CHECK(intersects(segment4, segment3, true));
+ BOOST_CHECK(intersects(segment4, segment2, false));
+ BOOST_CHECK(intersects(segment4, segment2, true));
+ BOOST_CHECK(!intersects(segment3, segment5, false));
+ BOOST_CHECK(intersects(segment3, segment5, true));
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test10, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ segment_type segment1 = construct<segment_type>(point_type(0, 0), point_type(0, 2));
+ segment_type segment2 = construct<segment_type>(point_type(0, 1), point_type(0, 3));
+ segment_type segment3 = construct<segment_type>(point_type(0, 1), point_type(0, 2));
+ segment_type segment4 = construct<segment_type>(point_type(0, 2), point_type(0, 3));
+ segment_type segment5 = construct<segment_type>(point_type(0, 2), point_type(2, 2));
+ segment_type segment6 = construct<segment_type>(point_type(0, 1), point_type(1, 1));
+
+ BOOST_CHECK(intersects(segment1, segment1, false));
+ BOOST_CHECK(intersects(segment1, segment1, true));
+ BOOST_CHECK(intersects(segment1, segment2, false));
+ BOOST_CHECK(intersects(segment1, segment2, true));
+ BOOST_CHECK(intersects(segment1, segment3, false));
+ BOOST_CHECK(intersects(segment1, segment3, true));
+ BOOST_CHECK(intersects(segment2, segment3, false));
+ BOOST_CHECK(intersects(segment2, segment3, true));
+ BOOST_CHECK(!intersects(segment1, segment4, false));
+ BOOST_CHECK(intersects(segment1, segment4, true));
+ BOOST_CHECK(!intersects(segment1, segment5, false));
+ BOOST_CHECK(intersects(segment1, segment5, true));
+ BOOST_CHECK(intersects(segment1, segment6, false));
+ BOOST_CHECK(intersects(segment1, segment6, true));
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test11, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ point_type point1(1, 2);
+ point_type point2(7, 10);
+ segment_type segment1 = construct<segment_type>(point1, point2);
+
+ BOOST_CHECK(euclidean_distance(segment1, point1) == 0.0);
+ BOOST_CHECK(euclidean_distance(segment1, point2) == 0.0);
+ BOOST_CHECK(euclidean_distance(segment1, point_type(10, 14)) == 5.0);
+ BOOST_CHECK(euclidean_distance(segment1, point_type(-3, -1)) == 5.0);
+ BOOST_CHECK(euclidean_distance(segment1, point_type(0, 9)) == 5.0);
+ BOOST_CHECK(euclidean_distance(segment1, point_type(8, 3)) == 5.0);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_concept_test12, T, test_types) {
+ typedef point_data<T> point_type;
+ typedef Segment<T> segment_type;
+
+ segment_type segment1 = construct<segment_type>(point_type(0, 0), point_type(3, 4));
+ segment_type segment2 = construct<segment_type>(point_type(2, 0), point_type(0, 2));
+ segment_type segment3 = construct<segment_type>(point_type(1, -7), point_type(10, 5));
+ segment_type segment4 = construct<segment_type>(point_type(7, 7), point_type(10, 11));
+
+ BOOST_CHECK(euclidean_distance(segment1, segment2) == 0.0);
+ BOOST_CHECK(euclidean_distance(segment1, segment3) == 5.0);
+ BOOST_CHECK(euclidean_distance(segment1, segment4) == 5.0);
+}

Added: branches/release/libs/polygon/test/voronoi_builder_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_builder_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,636 @@
+// Boost.Polygon library voronoi_builder_test.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <ctime>
+#include <limits>
+#include <list>
+#include <vector>
+
+#define BOOST_TEST_MODULE voronoi_builder_test
+#include <boost/mpl/list.hpp>
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/test/test_case_template.hpp>
+
+#include <boost/polygon/polygon.hpp>
+#include <boost/polygon/voronoi.hpp>
+#include "voronoi_test_helper.hpp"
+using boost::polygon::voronoi_builder;
+using boost::polygon::voronoi_diagram;
+
+typedef boost::mpl::list<int> test_types;
+typedef voronoi_diagram<double> vd_type;
+typedef vd_type::coordinate_type coordinate_type;
+typedef vd_type::edge_type voronoi_edge_type;
+typedef vd_type::const_cell_iterator const_cell_iterator;
+typedef vd_type::const_vertex_iterator const_vertex_iterator;
+
+#define CHECK_OUTPUT_SIZE(output, cells, vertices, edges) \
+ BOOST_CHECK_EQUAL(output.num_cells(), (std::size_t)cells); \
+ BOOST_CHECK_EQUAL(output.num_vertices(), (std::size_t)vertices); \
+ BOOST_CHECK_EQUAL(output.num_edges(), (std::size_t)edges)
+
+#define VERIFY_OUTPUT(output) \
+ BOOST_CHECK(voronoi_test_helper::verify_output(output, \
+ voronoi_test_helper::CELL_CONVEXITY)); \
+ BOOST_CHECK(voronoi_test_helper::verify_output(output, \
+ voronoi_test_helper::INCIDENT_EDGES_CCW_ORDER)); \
+ BOOST_CHECK(voronoi_test_helper::verify_output(output, \
+ voronoi_test_helper::NO_HALF_EDGE_INTERSECTIONS))
+
+#define VERIFY_NO_HALF_EDGE_INTERSECTIONS(output) \
+ BOOST_CHECK(voronoi_test_helper::verify_output(output, \
+ voronoi_test_helper::NO_HALF_EDGE_INTERSECTIONS))
+
+// Sites: (0, 0).
+BOOST_AUTO_TEST_CASE_TEMPLATE(single_site_test, T, test_types) {
+ std::vector< point_data<T> > points;
+ points.push_back(point_data<T>(0, 0));
+ vd_type test_output;
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ VERIFY_OUTPUT(test_output);
+
+ BOOST_CHECK(test_output.cells().size() == 1);
+ CHECK_OUTPUT_SIZE(test_output, 1, 0, 0);
+
+ const_cell_iterator it = test_output.cells().begin();
+ BOOST_CHECK(it->incident_edge() == NULL);
+}
+
+// Sites: (0, 0), (0, 1).
+BOOST_AUTO_TEST_CASE_TEMPLATE(collinear_sites_test1, T, test_types) {
+ std::vector< point_data<T> > points;
+ points.push_back(point_data<T>(0, 0));
+ points.push_back(point_data<T>(0, 1));
+ vd_type test_output;
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ VERIFY_OUTPUT(test_output);
+ CHECK_OUTPUT_SIZE(test_output, 2, 0, 2);
+
+ const_cell_iterator cell_it = test_output.cells().begin();
+ cell_it++;
+
+ const voronoi_edge_type* edge1_1 = cell_it->incident_edge();
+ const voronoi_edge_type* edge1_2 = edge1_1->twin();
+
+ BOOST_CHECK(edge1_1->twin() == edge1_2);
+ BOOST_CHECK(edge1_2->twin() == edge1_1);
+
+ BOOST_CHECK(edge1_1->next() == edge1_1);
+ BOOST_CHECK(edge1_1->prev() == edge1_1);
+ BOOST_CHECK(edge1_1->rot_next() == edge1_2);
+ BOOST_CHECK(edge1_1->rot_prev() == edge1_2);
+
+ BOOST_CHECK(edge1_2->next() == edge1_2);
+ BOOST_CHECK(edge1_2->prev() == edge1_2);
+ BOOST_CHECK(edge1_2->rot_next() == edge1_1);
+ BOOST_CHECK(edge1_2->rot_prev() == edge1_1);
+}
+
+// Sites: (0, 0), (1, 1), (2, 2).
+BOOST_AUTO_TEST_CASE_TEMPLATE(collinear_sites_test2, T, test_types) {
+ std::vector< point_data<T> > points;
+ points.push_back(point_data<T>(0, 0));
+ points.push_back(point_data<T>(1, 1));
+ points.push_back(point_data<T>(2, 2));
+ vd_type test_output;
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ VERIFY_OUTPUT(test_output);
+ CHECK_OUTPUT_SIZE(test_output, 3, 0, 4);
+
+ const_cell_iterator cell_it = test_output.cells().begin();
+ const voronoi_edge_type* edge1_1 = cell_it->incident_edge();
+ const voronoi_edge_type* edge1_2 = edge1_1->twin();
+ cell_it++;
+ cell_it++;
+ const voronoi_edge_type* edge2_2 = cell_it->incident_edge();
+ const voronoi_edge_type* edge2_1 = edge2_2->twin();
+
+ BOOST_CHECK(edge1_1->twin() == edge1_2 && edge1_2->twin() == edge1_1);
+ BOOST_CHECK(edge2_1->twin() == edge2_2 && edge2_2->twin() == edge2_1);
+
+ BOOST_CHECK(edge1_1->next() == edge1_1 && edge1_1->prev() == edge1_1);
+ BOOST_CHECK(edge1_2->next() == edge2_1 && edge1_2->prev() == edge2_1);
+ BOOST_CHECK(edge2_1->next() == edge1_2 && edge2_1->prev() == edge1_2);
+ BOOST_CHECK(edge2_2->next() == edge2_2 && edge2_2->prev() == edge2_2);
+
+ BOOST_CHECK(edge1_1->rot_next() == edge1_2 && edge1_1->rot_prev() == edge2_1);
+ BOOST_CHECK(edge1_2->rot_next() == edge2_2 && edge1_2->rot_prev() == edge1_1);
+ BOOST_CHECK(edge2_1->rot_next() == edge1_1 && edge2_1->rot_prev() == edge2_2);
+ BOOST_CHECK(edge2_2->rot_next() == edge2_1 && edge2_2->rot_prev() == edge1_2);
+
+ BOOST_CHECK(edge1_2->next() == edge2_1 && edge1_2->prev() == edge2_1);
+ BOOST_CHECK(edge2_1->next() == edge1_2 && edge2_1->prev() == edge1_2);
+}
+
+// Sites: (0, 0), (0, 4), (2, 1).
+BOOST_AUTO_TEST_CASE_TEMPLATE(triangle_test1, T, test_types) {
+ point_data<T> point1(0, 0);
+ point_data<T> point2(0, 4);
+ point_data<T> point3(2, 1);
+ std::vector< point_data<T> > points;
+ points.push_back(point1);
+ points.push_back(point2);
+ points.push_back(point3);
+ vd_type test_output;
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ VERIFY_OUTPUT(test_output);
+ CHECK_OUTPUT_SIZE(test_output, 3, 1, 6);
+
+ const_vertex_iterator it = test_output.vertices().begin();
+ BOOST_CHECK_EQUAL(it->x(), 0.25);
+ BOOST_CHECK_EQUAL(it->y(), 2.0);
+
+ const voronoi_edge_type* edge1_1 = it->incident_edge();
+ const voronoi_edge_type* edge1_2 = edge1_1->twin();
+ BOOST_CHECK(edge1_1->cell()->source_index() == 1);
+ BOOST_CHECK(edge1_2->cell()->source_index() == 2);
+
+ const voronoi_edge_type* edge2_1 = edge1_1->rot_prev();
+ const voronoi_edge_type* edge2_2 = edge2_1->twin();
+ BOOST_CHECK(edge2_1->cell()->source_index() == 2);
+ BOOST_CHECK(edge2_2->cell()->source_index() == 0);
+
+ const voronoi_edge_type* edge3_1 = edge2_1->rot_prev();
+ const voronoi_edge_type* edge3_2 = edge3_1->twin();
+ BOOST_CHECK(edge3_1->cell()->source_index() == 0);
+ BOOST_CHECK(edge3_2->cell()->source_index() == 1);
+
+ BOOST_CHECK(edge1_2->twin() == edge1_1);
+ BOOST_CHECK(edge2_2->twin() == edge2_1);
+ BOOST_CHECK(edge3_2->twin() == edge3_1);
+
+ BOOST_CHECK(edge1_1->prev() == edge3_2 && edge1_1->next() == edge3_2);
+ BOOST_CHECK(edge2_1->prev() == edge1_2 && edge2_1->next() == edge1_2);
+ BOOST_CHECK(edge3_1->prev() == edge2_2 && edge3_1->next() == edge2_2);
+
+ BOOST_CHECK(edge1_2->next() == edge2_1 && edge1_2->prev() == edge2_1);
+ BOOST_CHECK(edge2_2->next() == edge3_1 && edge2_2->prev() == edge3_1);
+ BOOST_CHECK(edge3_2->next() == edge1_1 && edge3_2->prev() == edge1_1);
+
+ BOOST_CHECK(edge1_1->rot_next() == edge3_1);
+ BOOST_CHECK(edge3_1->rot_next() == edge2_1);
+ BOOST_CHECK(edge2_1->rot_next() == edge1_1);
+
+ BOOST_CHECK(edge1_2->rot_next() == edge2_2);
+ BOOST_CHECK(edge2_2->rot_next() == edge3_2);
+ BOOST_CHECK(edge3_2->rot_next() == edge1_2);
+}
+
+// Sites: (0, 1), (2, 0), (2, 4).
+BOOST_AUTO_TEST_CASE_TEMPLATE(triangle_test2, T, test_types) {
+ point_data<T> point1(0, 1);
+ point_data<T> point2(2, 0);
+ point_data<T> point3(2, 4);
+ std::vector< point_data<T> > points;
+ points.push_back(point1);
+ points.push_back(point2);
+ points.push_back(point3);
+ vd_type test_output;
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ VERIFY_OUTPUT(test_output);
+ CHECK_OUTPUT_SIZE(test_output, 3, 1, 6);
+
+ const_vertex_iterator it = test_output.vertices().begin();
+ BOOST_CHECK_EQUAL(it->x(), 1.75);
+ BOOST_CHECK_EQUAL(it->y(), 2.0);
+
+ const voronoi_edge_type* edge1_1 = it->incident_edge();
+ const voronoi_edge_type* edge1_2 = edge1_1->twin();
+ BOOST_CHECK(edge1_1->cell()->source_index() == 2);
+ BOOST_CHECK(edge1_2->cell()->source_index() == 1);
+
+ const voronoi_edge_type* edge2_1 = edge1_1->rot_prev();
+ const voronoi_edge_type* edge2_2 = edge2_1->twin();
+ BOOST_CHECK(edge2_1->cell()->source_index() == 1);
+ BOOST_CHECK(edge2_2->cell()->source_index() == 0);
+
+ const voronoi_edge_type* edge3_1 = edge2_1->rot_prev();
+ const voronoi_edge_type* edge3_2 = edge3_1->twin();
+ BOOST_CHECK(edge3_1->cell()->source_index() == 0);
+ BOOST_CHECK(edge3_2->cell()->source_index() == 2);
+
+ BOOST_CHECK(edge1_2->twin() == edge1_1);
+ BOOST_CHECK(edge2_2->twin() == edge2_1);
+ BOOST_CHECK(edge3_2->twin() == edge3_1);
+
+ BOOST_CHECK(edge1_1->prev() == edge3_2 && edge1_1->next() == edge3_2);
+ BOOST_CHECK(edge2_1->prev() == edge1_2 && edge2_1->next() == edge1_2);
+ BOOST_CHECK(edge3_1->prev() == edge2_2 && edge3_1->next() == edge2_2);
+
+ BOOST_CHECK(edge1_2->next() == edge2_1 && edge1_2->prev() == edge2_1);
+ BOOST_CHECK(edge2_2->next() == edge3_1 && edge2_2->prev() == edge3_1);
+ BOOST_CHECK(edge3_2->next() == edge1_1 && edge3_2->prev() == edge1_1);
+
+ BOOST_CHECK(edge1_1->rot_next() == edge3_1);
+ BOOST_CHECK(edge3_1->rot_next() == edge2_1);
+ BOOST_CHECK(edge2_1->rot_next() == edge1_1);
+
+ BOOST_CHECK(edge1_2->rot_next() == edge2_2);
+ BOOST_CHECK(edge2_2->rot_next() == edge3_2);
+ BOOST_CHECK(edge3_2->rot_next() == edge1_2);
+}
+
+// Sites: (0, 0), (0, 1), (1, 0), (1, 1).
+BOOST_AUTO_TEST_CASE_TEMPLATE(square_test1, T, test_types) {
+ point_data<T> point1(0, 0);
+ point_data<T> point2(0, 1);
+ point_data<T> point3(1, 0);
+ point_data<T> point4(1, 1);
+ std::vector< point_data<T> > points;
+ points.push_back(point1);
+ points.push_back(point2);
+ points.push_back(point3);
+ points.push_back(point4);
+ vd_type test_output;
+ construct_voronoi(points.begin(), points.end(), &test_output);
+ VERIFY_OUTPUT(test_output);
+ CHECK_OUTPUT_SIZE(test_output, 4, 1, 8);
+
+ // Check voronoi vertex.
+ const_vertex_iterator it = test_output.vertices().begin();
+ BOOST_CHECK_EQUAL(it->x(), 0.5);
+ BOOST_CHECK_EQUAL(it->y(), 0.5);
+
+ // Check voronoi edges.
+ const voronoi_edge_type* edge1_1 = it->incident_edge();
+ const voronoi_edge_type* edge1_2 = edge1_1->twin();
+ BOOST_CHECK(edge1_1->cell()->source_index() == 3);
+ BOOST_CHECK(edge1_2->cell()->source_index() == 2);
+
+ const voronoi_edge_type* edge2_1 = edge1_1->rot_prev();
+ const voronoi_edge_type* edge2_2 = edge2_1->twin();
+ BOOST_CHECK(edge2_1->cell()->source_index() == 2);
+ BOOST_CHECK(edge2_2->cell()->source_index() == 0);
+
+ const voronoi_edge_type* edge3_1 = edge2_1->rot_prev();
+ const voronoi_edge_type* edge3_2 = edge3_1->twin();
+ BOOST_CHECK(edge3_1->cell()->source_index() == 0);
+ BOOST_CHECK(edge3_2->cell()->source_index() == 1);
+
+ const voronoi_edge_type* edge4_1 = edge3_1->rot_prev();
+ const voronoi_edge_type* edge4_2 = edge4_1->twin();
+ BOOST_CHECK(edge4_1->cell()->source_index() == 1);
+ BOOST_CHECK(edge4_2->cell()->source_index() == 3);
+
+ BOOST_CHECK(edge1_2->twin() == edge1_1);
+ BOOST_CHECK(edge2_2->twin() == edge2_1);
+ BOOST_CHECK(edge3_2->twin() == edge3_1);
+ BOOST_CHECK(edge4_2->twin() == edge4_1);
+
+ BOOST_CHECK(edge1_1->prev() == edge4_2 && edge1_1->next() == edge4_2);
+ BOOST_CHECK(edge2_1->prev() == edge1_2 && edge2_1->next() == edge1_2);
+ BOOST_CHECK(edge3_1->prev() == edge2_2 && edge3_1->next() == edge2_2);
+ BOOST_CHECK(edge4_1->prev() == edge3_2 && edge4_1->next() == edge3_2);
+
+ BOOST_CHECK(edge1_2->next() == edge2_1 && edge1_2->prev() == edge2_1);
+ BOOST_CHECK(edge2_2->next() == edge3_1 && edge2_2->prev() == edge3_1);
+ BOOST_CHECK(edge3_2->next() == edge4_1 && edge3_2->prev() == edge4_1);
+ BOOST_CHECK(edge4_2->next() == edge1_1 && edge4_2->prev() == edge1_1);
+
+ BOOST_CHECK(edge1_1->rot_next() == edge4_1);
+ BOOST_CHECK(edge4_1->rot_next() == edge3_1);
+ BOOST_CHECK(edge3_1->rot_next() == edge2_1);
+ BOOST_CHECK(edge2_1->rot_next() == edge1_1);
+
+ BOOST_CHECK(edge1_2->rot_next() == edge2_2);
+ BOOST_CHECK(edge2_2->rot_next() == edge3_2);
+ BOOST_CHECK(edge3_2->rot_next() == edge4_2);
+ BOOST_CHECK(edge4_2->rot_next() == edge1_2);
+}
+
+#ifdef NDEBUG
+BOOST_AUTO_TEST_CASE_TEMPLATE(grid_test, T, test_types) {
+ vd_type test_output_small, test_output_large;
+ std::vector< point_data<T> > point_vec_small, point_vec_large;
+ int grid_size[] = {10, 33, 101};
+ int max_value[] = {10, 33, 101};
+ int array_length = sizeof(grid_size) / sizeof(int);
+ for (int k = 0; k < array_length; k++) {
+ test_output_small.clear();
+ test_output_large.clear();
+ point_vec_small.clear();
+ point_vec_large.clear();
+ int koef = (std::numeric_limits<int>::max)() / max_value[k];
+ for (int i = 0; i < grid_size[k]; i++) {
+ for (int j = 0; j < grid_size[k]; j++) {
+ point_vec_small.push_back(point_data<T>(i, j));
+ point_vec_large.push_back(point_data<T>(koef * i, koef * j));
+ }
+ }
+ construct_voronoi(point_vec_small.begin(), point_vec_small.end(), &test_output_small);
+ construct_voronoi(point_vec_large.begin(), point_vec_large.end(), &test_output_large);
+ VERIFY_OUTPUT(test_output_small);
+ VERIFY_OUTPUT(test_output_large);
+ unsigned int num_cells = grid_size[k] * grid_size[k];
+ unsigned int num_vertices = num_cells - 2 * grid_size[k] + 1;
+ unsigned int num_edges = 4 * num_cells - 4 * grid_size[k];
+ CHECK_OUTPUT_SIZE(test_output_small, num_cells, num_vertices, num_edges);
+ CHECK_OUTPUT_SIZE(test_output_large, num_cells, num_vertices, num_edges);
+ }
+}
+#endif
+
+#ifdef NDEBUG
+BOOST_AUTO_TEST_CASE_TEMPLATE(random_test, T, test_types) {
+ boost::mt19937 gen(static_cast<unsigned int>(time(NULL)));
+ vd_type test_output_small, test_output_large;
+ std::vector< point_data<T> > point_vec_small, point_vec_large;
+ int num_points[] = {10, 100, 1000, 10000};
+ int num_runs[] = {1000, 100, 10, 1};
+ int mod_koef[] = {10, 100, 100, 1000};
+ int max_value[] = {5, 50, 50, 5000};
+ int array_length = sizeof(num_points) / sizeof(int);
+ for (int k = 0; k < array_length; k++) {
+ int koef = (std::numeric_limits<int>::max)() / max_value[k];
+ for (int i = 0; i < num_runs[k]; i++) {
+ test_output_small.clear();
+ test_output_large.clear();
+ point_vec_small.clear();
+ point_vec_large.clear();
+ for (int j = 0; j < num_points[k]; j++) {
+ T x = gen() % mod_koef[k] - mod_koef[k] / 2;
+ T y = gen() % mod_koef[k] - mod_koef[k] / 2;
+ point_vec_small.push_back(point_data<T>(x, y));
+ point_vec_large.push_back(point_data<T>(koef * x, koef * y));
+ }
+ construct_voronoi(point_vec_small.begin(), point_vec_small.end(), &test_output_small);
+ construct_voronoi(point_vec_large.begin(), point_vec_large.end(), &test_output_large);
+ VERIFY_OUTPUT(test_output_small);
+ VERIFY_OUTPUT(test_output_large);
+ BOOST_CHECK_EQUAL(test_output_small.num_cells(), test_output_large.num_cells());
+ BOOST_CHECK_EQUAL(test_output_small.num_vertices(), test_output_large.num_vertices());
+ BOOST_CHECK_EQUAL(test_output_small.num_edges(), test_output_large.num_edges());
+ }
+ }
+}
+#endif
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_sites_test1, T, test_types) {
+ vd_type test_output;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(0, 0);
+ point_data<T> point2(1, 1);
+ segments.push_back(segment_data<T>(point1, point2));
+ construct_voronoi(segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 3, 0, 4);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_sites_test2, T, test_types) {
+ vd_type test_output;
+ std::vector< point_data<T> > points;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(0, 0);
+ point_data<T> point2(4, 4);
+ point_data<T> point3(3, 1);
+ point_data<T> point4(1, 3);
+ segments.push_back(segment_data<T>(point1, point2));
+ points.push_back(point3);
+ points.push_back(point4);
+ construct_voronoi(points.begin(), points.end(), segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 5, 4, 16);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_sites_test3, T, test_types) {
+ vd_type test_output;
+ std::vector< point_data<T> > points;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(4, 0);
+ point_data<T> point2(0, 4);
+ point_data<T> point3(3, 3);
+ point_data<T> point4(1, 1);
+ segments.push_back(segment_data<T>(point1, point2));
+ points.push_back(point3);
+ points.push_back(point4);
+ construct_voronoi(points.begin(), points.end(), segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 5, 4, 16);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_sites_test4, T, test_types) {
+ vd_type test_output;
+ std::vector< point_data<T> > points;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(4, 0);
+ point_data<T> point2(0, 4);
+ point_data<T> point3(3, 2);
+ point_data<T> point4(2, 3);
+ segments.push_back(segment_data<T>(point1, point2));
+ points.push_back(point3);
+ points.push_back(point4);
+ construct_voronoi(points.begin(), points.end(), segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 5, 3, 14);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_site_test5, T, test_types) {
+ vd_type test_output;
+ std::vector< point_data<T> > points;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(0, 0);
+ point_data<T> point2(0, 8);
+ point_data<T> point3(-2, -2);
+ point_data<T> point4(-2, 4);
+ point_data<T> point5(-2, 10);
+ segments.push_back(segment_data<T>(point1, point2));
+ points.push_back(point3);
+ points.push_back(point4);
+ points.push_back(point5);
+ construct_voronoi(points.begin(), points.end(), segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 6, 4, 18);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_site_test6, T, test_types) {
+ vd_type test_output;
+ std::vector< point_data<T> > points;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(-1, 1);
+ point_data<T> point2(1, 0);
+ point_data<T> point3(1, 2);
+ segments.push_back(segment_data<T>(point2, point3));
+ points.push_back(point1);
+ construct_voronoi(points.begin(), points.end(), segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 4, 2, 10);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_site_test7, T, test_types) {
+ vd_type test_output;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(0, 0);
+ point_data<T> point2(4, 0);
+ point_data<T> point3(0, 4);
+ point_data<T> point4(4, 4);
+ segments.push_back(segment_data<T>(point1, point2));
+ segments.push_back(segment_data<T>(point2, point3));
+ segments.push_back(segment_data<T>(point3, point4));
+ construct_voronoi(segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 7, 6, 24);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_site_test8, T, test_types) {
+ vd_type test_output;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(0, 0);
+ point_data<T> point2(4, 0);
+ point_data<T> point3(4, 4);
+ point_data<T> point4(0, 4);
+ segments.push_back(segment_data<T>(point1, point2));
+ segments.push_back(segment_data<T>(point2, point3));
+ segments.push_back(segment_data<T>(point3, point4));
+ segments.push_back(segment_data<T>(point4, point1));
+ construct_voronoi(segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 8, 5, 24);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_site_test9, T, test_types) {
+ vd_type test_output;
+ std::vector< segment_data<T> > segments;
+ point_data<T> point1(0, 0);
+ point_data<T> point2(2, 0);
+ point_data<T> point3(4, 0);
+ segments.push_back(segment_data<T>(point1, point2));
+ segments.push_back(segment_data<T>(point2, point3));
+ construct_voronoi(segments.begin(), segments.end(), &test_output);
+ CHECK_OUTPUT_SIZE(test_output, 5, 0, 8);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+}
+
+#ifdef NDEBUG
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_grid_test, T, test_types) {
+ vd_type test_output_small, test_output_large;
+ std::vector< segment_data<T> > segments_small, segments_large;
+ int grid_size[] = {10, 27, 53};
+ int max_value[] = {100, 330, 1000};
+ int array_length = sizeof(grid_size) / sizeof(int);
+ for (int k = 0; k < array_length; k++) {
+ test_output_small.clear();
+ test_output_large.clear();
+ segments_small.clear();
+ segments_large.clear();
+ int cur_sz = grid_size[k];
+ int koef = (std::numeric_limits<int>::max)() / max_value[k];
+ for (int i = 0; i < cur_sz + 1; i++)
+ for (int j = 0; j < cur_sz; j++) {
+ point_data<T> point1_1(10 * i, 10 * j);
+ point_data<T> point1_2(koef * 10 * i, koef * 10 * j);
+ point_data<T> point2_1(10 * i, 10 * j + 10);
+ point_data<T> point2_2(koef * 10 * i, koef * (10 * j + 10));
+ segments_small.push_back(segment_data<T>(point1_1, point2_1));
+ segments_large.push_back(segment_data<T>(point1_2, point2_2));
+ point_data<T> point3_1(10 * j, 10 * i);
+ point_data<T> point3_2(koef * 10 * j, koef * 10 * i);
+ point_data<T> point4_1(10 * j + 10, 10 * i);
+ point_data<T> point4_2(koef * (10 * j + 10), koef * 10 * i);
+ segments_small.push_back(segment_data<T>(point3_1, point4_1));
+ segments_large.push_back(segment_data<T>(point3_2, point4_2));
+ }
+ construct_voronoi(segments_small.begin(), segments_small.end(), &test_output_small);
+ construct_voronoi(segments_large.begin(), segments_large.end(), &test_output_large);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output_small);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output_large);
+ BOOST_CHECK_EQUAL(test_output_small.num_cells(), test_output_large.num_cells());
+ BOOST_CHECK_EQUAL(test_output_small.num_vertices(), test_output_large.num_vertices());
+ BOOST_CHECK_EQUAL(test_output_small.num_edges(), test_output_large.num_edges());
+ }
+}
+#endif
+
+#ifdef NDEBUG
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_random_test1, T, test_types) {
+ boost::mt19937 gen(static_cast<unsigned int>(time(NULL)));
+ vd_type test_output;
+ std::vector< point_data<T> > points;
+ std::vector< segment_data<T> > segments;
+ int num_runs = 1000;
+ int num_segments = 10;
+ points.push_back(point_data<T>(-100, -100));
+ points.push_back(point_data<T>(-100, 100));
+ points.push_back(point_data<T>(100, -100));
+ points.push_back(point_data<T>(100, 100));
+ for (int i = 0; i < num_runs; i++) {
+ test_output.clear();
+ segments.clear();
+ for (int j = 0; j < num_segments; j++) {
+ T x1 = 0, y1 = 0, x2 = 0, y2 = 0;
+ while (x1 == x2 && y1 == y2) {
+ x1 = (gen() % 100) - 50;
+ y1 = (gen() % 100) - 50;
+ x2 = (gen() % 100) - 50;
+ y2 = (gen() % 100) - 50;
+ }
+ point_data<T> point1(x1, y1);
+ point_data<T> point2(x2, y2);
+ segments.push_back(segment_data<T>(point1, point2));
+ }
+ voronoi_test_helper::clean_segment_set(segments);
+ construct_voronoi(points.begin(), points.end(), segments.begin(), segments.end(), &test_output);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output);
+ }
+}
+#endif
+
+#ifdef NDEBUG
+BOOST_AUTO_TEST_CASE_TEMPLATE(segment_random_test2, T, test_types) {
+ boost::mt19937 gen(static_cast<unsigned int>(time(NULL)));
+ vd_type test_output_small, test_output_large;
+ std::vector< segment_data<T> > segments_small, segments_large;
+ int num_segments[] = {5, 25, 125, 625};
+ int num_runs[] = {1000, 100, 10, 1};
+ int mod_koef1[] = {10, 100, 200, 300};
+ int mod_koef2[] = {10, 20, 50, 100};
+ int max_value[] = {10, 60, 125, 200};
+ int array_length = sizeof(num_segments) / sizeof(int);
+ for (int k = 0; k < array_length; k++) {
+ int koef = (std::numeric_limits<int>::max)() / max_value[k];
+ for (int i = 0; i < num_runs[k]; i++) {
+ test_output_small.clear();
+ test_output_large.clear();
+ segments_small.clear();
+ segments_large.clear();
+ for (int j = 0; j < num_segments[k]; j++) {
+ T x1 = (gen() % mod_koef1[k]) - mod_koef1[k] / 2;
+ T y1 = (gen() % mod_koef1[k]) - mod_koef1[k] / 2;
+ T dx = 0, dy = 0;
+ while (dx == 0 && dy == 0) {
+ dx = (gen() % mod_koef2[k]) - mod_koef2[k] / 2;
+ dy = (gen() % mod_koef2[k]) - mod_koef2[k] / 2;
+ }
+ T x2 = x1 + dx;
+ T y2 = y1 + dy;
+ point_data<T> point1_small(x1, y1);
+ point_data<T> point2_small(x2, y2);
+ segments_small.push_back(segment_data<T>(point1_small, point2_small));
+ }
+ voronoi_test_helper::clean_segment_set(segments_small);
+ for (typename std::vector< segment_data<T> >::iterator it = segments_small.begin();
+ it != segments_small.end(); ++it) {
+ T x1 = it->low().x() * koef;
+ T y1 = it->low().y() * koef;
+ T x2 = it->high().x() * koef;
+ T y2 = it->high().y() * koef;
+ point_data<T> point1_large(x1, y1);
+ point_data<T> point2_large(x2, y2);
+ segments_large.push_back(segment_data<T>(point1_large, point2_large));
+ }
+ construct_voronoi(segments_small.begin(), segments_small.end(), &test_output_small);
+ construct_voronoi(segments_large.begin(), segments_large.end(), &test_output_large);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output_small);
+ VERIFY_NO_HALF_EDGE_INTERSECTIONS(test_output_large);
+ BOOST_CHECK_EQUAL(test_output_small.num_cells(), test_output_large.num_cells());
+ BOOST_CHECK_EQUAL(test_output_small.num_vertices(), test_output_large.num_vertices());
+ BOOST_CHECK_EQUAL(test_output_small.num_edges(), test_output_large.num_edges());
+ }
+ }
+}
+#endif

Added: branches/release/libs/polygon/test/voronoi_ctypes_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_ctypes_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,295 @@
+// Boost.Polygon library voronoi_ctypes_test.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <ctime>
+#include <vector>
+
+#define BOOST_TEST_MODULE voronoi_ctypes_test
+#include <boost/mpl/list.hpp>
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/test/test_case_template.hpp>
+
+#include <boost/polygon/detail/voronoi_ctypes.hpp>
+using namespace boost::polygon::detail;
+
+type_converter_fpt to_fpt;
+
+BOOST_AUTO_TEST_CASE(ulp_comparison_test1) {
+ ulp_comparison<double> ulp_cmp;
+ uint64 a = 22;
+ uint64 b = 27;
+ fpt64 da, db;
+ std::memcpy(&da, &a, sizeof(uint64));
+ std::memcpy(&db, &b, sizeof(uint64));
+ BOOST_CHECK_EQUAL(ulp_cmp(da, db, 1), ulp_cmp.LESS);
+ BOOST_CHECK_EQUAL(ulp_cmp(db, da, 1), ulp_cmp.MORE);
+ BOOST_CHECK_EQUAL(ulp_cmp(da, db, 4), ulp_cmp.LESS);
+ BOOST_CHECK_EQUAL(ulp_cmp(da, db, 5), ulp_cmp.EQUAL);
+ BOOST_CHECK_EQUAL(ulp_cmp(da, db, 6), ulp_cmp.EQUAL);
+}
+
+BOOST_AUTO_TEST_CASE(ulp_comparison_test2) {
+ ulp_comparison<fpt64> ulp_cmp;
+ uint64 a = 0ULL;
+ uint64 b = 0x8000000000000002ULL;
+ fpt64 da, db;
+ std::memcpy(&da, &a, sizeof(uint64));
+ std::memcpy(&db, &b, sizeof(uint64));
+ BOOST_CHECK_EQUAL(ulp_cmp(da, db, 1), ulp_cmp.MORE);
+ BOOST_CHECK_EQUAL(ulp_cmp(db, da, 1), ulp_cmp.LESS);
+ BOOST_CHECK_EQUAL(ulp_cmp(da, db, 2), ulp_cmp.EQUAL);
+ BOOST_CHECK_EQUAL(ulp_cmp(da, db, 3), ulp_cmp.EQUAL);
+}
+
+BOOST_AUTO_TEST_CASE(extended_exponent_fpt_test1) {
+ boost::mt19937_64 gen(static_cast<uint32>(time(NULL)));
+ fpt64 b = 0.0;
+ efpt64 eeb(b);
+ for (int i = 0; i < 1000; ++i) {
+ fpt64 a = to_fpt(static_cast<int64>(gen()));
+ efpt64 eea(a);
+ efpt64 neg = -eea;
+ efpt64 sum = eea + eeb;
+ efpt64 dif = eea - eeb;
+ efpt64 mul = eea * eeb;
+ BOOST_CHECK_EQUAL(to_fpt(neg), -a);
+ BOOST_CHECK_EQUAL(to_fpt(sum), a + b);
+ BOOST_CHECK_EQUAL(to_fpt(dif), a - b);
+ BOOST_CHECK_EQUAL(to_fpt(mul), a * b);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_exponent_fpt_test2) {
+ boost::mt19937_64 gen(static_cast<uint32>(time(NULL)));
+ fpt64 a = 0.0;
+ efpt64 eea(a);
+ for (int i = 0; i < 1000; ++i) {
+ fpt64 b = to_fpt(static_cast<int64>(gen()));
+ if (b == 0.0)
+ continue;
+ efpt64 eeb(b);
+ efpt64 neg = -eea;
+ efpt64 sum = eea + eeb;
+ efpt64 dif = eea - eeb;
+ efpt64 mul = eea * eeb;
+ efpt64 div = eea / eeb;
+ BOOST_CHECK_EQUAL(to_fpt(neg), -a);
+ BOOST_CHECK_EQUAL(to_fpt(sum), a + b);
+ BOOST_CHECK_EQUAL(to_fpt(dif), a - b);
+ BOOST_CHECK_EQUAL(to_fpt(mul), a * b);
+ BOOST_CHECK_EQUAL(to_fpt(div), a / b);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_exponent_fpt_test3) {
+ boost::mt19937_64 gen(static_cast<uint32>(time(NULL)));
+ for (int i = 0; i < 1000; ++i) {
+ fpt64 a = to_fpt(static_cast<int64>(gen()));
+ fpt64 b = to_fpt(static_cast<int64>(gen()));
+ if (b == 0.0)
+ continue;
+ efpt64 eea(a);
+ efpt64 eeb(b);
+ efpt64 neg = -eea;
+ efpt64 sum = eea + eeb;
+ efpt64 dif = eea - eeb;
+ efpt64 mul = eea * eeb;
+ efpt64 div = eea / eeb;
+ BOOST_CHECK_EQUAL(to_fpt(neg), -a);
+ BOOST_CHECK_EQUAL(to_fpt(sum), a + b);
+ BOOST_CHECK_EQUAL(to_fpt(dif), a - b);
+ BOOST_CHECK_EQUAL(to_fpt(mul), a * b);
+ BOOST_CHECK_EQUAL(to_fpt(div), a / b);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_exponent_fpt_test4) {
+ for (int exp = 0; exp < 64; ++exp)
+ for (int i = 1; i < 100; ++i) {
+ fpt64 a = i;
+ fpt64 b = to_fpt(1LL << exp);
+ efpt64 eea(a);
+ efpt64 eeb(b);
+ efpt64 neg = -eea;
+ efpt64 sum = eea + eeb;
+ efpt64 dif = eea - eeb;
+ efpt64 mul = eea * eeb;
+ efpt64 div = eea / eeb;
+ BOOST_CHECK_EQUAL(to_fpt(neg), -a);
+ BOOST_CHECK_EQUAL(to_fpt(sum), a + b);
+ BOOST_CHECK_EQUAL(to_fpt(dif), a - b);
+ BOOST_CHECK_EQUAL(to_fpt(mul), a * b);
+ BOOST_CHECK_EQUAL(to_fpt(div), a / b);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_exponent_fpt_test5) {
+ for (int i = 0; i < 100; ++i) {
+ efpt64 a(to_fpt(i * i));
+ efpt64 b = a.sqrt();
+ BOOST_CHECK_EQUAL(to_fpt(b), to_fpt(i));
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_exponent_fpt_test6) {
+ for (int i = -10; i <= 10; ++i) {
+ efpt64 a(to_fpt(i));
+ BOOST_CHECK_EQUAL(is_pos(a), i > 0);
+ BOOST_CHECK_EQUAL(is_neg(a), i < 0);
+ BOOST_CHECK_EQUAL(is_zero(a), !i);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test1) {
+ typedef extended_int<1> eint32;
+ eint32 e1(0), e2(32), e3(-32);
+ BOOST_CHECK_EQUAL(e1.count(), 0);
+ BOOST_CHECK_EQUAL(e1.size(), 0U);
+ BOOST_CHECK_EQUAL(e2.count(), 1);
+ BOOST_CHECK_EQUAL(e2.chunks()[0], 32U);
+ BOOST_CHECK_EQUAL(e2.size(), 1U);
+ BOOST_CHECK_EQUAL(e3.count(), -1);
+ BOOST_CHECK_EQUAL(e3.chunks()[0], 32U);
+ BOOST_CHECK_EQUAL(e3.size(), 1U);
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test2) {
+ typedef extended_int<2> eint64;
+ int64 val64 = 0x7fffffffffffffffLL;
+ eint64 e1(0), e2(32), e3(-32), e4(val64), e5(-val64);
+ BOOST_CHECK_EQUAL(e1.count(), 0);
+ BOOST_CHECK_EQUAL(e2.count(), 1);
+ BOOST_CHECK_EQUAL(e2.chunks()[0], 32U);
+ BOOST_CHECK_EQUAL(e3.count(), -1);
+ BOOST_CHECK_EQUAL(e3.chunks()[0], 32U);
+ BOOST_CHECK_EQUAL(e4.count(), 2);
+ BOOST_CHECK_EQUAL(e4.chunks()[0], 0xffffffff);
+ BOOST_CHECK_EQUAL(e4.chunks()[1], val64 >> 32);
+ BOOST_CHECK_EQUAL(e5.count(), -2);
+ BOOST_CHECK_EQUAL(e5.chunks()[0], 0xffffffff);
+ BOOST_CHECK_EQUAL(e5.chunks()[1], val64 >> 32);
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test3) {
+ typedef extended_int<2> eint64;
+ std::vector<uint32> chunks;
+ chunks.push_back(1);
+ chunks.push_back(2);
+ eint64 e1(chunks, true), e2(chunks, false);
+ BOOST_CHECK_EQUAL(e1.count(), 2);
+ BOOST_CHECK_EQUAL(e1.chunks()[0], 2U);
+ BOOST_CHECK_EQUAL(e1.chunks()[1], 1U);
+ BOOST_CHECK_EQUAL(e2.count(), -2);
+ BOOST_CHECK_EQUAL(e2.chunks()[0], 2U);
+ BOOST_CHECK_EQUAL(e2.chunks()[1], 1U);
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test4) {
+ typedef extended_int<2> eint64;
+ std::vector<uint32> chunks;
+ chunks.push_back(1);
+ chunks.push_back(2);
+ eint64 e1(chunks, true), e2(chunks, false);
+ BOOST_CHECK_EQUAL(e1 == e2, false);
+ BOOST_CHECK_EQUAL(e1 == -e2, true);
+ BOOST_CHECK_EQUAL(e1 != e2, true);
+ BOOST_CHECK_EQUAL(e1 != -e2, false);
+ BOOST_CHECK_EQUAL(e1 < e2, false);
+ BOOST_CHECK_EQUAL(e1 < -e2, false);
+ BOOST_CHECK_EQUAL(e1 <= e2, false);
+ BOOST_CHECK_EQUAL(e1 <= -e2, true);
+ BOOST_CHECK_EQUAL(e1 > e2, true);
+ BOOST_CHECK_EQUAL(e1 > -e2, false);
+ BOOST_CHECK_EQUAL(e1 >= e2, true);
+ BOOST_CHECK_EQUAL(e1 >= -e2, true);
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test5) {
+ typedef extended_int<2> eint64;
+ boost::mt19937_64 gen(static_cast<uint32>(time(NULL)));
+ for (int i = 0; i < 1000; ++i) {
+ int64 i1 = static_cast<int64>(gen());
+ int64 i2 = static_cast<int64>(gen());
+ eint64 e1(i1), e2(i2);
+ BOOST_CHECK_EQUAL(e1 == e2, i1 == i2);
+ BOOST_CHECK_EQUAL(e1 != e2, i1 != i2);
+ BOOST_CHECK_EQUAL(e1 > e2, i1 > i2);
+ BOOST_CHECK_EQUAL(e1 >= e2, i1 >= i2);
+ BOOST_CHECK_EQUAL(e1 < e2, i1 < i2);
+ BOOST_CHECK_EQUAL(e1 <= e2, i1 <= i2);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test6) {
+ typedef extended_int<1> eint32;
+ eint32 e1(32);
+ eint32 e2 = -e1;
+ BOOST_CHECK_EQUAL(e2.count(), -1);
+ BOOST_CHECK_EQUAL(e2.size(), 1U);
+ BOOST_CHECK_EQUAL(e2.chunks()[0], 32U);
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test7) {
+ typedef extended_int<2> eint64;
+ boost::mt19937_64 gen(static_cast<uint32>(time(NULL)));
+ for (int i = 0; i < 1000; ++i) {
+ int64 i1 = static_cast<int64>(gen()) >> 2;
+ int64 i2 = static_cast<int64>(gen()) >> 2;
+ eint64 e1(i1), e2(i2), e3(i1 + i2), e4(i1 - i2);
+ BOOST_CHECK(e1 + e2 == e3);
+ BOOST_CHECK(e1 - e2 == e4);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test8) {
+ typedef extended_int<2> eint64;
+ boost::mt19937 gen(static_cast<uint32>(time(NULL)));
+ for (int i = 0; i < 1000; ++i) {
+ int64 i1 = static_cast<int32>(gen());
+ int64 i2 = static_cast<int32>(gen());
+ eint64 e1(i1), e2(i2), e3(i1 * i2);
+ BOOST_CHECK(e1 * e2 == e3);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(exnteded_int_test9) {
+ typedef extended_int<1> eint32;
+ for (int i = -10; i <= 10; ++i) {
+ for (int j = -10; j <= 10; ++j) {
+ eint32 e1(i), e2(j), e3(i+j), e4(i-j), e5(i*j);
+ BOOST_CHECK(e1 + e2 == e3);
+ BOOST_CHECK(e1 - e2 == e4);
+ BOOST_CHECK(e1 * e2 == e5);
+ }
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extended_int_test10) {
+ typedef extended_int<2> eint64;
+ boost::mt19937_64 gen(static_cast<uint32>(time(NULL)));
+ for (int i = 0; i < 100; ++i) {
+ int64 i1 = static_cast<int64>(gen()) >> 20;
+ int64 i2 = i1 >> 32;
+ eint64 e1(i1), e2(i2);
+ BOOST_CHECK(to_fpt(e1) == static_cast<fpt64>(i1));
+ BOOST_CHECK(to_fpt(e2) == static_cast<fpt64>(i2));
+ }
+}
+
+BOOST_AUTO_TEST_CASE(extened_int_test11) {
+ typedef extended_int<1> eint32;
+ typedef extended_int<64> eint2048;
+ eint2048 two(2), value(1);
+ for (int i = 0; i < 1024; ++i)
+ value = value * two;
+ BOOST_CHECK_EQUAL(value.count(), 33);
+ for (std::size_t i = 1; i < value.size(); ++i)
+ BOOST_CHECK_EQUAL(value.chunks()[i-1], 0U);
+ BOOST_CHECK_EQUAL(value.chunks()[32], 1U);
+}

Added: branches/release/libs/polygon/test/voronoi_diagram_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_diagram_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,113 @@
+// Boost.Polygon library voronoi_diagram_test.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#define BOOST_TEST_MODULE voronoi_diagram_test
+#include <boost/test/test_case_template.hpp>
+
+#include <boost/polygon/voronoi_diagram.hpp>
+#include <boost/polygon/voronoi_geometry_type.hpp>
+using namespace boost::polygon;
+
+typedef voronoi_cell<double> voronoi_cell_type;
+typedef voronoi_vertex<double> voronoi_vertex_type;
+typedef voronoi_edge<double> voronoi_edge_type;
+typedef voronoi_diagram<double> voronoi_diagram_type;
+
+BOOST_AUTO_TEST_CASE(voronoi_cell_test) {
+ voronoi_cell_type cell(1, SOURCE_CATEGORY_INITIAL_SEGMENT);
+ cell.color(27);
+ BOOST_CHECK(!cell.contains_point());
+ BOOST_CHECK(cell.contains_segment());
+ BOOST_CHECK(cell.is_degenerate());
+ BOOST_CHECK(cell.source_index() == 1);
+ BOOST_CHECK(cell.source_category() == SOURCE_CATEGORY_INITIAL_SEGMENT);
+ BOOST_CHECK(cell.incident_edge() == NULL);
+ BOOST_CHECK(cell.color() == 27);
+
+ voronoi_edge_type edge(true, true);
+ cell.incident_edge(&edge);
+ BOOST_CHECK(!cell.is_degenerate());
+ BOOST_CHECK(cell.incident_edge() == &edge);
+}
+
+BOOST_AUTO_TEST_CASE(voronoi_vertex_test) {
+ voronoi_vertex_type vertex(1, 2);
+ vertex.color(27);
+ BOOST_CHECK(vertex.is_degenerate());
+ BOOST_CHECK(vertex.x() == 1);
+ BOOST_CHECK(vertex.y() == 2);
+ BOOST_CHECK(vertex.incident_edge() == NULL);
+ BOOST_CHECK(vertex.color() == 27);
+
+ voronoi_edge_type edge(true, true);
+ vertex.incident_edge(&edge);
+ BOOST_CHECK(!vertex.is_degenerate());
+ BOOST_CHECK(vertex.incident_edge() == &edge);
+}
+
+BOOST_AUTO_TEST_CASE(voronoi_edge_test) {
+ voronoi_edge_type edge1(false, false);
+ edge1.color(13);
+ BOOST_CHECK(!edge1.is_primary());
+ BOOST_CHECK(edge1.is_secondary());
+ BOOST_CHECK(!edge1.is_linear());
+ BOOST_CHECK(edge1.is_curved());
+ BOOST_CHECK(!edge1.is_finite());
+ BOOST_CHECK(edge1.is_infinite());
+ BOOST_CHECK(edge1.color() == 13);
+
+ voronoi_edge_type edge2(true, true);
+ edge2.color(14);
+ BOOST_CHECK(edge2.is_primary());
+ BOOST_CHECK(!edge2.is_secondary());
+ BOOST_CHECK(edge2.is_linear());
+ BOOST_CHECK(!edge2.is_curved());
+ BOOST_CHECK(!edge2.is_finite());
+ BOOST_CHECK(edge2.is_infinite());
+ BOOST_CHECK(edge2.color() == 14);
+
+ edge1.twin(&edge2);
+ edge2.twin(&edge1);
+ BOOST_CHECK(edge1.twin() == &edge2);
+ BOOST_CHECK(edge2.twin() == &edge1);
+
+ edge1.next(&edge2);
+ edge1.prev(&edge2);
+ edge2.next(&edge1);
+ edge2.prev(&edge1);
+ BOOST_CHECK(edge1.next() == &edge2);
+ BOOST_CHECK(edge1.prev() == &edge2);
+ BOOST_CHECK(edge1.rot_next() == &edge1);
+ BOOST_CHECK(edge1.rot_prev() == &edge1);
+
+ voronoi_cell_type cell(1, SOURCE_CATEGORY_INITIAL_SEGMENT);
+ edge1.cell(&cell);
+ BOOST_CHECK(edge1.cell() == &cell);
+
+ voronoi_vertex_type vertex0(1, 2);
+ edge1.vertex0(&vertex0);
+ BOOST_CHECK(edge1.vertex0() == &vertex0);
+ BOOST_CHECK(edge2.vertex1() == &vertex0);
+
+ voronoi_vertex_type vertex1(2, 1);
+ edge2.vertex0(&vertex1);
+ BOOST_CHECK(edge1.vertex1() == &vertex1);
+ BOOST_CHECK(edge2.vertex0() == &vertex1);
+
+ BOOST_CHECK(edge1.is_finite());
+ BOOST_CHECK(edge2.is_finite());
+}
+
+BOOST_AUTO_TEST_CASE(voronoi_diagram_test) {
+ voronoi_diagram_type vd;
+ BOOST_CHECK(vd.num_cells() == 0);
+ BOOST_CHECK(vd.num_vertices() == 0);
+ BOOST_CHECK(vd.num_edges() == 0);
+ vd.clear();
+}

Added: branches/release/libs/polygon/test/voronoi_geometry_type_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_geometry_type_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,28 @@
+// Boost.Polygon library voronoi_geometry_type_test.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#define BOOST_TEST_MODULE voronoi_geometry_type_test
+
+#include <boost/test/test_case_template.hpp>
+#include <boost/polygon/voronoi_geometry_type.hpp>
+using namespace boost::polygon;
+
+BOOST_AUTO_TEST_CASE(source_category_test1) {
+ BOOST_CHECK(belongs(SOURCE_CATEGORY_SINGLE_POINT, GEOMETRY_CATEGORY_POINT));
+ BOOST_CHECK(belongs(SOURCE_CATEGORY_SEGMENT_START_POINT, GEOMETRY_CATEGORY_POINT));
+ BOOST_CHECK(belongs(SOURCE_CATEGORY_SEGMENT_END_POINT, GEOMETRY_CATEGORY_POINT));
+ BOOST_CHECK(!belongs(SOURCE_CATEGORY_INITIAL_SEGMENT, GEOMETRY_CATEGORY_POINT));
+ BOOST_CHECK(!belongs(SOURCE_CATEGORY_REVERSE_SEGMENT, GEOMETRY_CATEGORY_POINT));
+
+ BOOST_CHECK(!belongs(SOURCE_CATEGORY_SINGLE_POINT, GEOMETRY_CATEGORY_SEGMENT));
+ BOOST_CHECK(!belongs(SOURCE_CATEGORY_SEGMENT_START_POINT, GEOMETRY_CATEGORY_SEGMENT));
+ BOOST_CHECK(!belongs(SOURCE_CATEGORY_SEGMENT_END_POINT, GEOMETRY_CATEGORY_SEGMENT));
+ BOOST_CHECK(belongs(SOURCE_CATEGORY_INITIAL_SEGMENT, GEOMETRY_CATEGORY_SEGMENT));
+ BOOST_CHECK(belongs(SOURCE_CATEGORY_REVERSE_SEGMENT, GEOMETRY_CATEGORY_SEGMENT));
+}

Added: branches/release/libs/polygon/test/voronoi_predicates_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_predicates_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,463 @@
+// Boost.Polygon library voronoi_predicates_test.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <limits>
+#include <map>
+
+#define BOOST_TEST_MODULE voronoi_predicates_test
+#include <boost/test/test_case_template.hpp>
+
+#include <boost/polygon/detail/voronoi_ctypes.hpp>
+#include <boost/polygon/detail/voronoi_predicates.hpp>
+#include <boost/polygon/detail/voronoi_structures.hpp>
+using namespace boost::polygon::detail;
+
+#include <boost/polygon/voronoi_geometry_type.hpp>
+using namespace boost::polygon;
+
+ulp_comparison<double> ulp_cmp;
+
+typedef voronoi_predicates< voronoi_ctype_traits<int> > VP;
+typedef point_2d<int> point_type;
+typedef site_event<int> site_type;
+typedef circle_event<double> circle_type;
+VP::event_comparison_predicate<site_type, circle_type> event_comparison;
+
+typedef beach_line_node_key<site_type> key_type;
+typedef VP::distance_predicate<site_type> distance_predicate_type;
+typedef VP::node_comparison_predicate<key_type> node_comparison_type;
+typedef std::map<key_type, int, node_comparison_type> beach_line_type;
+typedef beach_line_type::iterator bieach_line_iterator;
+distance_predicate_type distance_predicate;
+node_comparison_type node_comparison;
+
+typedef VP::circle_existence_predicate<site_type> CEP_type;
+typedef VP::mp_circle_formation_functor<site_type, circle_type> MP_CFF_type;
+typedef VP::lazy_circle_formation_functor<site_type, circle_type> lazy_CFF_type;
+VP::circle_formation_predicate<site_type, circle_type, CEP_type, MP_CFF_type> mp_predicate;
+VP::circle_formation_predicate<site_type, circle_type, CEP_type, lazy_CFF_type> lazy_predicate;
+
+#define CHECK_ORIENTATION(P1, P2, P3, R1, R2) \
+ BOOST_CHECK_EQUAL(VP::ot::eval(P1, P2, P3) == R1, true); \
+ BOOST_CHECK_EQUAL(VP::ot::eval(P1, P3, P2) == R2, true); \
+ BOOST_CHECK_EQUAL(VP::ot::eval(P2, P1, P3) == R2, true); \
+ BOOST_CHECK_EQUAL(VP::ot::eval(P2, P3, P1) == R1, true); \
+ BOOST_CHECK_EQUAL(VP::ot::eval(P3, P1, P2) == R1, true); \
+ BOOST_CHECK_EQUAL(VP::ot::eval(P3, P2, P1) == R2, true)
+
+#define CHECK_EVENT_COMPARISON(A, B, R1, R2) \
+ BOOST_CHECK_EQUAL(event_comparison(A, B), R1); \
+ BOOST_CHECK_EQUAL(event_comparison(B, A), R2)
+
+#define CHECK_DISTANCE_PREDICATE(S1, S2, S3, RES) \
+ BOOST_CHECK_EQUAL(distance_predicate(S1, S2, S3), RES)
+
+#define CHECK_NODE_COMPARISON(node, nodes, res, sz) \
+ for (int i = 0; i < sz; ++i) { \
+ BOOST_CHECK_EQUAL(node_comparison(node, nodes[i]), res[i]); \
+ BOOST_CHECK_EQUAL(node_comparison(nodes[i], node), !res[i]); \
+ }
+
+#define CHECK_CIRCLE(circle, c_x, c_y, l_x) \
+ BOOST_CHECK_EQUAL(ulp_cmp(c1.x(), c_x, 10), ulp_comparison<double>::EQUAL); \
+ BOOST_CHECK_EQUAL(ulp_cmp(c1.y(), c_y, 10), ulp_comparison<double>::EQUAL); \
+ BOOST_CHECK_EQUAL(ulp_cmp(c1.lower_x(), l_x, 10), ulp_comparison<double>::EQUAL)
+
+#define CHECK_CIRCLE_EXISTENCE(s1, s2, s3, RES) \
+ { circle_type c1; \
+ BOOST_CHECK_EQUAL(lazy_predicate(s1, s2, s3, c1), RES); }
+
+#define CHECK_CIRCLE_FORMATION_PREDICATE(s1, s2, s3, c_x, c_y, l_x) \
+ { circle_type c1, c2; \
+ BOOST_CHECK_EQUAL(mp_predicate(s1, s2, s3, c1), true); \
+ BOOST_CHECK_EQUAL(lazy_predicate(s1, s2, s3, c2), true); \
+ CHECK_CIRCLE(c1, c_x, c_y, l_x); \
+ CHECK_CIRCLE(c2, c_x, c_y, l_x); }
+
+BOOST_AUTO_TEST_CASE(orientation_test) {
+ int min_int = (std::numeric_limits<int>::min)();
+ int max_int = (std::numeric_limits<int>::max)();
+ point_type point1(min_int, min_int);
+ point_type point2(0, 0);
+ point_type point3(max_int, max_int);
+ point_type point4(min_int, max_int);
+ point_type point5(max_int-1, max_int);
+ CHECK_ORIENTATION(point1, point2, point3, VP::ot::COLLINEAR, VP::ot::COLLINEAR);
+ CHECK_ORIENTATION(point1, point4, point3, VP::ot::RIGHT, VP::ot::LEFT);
+ CHECK_ORIENTATION(point1, point5, point3, VP::ot::RIGHT, VP::ot::LEFT);
+}
+
+BOOST_AUTO_TEST_CASE(event_comparison_test1) {
+ site_type site(1, 2);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 2), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(1, 3), true, false);
+ CHECK_EVENT_COMPARISON(site, site_type(1, 2), false, false);
+}
+
+BOOST_AUTO_TEST_CASE(event_comparison_test2) {
+ site_type site(0, 0, 0, 2);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 2), true, false);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 0), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(0, -2, 0, -1), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(0, -2, 1, 1), true, false);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 0, 1, 1), true, false);
+}
+
+BOOST_AUTO_TEST_CASE(event_comparison_test3) {
+ site_type site(0, 0, 10, 10);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 0), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(0, -1), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 1), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 1, 0, 10), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(0, -10, 0, -1), false, true);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 0, 10, 9), true, false);
+ CHECK_EVENT_COMPARISON(site, site_type(0, 0, 9, 10), false, true);
+}
+
+BOOST_AUTO_TEST_CASE(event_comparison_test4) {
+ circle_type circle(1, 2, 3);
+ CHECK_EVENT_COMPARISON(circle, circle_type(1, 2, 3), false, false);
+ CHECK_EVENT_COMPARISON(circle, circle_type(1, 3, 3), true, false);
+ CHECK_EVENT_COMPARISON(circle, circle_type(1, 2, 4), true, false);
+ CHECK_EVENT_COMPARISON(circle, circle_type(0, 2, 2), false, true);
+ CHECK_EVENT_COMPARISON(circle, circle_type(-1, 2, 3), false, false);
+}
+
+BOOST_AUTO_TEST_CASE(event_comparison_test5) {
+ circle_type circle(1, 2, 3);
+ CHECK_EVENT_COMPARISON(circle, site_type(0, 100), false, true);
+ CHECK_EVENT_COMPARISON(circle, site_type(3, 0), false, true);
+ CHECK_EVENT_COMPARISON(circle, site_type(3, 2), false, false);
+ CHECK_EVENT_COMPARISON(circle, site_type(3, 3), true, false);
+ CHECK_EVENT_COMPARISON(circle, site_type(4, 2), true, false);
+}
+
+BOOST_AUTO_TEST_CASE(distance_predicate_test1) {
+ site_type site1(-5, 0);
+ site_type site2(-8, 9);
+ site_type site3(-2, 1);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 5), false);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site_type(0, 5), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 4), false);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site_type(0, 4), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 6), true);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site_type(0, 6), true);
+}
+
+BOOST_AUTO_TEST_CASE(distance_predicate_test2) {
+ site_type site1(-4, 0, -4, 20);
+ site_type site2(-2, 10);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, 11), false);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, 9), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 11), true);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 9), true);
+}
+
+BOOST_AUTO_TEST_CASE(disntace_predicate_test3) {
+ site_type site1(-5, 5, 2, -2);
+ site1.inverse();
+ site_type site2(-2, 4);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, -1), false);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, -1), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 1), false);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, 1), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 4), true);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, 4), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 5), true);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, 5), false);
+}
+
+BOOST_AUTO_TEST_CASE(distance_predicate_test4) {
+ site_type site1(-5, 5, 2, -2);
+ site_type site2(-2, -4);
+ site_type site3(-4, 1);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, 1), true);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, 1), true);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site_type(0, 1), true);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site_type(0, 1), true);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, -2), true);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, -2), false);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site_type(0, -2), true);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site_type(0, -2), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, -8), true);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, -8), false);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site_type(0, -8), true);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site_type(0, -8), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(0, -9), true);
+ CHECK_DISTANCE_PREDICATE(site2, site1, site_type(0, -9), false);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site_type(0, -9), true);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site_type(0, -9), false);
+}
+
+BOOST_AUTO_TEST_CASE(disntace_predicate_test5) {
+ site_type site1(-5, 5, 2, -2);
+ site_type site2 = site1;
+ site2.inverse();
+ site_type site3(-2, 4);
+ site_type site4(-2, -4);
+ site_type site5(-4, 1);
+ CHECK_DISTANCE_PREDICATE(site3, site2, site_type(0, 1), false);
+ CHECK_DISTANCE_PREDICATE(site3, site2, site_type(0, 4), false);
+ CHECK_DISTANCE_PREDICATE(site3, site2, site_type(0, 5), false);
+ CHECK_DISTANCE_PREDICATE(site3, site2, site_type(0, 7), true);
+ CHECK_DISTANCE_PREDICATE(site4, site1, site_type(0, -2), false);
+ CHECK_DISTANCE_PREDICATE(site5, site1, site_type(0, -2), false);
+ CHECK_DISTANCE_PREDICATE(site4, site1, site_type(0, -8), false);
+ CHECK_DISTANCE_PREDICATE(site5, site1, site_type(0, -8), false);
+ CHECK_DISTANCE_PREDICATE(site4, site1, site_type(0, -9), false);
+ CHECK_DISTANCE_PREDICATE(site5, site1, site_type(0, -9), false);
+ CHECK_DISTANCE_PREDICATE(site4, site1, site_type(0, -18), false);
+ CHECK_DISTANCE_PREDICATE(site5, site1, site_type(0, -18), false);
+ CHECK_DISTANCE_PREDICATE(site4, site1, site_type(0, -1), true);
+ CHECK_DISTANCE_PREDICATE(site5, site1, site_type(0, -1), true);
+}
+
+BOOST_AUTO_TEST_CASE(distance_predicate_test6) {
+ site_type site1(-5, 0, 2, 7);
+ site_type site2 = site1;
+ site2.inverse();
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(2, 7), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(1, 5), false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(-1, 5), true);
+}
+
+BOOST_AUTO_TEST_CASE(distance_predicate_test7) {
+ site_type site1(-5, 5, 2, -2);
+ site1.inverse();
+ site_type site2(-5, 5, 0, 6);
+ site_type site3(-2, 4, 0, 4);
+ site_type site4(0, 2);
+ site_type site5(0, 5);
+ site_type site6(0, 6);
+ site_type site7(0, 8);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site4, false);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site5, true);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site6, true);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site7, true);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site4, false);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site5, true);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site6, true);
+ CHECK_DISTANCE_PREDICATE(site1, site3, site7, true);
+ site3.inverse();
+ CHECK_DISTANCE_PREDICATE(site3, site1, site4, false);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site5, false);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site6, false);
+ CHECK_DISTANCE_PREDICATE(site3, site1, site7, true);
+}
+
+BOOST_AUTO_TEST_CASE(distatnce_predicate_test8) {
+ site_type site1(-5, 3, -2, 2);
+ site1.inverse();
+ site_type site2(-5, 5, -2, 2);
+ CHECK_DISTANCE_PREDICATE(site1, site2, site_type(-4, 2), false);
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test1) {
+ beach_line_type beach_line;
+ site_type site1(0, 0);
+ site1.sorted_index(0);
+ site_type site2(0, 2);
+ site2.sorted_index(1);
+ site_type site3(1, 0);
+ site3.sorted_index(2);
+ beach_line[key_type(site1, site2)] = 2;
+ beach_line[key_type(site1, site3)] = 0;
+ beach_line[key_type(site3, site1)] = 1;
+ int cur_index = 0;
+ for (bieach_line_iterator it = beach_line.begin();
+ it != beach_line.end(); ++it, ++cur_index) {
+ BOOST_CHECK_EQUAL(it->second, cur_index);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test2) {
+ beach_line_type beach_line;
+ site_type site1(0, 1);
+ site1.sorted_index(0);
+ site_type site2(2, 0);
+ site2.sorted_index(1);
+ site_type site3(2, 4);
+ site3.sorted_index(2);
+ beach_line[key_type(site1, site2)] = 0;
+ beach_line[key_type(site2, site1)] = 1;
+ beach_line[key_type(site1, site3)] = 2;
+ beach_line[key_type(site3, site1)] = 3;
+ int cur_index = 0;
+ for (bieach_line_iterator it = beach_line.begin();
+ it != beach_line.end(); ++it, ++cur_index) {
+ BOOST_CHECK_EQUAL(it->second, cur_index);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test3) {
+ key_type node(site_type(1, 0).sorted_index(1), site_type(0, 2).sorted_index(0));
+ key_type nodes[] = {
+ key_type(site_type(2, -10).sorted_index(2)),
+ key_type(site_type(2, -1).sorted_index(2)),
+ key_type(site_type(2, 0).sorted_index(2)),
+ key_type(site_type(2, 1).sorted_index(2)),
+ key_type(site_type(2, 2).sorted_index(2)),
+ key_type(site_type(2, 3).sorted_index(2)),
+ };
+ bool res[] = {false, false, false, false, true, true};
+ CHECK_NODE_COMPARISON(node, nodes, res, 6);
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test4) {
+ key_type node(site_type(0, 1).sorted_index(0), site_type(1, 0).sorted_index(1));
+ key_type nodes[] = {
+ key_type(site_type(2, -3).sorted_index(2)),
+ key_type(site_type(2, -2).sorted_index(2)),
+ key_type(site_type(2, -1).sorted_index(2)),
+ key_type(site_type(2, 0).sorted_index(2)),
+ key_type(site_type(2, 1).sorted_index(2)),
+ key_type(site_type(2, 3).sorted_index(2)),
+ };
+ bool res[] = {false, true, true, true, true, true};
+ CHECK_NODE_COMPARISON(node, nodes, res, 6);
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test5) {
+ key_type node(site_type(0, 0).sorted_index(0), site_type(1, 2).sorted_index(1));
+ key_type nodes[] = {
+ key_type(site_type(2, -10).sorted_index(2)),
+ key_type(site_type(2, 0).sorted_index(2)),
+ key_type(site_type(2, 1).sorted_index(2)),
+ key_type(site_type(2, 2).sorted_index(2)),
+ key_type(site_type(2, 5).sorted_index(2)),
+ key_type(site_type(2, 20).sorted_index(2)),
+ };
+ bool res[] = {false, false, true, true, true, true};
+ CHECK_NODE_COMPARISON(node, nodes, res, 6);
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test6) {
+ key_type node(site_type(1, 1).sorted_index(1), site_type(0, 0).sorted_index(0));
+ key_type nodes[] = {
+ key_type(site_type(2, -3).sorted_index(2)),
+ key_type(site_type(2, -2).sorted_index(2)),
+ key_type(site_type(2, 0).sorted_index(2)),
+ key_type(site_type(2, 1).sorted_index(2)),
+ key_type(site_type(2, 2).sorted_index(2)),
+ key_type(site_type(2, 3).sorted_index(2)),
+ key_type(site_type(2, 5).sorted_index(2)),
+ };
+ bool res[] = {false, false, false, false, false, false, true};
+ CHECK_NODE_COMPARISON(node, nodes, res, 7);
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test7) {
+ key_type node(site_type(0, 0).sorted_index(0), site_type(0, 2).sorted_index(1));
+ key_type nodes[] = {
+ key_type(site_type(1, 0).sorted_index(2)),
+ key_type(site_type(1, 1).sorted_index(2)),
+ key_type(site_type(1, 2).sorted_index(2)),
+ };
+ bool res[] = {false, false, true};
+ CHECK_NODE_COMPARISON(node, nodes, res, 3);
+}
+
+BOOST_AUTO_TEST_CASE(node_comparison_test8) {
+ key_type node(site_type(0, 0).sorted_index(0), site_type(1, 1).sorted_index(2));
+ key_type nodes[] = {
+ key_type(site_type(1, 0).sorted_index(1)),
+ key_type(site_type(1, 1).sorted_index(2)),
+ key_type(site_type(1, 2).sorted_index(3)),
+ key_type(site_type(1, 1).sorted_index(2), site_type(0, 0).sorted_index(0)),
+ };
+ bool res[] = {false, true, true, true};
+ CHECK_NODE_COMPARISON(node, nodes, res, 4);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test1) {
+ site_type site1(0, 0);
+ site_type site2(-8, 0);
+ site_type site3(0, 6);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site1, site2, site3, -4.0, 3.0, 1.0);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test2) {
+ int min_int = (std::numeric_limits<int>::min)();
+ int max_int = (std::numeric_limits<int>::max)();
+ site_type site1(min_int, min_int);
+ site_type site2(min_int, max_int);
+ site_type site3(max_int-1, max_int-1);
+ site_type site4(max_int, max_int);
+ CHECK_CIRCLE_EXISTENCE(site1, site2, site4, true);
+ CHECK_CIRCLE_EXISTENCE(site1, site3, site4, false);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test3) {
+ site_type site1(-4, 0);
+ site_type site2(0, 4);
+ site_type site3(site1.point0(), site2.point0());
+ CHECK_CIRCLE_EXISTENCE(site1, site3, site2, false);
+ site_type site4(-2, 0);
+ site_type site5(0, 2);
+ CHECK_CIRCLE_EXISTENCE(site3, site4, site5, false);
+ CHECK_CIRCLE_EXISTENCE(site4, site5, site3, false);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test4) {
+ site_type site1(-4, 0, -4, 20);
+ site_type site2(-2, 10);
+ site_type site3(4, 10);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site1, site2, site3, 1.0, 6.0, 6.0);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site3, site2, site1, 1.0, 14.0, 6.0);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test5) {
+ site_type site1(1, 0, 7, 0);
+ site1.inverse();
+ site_type site2(-2, 4, 10, 4);
+ site_type site3(6, 2);
+ site_type site4(1, 0);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site3, site1, site2, 4.0, 2.0, 6.0);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site4, site2, site1, 1.0, 2.0, 3.0);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test6) {
+ site_type site1(-1, 2, 8, -10);
+ site1.inverse();
+ site_type site2(-1, 0, 8, 12);
+ site_type site3(1, 1);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site3, site2, site1, 6.0, 1.0, 11.0);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test7) {
+ site_type site1(1, 0, 6, 0);
+ site1.inverse();
+ site_type site2(-6, 4, 0, 12);
+ site_type site3(1, 0);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site3, site2, site1, 1.0, 5.0, 6.0);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test8) {
+ site_type site1(1, 0, 5, 0);
+ site1.inverse();
+ site_type site2(0, 12, 8, 6);
+ site_type site3(1, 0);
+ CHECK_CIRCLE_FORMATION_PREDICATE(site3, site2, site1, 1.0, 5.0, 6.0);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test9) {
+ site_type site1(0, 0, 4, 0);
+ site_type site2(0, 0, 0, 4);
+ site_type site3(0, 4, 4, 4);
+ site1.inverse();
+ CHECK_CIRCLE_FORMATION_PREDICATE(site1, site2, site3, 2.0, 2.0, 4.0);
+}
+
+BOOST_AUTO_TEST_CASE(circle_formation_predicate_test10) {
+ site_type site1(1, 0, 41, 30);
+ site_type site2(-39, 30, 1, 60);
+ site_type site3(1, 60, 41, 30);
+ site1.inverse();
+ CHECK_CIRCLE_FORMATION_PREDICATE(site1, site2, site3, 1.0, 30.0, 25.0);
+}

Added: branches/release/libs/polygon/test/voronoi_robust_fpt_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_robust_fpt_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,355 @@
+// Boost.Polygon library voronoi_robust_fpt_test.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <cmath>
+#include <ctime>
+#include <vector>
+
+#define BOOST_TEST_MODULE voronoi_robust_fpt_test
+#include <boost/mpl/list.hpp>
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/test/test_case_template.hpp>
+
+#include <boost/polygon/detail/voronoi_ctypes.hpp>
+#include <boost/polygon/detail/voronoi_robust_fpt.hpp>
+using boost::polygon::detail::int32;
+using boost::polygon::detail::uint32;
+using boost::polygon::detail::int64;
+using boost::polygon::detail::fpt64;
+using boost::polygon::detail::efpt64;
+using boost::polygon::detail::extended_int;
+using boost::polygon::detail::extended_exponent_fpt;
+using boost::polygon::detail::robust_fpt;
+using boost::polygon::detail::robust_dif;
+using boost::polygon::detail::robust_sqrt_expr;
+using boost::polygon::detail::type_converter_fpt;
+using boost::polygon::detail::type_converter_efpt;
+using boost::polygon::detail::ulp_comparison;
+
+typedef robust_fpt<double> rfpt_type;
+typedef type_converter_fpt to_fpt_type;
+typedef type_converter_efpt to_efpt_type;
+type_converter_fpt to_fpt;
+
+BOOST_AUTO_TEST_CASE(robust_fpt_constructors_test1) {
+ rfpt_type a = rfpt_type();
+ BOOST_CHECK_EQUAL(a.fpv(), 0.0);
+ BOOST_CHECK_EQUAL(a.re(), 0.0);
+ BOOST_CHECK_EQUAL(a.ulp(), 0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_constructors_test2) {
+ rfpt_type a(10.0, 1.0);
+ BOOST_CHECK_EQUAL(a.fpv(), 10.0);
+ BOOST_CHECK_EQUAL(a.re(), 1.0);
+ BOOST_CHECK_EQUAL(a.ulp(), 1.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_constructors_test3) {
+ rfpt_type a(10.0);
+ BOOST_CHECK_EQUAL(a.fpv(), 10.0);
+ BOOST_CHECK_EQUAL(a.re(), 0.0);
+ BOOST_CHECK_EQUAL(a.ulp(), 0.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_constructors_test4) {
+ rfpt_type a(10.0, 3.0);
+ BOOST_CHECK_EQUAL(a.fpv(), 10.0);
+ BOOST_CHECK_EQUAL(a.re(), 3.0);
+ BOOST_CHECK_EQUAL(a.ulp(), 3.0);
+
+ rfpt_type b(10.0, 2.75);
+ BOOST_CHECK_EQUAL(b.fpv(), 10.0);
+ BOOST_CHECK_EQUAL(b.re(), 2.75);
+ BOOST_CHECK_EQUAL(b.ulp(), 2.75);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_sum_test1) {
+ rfpt_type a(2.0, 5.0);
+ rfpt_type b(3.0, 4.0);
+ rfpt_type c = a + b;
+ BOOST_CHECK_EQUAL(c.fpv(), 5.0);
+ BOOST_CHECK_EQUAL(c.re(), 6.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 6.0);
+
+ c += b;
+ BOOST_CHECK_EQUAL(c.fpv(), 8.0);
+ BOOST_CHECK_EQUAL(c.re(), 7.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 7.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_sum_test2) {
+ rfpt_type a(3.0, 2.0);
+ rfpt_type b(-2.0, 3.0);
+ rfpt_type c = a + b;
+ BOOST_CHECK_EQUAL(c.fpv(), 1.0);
+ BOOST_CHECK_EQUAL(c.re(), 13.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 13.0);
+
+ c += b;
+ BOOST_CHECK_EQUAL(c.fpv(), -1.0);
+ BOOST_CHECK_EQUAL(c.re(), 20.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 20.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_dif_test1) {
+ rfpt_type a(2.0, 5.0);
+ rfpt_type b(-3.0, 4.0);
+ rfpt_type c = a - b;
+ BOOST_CHECK_EQUAL(c.fpv(), 5.0);
+ BOOST_CHECK_EQUAL(c.re(), 6.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 6.0);
+
+ c -= b;
+ BOOST_CHECK_EQUAL(c.fpv(), 8.0);
+ BOOST_CHECK_EQUAL(c.re(), 7.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 7.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_dif_test2) {
+ rfpt_type a(3.0, 2.0);
+ rfpt_type b(2.0, 3.0);
+ rfpt_type c = a - b;
+ BOOST_CHECK_EQUAL(c.fpv(), 1.0);
+ BOOST_CHECK_EQUAL(c.re(), 13.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 13.0);
+
+ c -= b;
+ BOOST_CHECK_EQUAL(c.fpv(), -1.0);
+ BOOST_CHECK_EQUAL(c.re(), 20.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 20.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_mult_test3) {
+ rfpt_type a(2.0, 3.0);
+ rfpt_type b(4.0, 1.0);
+ rfpt_type c = a * b;
+ BOOST_CHECK_EQUAL(c.fpv(), 8.0);
+ BOOST_CHECK_EQUAL(c.re(), 5.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 5.0);
+
+ c *= b;
+ BOOST_CHECK_EQUAL(c.fpv(), 32.0);
+ BOOST_CHECK_EQUAL(c.re(), 7.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 7.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_fpt_div_test1) {
+ rfpt_type a(2.0, 3.0);
+ rfpt_type b(4.0, 1.0);
+ rfpt_type c = a / b;
+ BOOST_CHECK_EQUAL(c.fpv(), 0.5);
+ BOOST_CHECK_EQUAL(c.re(), 5.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 5.0);
+
+ c /= b;
+ BOOST_CHECK_EQUAL(c.fpv(), 0.125);
+ BOOST_CHECK_EQUAL(c.re(), 7.0);
+ BOOST_CHECK_EQUAL(c.ulp(), 7.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_dif_constructors_test) {
+ robust_dif<int> rd1;
+ BOOST_CHECK_EQUAL(rd1.pos(), 0);
+ BOOST_CHECK_EQUAL(rd1.neg(), 0);
+ BOOST_CHECK_EQUAL(rd1.dif(), 0);
+
+ robust_dif<int> rd2(1);
+ BOOST_CHECK_EQUAL(rd2.pos(), 1);
+ BOOST_CHECK_EQUAL(rd2.neg(), 0);
+ BOOST_CHECK_EQUAL(rd2.dif(), 1);
+
+ robust_dif<int> rd3(-1);
+ BOOST_CHECK_EQUAL(rd3.pos(), 0);
+ BOOST_CHECK_EQUAL(rd3.neg(), 1);
+ BOOST_CHECK_EQUAL(rd3.dif(), -1);
+
+ robust_dif<int> rd4(1, 2);
+ BOOST_CHECK_EQUAL(rd4.pos(), 1);
+ BOOST_CHECK_EQUAL(rd4.neg(), 2);
+ BOOST_CHECK_EQUAL(rd4.dif(), -1);
+}
+
+BOOST_AUTO_TEST_CASE(robust_dif_operators_test1) {
+ robust_dif<int> a(5, 2), b(1, 10);
+ int dif_a = a.dif();
+ int dif_b = b.dif();
+ robust_dif<int> sum = a + b;
+ robust_dif<int> dif = a - b;
+ robust_dif<int> mult = a * b;
+ robust_dif<int> umin = -a;
+ BOOST_CHECK_EQUAL(sum.dif(), dif_a + dif_b);
+ BOOST_CHECK_EQUAL(dif.dif(), dif_a - dif_b);
+ BOOST_CHECK_EQUAL(mult.dif(), dif_a * dif_b);
+ BOOST_CHECK_EQUAL(umin.dif(), -dif_a);
+}
+
+BOOST_AUTO_TEST_CASE(robust_dif_operators_test2) {
+ robust_dif<int> a(5, 2);
+ for (int b = -3; b <= 3; b += 6) {
+ int dif_a = a.dif();
+ int dif_b = b;
+ robust_dif<int> sum = a + b;
+ robust_dif<int> dif = a - b;
+ robust_dif<int> mult = a * b;
+ robust_dif<int> div = a / b;
+ BOOST_CHECK_EQUAL(sum.dif(), dif_a + dif_b);
+ BOOST_CHECK_EQUAL(dif.dif(), dif_a - dif_b);
+ BOOST_CHECK_EQUAL(mult.dif(), dif_a * dif_b);
+ BOOST_CHECK_EQUAL(div.dif(), dif_a / dif_b);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(robust_dif_operators_test3) {
+ robust_dif<int> b(5, 2);
+ for (int a = -3; a <= 3; a += 6) {
+ int dif_a = a;
+ int dif_b = b.dif();
+ robust_dif<int> sum = a + b;
+ robust_dif<int> dif = a - b;
+ robust_dif<int> mult = a * b;
+ BOOST_CHECK_EQUAL(sum.dif(), dif_a + dif_b);
+ BOOST_CHECK_EQUAL(dif.dif(), dif_a - dif_b);
+ BOOST_CHECK_EQUAL(mult.dif(), dif_a * dif_b);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(robust_dif_operators_test4) {
+ std::vector< robust_dif<int> > a4(4, robust_dif<int>(5, 2));
+ std::vector< robust_dif<int> > b4(4, robust_dif<int>(1, 2));
+ std::vector< robust_dif<int> > c4 = a4;
+ c4[0] += b4[0];
+ c4[1] -= b4[1];
+ c4[2] *= b4[2];
+ BOOST_CHECK_EQUAL(c4[0].dif(), a4[0].dif() + b4[0].dif());
+ BOOST_CHECK_EQUAL(c4[1].dif(), a4[1].dif() - b4[1].dif());
+ BOOST_CHECK_EQUAL(c4[2].dif(), a4[2].dif() * b4[2].dif());
+ a4[0] += b4[0].dif();
+ a4[1] -= b4[1].dif();
+ a4[2] *= b4[2].dif();
+ a4[3] /= b4[3].dif();
+ BOOST_CHECK_EQUAL(c4[0].dif(), a4[0].dif());
+ BOOST_CHECK_EQUAL(c4[1].dif(), a4[1].dif());
+ BOOST_CHECK_EQUAL(c4[2].dif(), a4[2].dif());
+ BOOST_CHECK_EQUAL(c4[3].dif() / b4[3].dif(), a4[3].dif());
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test1) {
+ robust_sqrt_expr<int32, fpt64, to_fpt_type> sqrt_expr;
+ int32 A[1] = {10};
+ int32 B[1] = {100};
+ BOOST_CHECK_EQUAL(sqrt_expr.eval1(A, B), 100.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test2) {
+ robust_sqrt_expr<int32, fpt64, to_fpt_type> sqrt_expr;
+ int32 A[2] = {10, 30};
+ int32 B[2] = {400, 100};
+ BOOST_CHECK_EQUAL(sqrt_expr.eval2(A, B), 500.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test3) {
+ robust_sqrt_expr<int32, fpt64, to_fpt_type> sqrt_expr;
+ int32 A[2] = {10, -30};
+ int32 B[2] = {400, 100};
+ BOOST_CHECK_EQUAL(sqrt_expr.eval2(A, B), -100.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test4) {
+ robust_sqrt_expr<int32, fpt64, to_fpt_type> sqrt_expr;
+ int32 A[3] = {10, 30, 20};
+ int32 B[3] = {4, 1, 9};
+ BOOST_CHECK_EQUAL(sqrt_expr.eval3(A, B), 110.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test5) {
+ robust_sqrt_expr<int32, fpt64, to_fpt_type> sqrt_expr;
+ int32 A[3] = {10, 30, -20};
+ int32 B[3] = {4, 1, 9};
+ BOOST_CHECK_EQUAL(sqrt_expr.eval3(A, B), -10.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test6) {
+ robust_sqrt_expr<int32, fpt64, to_fpt_type> sqrt_expr;
+ int32 A[4] = {10, 30, 20, 5};
+ int32 B[4] = {4, 1, 9, 16};
+ BOOST_CHECK_EQUAL(sqrt_expr.eval4(A, B), 130.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test7) {
+ robust_sqrt_expr<int32, fpt64, to_fpt_type> sqrt_expr;
+ int32 A[4] = {10, 30, -20, -5};
+ int32 B[4] = {4, 1, 9, 16};
+ BOOST_CHECK_EQUAL(sqrt_expr.eval4(A, B), -30.0);
+}
+
+BOOST_AUTO_TEST_CASE(robust_sqrt_expr_test8) {
+ typedef extended_int<16> eint512;
+ robust_sqrt_expr<eint512, efpt64, to_efpt_type> sqrt_expr;
+ int32 A[4] = {1000, 3000, -2000, -500};
+ int32 B[4] = {400, 100, 900, 1600};
+ eint512 AA[4], BB[4];
+ for (std::size_t i = 0; i < 4; ++i) {
+ AA[i] = A[i];
+ BB[i] = B[i];
+ }
+ BOOST_CHECK_EQUAL(to_fpt(sqrt_expr.eval4(AA, BB)), -30000.0);
+}
+
+template <typename _int, typename _fpt>
+class sqrt_expr_tester {
+ public:
+ static const std::size_t MX_SQRTS = 4;
+
+ bool run() {
+ static boost::mt19937 gen(static_cast<uint32>(time(NULL)));
+ bool ret_val = true;
+ for (std::size_t i = 0; i < MX_SQRTS; ++i) {
+ a[i] = gen() & 1048575;
+ int64 temp = gen() & 1048575;
+ b[i] = temp * temp;
+ }
+ uint32 mask = (1 << MX_SQRTS);
+ for (std::size_t i = 0; i < mask; i++) {
+ fpt64 expected_val = 0.0;
+ for (std::size_t j = 0; j < MX_SQRTS; j++) {
+ if (i & (1 << j)) {
+ A[j] = a[j];
+ B[j] = b[j];
+ expected_val += static_cast<fpt64>(a[j]) *
+ std::sqrt(static_cast<fpt64>(b[j]));
+ } else {
+ A[j] = -a[j];
+ B[j] = b[j];
+ expected_val -= static_cast<fpt64>(a[j]) *
+ std::sqrt(static_cast<fpt64>(b[j]));
+ }
+ }
+ fpt64 received_val = to_fpt(sqrt_expr_.eval4(A, B));
+ ret_val &= ulp_cmp(expected_val, received_val, 25) ==
+ ulp_comparison<fpt64>::EQUAL;
+ }
+ return ret_val;
+ }
+
+ private:
+ robust_sqrt_expr<_int, _fpt, to_efpt_type> sqrt_expr_;
+ ulp_comparison<fpt64> ulp_cmp;
+ _int A[MX_SQRTS];
+ _int B[MX_SQRTS];
+ int64 a[MX_SQRTS];
+ int64 b[MX_SQRTS];
+};
+
+BOOST_AUTO_TEST_CASE(mpz_sqrt_evaluator_test) {
+ typedef extended_int<16> eint512;
+ sqrt_expr_tester<eint512, efpt64> tester;
+ for (int i = 0; i < 2000; ++i)
+ BOOST_CHECK(tester.run());
+}

Added: branches/release/libs/polygon/test/voronoi_structures_test.cpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_structures_test.cpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,131 @@
+// Boost.Polygon library voronoi_structures_test.cpp file
+
+// Copyright Andrii Sydorchuk 2010-2012.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <functional>
+#include <vector>
+
+#define BOOST_TEST_MODULE voronoi_structures_test
+#include <boost/test/test_case_template.hpp>
+#include <boost/polygon/detail/voronoi_structures.hpp>
+using namespace boost::polygon::detail;
+
+#include <boost/polygon/voronoi_geometry_type.hpp>
+using namespace boost::polygon;
+
+typedef point_2d<int> point_type;
+typedef site_event<int> site_type;
+typedef circle_event<int> circle_type;
+typedef ordered_queue<int, std::greater<int> > ordered_queue_type;
+typedef beach_line_node_key<int> node_key_type;
+typedef beach_line_node_data<int, int> node_data_type;
+
+BOOST_AUTO_TEST_CASE(point_2d_test1) {
+ point_type p(1, 2);
+ BOOST_CHECK_EQUAL(p.x(), 1);
+ BOOST_CHECK_EQUAL(p.y(), 2);
+ p.x(3);
+ BOOST_CHECK_EQUAL(p.x(), 3);
+ p.y(4);
+ BOOST_CHECK_EQUAL(p.y(), 4);
+}
+
+BOOST_AUTO_TEST_CASE(site_event_test1) {
+ site_type s(1, 2);
+ s.sorted_index(1);
+ s.initial_index(2);
+ s.source_category(SOURCE_CATEGORY_SEGMENT_START_POINT);
+ BOOST_CHECK(s.x0() == 1 && s.x1() == 1);
+ BOOST_CHECK(s.y0() == 2 && s.y1() == 2);
+ BOOST_CHECK(s.is_point());
+ BOOST_CHECK(!s.is_segment());
+ BOOST_CHECK(!s.is_inverse());
+ BOOST_CHECK(s.sorted_index() == 1);
+ BOOST_CHECK(s.initial_index() == 2);
+ BOOST_CHECK(s.source_category() == SOURCE_CATEGORY_SEGMENT_START_POINT);
+}
+
+BOOST_AUTO_TEST_CASE(site_event_test2) {
+ site_type s(1, 2, 3, 4);
+ s.sorted_index(1);
+ s.initial_index(2);
+ s.source_category(SOURCE_CATEGORY_INITIAL_SEGMENT);
+ BOOST_CHECK(s.x0(true) == 1 && s.x0() == 1);
+ BOOST_CHECK(s.y0(true) == 2 && s.y0() == 2);
+ BOOST_CHECK(s.x1(true) == 3 && s.x1() == 3);
+ BOOST_CHECK(s.y1(true) == 4 && s.y1() == 4);
+ BOOST_CHECK(!s.is_point());
+ BOOST_CHECK(s.is_segment());
+ BOOST_CHECK(!s.is_inverse());
+ BOOST_CHECK(s.source_category() == SOURCE_CATEGORY_INITIAL_SEGMENT);
+
+ s.inverse();
+ BOOST_CHECK(s.x1(true) == 1 && s.x0() == 1);
+ BOOST_CHECK(s.y1(true) == 2 && s.y0() == 2);
+ BOOST_CHECK(s.x0(true) == 3 && s.x1() == 3);
+ BOOST_CHECK(s.y0(true) == 4 && s.y1() == 4);
+ BOOST_CHECK(s.is_inverse());
+ BOOST_CHECK(s.source_category() == SOURCE_CATEGORY_INITIAL_SEGMENT);
+}
+
+BOOST_AUTO_TEST_CASE(circle_event_test) {
+ circle_type c(0, 1, 2);
+ BOOST_CHECK_EQUAL(c.x(), 0);
+ BOOST_CHECK_EQUAL(c.y(), 1);
+ BOOST_CHECK_EQUAL(c.lower_x(), 2);
+ BOOST_CHECK_EQUAL(c.lower_y(), 1);
+ BOOST_CHECK(c.is_active());
+ c.x(3);
+ c.y(4);
+ c.lower_x(5);
+ BOOST_CHECK_EQUAL(c.x(), 3);
+ BOOST_CHECK_EQUAL(c.y(), 4);
+ BOOST_CHECK_EQUAL(c.lower_x(), 5);
+ BOOST_CHECK_EQUAL(c.lower_y(), 4);
+ c.deactivate();
+ BOOST_CHECK(!c.is_active());
+}
+
+BOOST_AUTO_TEST_CASE(ordered_queue_test) {
+ ordered_queue_type q;
+ BOOST_CHECK(q.empty());
+ std::vector<int*> vi;
+ for (int i = 0; i < 20; ++i)
+ vi.push_back(&q.push(i));
+ for (int i = 0; i < 20; ++i)
+ *vi[i] <<= 1;
+ BOOST_CHECK(!q.empty());
+ for (int i = 0; i < 20; ++i, q.pop())
+ BOOST_CHECK_EQUAL(q.top(), i << 1);
+ BOOST_CHECK(q.empty());
+}
+
+BOOST_AUTO_TEST_CASE(beach_line_node_key_test) {
+ node_key_type key(1);
+ BOOST_CHECK_EQUAL(key.left_site(), 1);
+ BOOST_CHECK_EQUAL(key.right_site(), 1);
+ key.left_site(2);
+ BOOST_CHECK_EQUAL(key.left_site(), 2);
+ BOOST_CHECK_EQUAL(key.right_site(), 1);
+ key.right_site(3);
+ BOOST_CHECK_EQUAL(key.left_site(), 2);
+ BOOST_CHECK_EQUAL(key.right_site(), 3);
+}
+
+BOOST_AUTO_TEST_CASE(beach_line_node_data_test) {
+ node_data_type node_data(NULL);
+ BOOST_CHECK(node_data.edge() == NULL);
+ BOOST_CHECK(node_data.circle_event() == NULL);
+ int data = 4;
+ node_data.circle_event(&data);
+ BOOST_CHECK(node_data.edge() == NULL);
+ BOOST_CHECK(node_data.circle_event() == &data);
+ node_data.edge(&data);
+ BOOST_CHECK(node_data.edge() == &data);
+ BOOST_CHECK(node_data.circle_event() == &data);
+}

Added: branches/release/libs/polygon/test/voronoi_test_helper.hpp
==============================================================================
--- (empty file)
+++ branches/release/libs/polygon/test/voronoi_test_helper.hpp 2012-09-16 18:48:03 EDT (Sun, 16 Sep 2012)
@@ -0,0 +1,260 @@
+// Boost.Polygon library voronoi_test_helper.hpp file
+
+// Copyright Andrii Sydorchuk 2010-2011.
+// Distributed under 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef VORONOI_TEST_HELPER
+#define VORONOI_TEST_HELPER
+
+#include <algorithm>
+#include <iostream>
+#include <iterator>
+#include <fstream>
+#include <map>
+#include <vector>
+#include <utility>
+
+#include <boost/polygon/polygon.hpp>
+using namespace boost::polygon;
+
+namespace voronoi_test_helper {
+
+enum kOrientation {
+ RIGHT = -1,
+ COLLINEAR = 0,
+ LEFT = 1
+};
+
+template <typename VERTEX>
+kOrientation get_orientation(
+ const VERTEX& v1, const VERTEX& v2, const VERTEX& v3) {
+ typename VERTEX::coordinate_type lhs = (v2.x() - v1.x()) * (v3.y() - v2.y());
+ typename VERTEX::coordinate_type rhs = (v2.y() - v1.y()) * (v3.x() - v2.x());
+ if (lhs == rhs) {
+ return COLLINEAR;
+ }
+ return (lhs < rhs) ? RIGHT : LEFT;
+}
+
+template <typename OUTPUT>
+bool verify_cell_convexity(const OUTPUT& output) {
+ typename OUTPUT::const_cell_iterator cell_it;
+ for (cell_it = output.cells().begin();
+ cell_it != output.cells().end(); cell_it++) {
+ const typename OUTPUT::edge_type* edge = cell_it->incident_edge();
+ if (edge)
+ do {
+ if (edge->next()->prev() != edge) {
+ return false;
+ }
+ if (edge->cell() != &(*cell_it)) {
+ return false;
+ }
+ if (edge->vertex1() != edge->next()->vertex0()) {
+ return false;
+ }
+ if (edge->vertex0() != NULL &&
+ edge->vertex1() != NULL &&
+ edge->next()->vertex1() != NULL) {
+ if (get_orientation(*edge->vertex0(),
+ *edge->vertex1(),
+ *edge->next()->vertex1()) != LEFT) {
+ return false;
+ }
+ }
+ edge = edge->next();
+ } while (edge != cell_it->incident_edge());
+ }
+ return true;
+}
+
+template <typename OUTPUT>
+bool verify_incident_edges_ccw_order(const OUTPUT& output) {
+ typedef typename OUTPUT::edge_type voronoi_edge_type;
+ typename OUTPUT::const_vertex_iterator vertex_it;
+ for (vertex_it = output.vertices().begin();
+ vertex_it != output.vertices().end(); vertex_it++) {
+ if (vertex_it->is_degenerate())
+ continue;
+ const voronoi_edge_type* edge = vertex_it->incident_edge();
+ do {
+ const voronoi_edge_type* next_edge = edge->rot_next();
+ if (edge->vertex0() != next_edge->vertex0()) {
+ return false;
+ }
+ if (edge->vertex1() != NULL && next_edge->vertex1() != NULL &&
+ get_orientation(*edge->vertex1(),
+ *edge->vertex0(),
+ *next_edge->vertex1()) == LEFT) {
+ return false;
+ }
+ edge = edge->rot_next();
+ } while (edge != vertex_it->incident_edge());
+ }
+ return true;
+}
+
+template <typename VERTEX>
+struct cmp {
+ bool operator()(const VERTEX& v1, const VERTEX& v2) const {
+ if (v1.x() != v2.x())
+ return v1.x() < v2.x();
+ return v1.y() < v2.y();
+ }
+};
+
+template <typename Output>
+bool verfiy_no_line_edge_intersections(const Output &output) {
+ // Create map from edges with first point less than the second one.
+ // Key is the first point of the edge, value is a vector of second points
+ // with the same first point.
+ typedef typename Output::vertex_type vertex_type;
+ cmp<vertex_type> comparator;
+ std::map< vertex_type, std::vector<vertex_type>, cmp<vertex_type> > edge_map;
+ typename Output::const_edge_iterator edge_it;
+ for (edge_it = output.edges().begin();
+ edge_it != output.edges().end(); edge_it++) {
+ if (edge_it->is_finite()) {
+ if (comparator(*edge_it->vertex0(), *edge_it->vertex1())) {
+ edge_map[*edge_it->vertex0()].push_back(*edge_it->vertex1());
+ }
+ }
+ }
+ return !intersection_check(edge_map);
+}
+
+template <typename Point2D>
+bool intersection_check(
+ const std::map< Point2D, std::vector<Point2D>, cmp<Point2D> > &edge_map) {
+ // Iterate over map of edges and check if there are any intersections.
+ // All the edges are stored by the low x value. That's why we iterate
+ // left to right checking for intersections between all pairs of edges
+ // that overlap in the x dimension.
+ // Complexity. Approximately N*sqrt(N). Worst case N^2.
+ typedef Point2D point_type;
+ typedef typename point_type::coordinate_type coordinate_type;
+ typedef typename std::map<point_type, std::vector<point_type>, cmp<Point2D> >::const_iterator
+ edge_map_iterator;
+ typedef typename std::vector<point_type>::size_type size_type;
+ edge_map_iterator edge_map_it1, edge_map_it2, edge_map_it_bound;
+ for (edge_map_it1 = edge_map.begin();
+ edge_map_it1 != edge_map.end(); edge_map_it1++) {
+ const point_type &point1 = edge_map_it1->first;
+ for (size_type i = 0; i < edge_map_it1->second.size(); i++) {
+ const point_type &point2 = edge_map_it1->second[i];
+ coordinate_type min_y1 = (std::min)(point1.y(), point2.y());
+ coordinate_type max_y1 = (std::max)(point1.y(), point2.y());
+
+ // Find the first edge with greater or equal first point.
+ edge_map_it_bound = edge_map.lower_bound(point2);
+
+ edge_map_it2 = edge_map_it1;
+ edge_map_it2++;
+ for (; edge_map_it2 != edge_map_it_bound; edge_map_it2++) {
+ const point_type &point3 = edge_map_it2->first;
+ for (size_type j = 0; j < edge_map_it2->second.size(); j++) {
+ const point_type &point4 = edge_map_it2->second[j];
+ coordinate_type min_y2 = (std::min)(point3.y(), point4.y());
+ coordinate_type max_y2 = (std::max)(point3.y(), point4.y());
+
+ // In most cases it is enought to make
+ // simple intersection check in the y dimension.
+ if (!(max_y1 > min_y2 && max_y2 > min_y1))
+ continue;
+
+ // Intersection check.
+ if (get_orientation(point1, point2, point3) *
+ get_orientation(point1, point2, point4) == RIGHT &&
+ get_orientation(point3, point4, point1) *
+ get_orientation(point3, point4, point2) == RIGHT)
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+enum kVerification {
+ CELL_CONVEXITY = 1,
+ INCIDENT_EDGES_CCW_ORDER = 2,
+ NO_HALF_EDGE_INTERSECTIONS = 4,
+ FAST_VERIFICATION = 3,
+ COMPLETE_VERIFICATION = 7
+};
+
+template <typename Output>
+bool verify_output(const Output &output, kVerification mask) {
+ bool result = true;
+ if (mask & CELL_CONVEXITY)
+ result &= verify_cell_convexity(output);
+ if (mask & INCIDENT_EDGES_CCW_ORDER)
+ result &= verify_incident_edges_ccw_order(output);
+ if (mask & NO_HALF_EDGE_INTERSECTIONS)
+ result &= verfiy_no_line_edge_intersections(output);
+ return result;
+}
+
+template <typename PointIterator>
+void save_points(
+ PointIterator first, PointIterator last, const char* file_name) {
+ std::ofstream ofs(file_name);
+ ofs << std::distance(first, last) << std::endl;
+ for (PointIterator it = first; it != last; ++it) {
+ ofs << it->x() << " " << it->y() << std::endl;
+ }
+ ofs.close();
+}
+
+template <typename SegmentIterator>
+void save_segments(
+ SegmentIterator first, SegmentIterator last, const char* file_name) {
+ std::ofstream ofs(file_name);
+ ofs << std::distance(first, last) << std::endl;
+ for (SegmentIterator it = first; it != last; ++it) {
+ ofs << it->low().x() << " " << it->low().y() << " ";
+ ofs << it->high().x() << " " << it->high().y() << std::endl;
+ }
+ ofs.close();
+}
+
+template <typename T>
+void clean_segment_set(std::vector< segment_data<T> >& data) {
+ typedef T Unit;
+ typedef typename scanline_base<Unit>::Point Point;
+ typedef typename scanline_base<Unit>::half_edge half_edge;
+ typedef int segment_id;
+ std::vector<std::pair<half_edge, segment_id> > half_edges;
+ std::vector<std::pair<half_edge, segment_id> > half_edges_out;
+ segment_id id = 0;
+ half_edges.reserve(data.size());
+ for (typename std::vector< segment_data<T> >::iterator it = data.begin();
+ it != data.end(); ++it) {
+ Point l = it->low();
+ Point h = it->high();
+ half_edges.push_back(std::make_pair(half_edge(l, h), id++));
+ }
+ half_edges_out.reserve(half_edges.size());
+ // Apparently no need to pre-sort data when calling validate_scan.
+ line_intersection<Unit>::validate_scan(
+ half_edges_out, half_edges.begin(), half_edges.end());
+ std::vector< segment_data<T> > result;
+ result.reserve(half_edges_out.size());
+ for (std::size_t i = 0; i < half_edges_out.size(); ++i) {
+ id = half_edges_out[i].second;
+ Point l = half_edges_out[i].first.first;
+ Point h = half_edges_out[i].first.second;
+ segment_data<T> orig_seg = data[id];
+ if (orig_seg.high() < orig_seg.low())
+ std::swap(l, h);
+ result.push_back(segment_data<T>(l, h));
+ }
+ std::swap(result, data);
+}
+} // voronoi_test_helper
+
+#endif


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