Merge y into x
| 63 | |
| 64 | // Merge y into x |
| 65 | void DisjointSet::unite(PointId x, PointId y) |
| 66 | { |
| 67 | x = this->find(x); |
| 68 | y = this->find(y); |
| 69 | // Check if elements are part of the same tree |
| 70 | if (x == y) |
| 71 | return; |
| 72 | m_parent[y] = x; |
| 73 | } |
| 74 | |
| 75 | } // namespace pdal |