| 496 | } |
| 497 | |
| 498 | void merge(const std::vector<int>& edge_indices) { |
| 499 | if (edge_indices.empty()) { |
| 500 | return; |
| 501 | } |
| 502 | |
| 503 | std::list<Halfedge_handle> to_remove; |
| 504 | auto eit = edge_indices.begin(); |
| 505 | size_t n = 0; |
| 506 | for (auto it = arr.edges_begin(); it != arr.edges_end(); ++it, ++n) { |
| 507 | if (n == *eit) { |
| 508 | ++eit; |
| 509 | to_remove.push_back(it); |
| 510 | if (eit == edge_indices.end()) { |
| 511 | break; |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | for (auto& h : to_remove) { |
| 517 | /* |
| 518 | auto v0 = h->source()->point(); |
| 519 | std::cout << CGAL::to_double(v0.cartesian(0)) << " " << CGAL::to_double(v0.cartesian(1)) << std::endl; |
| 520 | auto v1 = h->target()->point(); |
| 521 | std::cout << CGAL::to_double(v1.cartesian(0)) << " " << CGAL::to_double(v1.cartesian(1)) << std::endl << std::endl; |
| 522 | */ |
| 523 | arr.remove_edge(h); |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | size_t num_edges() { |
| 528 | return arr.number_of_edges(); |
nothing calls this directly
no test coverage detected