Skip to content

Instantly share code, notes, and snippets.

@stephanmg
Created June 11, 2018 14:25
Show Gist options
  • Save stephanmg/9874dbe5183e0783e1316cd58b3b4ff0 to your computer and use it in GitHub Desktop.
Save stephanmg/9874dbe5183e0783e1316cd58b3b4ff0 to your computer and use it in GitHub Desktop.
/// Collapse now
std::vector<Grid::traits<Edge>::secure_container>::iterator it = edgeContainers.begin();
size_t numEdges = 4;
for (; it != edgeContainers.end(); ++it) {
UG_LOGN("edges contained in container: " << it->size());
if (it->size() > numEdges) {
for (size_t i = 0; i < it->size()-numEdges; i++) {
UG_LOGN("Collapse " << i);
CollapseEdge(g, (*it)[0], (*it)[0]->vertex(0));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment