Subject: CGAL users discussion list
List archive
- From: Noura <>
- To:
- Subject: [cgal-discuss] Problem with std::map for Cell_handle and Finite_cells_iterator
- Date: Fri, 23 Sep 2011 08:09:46 -0700 (PDT)
Hi,
I am using Triangulation_3 and I have problems using a std::map with
Finite_cells_iterator and Cell_handle. Until now I have been using
seamlessly the iterator as a Cell_handle but for the map it doesn't work.
To fill the map I go over the cells with the iterator and compute the
information:
std::map<Cell_handle, Information> information_map;
for(Finite_cells_iterator cit = delaunay.finite_cells_begin(); cit !=
delaunay.finite_cells_end() ; ++cit){
...
information_map[cit] = cell_info;
...
}
Then I use the locate function to get the cells and I want to get the
information stored in the map:
Cell_handle ch = delaunay.locate(point, locate_type, li, lj, start);
if(locate_type != OUTSIDE_CONVEX_HULL && locate_type !=
OUTSIDE_AFFINE_HULL){
...
Information i = information_map[ch];
...
}
But the information the I get is the default of the map, I have done several
tests with the std::find() function and the Cell_handle is not found. I
wanted to avoid using triangulation_with_info because I have big meshes and
I want to limit the memory footprint.
It works for a map built with Finite_vertices_iterator and the look up done
with Vertex_handle. How can I make it work for the cells?
Thank you for your attention,
Noura
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Problem-with-std-map-for-Cell-handle-and-Finite-cells-iterator-tp3837136p3837136.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Problem with std::map for Cell_handle and Finite_cells_iterator, Noura, 09/23/2011
- Re: [cgal-discuss] Problem with std::map for Cell_handle and Finite_cells_iterator, Sebastien Loriot (GeometryFactory), 09/26/2011
Archive powered by MHonArc 2.6.16.