diatomic / tess2

Parallel Delaunay and Voronoi Tessellation and Density Estimation
Other
27 stars 7 forks source link

Simplify implementation of neighbor_edges() in tet.cpp #5

Closed mrzv closed 9 years ago

mrzv commented 9 years ago

Issue by Tom Peterka Saturday Nov 22, 2014 at 22:48 GMT


Replace:

#!c++

  visited_tets.insert(t);

  for (int i = 0; i < 4; ++i) {
    int u = tets[t].verts[i];
    if (u != v) {
      nbrs.push_back(std::make_pair(u,t));
      visited_verts.insert(u);

      int next = tets[t].tets[i];
      if (next == -1)
    finite = false;
      else
    q.push(next);
    }
  }

With:

#!c++

  q.push(t);

It's not a bug, just a simple implementation, and this is the way that neighbor_tets() and complete() are already structured. A student pointed this out to me when he was using the code. It needs to be done in both tess1 and tess2. I would do it in the development forks first, and then it can get pushed to main line later after it is tested.

I can take care of it. Any reason why I should not do this?

mrzv commented 9 years ago

Comment by Tom Peterka Monday Nov 24, 2014 at 15:39 GMT


Done.