mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-27 20:20:49 +00:00
fix
This commit is contained in:
parent
147f3dae13
commit
c83c4c401e
@ -577,14 +577,9 @@ bool BucketsSinglePolygonIndex::Edge::compare1(const Edge & a, const Edge & b)
|
|||||||
{
|
{
|
||||||
return a.r.x() < b.r.x();
|
return a.r.x() < b.r.x();
|
||||||
}
|
}
|
||||||
if (a.r.y() != b.r.y())
|
|
||||||
{
|
|
||||||
return a.r.y() < b.r.y();
|
return a.r.y() < b.r.y();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BucketsSinglePolygonIndex::Edge::compare2(const Edge & a, const Edge & b)
|
bool BucketsSinglePolygonIndex::Edge::compare2(const Edge & a, const Edge & b)
|
||||||
{
|
{
|
||||||
/** comparing right point */
|
/** comparing right point */
|
||||||
@ -602,14 +597,9 @@ bool BucketsSinglePolygonIndex::Edge::compare2(const Edge & a, const Edge & b)
|
|||||||
{
|
{
|
||||||
return a.l.x() < b.l.x();
|
return a.l.x() < b.l.x();
|
||||||
}
|
}
|
||||||
if (a.l.y() != b.l.y())
|
|
||||||
{
|
|
||||||
return a.l.y() < b.l.y();
|
return a.l.y() < b.l.y();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BucketsSinglePolygonIndex::find(const Point & point) const
|
bool BucketsSinglePolygonIndex::find(const Point & point) const
|
||||||
{
|
{
|
||||||
/** TODO: maybe we should check for vertical line? */
|
/** TODO: maybe we should check for vertical line? */
|
||||||
@ -626,10 +616,6 @@ bool BucketsSinglePolygonIndex::find(const Point & point) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** point is considired inside when ray down from point crosses odd number of edges */
|
|
||||||
std::vector<size_t> intersections;
|
|
||||||
intersections.reserve(10);
|
|
||||||
|
|
||||||
size_t pos = std::upper_bound(this->sorted_x.begin() + 1, this->sorted_x.end() - 1, x) - this->sorted_x.begin() - 1;
|
size_t pos = std::upper_bound(this->sorted_x.begin() + 1, this->sorted_x.end() - 1, x) - this->sorted_x.begin() - 1;
|
||||||
|
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user