Subject: CGAL users discussion list
List archive
- From: Sylvain Pion <>
- To:
- Subject: Re: [cgal-discuss] Edge with info
- Date: Tue, 03 Nov 2009 12:35:15 +0100
- Organization: INRIA
Daniel Duque wrote:
I am thinking about efficiently adding info to the edges of a triangulation. E.g., imagine you frequently need their lengths, and do not want to compute them each time you need them, just once when the triangulation is built.
Since edges are not explicitly represented, I had the idea of using
Cell_circulator tds.incident_cells ( Edge e) Starts at an arbitrary cell incident to e
to get one cell incident to an edge. The cell could be provided with info relevant to the edge. E.g., a simple way would be to keep a 4x4 matrix, with element i,j giving the info for the vertex with indices i,j.
My question is if this approach is (basically) sensible.
I think it's OK.
If you are happy with a log(n) access time, then of course an external
map<Edge, Info> or map<pair<Vertex_handle, Vertex_handle>, Info>
could work as well. Same for the unordered_map (hash) variants.
Also, I am assuming the "arbitrary" cell will always be the same one for a given edge. I would be surprised if this was not the case.
BTW, there was a previous email from "400555 < >" about this last July, but it did not get any answers.
Yep, it's clear that built-in support for this in CGAL would help a lot.
--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
- [cgal-discuss] Edge with info, Daniel Duque, 11/03/2009
- Re: [cgal-discuss] Edge with info, Manuel Caroli, 11/03/2009
- Re: [cgal-discuss] Edge with info, Daniel Duque, 11/03/2009
- Re: [cgal-discuss] Edge with info, Vitaliy, 11/03/2009
- Re: [cgal-discuss] Edge with info, Manuel Caroli, 11/03/2009
- Re: [cgal-discuss] Edge with info, Daniel Duque, 11/03/2009
- Re: [cgal-discuss] Edge with info, Daniel Duque, 11/03/2009
- Re: [cgal-discuss] Edge with info, Vitaliy, 11/03/2009
- Re: [cgal-discuss] Edge with info, Sylvain Pion, 11/03/2009
- Re: [cgal-discuss] Edge with info, Shuchu Han, 11/03/2009
- Re: [cgal-discuss] Edge with info, Manuel Caroli, 11/03/2009
Archive powered by MHonArc 2.6.16.