|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80595 - trunk/boost/polygon/detail
From: lucanus.j.simonson_at_[hidden]
Date: 2012-09-18 20:26:16
Author: ljsimons
Date: 2012-09-18 20:26:14 EDT (Tue, 18 Sep 2012)
New Revision: 80595
URL: http://svn.boost.org/trac/boost/changeset/80595
Log:
fixed std::cout for clang
Text files modified:
trunk/boost/polygon/detail/boolean_op_45.hpp | 110 ++++++++--------
trunk/boost/polygon/detail/polygon_45_formation.hpp | 178 +++++++++++++-------------
trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp | 258 ++++++++++++++++++++--------------------
trunk/boost/polygon/detail/scan_arbitrary.hpp | 170 +++++++++++++-------------
4 files changed, 358 insertions(+), 358 deletions(-)
Modified: trunk/boost/polygon/detail/boolean_op_45.hpp
==============================================================================
--- trunk/boost/polygon/detail/boolean_op_45.hpp (original)
+++ trunk/boost/polygon/detail/boolean_op_45.hpp 2012-09-18 20:26:14 EDT (Tue, 18 Sep 2012)
@@ -395,9 +395,9 @@
int edgeType = applyLogic<op>(count1, count2);
if(edgeType) {
int multiplier = end == LOW ? -1 : 1;
- //std::cout << "cross logic: " << edgeType << std::endl;
+ //std::cout << "cross logic: " << edgeType << "\n";
output.insert(output.end(), Vertex45(pt, rise, edgeType * multiplier));
- //std::cout << "write out: " << crossPoint << " " << Point(eraseItrs[i]->x, eraseItrs[i]->y) << std::endl;
+ //std::cout << "write out: " << crossPoint << " " << Point(eraseItrs[i]->x, eraseItrs[i]->y) << "\n";
}
}
};
@@ -428,9 +428,9 @@
int edgeType = applyLogic<op>(count1, count2);
if(edgeType) {
int multiplier = end == LOW ? -1 : 1;
- //std::cout << "cross logic: " << edgeType << std::endl;
+ //std::cout << "cross logic: " << edgeType << "\n";
output.insert(output.end(), Vertex45(pt, rise, edgeType * multiplier));
- //std::cout << "write out: " << crossPoint << " " << Point(eraseItrs[i]->x, eraseItrs[i]->y) << std::endl;
+ //std::cout << "write out: " << crossPoint << " " << Point(eraseItrs[i]->x, eraseItrs[i]->y) << "\n";
}
}
};
@@ -510,18 +510,18 @@
//std::cout << "1\n";
while(inputBegin != inputEnd) {
//std::cout << "2\n";
- //std::cout << "x_ = " << x_ << std::endl;
- //std::cout << "scan line size: " << scanData_.size() << std::endl;
+ //std::cout << "x_ = " << x_ << "\n";
+ //std::cout << "scan line size: " << scanData_.size() << "\n";
//for(iterator iter = scanData_.begin();
// iter != scanData_.end(); ++iter) {
// std::cout << "scan element\n";
- // std::cout << *iter << " " << iter->evalAtX(x_) << std::endl;
+ // std::cout << *iter << " " << iter->evalAtX(x_) << "\n";
// }
- // std::cout << "cross queue size: " << crossQueue_.size() << std::endl;
- // std::cout << "cross vector size: " << crossVector_.size() << std::endl;
+ // std::cout << "cross queue size: " << crossQueue_.size() << "\n";
+ // std::cout << "cross vector size: " << crossVector_.size() << "\n";
//for(CrossQueue::iterator cqitr = crossQueue_.begin(); cqitr != crossQueue_.end(); ++cqitr) {
// std::cout << *cqitr << " ";
- //} std::cout << std::endl;
+ //} std::cout << "\n";
Unit nextX = (*inputBegin).first.x();
if(!crossVector_.empty() && crossVector_[0].first.x() < nextX) nextX = crossVector_[0].first.x();
if(nextX != x_) {
@@ -567,18 +567,18 @@
//std::cout << "loop\n";
//pop point off the cross queue
Point crossPoint = *(crossQueue_.begin());
- //std::cout << crossPoint << std::endl;
+ //std::cout << crossPoint << "\n";
//for(iterator iter = scanData_.begin();
// iter != scanData_.end(); ++iter) {
// std::cout << "scan element\n";
- // std::cout << *iter << " " << iter->evalAtX(x_) << std::endl;
+ // std::cout << *iter << " " << iter->evalAtX(x_) << "\n";
//}
crossQueue_.erase(crossQueue_.begin());
Scan45Vertex vertex(crossPoint, Scan45Count());
iterator lowIter = lookUp_(vertex.first.y());
- //std::cout << "searching at: " << vertex.first.y() << std::endl;
+ //std::cout << "searching at: " << vertex.first.y() << "\n";
//if(lowIter == scanData_.end()) std::cout << "could not find\n";
- //else std::cout << "found: " << *lowIter << std::endl;
+ //else std::cout << "found: " << *lowIter << "\n";
if(lowIter == scanData_.end() ||
lowIter->evalAtX(x_) != vertex.first.y()) {
// std::cout << "skipping\n";
@@ -593,7 +593,7 @@
--searchDownItr;
countBelow = searchDownItr->count;
}
- //std::cout << "Below Count: " << countBelow << std::endl;
+ //std::cout << "Below Count: " << countBelow << "\n";
Scan45Count count(countBelow);
std::size_t numEdges = 0;
iterator eraseItrs[3];
@@ -601,7 +601,7 @@
lowIter->evalAtX(x_) == vertex.first.y()) {
for(int index = lowIter->rise +1; index >= 0; --index)
count[index] = lowIter->count;
- //std::cout << count << std::endl;
+ //std::cout << count << "\n";
eraseItrs[numEdges] = lowIter;
++numEdges;
++lowIter;
@@ -630,8 +630,8 @@
vertex.second[0] = count[0] - count[1];
//add the point, deriviative pair into the cross vector
//std::cout << "LOOK HERE!\n";
- //std::cout << count << std::endl;
- //std::cout << vertex << std::endl;
+ //std::cout << count << "\n";
+ //std::cout << vertex << "\n";
crossVector_.push_back(vertex);
}
//erase crossing elements
@@ -686,10 +686,10 @@
iterator prevIter = scanData_.end();
while(inputBegin != inputEnd &&
(*inputBegin).first.x() == x_) {
- //std::cout << (*inputBegin) << std::endl;
+ //std::cout << (*inputBegin) << "\n";
//std::cout << "loop\n";
Scan45Vertex vertex = *inputBegin;
- //std::cout << vertex.first << std::endl;
+ //std::cout << vertex.first << "\n";
//if vertical count propigating up fake a null event at the next element
if(verticalCount != CountType() && (prevIter != scanData_.end() &&
prevIter->evalAtX(x_) < vertex.first.y())) {
@@ -707,13 +707,13 @@
++inputBegin;
}
}
- //std::cout << vertex.second << std::endl;
+ //std::cout << vertex.second << "\n";
//integrate vertex
CountType currentCount = verticalCount;// + vertex.second[0];
for(unsigned int i = 0; i < 3; ++i) {
vertex.second[i] = currentCount += vertex.second[i];
}
- //std::cout << vertex.second << std::endl;
+ //std::cout << vertex.second << "\n";
//vertex represents the change in state at this point
//get counts at current vertex
@@ -725,8 +725,8 @@
countBelow = lowIter->count;
++lowIter;
}
- //std::cout << "Count Below: " << countBelow[0] << " " << countBelow[1] << std::endl;
- //std::cout << "vertical count: " << verticalCount[0] << " " << verticalCount[1] << std::endl;
+ //std::cout << "Count Below: " << countBelow[0] << " " << countBelow[1] << "\n";
+ //std::cout << "vertical count: " << verticalCount[0] << " " << verticalCount[1] << "\n";
Scan45Count countAt(countBelow - verticalCount);
//check if the vertical edge should be written out
if(verticalCount != CountType()) {
@@ -756,20 +756,20 @@
}
verticalCount += vertex.second[3];
prevPoint = vertex.first;
- //std::cout << "new vertical count: " << verticalCount[0] << " " << verticalCount[1] << std::endl;
+ //std::cout << "new vertical count: " << verticalCount[0] << " " << verticalCount[1] << "\n";
prevIter = lowIter;
//count represents the current state at this point
- //std::cout << vertex.second << std::endl;
- //std::cout << countAt << std::endl;
+ //std::cout << vertex.second << "\n";
+ //std::cout << countAt << "\n";
//std::cout << "ADD\n";
vertex.second += countAt;
- //std::cout << vertex.second << std::endl;
+ //std::cout << vertex.second << "\n";
//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;
+ // " " << vertex.second[i][0] << " " << vertex.second[i][1] << "\n";
iterator insertIter = scanData_.insert(scanData_.end(),
Scan45ElementT<CountType>(vertex.first.x(),
vertex.first.y(),
@@ -864,7 +864,7 @@
}
}
}
- //std::cout << std::endl;
+ //std::cout << "\n";
}
inline iterator lookUp_(Unit y){
@@ -878,7 +878,7 @@
// lessScan45Element<CountType> >& data) {
// typename std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >::const_iterator iter;
// for(iter = data.begin(); iter != data.end(); ++iter) {
- // std::cout << iter->x << " " << iter->y << " " << iter->rise << std::endl;
+ // std::cout << iter->x << " " << iter->y << " " << iter->rise << "\n";
// }
//}
@@ -957,13 +957,13 @@
reference.push_back(Vertex45(Point(10, 10), 2, 1));
reference.push_back(Vertex45(Point(10, 10), 0, 1));
if(result != reference) {
- stdcout << "result size == " << result.size() << std::endl;
+ stdcout << "result size == " << result.size() << "\n";
for(std::size_t i = 0; i < result.size(); ++i) {
- //std::cout << "result == " << result[i]<< std::endl;
+ //std::cout << "result == " << result[i]<< "\n";
}
- stdcout << "reference size == " << reference.size() << std::endl;
+ stdcout << "reference size == " << reference.size() << "\n";
for(std::size_t i = 0; i < reference.size(); ++i) {
- //std::cout << "reference == " << reference[i]<< std::endl;
+ //std::cout << "reference == " << reference[i]<< "\n";
}
return false;
}
@@ -1007,13 +1007,13 @@
reference.push_back(Vertex45(Point(10, 20), 2, 1));
reference.push_back(Vertex45(Point(10, 20), 1, 1));
if(result != reference) {
- stdcout << "result size == " << result.size() << std::endl;
+ stdcout << "result size == " << result.size() << "\n";
for(std::size_t i = 0; i < result.size(); ++i) {
- //std::cout << "result == " << result[i]<< std::endl;
+ //std::cout << "result == " << result[i]<< "\n";
}
- stdcout << "reference size == " << reference.size() << std::endl;
+ stdcout << "reference size == " << reference.size() << "\n";
for(std::size_t i = 0; i < reference.size(); ++i) {
- //std::cout << "reference == " << reference[i]<< std::endl;
+ //std::cout << "reference == " << reference[i]<< "\n";
}
return false;
}
@@ -1057,13 +1057,13 @@
reference.push_back(Vertex45(Point(20, 10), 1, -1));
reference.push_back(Vertex45(Point(20, 10), 0, 1));
if(result != reference) {
- stdcout << "result size == " << result.size() << std::endl;
+ stdcout << "result size == " << result.size() << "\n";
for(std::size_t i = 0; i < result.size(); ++i) {
- //stdcout << "result == " << result[i]<< std::endl;
+ //stdcout << "result == " << result[i]<< "\n";
}
- stdcout << "reference size == " << reference.size() << std::endl;
+ stdcout << "reference size == " << reference.size() << "\n";
for(std::size_t i = 0; i < reference.size(); ++i) {
- //stdcout << "reference == " << reference[i]<< std::endl;
+ //stdcout << "reference == " << reference[i]<< "\n";
}
return false;
}
@@ -1114,13 +1114,13 @@
reference.push_back(Vertex45(Point(10, 10), 2, 1));
reference.push_back(Vertex45(Point(10, 10), 0, 1));
if(result != reference) {
- stdcout << "result size == " << result.size() << std::endl;
+ stdcout << "result size == " << result.size() << "\n";
for(std::size_t i = 0; i < result.size(); ++i) {
- //stdcout << "result == " << result[i]<< std::endl;
+ //stdcout << "result == " << result[i]<< "\n";
}
- stdcout << "reference size == " << reference.size() << std::endl;
+ stdcout << "reference size == " << reference.size() << "\n";
for(std::size_t i = 0; i < reference.size(); ++i) {
- //stdcout << "reference == " << reference[i]<< std::endl;
+ //stdcout << "reference == " << reference[i]<< "\n";
}
return false;
}
@@ -1176,8 +1176,8 @@
// result == 12 8 1 -1
// result == 12 8 -1 1
if(result.size() != 24) {
- //stdcout << "result size == " << result.size() << std::endl;
- //stdcout << "reference size == " << 24 << std::endl;
+ //stdcout << "result size == " << result.size() << "\n";
+ //stdcout << "reference size == " << 24 << "\n";
return false;
}
stdcout << "done testing Scan45Star1\n";
@@ -1232,8 +1232,8 @@
// result == 16 8 1 -1
// result == 16 8 0 1
if(result.size() != 24) {
- //std::cout << "result size == " << result.size() << std::endl;
- //std::cout << "reference size == " << 24 << std::endl;
+ //std::cout << "result size == " << result.size() << "\n";
+ //std::cout << "reference size == " << 24 << "\n";
return false;
}
stdcout << "done testing Scan45Star2\n";
@@ -1297,8 +1297,8 @@
// result == 12 14 2 1
// result == 12 14 0 1
if(result.size() != 28) {
- //std::cout << "result size == " << result.size() << std::endl;
- //std::cout << "reference size == " << 28 << std::endl;
+ //std::cout << "result size == " << result.size() << "\n";
+ //std::cout << "reference size == " << 28 << "\n";
return false;
}
@@ -1364,8 +1364,8 @@
// result == 16 12 2 1
// result == 16 12 0 1
if(result.size() != 28) {
- //stdcout << "result size == " << result.size() << std::endl;
- //stdcout << "reference size == " << 28 << std::endl;
+ //stdcout << "result size == " << result.size() << "\n";
+ //stdcout << "reference size == " << 28 << "\n";
return false;
}
Modified: trunk/boost/polygon/detail/polygon_45_formation.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_formation.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_formation.hpp 2012-09-18 20:26:14 EDT (Tue, 18 Sep 2012)
@@ -311,7 +311,7 @@
at1->copyHoles(*(at1->otherTailp_));
//std::cout << "test2\n";
//Polygon45WithHolesImpl<PolyLine45PolygonData> poly(polyData);
- //std::cout << poly << std::endl;
+ //std::cout << poly << "\n";
//std::cout << "test3\n";
typedef typename cT::value_type pType;
output.push_back(pType());
@@ -319,14 +319,14 @@
typename PolyLineByConcept<Unit, cType>::type polyData(at1);
assign(output.back(), polyData);
//std::cout << "test4\n";
- //std::cout << "delete " << at1->otherTailp_ << std::endl;
+ //std::cout << "delete " << at1->otherTailp_ << "\n";
//at1->print();
//at1->otherTailp_->print();
delete at1->otherTailp_;
//at1->print();
//at1->otherTailp_->print();
//std::cout << "test5\n";
- //std::cout << "delete " << at1 << std::endl;
+ //std::cout << "delete " << at1 << "\n";
delete at1;
//std::cout << "test6\n";
return 0;
@@ -345,7 +345,7 @@
inline void destroyContents() {
if(otherTailp_) {
- //std::cout << "delete p " << tailp_ << std::endl;
+ //std::cout << "delete p " << tailp_ << "\n";
if(tailp_) delete tailp_;
tailp_ = 0;
otherTailp_->otherTailp_ = 0;
@@ -353,7 +353,7 @@
otherTailp_ = 0;
}
for(typename std::list<ActiveTail45*>::iterator itr = holesList_.begin(); itr != holesList_.end(); ++itr) {
- //std::cout << "delete p " << (*itr) << std::endl;
+ //std::cout << "delete p " << (*itr) << "\n";
if(*itr) {
if((*itr)->otherTailp_) {
delete (*itr)->otherTailp_;
@@ -367,7 +367,7 @@
}
// inline void print() {
-// std::cout << this << " " << tailp_ << " " << otherTailp_ << " " << holesList_.size() << " " << head_ << std::endl;
+// std::cout << this << " " << tailp_ << " " << otherTailp_ << " " << holesList_.size() << " " << head_ << "\n";
// }
static inline std::pair<ActiveTail45*, ActiveTail45*> createActiveTail45sAsPair(Point point, bool solid,
@@ -575,9 +575,9 @@
while(inputBegin != inputEnd) {
//std::cout << "2\n";
x_ = (*inputBegin).pt.x();
- //std::cout << "SCAN FORMATION " << x_ << std::endl;
- //std::cout << "x_ = " << x_ << std::endl;
- //std::cout << "scan line size: " << scanData_.size() << std::endl;
+ //std::cout << "SCAN FORMATION " << x_ << "\n";
+ //std::cout << "x_ = " << x_ << "\n";
+ //std::cout << "scan line size: " << scanData_.size() << "\n";
inputBegin = processEvent_(output, inputBegin, inputEnd);
}
}
@@ -587,7 +587,7 @@
template <class cT, class cT2>
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 << point << "\n";
//std::cout << counts[0] << " ";
//std::cout << counts[1] << " ";
//std::cout << counts[2] << " ";
@@ -600,14 +600,14 @@
ActiveTail45* returnValue = 0;
int returnCount = 0;
for(int i = 0; i < 3; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] == -1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < 4; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(counts[j]) {
if(counts[j] == 1) {
- //std::cout << "case1: " << i << " " << j << std::endl;
+ //std::cout << "case1: " << i << " " << j << "\n";
//if a figure is closed it will be written out by this function to output
ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
counts[i] = 0;
@@ -623,14 +623,14 @@
//find any pairs of incoming edges that need to create pair for leading solid
//std::cout << "checking case2\n";
for(int i = 0; i < 3; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(incoming[i] == 1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < 4; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(incoming[j]) {
if(incoming[j] == -1) {
- //std::cout << "case2: " << i << " " << j << std::endl;
+ //std::cout << "case2: " << i << " " << j << "\n";
//std::cout << "creating active tail pair\n";
std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, true, 0, fractureHoles_ != 0);
@@ -642,10 +642,10 @@
returnCount = 1;
} else {
Vertex45 vertex(point, i -1, incoming[i]);
- //std::cout << "new element " << j-1 << " " << -1 << std::endl;
+ //std::cout << "new element " << j-1 << " " << -1 << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, -1), tailPair.first));
}
- //std::cout << "new element " << i-1 << " " << 1 << std::endl;
+ //std::cout << "new element " << i-1 << " " << 1 << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, i -1, 1), tailPair.second));
incoming[i] = 0;
incoming[j] = 0;
@@ -662,14 +662,14 @@
//find pass through with solid on top
//std::cout << "checking case 3\n";
for(int i = 0; i < 4; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] != 0) {
if(counts[i] == 1) {
//std::cout << "fixed i\n";
for(int j = 3; j >= 0; --j) {
if(incoming[j] != 0) {
if(incoming[j] == 1) {
- //std::cout << "case3: " << i << " " << j << std::endl;
+ //std::cout << "case3: " << i << " " << j << "\n";
//tails[i]->print();
//pass through solid on top
tails[i]->pushPoint(point);
@@ -699,14 +699,14 @@
for(int j = 0; j < 4; ++j) {
if(incoming[j] != 0) {
if(incoming[j] == -1) {
- //std::cout << "case4: " << i << " " << j << std::endl;
+ //std::cout << "case4: " << i << " " << j << "\n";
//pass through solid on bottom
tails[i]->pushPoint(point);
if(j == 3) {
returnValue = tails[i];
returnCount = 1;
} else {
- //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
+ //std::cout << "new element " << j-1 << " " << incoming[j] << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]), tails[i]));
}
tails[i] = 0;
@@ -728,7 +728,7 @@
if(counts[i] != 0) {
for(int j = i+1; j < 4; ++j) {
if(counts[j] != 0) {
- //std::cout << "case5: " << i << " " << j << std::endl;
+ //std::cout << "case5: " << i << " " << j << "\n";
//we are ending a hole and may potentially close a figure and have to handle the hole
returnValue = ActiveTail45::joinChains(point, tails[i], tails[j], false, output);
tails[i] = 0;
@@ -746,7 +746,7 @@
if(incoming[i] != 0) {
for(int j = i+1; j < 4; ++j) {
if(incoming[j] != 0) {
- //std::cout << "case6: " << i << " " << j << std::endl;
+ //std::cout << "case6: " << i << " " << j << "\n";
//we are beginning a empty space
ActiveTail45* holep = 0;
if(counts[3] == 0) holep = tails[3];
@@ -756,10 +756,10 @@
returnValue = tailPair.first;
returnCount = -1;
} else {
- //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
+ //std::cout << "new element " << j-1 << " " << incoming[j] << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]), tailPair.first));
}
- //std::cout << "new element " << i-1 << " " << incoming[i] << std::endl;
+ //std::cout << "new element " << i-1 << " " << incoming[i] << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, i -1, incoming[i]), tailPair.second));
incoming[i] = 0;
incoming[j] = 0;
@@ -798,7 +798,7 @@
//std::cout << "loop2\n";
elementIters.push_back(iter);
int index = iter->first.rise + 1;
- //std::cout << index << " " << iter->first.count << std::endl;
+ //std::cout << index << " " << iter->first.count << "\n";
counts[index] = iter->first.count;
tails[index] = iter->second;
++iter;
@@ -834,7 +834,7 @@
verticalCount = result.first;
verticalTail = result.second;
//if(verticalTail) std::cout << "have vertical tail\n";
- //std::cout << "verticalCount: " << verticalCount << std::endl;
+ //std::cout << "verticalCount: " << verticalCount << "\n";
if(verticalTail && !verticalCount) {
//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
@@ -906,9 +906,9 @@
data.push_back(Vertex45(Point(10, 10), 0, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -930,9 +930,9 @@
data.push_back(Vertex45(Point(10, 20), 1, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -955,9 +955,9 @@
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;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1020,9 +1020,9 @@
data.push_back(Vertex45(Point(12, 8), -1, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1053,9 +1053,9 @@
polygon_sort(result.begin(), result.end());
pf.scan(polys, result.begin(), result.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1125,9 +1125,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1197,9 +1197,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1241,9 +1241,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1289,9 +1289,9 @@
while(inputBegin != inputEnd) {
//std::cout << "2\n";
x_ = (*inputBegin).pt.x();
- //std::cout << "SCAN FORMATION " << x_ << std::endl;
- //std::cout << "x_ = " << x_ << std::endl;
- //std::cout << "scan line size: " << scanData_.size() << std::endl;
+ //std::cout << "SCAN FORMATION " << x_ << "\n";
+ //std::cout << "x_ = " << x_ << "\n";
+ //std::cout << "scan line size: " << scanData_.size() << "\n";
inputBegin = processEvent_(output, inputBegin, inputEnd);
}
}
@@ -1316,7 +1316,7 @@
std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
iterator previter, Point point,
Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
- //std::cout << point << std::endl;
+ //std::cout << point << "\n";
//std::cout << counts[0] << " ";
//std::cout << counts[1] << " ";
//std::cout << counts[2] << " ";
@@ -1332,14 +1332,14 @@
verticalPairOut.second = 0;
int returnCount = 0;
for(int i = 0; i < 3; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] == -1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < 4; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(counts[j]) {
if(counts[j] == 1) {
- //std::cout << "case1: " << i << " " << j << std::endl;
+ //std::cout << "case1: " << i << " " << j << "\n";
//if a figure is closed it will be written out by this function to output
ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
counts[i] = 0;
@@ -1355,14 +1355,14 @@
//find any pairs of incoming edges that need to create pair for leading solid
//std::cout << "checking case2\n";
for(int i = 0; i < 3; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(incoming[i] == 1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < 4; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(incoming[j]) {
if(incoming[j] == -1) {
- //std::cout << "case2: " << i << " " << j << std::endl;
+ //std::cout << "case2: " << i << " " << j << "\n";
//std::cout << "creating active tail pair\n";
std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
@@ -1374,10 +1374,10 @@
returnCount = 1;
} else {
Vertex45 vertex(point, i -1, incoming[i]);
- //std::cout << "new element " << j-1 << " " << -1 << std::endl;
+ //std::cout << "new element " << j-1 << " " << -1 << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, -1), tailPair.first));
}
- //std::cout << "new element " << i-1 << " " << 1 << std::endl;
+ //std::cout << "new element " << i-1 << " " << 1 << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, i -1, 1), tailPair.second));
incoming[i] = 0;
incoming[j] = 0;
@@ -1394,14 +1394,14 @@
//find pass through with solid on top
//std::cout << "checking case 3\n";
for(int i = 0; i < 4; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] != 0) {
if(counts[i] == 1) {
//std::cout << "fixed i\n";
for(int j = 3; j >= 0; --j) {
if(incoming[j] != 0) {
if(incoming[j] == 1) {
- //std::cout << "case3: " << i << " " << j << std::endl;
+ //std::cout << "case3: " << i << " " << j << "\n";
//tails[i]->print();
//pass through solid on top
if(i != 3)
@@ -1437,10 +1437,10 @@
for(int j = 0; j < 4; ++j) {
if(incoming[j] != 0) {
if(incoming[j] == -1) {
- //std::cout << "case4: " << i << " " << j << std::endl;
+ //std::cout << "case4: " << i << " " << j << "\n";
//pass through solid on bottom
if(i == 3) {
- //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
+ //std::cout << "new element " << j-1 << " " << incoming[j] << "\n";
if(j == 3) {
returnValue = tails[i];
returnCount = 1;
@@ -1483,7 +1483,7 @@
if(counts[i] != 0) {
for(int j = i+1; j < 4; ++j) {
if(counts[j] != 0) {
- //std::cout << "case5: " << i << " " << j << std::endl;
+ //std::cout << "case5: " << i << " " << j << "\n";
//we are ending a hole and may potentially close a figure and have to handle the hole
tails[i]->pushPoint(point);
verticalPairOut.first = tails[i];
@@ -1511,7 +1511,7 @@
if(incoming[i] != 0) {
for(int j = i+1; j < 4; ++j) {
if(incoming[j] != 0) {
- //std::cout << "case6: " << i << " " << j << std::endl;
+ //std::cout << "case6: " << i << " " << j << "\n";
//we are beginning a empty space
if(verticalPair.first == 0) {
getVerticalPair_(verticalPair, previter);
@@ -1523,12 +1523,12 @@
} else {
std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
- //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
+ //std::cout << "new element " << j-1 << " " << incoming[j] << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]), tailPair.second));
verticalPairOut.second = tailPair.first;
verticalPairOut.first = verticalPair.first;
}
- //std::cout << "new element " << i-1 << " " << incoming[i] << std::endl;
+ //std::cout << "new element " << i-1 << " " << incoming[i] << "\n";
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, i -1, incoming[i]), verticalPair.second));
incoming[i] = 0;
incoming[j] = 0;
@@ -1578,7 +1578,7 @@
//std::cout << "loop2\n";
elementIters.push_back(iter);
int index = iter->first.rise + 1;
- //std::cout << index << " " << iter->first.count << std::endl;
+ //std::cout << index << " " << iter->first.count << "\n";
counts[index] = iter->first.count;
tails[index] = iter->second;
++iter;
@@ -1670,9 +1670,9 @@
data.push_back(Vertex45(Point(10, 10), 0, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1694,9 +1694,9 @@
data.push_back(Vertex45(Point(10, 20), 1, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1718,9 +1718,9 @@
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;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1744,9 +1744,9 @@
data.push_back(Vertex45(Point(20, 20), 2, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1770,9 +1770,9 @@
data.push_back(Vertex45(Point(20, -10), 2, -1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1803,9 +1803,9 @@
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;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1837,9 +1837,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1901,9 +1901,9 @@
data.push_back(Vertex45(Point(12, 8), -1, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -1935,9 +1935,9 @@
polygon_sort(result.begin(), result.end());
pf.scan(polys, result.begin(), result.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -2007,9 +2007,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -2079,9 +2079,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
@@ -2123,9 +2123,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon tiling\n";
return true;
Modified: trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp (original)
+++ trunk/boost/polygon/detail/polygon_arbitrary_formation.hpp 2012-09-18 20:26:14 EDT (Tue, 18 Sep 2012)
@@ -442,8 +442,8 @@
y_den = (dx1 * dy2 - dx2 * dy1);
x = x_num / x_den;
y = y_num / y_den;
- //std::cout << "cross1 " << dy1 << " " << dx2 << " " << dy1 * dx2 << std::endl;
- //std::cout << "cross2 " << dy2 << " " << dx1 << " " << dy2 * dx1 << std::endl;
+ //std::cout << "cross1 " << dy1 << " " << dx2 << " " << dy1 * dx2 << "\n";
+ //std::cout << "cross2 " << dy2 << " " << dx1 << " " << dy2 * dx1 << "\n";
//Unit exp_x = compute_x_intercept<at>(x11, x21, y11, y21, dy1, dy2, dx1, dx2);
//Unit exp_y = compute_x_intercept<at>(y11, y21, x11, x21, dx1, dx2, dy1, dy2);
if(round_closest) {
@@ -460,10 +460,10 @@
if(is_horizontal(he2))
y_unit = he2.first.y();
//if(x != exp_x || y != exp_y)
- // std::cout << exp_x << " " << exp_y << " " << x << " " << y << std::endl;
+ // std::cout << exp_x << " " << exp_y << " " << x << " " << y << "\n";
//Unit y1 = evalAtXforY(exp_x, he1.first, he1.second);
//Unit y2 = evalAtXforY(exp_x, he2.first, he2.second);
- //std::cout << exp_x << " " << exp_y << " " << y1 << " " << y2 << std::endl;
+ //std::cout << exp_x << " " << exp_y << " " << y1 << " " << y2 << "\n";
Point result(x_unit, y_unit);
if(!projected && !contains(rect1, result, true)) return false;
if(!projected && !contains(rect2, result, true)) return false;
@@ -554,9 +554,9 @@
y_den = (dx1 * dy2 - dx2 * dy1);
x = x_num / x_den;
y = y_num / y_den;
- //std::cout << x << " " << y << std::endl;
- //std::cout << "cross1 " << dy1 << " " << dx2 << " " << dy1 * dx2 << std::endl;
- //std::cout << "cross2 " << dy2 << " " << dx1 << " " << dy2 * dx1 << std::endl;
+ //std::cout << x << " " << y << "\n";
+ //std::cout << "cross1 " << dy1 << " " << dx2 << " " << dy1 * dx2 << "\n";
+ //std::cout << "cross2 " << dy2 << " " << dx1 << " " << dy2 * dx1 << "\n";
//Unit exp_x = compute_x_intercept<at>(x11, x21, y11, y21, dy1, dy2, dx1, dx2);
//Unit exp_y = compute_x_intercept<at>(y11, y21, x11, x21, dx1, dx2, dy1, dy2);
if(round_closest) {
@@ -573,10 +573,10 @@
if(is_horizontal(he2))
y_unit = he2.first.y();
//if(x != exp_x || y != exp_y)
- // std::cout << exp_x << " " << exp_y << " " << x << " " << y << std::endl;
+ // std::cout << exp_x << " " << exp_y << " " << x << " " << y << "\n";
//Unit y1 = evalAtXforY(exp_x, he1.first, he1.second);
//Unit y2 = evalAtXforY(exp_x, he2.first, he2.second);
- //std::cout << exp_x << " " << exp_y << " " << y1 << " " << y2 << std::endl;
+ //std::cout << exp_x << " " << exp_y << " " << y1 << " " << y2 << "\n";
Point result(x_unit, y_unit);
if(!contains(rect1, result, true)) return false;
if(!contains(rect2, result, true)) return false;
@@ -644,8 +644,8 @@
high_precision y_den = (dx1 * dy2 - dx2 * dy1);
high_precision x = x_num / x_den;
high_precision y = y_num / y_den;
- //std::cout << "cross1 " << dy1 << " " << dx2 << " " << dy1 * dx2 << std::endl;
- //std::cout << "cross2 " << dy2 << " " << dx1 << " " << dy2 * dx1 << std::endl;
+ //std::cout << "cross1 " << dy1 << " " << dx2 << " " << dy1 * dx2 << "\n";
+ //std::cout << "cross2 " << dy2 << " " << dx1 << " " << dy2 * dx1 << "\n";
//Unit exp_x = compute_x_intercept<at>(x11, x21, y11, y21, dy1, dy2, dx1, dx2);
//Unit exp_y = compute_x_intercept<at>(y11, y21, x11, x21, dx1, dx2, dy1, dy2);
Unit x_unit = convert_high_precision_type<Unit>(x);
@@ -658,10 +658,10 @@
if(is_horizontal(he2))
y_unit = he2.first.y();
//if(x != exp_x || y != exp_y)
- // std::cout << exp_x << " " << exp_y << " " << x << " " << y << std::endl;
+ // std::cout << exp_x << " " << exp_y << " " << x << " " << y << "\n";
//Unit y1 = evalAtXforY(exp_x, he1.first, he1.second);
//Unit y2 = evalAtXforY(exp_x, he2.first, he2.second);
- //std::cout << exp_x << " " << exp_y << " " << y1 << " " << y2 << std::endl;
+ //std::cout << exp_x << " " << exp_y << " " << y1 << " " << y2 << "\n";
Point result(x_unit, y_unit);
if(!contains(rect1, result, true)) return false;
if(!contains(rect2, result, true)) return false;
@@ -1121,21 +1121,21 @@
typename PolyLineArbitraryByConcept<Unit, typename geometry_concept<typename cT::value_type>::type>::type polyData(at1);
//poly_line_arbitrary_polygon_data polyData(at1);
//std::cout << "test2\n";
- //std::cout << poly << std::endl;
+ //std::cout << poly << "\n";
//std::cout << "test3\n";
typedef typename cT::value_type result_type;
typedef typename geometry_concept<result_type>::type result_concept;
output.push_back(result_type());
assign(output.back(), polyData);
//std::cout << "test4\n";
- //std::cout << "delete " << at1->otherTailp_ << std::endl;
+ //std::cout << "delete " << at1->otherTailp_ << "\n";
//at1->print();
//at1->otherTailp_->print();
delete at1->otherTailp_;
//at1->print();
//at1->otherTailp_->print();
//std::cout << "test5\n";
- //std::cout << "delete " << at1 << std::endl;
+ //std::cout << "delete " << at1 << "\n";
delete at1;
//std::cout << "test6\n";
return 0;
@@ -1154,7 +1154,7 @@
inline void destroyContents() {
if(otherTailp_) {
- //std::cout << "delete p " << tailp_ << std::endl;
+ //std::cout << "delete p " << tailp_ << "\n";
if(tailp_) delete tailp_;
tailp_ = 0;
otherTailp_->otherTailp_ = 0;
@@ -1162,7 +1162,7 @@
otherTailp_ = 0;
}
for(typename std::list<active_tail_arbitrary*>::iterator itr = holesList_.begin(); itr != holesList_.end(); ++itr) {
- //std::cout << "delete p " << (*itr) << std::endl;
+ //std::cout << "delete p " << (*itr) << "\n";
if(*itr) {
if((*itr)->otherTailp_) {
delete (*itr)->otherTailp_;
@@ -1176,7 +1176,7 @@
}
inline void print() {
- //std::cout << this << " " << tailp_ << " " << otherTailp_ << " " << holesList_.size() << " " << head_ << std::endl;
+ //std::cout << this << " " << tailp_ << " " << otherTailp_ << " " << holesList_.size() << " " << head_ << "\n";
}
static inline std::pair<active_tail_arbitrary*, active_tail_arbitrary*> createActiveTailsAsPair(Point point, bool solid,
@@ -1356,12 +1356,12 @@
while(inputBegin != inputEnd) {
//std::cout << "2\n";
x_ = (*inputBegin).pt.get(HORIZONTAL);
- //std::cout << "SCAN FORMATION " << x_ << std::endl;
- //std::cout << "x_ = " << x_ << std::endl;
- //std::cout << "scan line size: " << scanData_.size() << std::endl;
+ //std::cout << "SCAN FORMATION " << x_ << "\n";
+ //std::cout << "x_ = " << x_ << "\n";
+ //std::cout << "scan line size: " << scanData_.size() << "\n";
inputBegin = processEvent_(output, inputBegin, inputEnd);
}
- //std::cout << "scan line size: " << scanData_.size() << std::endl;
+ //std::cout << "scan line size: " << scanData_.size() << "\n";
}
protected:
@@ -1369,7 +1369,7 @@
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) {
- //std::cout << "\nAT POINT: " << point << std::endl;
+ //std::cout << "\nAT POINT: " << point << "\n";
//join any closing solid corners
std::vector<int> counts;
std::vector<int> incoming;
@@ -1401,25 +1401,25 @@
have_vertical_tail_from_below = true;
}
//assert size = size_less_1 + 1
- //std::cout << tails.size() << " " << incoming.size() << " " << counts_from_scanline.size() << " " << incoming_count.size() << std::endl;
+ //std::cout << tails.size() << " " << incoming.size() << " " << counts_from_scanline.size() << " " << incoming_count.size() << "\n";
// for(std::size_t i = 0; i < counts.size(); ++i) {
// std::cout << counts_from_scanline[i].first.first.first.get(HORIZONTAL) << ",";
// std::cout << counts_from_scanline[i].first.first.first.get(VERTICAL) << " ";
// std::cout << counts_from_scanline[i].first.first.second.get(HORIZONTAL) << ",";
// std::cout << counts_from_scanline[i].first.first.second.get(VERTICAL) << ":";
// std::cout << counts_from_scanline[i].first.second << " ";
- // } std::cout << std::endl;
+ // } std::cout << "\n";
// print(incoming_count);
{
for(int i = 0; i < c_size_less_1; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] == -1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < c_size; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(counts[j]) {
if(counts[j] == 1) {
- //std::cout << "case1: " << i << " " << j << std::endl;
+ //std::cout << "case1: " << i << " " << j << "\n";
//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);
counts[i] = 0;
@@ -1437,15 +1437,15 @@
//std::cout << "checking case2\n";
{
for(int i = 0; i < i_size_less_1; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(incoming[i] == 1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < i_size; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(incoming[j]) {
- //std::cout << incoming[j] << std::endl;
+ //std::cout << incoming[j] << "\n";
if(incoming[j] == -1) {
- //std::cout << "case2: " << i << " " << j << std::endl;
+ //std::cout << "case2: " << i << " " << j << "\n";
//std::cout << "creating active tail pair\n";
std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
active_tail_arbitrary::createActiveTailsAsPair(point, true, 0, fractureHoles_ != 0);
@@ -1457,14 +1457,14 @@
returnCount.first = point;
returnCount.second = 1;
} else {
- //std::cout << "new element " << j-1 << " " << -1 << std::endl;
- //std::cout << point << " " << incoming_count[j].first << std::endl;
+ //std::cout << "new element " << j-1 << " " << -1 << "\n";
+ //std::cout << point << " " << incoming_count[j].first << "\n";
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;
+ //std::cout << "new element " << i-1 << " " << 1 << "\n";
+ //std::cout << point << " " << incoming_count[i].first << "\n";
elements.push_back(std::pair<vertex_half_edge,
active_tail_arbitrary*>(vertex_half_edge(point,
incoming_count[i].first, 1), tailPair.second));
@@ -1484,14 +1484,14 @@
{
//std::cout << "checking case 3\n";
for(int i = 0; i < c_size; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] != 0) {
if(counts[i] == 1) {
//std::cout << "fixed i\n";
for(int j = i_size_less_1; j >= 0; --j) {
if(incoming[j] != 0) {
if(incoming[j] == 1) {
- //std::cout << "case3: " << i << " " << j << std::endl;
+ //std::cout << "case3: " << i << " " << j << "\n";
//tails[i]->print();
//pass through solid on top
tails[i]->pushPoint(point);
@@ -1521,13 +1521,13 @@
//find pass through with solid on bottom
{
for(int i = c_size_less_1; i >= 0; --i) {
- //std::cout << "i = " << i << " with count " << counts[i] << std::endl;
+ //std::cout << "i = " << i << " with count " << counts[i] << "\n";
if(counts[i] != 0) {
if(counts[i] == -1) {
for(int j = 0; j < i_size; ++j) {
if(incoming[j] != 0) {
if(incoming[j] == -1) {
- //std::cout << "case4: " << i << " " << j << std::endl;
+ //std::cout << "case4: " << i << " " << j << "\n";
//pass through solid on bottom
tails[i]->pushPoint(point);
if(j == i_size_less_1 && incoming_count[j].first.get(HORIZONTAL) == point.get(HORIZONTAL)) {
@@ -1535,8 +1535,8 @@
returnCount.first = point;
returnCount.second = 1;
} else {
- //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
- //std::cout << point << " " << incoming_count[j].first << std::endl;
+ //std::cout << "new element " << j-1 << " " << incoming[j] << "\n";
+ //std::cout << point << " " << incoming_count[j].first << "\n";
elements.push_back(std::pair<vertex_half_edge,
active_tail_arbitrary*>(vertex_half_edge(point,
incoming_count[j].first, incoming[j]), tails[i]));
@@ -1561,11 +1561,11 @@
if(counts[i] != 0) {
for(int j = i+1; j < c_size; ++j) {
if(counts[j] != 0) {
- //std::cout << "case5: " << i << " " << j << std::endl;
+ //std::cout << "case5: " << i << " " << j << "\n";
//we are ending a hole and may potentially close a figure and have to handle the hole
returnValue = active_tail_arbitrary::joinChains(point, tails[i], tails[j], false, output);
if(returnValue) returnCount.first = point;
- //std::cout << returnValue << std::endl;
+ //std::cout << returnValue << "\n";
tails[i] = 0;
tails[j] = 0;
counts[i] = 0;
@@ -1583,7 +1583,7 @@
if(incoming[i] != 0) {
for(int j = i+1; j < i_size; ++j) {
if(incoming[j] != 0) {
- //std::cout << "case6: " << i << " " << j << std::endl;
+ //std::cout << "case6: " << i << " " << j << "\n";
//we are beginning a empty space
active_tail_arbitrary* holep = 0;
//if(c_size && counts[c_size_less_1] == 0 &&
@@ -1596,20 +1596,20 @@
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;
+ //std::cout << "vertical element " << point << "\n";
returnValue = tailPair.first;
returnCount.first = point;
//returnCount = incoming_count[j];
returnCount.second = -1;
} else {
- //std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
- //std::cout << point << " " << incoming_count[j].first << std::endl;
+ //std::cout << "new element " << j-1 << " " << incoming[j] << "\n";
+ //std::cout << point << " " << incoming_count[j].first << "\n";
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;
+ //std::cout << "new element " << i-1 << " " << incoming[i] << "\n";
+ //std::cout << point << " " << incoming_count[i].first << "\n";
elements.push_back(std::pair<vertex_half_edge,
active_tail_arbitrary*>(vertex_half_edge(point,
incoming_count[i].first, incoming[i]), tailPair.second));
@@ -1639,13 +1639,13 @@
//std::cout << count[i].first.get(HORIZONTAL) << ",";
//std::cout << count[i].first.get(VERTICAL) << ":";
//std::cout << count[i].second << " ";
- } //std::cout << std::endl;
+ } //std::cout << "\n";
}
static inline void print(const scanline_data& data) {
for(typename scanline_data::const_iterator itr = data.begin(); itr != data.end(); ++itr){
//std::cout << itr->first.pt << ", " << itr->first.other_pt << "; ";
- } //std::cout << std::endl;
+ } //std::cout << "\n";
}
template <class cT, class iT>
@@ -1664,16 +1664,16 @@
while(currentIter != inputEnd && currentIter->pt.get(HORIZONTAL) == x_) {
//std::cout << "loop\n";
Unit currentY = (*currentIter).pt.get(VERTICAL);
- //std::cout << "current Y " << currentY << std::endl;
- //std::cout << "scanline size " << scanData_.size() << std::endl;
+ //std::cout << "current Y " << currentY << "\n";
+ //std::cout << "scanline size " << scanData_.size() << "\n";
//print(scanData_);
iterator iter = lookUp_(currentY);
- //std::cout << "found element in scanline " << (iter != scanData_.end()) << std::endl;
+ //std::cout << "found element in scanline " << (iter != scanData_.end()) << "\n";
//int counts[4] = {0, 0, 0, 0};
incoming_count counts_from_scanline;
//std::cout << "finding elements in tree\n";
//if(iter != scanData_.end())
- // std::cout << "first iter y is " << iter->first.evalAtX(x_) << std::endl;
+ // std::cout << "first iter y is " << iter->first.evalAtX(x_) << "\n";
while(iter != scanData_.end() &&
((iter->first.pt.x() == x_ && iter->first.pt.y() == currentY) ||
(iter->first.other_pt.x() == x_ && iter->first.other_pt.y() == currentY))) {
@@ -1688,7 +1688,7 @@
++iter;
}
Point currentPoint(x_, currentY);
- //std::cout << "counts_from_scanline size " << counts_from_scanline.size() << std::endl;
+ //std::cout << "counts_from_scanline size " << counts_from_scanline.size() << "\n";
sort_incoming_count(counts_from_scanline, currentPoint);
vertex_arbitrary_count incoming;
@@ -1702,9 +1702,9 @@
currentIter->pt.get(HORIZONTAL) == x_);
//print(incoming);
sort_vertex_arbitrary_count(incoming, currentPoint);
- //std::cout << currentPoint.get(HORIZONTAL) << "," << currentPoint.get(VERTICAL) << std::endl;
+ //std::cout << currentPoint.get(HORIZONTAL) << "," << currentPoint.get(VERTICAL) << "\n";
//print(incoming);
- //std::cout << "incoming counts from input size " << incoming.size() << std::endl;
+ //std::cout << "incoming counts from input size " << incoming.size() << "\n";
//compact_vertex_arbitrary_count(currentPoint, incoming);
vertex_arbitrary_count tmp;
tmp.reserve(incoming.size());
@@ -1714,13 +1714,13 @@
}
}
incoming.swap(tmp);
- //std::cout << "incoming counts from input size " << incoming.size() << std::endl;
+ //std::cout << "incoming counts from input size " << incoming.size() << "\n";
//now counts_from_scanline has the data from the left and
//incoming has the data from the right at this point
//cancel out any end points
if(verticalTail) {
//std::cout << "adding vertical tail to counts from scanline\n";
- //std::cout << -verticalCount.second << std::endl;
+ //std::cout << -verticalCount.second << "\n";
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),
@@ -1737,7 +1737,7 @@
verticalTail = result.second;
//if(verticalTail) {
// std::cout << "have vertical tail\n";
- // std::cout << verticalCount.second << std::endl;
+ // std::cout << verticalCount.second << "\n";
//}
if(verticalTail && !(verticalCount.second)) {
//we got a hole out of the point we just processed
@@ -1794,7 +1794,7 @@
inline iterator lookUp_(Unit y){
//if just before then we need to look from 1 not -1
- //std::cout << "just before " << justBefore_ << std::endl;
+ //std::cout << "just before " << justBefore_ << "\n";
return scanData_.lower_bound(vertex_half_edge(Point(x_, y), Point(x_, y+1), 0));
}
@@ -1816,9 +1816,9 @@
data.push_back(vertex_half_edge(Point(10, 10), Point(0, 10), 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1840,9 +1840,9 @@
data.push_back(vertex_half_edge(Point(10, 20), Point(0, 10), 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1864,9 +1864,9 @@
data.push_back(vertex_half_edge(Point(2, 4), Point(2, -4), 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1910,14 +1910,14 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
pf2.scan(polys2, data.begin(), data.end());
- stdcout << "result size: " << polys2.size() << std::endl;
+ stdcout << "result size: " << polys2.size() << "\n";
for(std::size_t i = 0; i < polys2.size(); ++i) {
- stdcout << polys2[i] << std::endl;
+ stdcout << polys2[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1957,9 +1957,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -1997,9 +1997,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -2037,9 +2037,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -2065,9 +2065,9 @@
data.push_back(vertex_half_edge(Point(0, 2), Point(-1, 4), 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing polygon formation\n";
return true;
@@ -2281,12 +2281,12 @@
while(inputBegin != inputEnd) {
//std::cout << "2\n";
polygon_arbitrary_formation<Unit>::x_ = (*inputBegin).pt.get(HORIZONTAL);
- //std::cout << "SCAN FORMATION " << x_ << std::endl;
- //std::cout << "x_ = " << x_ << std::endl;
- //std::cout << "scan line size: " << scanData_.size() << std::endl;
+ //std::cout << "SCAN FORMATION " << x_ << "\n";
+ //std::cout << "x_ = " << x_ << "\n";
+ //std::cout << "scan line size: " << scanData_.size() << "\n";
inputBegin = processEvent_(output, inputBegin, inputEnd);
}
- //std::cout << "scan line size: " << scanData_.size() << std::endl;
+ //std::cout << "scan line size: " << scanData_.size() << "\n";
}
private:
@@ -2311,7 +2311,7 @@
std::pair<active_tail_arbitrary*, active_tail_arbitrary*>& verticalPair,
iterator previter, Point point, incoming_count& counts_from_scanline,
vertex_arbitrary_count& incoming_count) {
- //std::cout << "\nAT POINT: " << point << std::endl;
+ //std::cout << "\nAT POINT: " << point << "\n";
//join any closing solid corners
std::vector<int> counts;
std::vector<int> incoming;
@@ -2346,25 +2346,25 @@
have_vertical_tail_from_below = true;
}
//assert size = size_less_1 + 1
- //std::cout << tails.size() << " " << incoming.size() << " " << counts_from_scanline.size() << " " << incoming_count.size() << std::endl;
+ //std::cout << tails.size() << " " << incoming.size() << " " << counts_from_scanline.size() << " " << incoming_count.size() << "\n";
// for(std::size_t i = 0; i < counts.size(); ++i) {
// std::cout << counts_from_scanline[i].first.first.first.get(HORIZONTAL) << ",";
// std::cout << counts_from_scanline[i].first.first.first.get(VERTICAL) << " ";
// std::cout << counts_from_scanline[i].first.first.second.get(HORIZONTAL) << ",";
// std::cout << counts_from_scanline[i].first.first.second.get(VERTICAL) << ":";
// std::cout << counts_from_scanline[i].first.second << " ";
- // } std::cout << std::endl;
+ // } std::cout << "\n";
// print(incoming_count);
{
for(int i = 0; i < c_size_less_1; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] == -1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < c_size; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(counts[j]) {
if(counts[j] == 1) {
- //std::cout << "case1: " << i << " " << j << std::endl;
+ //std::cout << "case1: " << i << " " << j << "\n";
//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);
counts[i] = 0;
@@ -2382,15 +2382,15 @@
//std::cout << "checking case2\n";
{
for(int i = 0; i < i_size_less_1; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(incoming[i] == 1) {
//std::cout << "fixed i\n";
for(int j = i + 1; j < i_size; ++j) {
- //std::cout << j << std::endl;
+ //std::cout << j << "\n";
if(incoming[j]) {
- //std::cout << incoming[j] << std::endl;
+ //std::cout << incoming[j] << "\n";
if(incoming[j] == -1) {
- //std::cout << "case2: " << i << " " << j << std::endl;
+ //std::cout << "case2: " << i << " " << j << "\n";
//std::cout << "creating active tail pair\n";
std::pair<active_tail_arbitrary*, active_tail_arbitrary*> tailPair =
active_tail_arbitrary::createActiveTailsAsPair(point, true, 0, polygon_arbitrary_formation<Unit>::fractureHoles_ != 0);
@@ -2402,14 +2402,14 @@
returnCount.first = point;
returnCount.second = 1;
} else {
- //std::cout << "new element " << j-1 << " " << -1 << std::endl;
- //std::cout << point << " " << incoming_count[j].first << std::endl;
+ //std::cout << "new element " << j-1 << " " << -1 << "\n";
+ //std::cout << point << " " << incoming_count[j].first << "\n";
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;
+ //std::cout << "new element " << i-1 << " " << 1 << "\n";
+ //std::cout << point << " " << incoming_count[i].first << "\n";
elements.push_back(std::pair<vertex_half_edge,
active_tail_arbitrary*>(vertex_half_edge(point,
incoming_count[i].first, 1), tailPair.second));
@@ -2429,14 +2429,14 @@
{
//std::cout << "checking case 3\n";
for(int i = 0; i < c_size; ++i) {
- //std::cout << i << std::endl;
+ //std::cout << i << "\n";
if(counts[i] != 0) {
if(counts[i] == 1) {
//std::cout << "fixed i\n";
for(int j = i_size_less_1; j >= 0; --j) {
if(incoming[j] != 0) {
if(incoming[j] == 1) {
- //std::cout << "case3: " << i << " " << j << std::endl;
+ //std::cout << "case3: " << i << " " << j << "\n";
//tails[i]->print();
//pass through solid on top
tails[i]->pushPoint(point);
@@ -2470,13 +2470,13 @@
//find pass through with solid on bottom
{
for(int i = c_size_less_1; i >= 0; --i) {
- //std::cout << "i = " << i << " with count " << counts[i] << std::endl;
+ //std::cout << "i = " << i << " with count " << counts[i] << "\n";
if(counts[i] != 0) {
if(counts[i] == -1) {
for(int j = 0; j < i_size; ++j) {
if(incoming[j] != 0) {
if(incoming[j] == -1) {
- //std::cout << "case4: " << i << " " << j << std::endl;
+ //std::cout << "case4: " << i << " " << j << "\n";
//pass through solid on bottom
//if count from scanline is vertical
@@ -2536,7 +2536,7 @@
if(counts[i] != 0) {
for(int j = i+1; j < c_size; ++j) {
if(counts[j] != 0) {
- //std::cout << "case5: " << i << " " << j << std::endl;
+ //std::cout << "case5: " << i << " " << j << "\n";
//we are ending a hole and may potentially close a figure and have to handle the hole
tails[i]->pushPoint(point);
verticalPairOut.first = tails[i];
@@ -2569,7 +2569,7 @@
if(incoming[i] != 0) {
for(int j = i+1; j < i_size; ++j) {
if(incoming[j] != 0) {
- //std::cout << "case6: " << i << " " << j << std::endl;
+ //std::cout << "case6: " << i << " " << j << "\n";
//we are beginning a empty space
if(verticalPair.first == 0) {
getVerticalPair_(verticalPair, previter);
@@ -2619,13 +2619,13 @@
//std::cout << count[i].first.get(HORIZONTAL) << ",";
//std::cout << count[i].first.get(VERTICAL) << ":";
//std::cout << count[i].second << " ";
- } //std::cout << std::endl;
+ } //std::cout << "\n";
}
static inline void print(const scanline_data& data) {
for(typename scanline_data::const_iterator itr = data.begin(); itr != data.end(); ++itr){
//std::cout << itr->first.pt << ", " << itr->first.other_pt << "; ";
- } //std::cout << std::endl;
+ } //std::cout << "\n";
}
template <class cT, class iT>
@@ -2645,16 +2645,16 @@
while(currentIter != inputEnd && currentIter->pt.get(HORIZONTAL) == polygon_arbitrary_formation<Unit>::x_) {
//std::cout << "loop\n";
Unit currentY = (*currentIter).pt.get(VERTICAL);
- //std::cout << "current Y " << currentY << std::endl;
- //std::cout << "scanline size " << scanData_.size() << std::endl;
+ //std::cout << "current Y " << currentY << "\n";
+ //std::cout << "scanline size " << scanData_.size() << "\n";
//print(scanData_);
iterator iter = this->lookUp_(currentY);
- //std::cout << "found element in scanline " << (iter != scanData_.end()) << std::endl;
+ //std::cout << "found element in scanline " << (iter != scanData_.end()) << "\n";
//int counts[4] = {0, 0, 0, 0};
incoming_count counts_from_scanline;
//std::cout << "finding elements in tree\n";
//if(iter != scanData_.end())
- // std::cout << "first iter y is " << iter->first.evalAtX(x_) << std::endl;
+ // std::cout << "first iter y is " << iter->first.evalAtX(x_) << "\n";
iterator previter = iter;
if(previter != polygon_arbitrary_formation<Unit>::scanData_.end() &&
previter->first.evalAtX(polygon_arbitrary_formation<Unit>::x_) >= currentY &&
@@ -2674,7 +2674,7 @@
++iter;
}
Point currentPoint(polygon_arbitrary_formation<Unit>::x_, currentY);
- //std::cout << "counts_from_scanline size " << counts_from_scanline.size() << std::endl;
+ //std::cout << "counts_from_scanline size " << counts_from_scanline.size() << "\n";
this->sort_incoming_count(counts_from_scanline, currentPoint);
vertex_arbitrary_count incoming;
@@ -2688,9 +2688,9 @@
currentIter->pt.get(HORIZONTAL) == polygon_arbitrary_formation<Unit>::x_);
//print(incoming);
this->sort_vertex_arbitrary_count(incoming, currentPoint);
- //std::cout << currentPoint.get(HORIZONTAL) << "," << currentPoint.get(VERTICAL) << std::endl;
+ //std::cout << currentPoint.get(HORIZONTAL) << "," << currentPoint.get(VERTICAL) << "\n";
//print(incoming);
- //std::cout << "incoming counts from input size " << incoming.size() << std::endl;
+ //std::cout << "incoming counts from input size " << incoming.size() << "\n";
//compact_vertex_arbitrary_count(currentPoint, incoming);
vertex_arbitrary_count tmp;
tmp.reserve(incoming.size());
@@ -2700,13 +2700,13 @@
}
}
incoming.swap(tmp);
- //std::cout << "incoming counts from input size " << incoming.size() << std::endl;
+ //std::cout << "incoming counts from input size " << incoming.size() << "\n";
//now counts_from_scanline has the data from the left and
//incoming has the data from the right at this point
//cancel out any end points
if(verticalTail) {
//std::cout << "adding vertical tail to counts from scanline\n";
- //std::cout << -verticalCount.second << std::endl;
+ //std::cout << -verticalCount.second << "\n";
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),
@@ -2771,9 +2771,9 @@
data.push_back(vertex_half_edge(Point(10, 10), Point(0, 10), 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing trapezoid formation\n";
return true;
@@ -2794,9 +2794,9 @@
data.push_back(vertex_half_edge(Point(10, 20), Point(0, 10), 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing trapezoid formation\n";
return true;
@@ -2817,9 +2817,9 @@
data.push_back(vertex_half_edge(Point(2, 4), Point(2, -4), 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing trapezoid formation\n";
return true;
@@ -2862,14 +2862,14 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
//pf2.scan(polys2, data.begin(), data.end());
- //stdcout << "result size: " << polys2.size() << std::endl;
+ //stdcout << "result size: " << polys2.size() << "\n";
//for(std::size_t i = 0; i < polys2.size(); ++i) {
- // stdcout << polys2[i] << std::endl;
+ // stdcout << polys2[i] << "\n";
//}
stdcout << "done testing trapezoid formation\n";
return true;
@@ -2909,9 +2909,9 @@
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
- stdcout << "result size: " << polys.size() << std::endl;
+ stdcout << "result size: " << polys.size() << "\n";
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
stdcout << "done testing trapezoid formation\n";
return true;
Modified: trunk/boost/polygon/detail/scan_arbitrary.hpp
==============================================================================
--- trunk/boost/polygon/detail/scan_arbitrary.hpp (original)
+++ trunk/boost/polygon/detail/scan_arbitrary.hpp 2012-09-18 20:26:14 EDT (Tue, 18 Sep 2012)
@@ -269,11 +269,11 @@
// for(typename std::set<Point>::iterator itr = intersection_points[offenders.first].begin();
// itr != intersection_points[offenders.first].end(); ++itr) {
// std::cout << (*itr).x() << " " << (*itr).y() << " ";
-// } std::cout << std::endl;
+// } std::cout << "\n";
// for(typename std::set<Point>::iterator itr = intersection_points[offenders.second].begin();
// itr != intersection_points[offenders.second].end(); ++itr) {
// std::cout << (*itr).x() << " " << (*itr).y() << " ";
-// } std::cout << std::endl;
+// } std::cout << "\n";
// exit(1);
// }
}
@@ -307,7 +307,7 @@
if(scanline_base<Unit>::intersects(he1, he2)) {
offenders.first = id1;
offenders.second = id2;
- //std::cout << he1.first.x() << " " << he1.first.y() << " " << he1.second.x() << " " << he1.second.y() << " " << he2.first.x() << " " << he2.first.y() << " " << he2.second.x() << " " << he2.second.y() << std::endl;
+ //std::cout << he1.first.x() << " " << he1.first.y() << " " << he1.second.x() << " " << he1.second.y() << " " << he2.first.x() << " " << he2.first.y() << " " << he2.second.x() << " " << he2.second.y() << "\n";
return false;
}
}
@@ -693,7 +693,7 @@
}
edges.clear();
validate_scan(edges, input.begin(), input.end());
- stdcout << edges.size() << std::endl;
+ stdcout << edges.size() << "\n";
if(!verify_scan(result, edges.begin(), edges.end())) {
stdcout << "s fail5 3 " << result.first << " " << result.second << "\n";
return false;
@@ -876,7 +876,7 @@
for(std::size_t i = 0; i < vec.size(); ++ i) {
// print(vec[i]);
}
- //std::cout << std::endl;
+ //std::cout << "\n";
}
template <typename stream_type>
@@ -1012,7 +1012,7 @@
void write_out(result_type& result, result_functor rf, const half_edge& he,
const property_map& pm_left, const property_map& pm_right) {
//std::cout << "write out ";
- //std::cout << he.first << ", " << he.second << std::endl;
+ //std::cout << he.first << ", " << he.second << "\n";
property_set ps_left, ps_right;
set_unique_property(ps_left, pm_left);
set_unique_property(ps_right, pm_right);
@@ -1230,7 +1230,7 @@
// for(std::size_t i = 0; i < mp.size(); ++i) {
// std::cout << mp[i].first << ":" << mp[i].second << " ";
// } std::cout << ") ";
- // } std::cout << std::endl;
+ // } std::cout << "\n";
//}
static inline void merge_property_maps(property_map& mp, const property_map& mp2) {
@@ -1338,7 +1338,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
input.clear();
result.clear();
input.push_back(std::make_pair(half_edge(Point(-1, -1), Point(10, 0)), std::make_pair(0, 1)));
@@ -1350,7 +1350,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
input.clear();
result.clear();
input.push_back(std::make_pair(half_edge(Point(0, 0), Point(0, 10)), std::make_pair(0, 1)));
@@ -1366,7 +1366,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
input.clear();
result.clear();
input.push_back(std::make_pair(half_edge(Point(0, 0), Point(0, 10)), std::make_pair(0, 1)));
@@ -1382,7 +1382,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
input.clear();
result.clear();
input.push_back(std::make_pair(half_edge(Point(0, 0), Point(10, 0)), std::make_pair(0, 1)));
@@ -1398,7 +1398,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
input.clear();
result.clear();
input.push_back(std::make_pair(half_edge(Point(0, 0), Point(10, 0)), std::make_pair(0, 1)));
@@ -1414,7 +1414,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
input.clear();
result.clear();
input.push_back(std::make_pair(half_edge(Point(0, 0), Point(10, 0)), std::make_pair(0, 1)));
@@ -1438,7 +1438,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
input.clear();
result.clear();
input.push_back(std::make_pair(half_edge(Point(-1, -1), Point(10, 0)), std::make_pair(0, 1))); //a
@@ -1458,7 +1458,7 @@
stdcout << "scanned\n";
for(std::size_t i = 0; i < result.size(); ++i) {
stdcout << result[i].first.first << ", " << result[i].first.second << "; ";
- } stdcout << std::endl;
+ } stdcout << "\n";
return true;
}
@@ -1568,7 +1568,7 @@
}
if(!line_intersection<Unit>::verify_scan(offenders, lines.begin(), lines.end())) {
//stdcout << "Intersection failed!\n";
- //stdcout << offenders.first << " " << offenders.second << std::endl;
+ //stdcout << offenders.first << " " << offenders.second << "\n";
return false;
}
std::vector<Point> pts;
@@ -1790,7 +1790,7 @@
yh(rect, 11);
si.insert(rect, 333);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
Point pts[4] = {Point(0, 0), Point(10,-3), Point(13, 8), Point(0, 0) };
polygon_data<Unit> poly;
@@ -1798,25 +1798,25 @@
poly.set(pts, pts+3);
si2.insert(poly, 444);
si2.sort_property_merge_data();
- print(stdcout, si2.pmd) << std::endl;
+ print(stdcout, si2.pmd) << "\n";
property_merge si3;
poly.set(pts, pts+4);
si3.insert(poly, 444);
si3.sort_property_merge_data();
- stdcout << (si2.pmd == si3.pmd) << std::endl;
+ stdcout << (si2.pmd == si3.pmd) << "\n";
std::reverse(pts, pts+4);
property_merge si4;
poly.set(pts, pts+4);
si4.insert(poly, 444);
si4.sort_property_merge_data();
- print(stdcout, si4.pmd) << std::endl;
- stdcout << (si2.pmd == si4.pmd) << std::endl;
+ print(stdcout, si4.pmd) << "\n";
+ stdcout << (si2.pmd == si4.pmd) << "\n";
std::reverse(pts, pts+3);
property_merge si5;
poly.set(pts, pts+4);
si5.insert(poly, 444);
si5.sort_property_merge_data();
- stdcout << (si2.pmd == si5.pmd) << std::endl;
+ stdcout << (si2.pmd == si5.pmd) << "\n";
return true;
}
@@ -1833,7 +1833,7 @@
si.insert(rect, 333);
std::map<std::set<property_type>, polygon_set_data<Unit> > result;
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
polygon_set_data<Unit> psd = (*(result.begin())).second;
std::vector<polygon_data<Unit> > polys;
psd.get(polys);
@@ -1841,7 +1841,7 @@
stdcout << "fail merge 1\n";
return false;
}
- stdcout << (polys[0]) << std::endl;
+ stdcout << (polys[0]) << "\n";
si.clear();
std::vector<Point> pts;
pts.push_back(Point(0, 0));
@@ -1858,9 +1858,9 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() != 1) {
@@ -1884,9 +1884,9 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() != 1) {
@@ -1910,16 +1910,16 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() != 1) {
stdcout << "fail merge 4\n";
return false;
}
- stdcout << (polys[0]) << std::endl;
+ stdcout << (polys[0]) << "\n";
stdcout << "Polygon { -4 0, -2 -3, 3 -4 } \n";
stdcout << "Polygon { -1 1, 1 -2, -4 -3 } \n";
si.clear();
@@ -1937,9 +1937,9 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() != 1) {
@@ -1963,17 +1963,17 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
if(!result.empty()) {
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() != 1) {
stdcout << "fail merge 6\n";
return false;
}
- stdcout << (polys[0]) << std::endl;
+ stdcout << (polys[0]) << "\n";
}
stdcout << "Polygon { 0 2, 3 -1, 4 1 } \n";
stdcout << "Polygon { -4 3, 3 3, 4 2 } \n";
@@ -1992,17 +1992,17 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
if(!result.empty()) {
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() == 0) {
stdcout << "fail merge 7\n";
return false;
}
- stdcout << (polys[0]) << std::endl;
+ stdcout << (polys[0]) << "\n";
}
stdcout << "Polygon { 1 -2, -1 4, 3 -2 } \n";
stdcout << "Polygon { 0 -3, 3 1, -3 -4 } \n";
@@ -2021,17 +2021,17 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
if(!result.empty()) {
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() == 0) {
stdcout << "fail merge 8\n";
return false;
}
- stdcout << (polys[0]) << std::endl;
+ stdcout << (polys[0]) << "\n";
}
stdcout << "Polygon { 2 2, 3 0, -3 4 } \n";
stdcout << "Polygon { -2 -2, 0 0, -1 -1 } \n";
@@ -2050,17 +2050,17 @@
si.insert(poly, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
if(!result.empty()) {
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() == 0) {
stdcout << "fail merge 9\n";
return false;
}
- stdcout << (polys[0]) << std::endl;
+ stdcout << (polys[0]) << "\n";
}
si.clear();
pts.clear();
@@ -2158,10 +2158,10 @@
result.clear();
si.merge(result);
si.verify1();
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
if(!result.empty()) {
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
std::vector<Point> outpts;
for(typename polygon_set_data<Unit>::iterator_type itr = psd.begin();
itr != psd.end(); ++itr) {
@@ -2172,8 +2172,8 @@
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";
- stdcout << i << std::endl;
- stdcout << outpts[i] << " " << outpts[i+1] << std::endl;
+ stdcout << i << "\n";
+ stdcout << outpts[i] << " " << outpts[i+1] << "\n";
return 0;
}
}
@@ -2183,10 +2183,10 @@
stdcout << "fail merge 10\n";
return false;
}
- stdcout << (polys[0]) << std::endl;
+ stdcout << (polys[0]) << "\n";
}
for(unsigned int i = 0; i < 10; ++i) {
- stdcout << "random case # " << i << std::endl;
+ stdcout << "random case # " << i << "\n";
si.clear();
pts.clear();
pts.push_back(Point(rand()%9-4, rand()%9-4));
@@ -2194,7 +2194,7 @@
pts.push_back(Point(rand()%9-4, rand()%9-4));
polygon_data<Unit> poly1;
poly1.set(pts.begin(), pts.end());
- stdcout << poly1 << std::endl;
+ stdcout << poly1 << "\n";
si.insert(poly1, 444);
pts.clear();
pts.push_back(Point(rand()%9-4, rand()%9-4));
@@ -2202,14 +2202,14 @@
pts.push_back(Point(rand()%9-4, rand()%9-4));
polygon_data<Unit> poly2;
poly2.set(pts.begin(), pts.end());
- stdcout << poly2 << std::endl;
+ stdcout << poly2 << "\n";
si.insert(poly2, 444);
result.clear();
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
if(!result.empty()) {
psd = (*(result.begin())).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
polys.clear();
psd.get(polys);
if(polys.size() == 0) {
@@ -2228,13 +2228,13 @@
std::vector<polygon_data<Unit> > polys2;
psd.get(polys2);
if(!polys1.empty() || !polys2.empty()) {
- stdcout << "fail random merge " << i << std::endl;
+ stdcout << "fail random merge " << i << "\n";
return false;
}
}
}
if(!polys.empty())
- stdcout << polys.size() << ": " << (polys[0]) << std::endl;
+ stdcout << polys.size() << ": " << (polys[0]) << "\n";
}
return true;
}
@@ -2249,13 +2249,13 @@
std::vector<polygon_data<Unit> > polys90;
si.insert(rect1, 111);
si90.insert(rect1, 111);
- stdcout << rect1 << std::endl;
+ stdcout << rect1 << "\n";
si.insert(rect2, 222);
si90.insert(rect2, 222);
- stdcout << rect2 << std::endl;
+ stdcout << rect2 << "\n";
si.insert(rect3, 333);
si90.insert(rect3, 333);
- stdcout << rect3 << std::endl;
+ stdcout << rect3 << "\n";
si.merge(result);
si90.merge(result90);
if(result.size() != result90.size()) {
@@ -2277,20 +2277,20 @@
psd90.get(polys90);
if(polys.size() != polys90.size()) {
stdcout << "merge failed with polygon count mismatch\n";
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
for(std::size_t j = 0; j < polys.size(); ++j) {
- stdcout << polys[j] << std::endl;
+ stdcout << polys[j] << "\n";
}
stdcout << "reference\n";
for(std::size_t j = 0; j < polys90.size(); ++j) {
- stdcout << polys90[j] << std::endl;
+ stdcout << polys90[j] << "\n";
}
return 0;
}
bool failed = false;
for(std::size_t j = 0; j < polys.size(); ++j) {
- stdcout << polys[j] << std::endl;
- stdcout << polys90[j] << std::endl;
+ stdcout << polys[j] << "\n";
+ stdcout << polys90[j] << "\n";
#ifdef BOOST_POLYGON_ICC
#pragma warning (disable:1572)
#endif
@@ -2324,7 +2324,7 @@
property_merge_90<property_type, Unit> si90;
std::map<std::set<property_type>, polygon_90_set_data<Unit> > result90;
std::vector<polygon_data<Unit> > polys90;
- stdcout << "random case # " << i << std::endl;
+ stdcout << "random case # " << i << "\n";
set_points(rect1, (Point(rand()%9-4, rand()%9-4)), (Point(rand()%9-4, rand()%9-4)));
set_points(rect2, (Point(rand()%9-4, rand()%9-4)), (Point(rand()%9-4, rand()%9-4)));
set_points(rect3, (Point(rand()%9-4, rand()%9-4)), (Point(rand()%9-4, rand()%9-4)));
@@ -2356,7 +2356,7 @@
si.insert(rect, 555);
std::map<std::set<property_type>, polygon_set_data<Unit> > result;
si.merge(result);
- print(stdcout, si.pmd) << std::endl;
+ print(stdcout, si.pmd) << "\n";
for(typename std::map<std::set<property_type>, polygon_set_data<Unit> >::iterator itr = result.begin();
itr != result.end(); ++itr) {
stdcout << "( ";
@@ -2365,18 +2365,18 @@
stdcout << (*set_itr) << " ";
} stdcout << ") \n";
polygon_set_data<Unit> psd = (*itr).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
std::vector<polygon_data<Unit> > polys;
psd.get(polys);
for(std::size_t i = 0; i < polys.size(); ++i) {
- stdcout << polys[i] << std::endl;
+ stdcout << polys[i] << "\n";
}
}
std::vector<Point> pts;
std::vector<polygon_data<Unit> > polys;
for(unsigned int i = 0; i < 10; ++i) {
property_merge si2;
- stdcout << "random case # " << i << std::endl;
+ stdcout << "random case # " << i << "\n";
si.clear();
pts.clear();
pts.push_back(Point(rand()%9-4, rand()%9-4));
@@ -2384,7 +2384,7 @@
pts.push_back(Point(rand()%9-4, rand()%9-4));
polygon_data<Unit> poly1;
poly1.set(pts.begin(), pts.end());
- stdcout << poly1 << std::endl;
+ stdcout << poly1 << "\n";
si.insert(poly1, 444);
si2.insert(poly1, 333);
pts.clear();
@@ -2393,7 +2393,7 @@
pts.push_back(Point(rand()%9-4, rand()%9-4));
polygon_data<Unit> poly2;
poly2.set(pts.begin(), pts.end());
- stdcout << poly2 << std::endl;
+ stdcout << poly2 << "\n";
si.insert(poly2, 444);
si2.insert(poly2, 444);
pts.clear();
@@ -2402,7 +2402,7 @@
pts.push_back(Point(rand()%9-4, rand()%9-4));
polygon_data<Unit> poly3;
poly3.set(pts.begin(), pts.end());
- stdcout << poly3 << std::endl;
+ stdcout << poly3 << "\n";
si.insert(poly3, 444);
si2.insert(poly3, 555);
result.clear();
@@ -2418,15 +2418,15 @@
stdcout << (*set_itr) << " ";
} stdcout << ") \n";
polygon_set_data<Unit> psd = (*itr).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
std::vector<polygon_data<Unit> > polys2;
psd.get(polys2);
for(std::size_t ii = 0; ii < polys2.size(); ++ii) {
- stdcout << polys2[ii] << std::endl;
+ stdcout << polys2[ii] << "\n";
}
}
stdcout << "intersected pmd\n";
- print(stdcout, si2.pmd) << std::endl;
+ print(stdcout, si2.pmd) << "\n";
stdcout << "intersected result\n";
for(typename std::map<std::set<property_type>, polygon_set_data<Unit> >::iterator itr = result2.begin();
itr != result2.end(); ++itr) {
@@ -2436,11 +2436,11 @@
stdcout << (*set_itr) << " ";
} stdcout << ") \n";
polygon_set_data<Unit> psd = (*itr).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
std::vector<polygon_data<Unit> > polys2;
psd.get(polys2);
for(std::size_t ii = 0; ii < polys2.size(); ++ii) {
- stdcout << polys2[ii] << std::endl;
+ stdcout << polys2[ii] << "\n";
}
}
si.clear();
@@ -2463,11 +2463,11 @@
stdcout << (*set_itr) << " ";
} stdcout << ") \n";
polygon_set_data<Unit> psd = (*itr).second;
- stdcout << psd << std::endl;
+ stdcout << psd << "\n";
std::vector<polygon_data<Unit> > polys2;
psd.get(polys2);
for(std::size_t ii = 0; ii < polys2.size(); ++ii) {
- stdcout << polys2[ii] << std::endl;
+ stdcout << polys2[ii] << "\n";
}
}
std::vector<polygon_data<Unit> > polys2;
@@ -2475,7 +2475,7 @@
(*(result.begin())).second.get(polys);
(*(result2.begin())).second.get(polys2);
if(!(polys == polys2)) {
- stdcout << "failed intersection check # " << i << std::endl;
+ stdcout << "failed intersection check # " << i << "\n";
return false;
}
}
@@ -2660,7 +2660,7 @@
abo.execute(psd3, psd.begin(), psd.end(), psd2.begin(), psd2.end(), arbitrary_boolean_op<Unit>::BOOLEAN_OR);
psd3.get(pv);
for(std::size_t i = 0; i < pv.size(); ++i) {
- stdcout << pv[i] << std::endl;
+ stdcout << pv[i] << "\n";
}
pv.clear();
abo.clear();
@@ -2668,7 +2668,7 @@
abo.execute(psd3, psd.begin(), psd.end(), psd2.begin(), psd2.end(), arbitrary_boolean_op<Unit>::BOOLEAN_AND);
psd3.get(pv);
for(std::size_t i = 0; i < pv.size(); ++i) {
- stdcout << pv[i] << std::endl;
+ stdcout << pv[i] << "\n";
}
pv.clear();
abo.clear();
@@ -2676,7 +2676,7 @@
abo.execute(psd3, psd.begin(), psd.end(), psd2.begin(), psd2.end(), arbitrary_boolean_op<Unit>::BOOLEAN_XOR);
psd3.get(pv);
for(std::size_t i = 0; i < pv.size(); ++i) {
- stdcout << pv[i] << std::endl;
+ stdcout << pv[i] << "\n";
}
pv.clear();
abo.clear();
@@ -2684,7 +2684,7 @@
abo.execute(psd3, psd.begin(), psd.end(), psd2.begin(), psd2.end(), arbitrary_boolean_op<Unit>::BOOLEAN_NOT);
psd3.get(pv);
for(std::size_t i = 0; i < pv.size(); ++i) {
- stdcout << pv[i] << std::endl;
+ stdcout << pv[i] << "\n";
}
return true;
}
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