mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 20:24:07 +00:00
remove id from stored edges
This commit is contained in:
parent
e579a9830c
commit
ce082b3389
@ -525,12 +525,12 @@ void BucketsSinglePolygonIndex::indexBuild(const Polygon & polygon)
|
||||
{
|
||||
if (l & 1)
|
||||
{
|
||||
this->edges_index_tree[l++].push_back(all_edges[i]);
|
||||
this->edges_index_tree[l++].eplace_back(all_edges[i]);
|
||||
++total_index_edges;
|
||||
}
|
||||
if (r & 1)
|
||||
{
|
||||
this->edges_index_tree[--r].push_back(all_edges[i]);
|
||||
this->edges_index_tree[--r].emplace_back(all_edges[i]);
|
||||
++total_index_edges;
|
||||
}
|
||||
}
|
||||
|
@ -199,6 +199,13 @@ private:
|
||||
static bool compare2(const Edge & a, const Edge & b);
|
||||
};
|
||||
|
||||
struct EdgeNoId
|
||||
{
|
||||
explicit EdgeNoId(const Edge & e): l(e.l), r(e.r) {}
|
||||
Point l;
|
||||
Point r;
|
||||
};
|
||||
|
||||
/** Sorted distinct coordinates of all vertexes. */
|
||||
std::vector<Float64> sorted_x;
|
||||
std::vector<Edge> all_edges;
|
||||
@ -218,7 +225,7 @@ private:
|
||||
* Every polygon's edge covers a segment of x coordinates, and can be added to this tree by
|
||||
* placing it into O(log n) vertexes of this tree.
|
||||
*/
|
||||
std::vector<std::vector<Edge>> edges_index_tree;
|
||||
std::vector<std::vector<EdgeNoId>> edges_index_tree;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user