Polygon: cleaning trunk for the new changes.
[SVN r83340]
This commit is contained in:
parent
23d0873703
commit
7a2ee5b963
@ -480,7 +480,7 @@ const</font></td>
|
||||
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">
|
||||
<table style="width: 100%;" id="table3" border="1">
|
||||
<tbody>
|
||||
|
||||
|
||||
@ -550,7 +550,7 @@ respectively. Linear runtime. </td>
|
||||
<tr>
|
||||
<td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top"> </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">
|
||||
<table class="docinfo" id="table4" frame="void" rules="none">
|
||||
<colgroup> <col class="docinfo-name" /><col class="docinfo-content" /> </colgroup> <tbody valign="top">
|
||||
<tr>
|
||||
<th class="docinfo-name">Copyright:</th>
|
||||
@ -570,4 +570,4 @@ http://www.boost.org/LICENSE_1_0.txt</a>)</td>
|
||||
</table>
|
||||
|
||||
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
@ -13,7 +13,7 @@ namespace boost { namespace polygon{
|
||||
template <typename coordinate_type>
|
||||
inline void polygon_set_data<coordinate_type>::clean() const {
|
||||
if(dirty_) {
|
||||
polygon_45_set_data<coordinate_type> tmp;
|
||||
//polygon_45_set_data<coordinate_type> tmp;
|
||||
//very important:
|
||||
//the 45 degree algorithm does not satisfy
|
||||
//the precondition of arbitrary polygon formation
|
||||
|
@ -10,16 +10,7 @@
|
||||
#ifndef BOOST_POLYGON_DETAIL_VORONOI_CTYPES
|
||||
#define BOOST_POLYGON_DETAIL_VORONOI_CTYPES
|
||||
|
||||
#ifndef BOOST_POLYGON_NO_DEPS
|
||||
#include <boost/cstdint.hpp>
|
||||
#else
|
||||
namespace boost {
|
||||
typedef int int32_t;
|
||||
typedef long long int64_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
};
|
||||
#endif
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
@ -17,10 +17,10 @@
|
||||
#include "voronoi_builder.hpp"
|
||||
#include "voronoi_diagram.hpp"
|
||||
|
||||
// Public methods to compute Voronoi diagram.
|
||||
// Public methods to compute Voronoi diagram of a set of points and segments.
|
||||
// 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
|
||||
// coordinate range voronoi_builder configuration via coordinate type traits
|
||||
// is required.
|
||||
// Complexity - O(N*logN), memory usage - O(N), N - number of input objects.
|
||||
namespace boost {
|
||||
@ -34,8 +34,7 @@ typename enable_if<
|
||||
>::type
|
||||
>::type,
|
||||
std::size_t
|
||||
>::type
|
||||
insert(const Point& point, VB* vb) {
|
||||
>::type insert(const Point& point, VB* vb) {
|
||||
return vb->insert_point(x(point), y(point));
|
||||
}
|
||||
|
||||
@ -49,8 +48,7 @@ typename enable_if<
|
||||
>::type
|
||||
>::type,
|
||||
void
|
||||
>::type
|
||||
insert(PointIterator first, const PointIterator last, VB* vb) {
|
||||
>::type insert(const PointIterator first, const PointIterator last, VB* vb) {
|
||||
for (PointIterator it = first; it != last; ++it) {
|
||||
insert(*it, vb);
|
||||
}
|
||||
@ -64,8 +62,7 @@ typename enable_if<
|
||||
>::type
|
||||
>::type,
|
||||
std::size_t
|
||||
>::type
|
||||
insert(const Segment& segment, VB* vb) {
|
||||
>::type insert(const Segment& segment, VB* vb) {
|
||||
return vb->insert_segment(
|
||||
x(low(segment)), y(low(segment)),
|
||||
x(high(segment)), y(high(segment)));
|
||||
@ -81,8 +78,9 @@ typename enable_if<
|
||||
>::type
|
||||
>::type,
|
||||
void
|
||||
>::type
|
||||
insert(SegmentIterator first, SegmentIterator last, VB* vb) {
|
||||
>::type insert(const SegmentIterator first,
|
||||
const SegmentIterator last,
|
||||
VB* vb) {
|
||||
for (SegmentIterator it = first; it != last; ++it) {
|
||||
insert(*it, vb);
|
||||
}
|
||||
@ -98,8 +96,9 @@ typename enable_if<
|
||||
>::type
|
||||
>::type,
|
||||
void
|
||||
>::type
|
||||
construct_voronoi(PointIterator first, PointIterator last, VD* vd) {
|
||||
>::type construct_voronoi(const PointIterator first,
|
||||
const PointIterator last,
|
||||
VD* vd) {
|
||||
default_voronoi_builder builder;
|
||||
insert(first, last, &builder);
|
||||
builder.construct(vd);
|
||||
@ -115,8 +114,9 @@ typename enable_if<
|
||||
>::type
|
||||
>::type,
|
||||
void
|
||||
>::type
|
||||
construct_voronoi(SegmentIterator first, SegmentIterator last, VD* vd) {
|
||||
>::type construct_voronoi(const SegmentIterator first,
|
||||
const SegmentIterator last,
|
||||
VD* vd) {
|
||||
default_voronoi_builder builder;
|
||||
insert(first, last, &builder);
|
||||
builder.construct(vd);
|
||||
@ -141,9 +141,11 @@ typename enable_if<
|
||||
>::type
|
||||
>::type,
|
||||
void
|
||||
>::type
|
||||
construct_voronoi(PointIterator p_first, PointIterator p_last,
|
||||
SegmentIterator s_first, SegmentIterator s_last, VD* vd) {
|
||||
>::type construct_voronoi(const PointIterator p_first,
|
||||
const PointIterator p_last,
|
||||
const SegmentIterator s_first,
|
||||
const SegmentIterator s_last,
|
||||
VD* vd) {
|
||||
default_voronoi_builder builder;
|
||||
insert(p_first, p_last, &builder);
|
||||
insert(s_first, s_last, &builder);
|
||||
|
@ -328,7 +328,7 @@ class voronoi_diagram {
|
||||
return vertices_.size();
|
||||
}
|
||||
|
||||
void _reserve(int num_sites) {
|
||||
void _reserve(std::size_t num_sites) {
|
||||
cells_.reserve(num_sites);
|
||||
vertices_.reserve(num_sites << 1);
|
||||
edges_.reserve((num_sites << 2) + (num_sites << 1));
|
||||
|
Loading…
Reference in New Issue
Block a user