| 121 | } |
| 122 | |
| 123 | UnionFind<MR::UndirectedEdgeId> getUnionFindStructure( const PolylineTopology& topology ) |
| 124 | { |
| 125 | MR_TIMER; |
| 126 | |
| 127 | auto size = topology.undirectedEdgeSize(); |
| 128 | |
| 129 | UnionFind<UndirectedEdgeId> unionFindStructure( size ); |
| 130 | for ( auto u0 : undirectedEdges( topology ) ) |
| 131 | { |
| 132 | auto u1 = topology.next( u0 ); |
| 133 | auto u2 = topology.next( EdgeId( u0 ).sym() ); |
| 134 | if ( u1.valid() && u1.undirected() != u0 ) |
| 135 | unionFindStructure.unite( u0, u1.undirected() ); |
| 136 | if ( u2.valid() && u2.undirected() != u0 ) |
| 137 | unionFindStructure.unite( u0, u2.undirected() ); |
| 138 | } |
| 139 | return unionFindStructure; |
| 140 | } |
| 141 | |
| 142 | template <typename V> |
| 143 | std::vector<UndirectedEdgeBitSet> getNLargeByLengthComponents( const Polyline<V>& polyline, const LargeByLengthComponentsSettings& settings ) |
no test coverage detected