Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Type of dD Triangulation Finite iterators?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Type of dD Triangulation Finite iterators?


Chronological Thread 
  • From: Marc Alexa <>
  • To:
  • Subject: Re: [cgal-discuss] Type of dD Triangulation Finite iterators?
  • Date: Thu, 28 May 2020 09:25:39 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:Is/T2RGg2BIhiLrYUgEDBZ1GYnF86YWxBRYc798ds5kLTJ76p8+4bnLW6fgltlLVR4KTs6sC17OL9fm6BCdRvt6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vLBi6txjdutcWjIdtLqs8yAbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDM/7WrZiNF/jLhDrRyhuxNwzJPabo+bNPRgfKzTftQUSHFbUcpNUixMGIO8Y5cNAucHIO1Wr5P9p1wLrRamAgejHvnvxSNVjXLq2a01zesgHhvb1wEnGtIBqm7Uo8nvOKgIVeC60qbJwi/YYvNZ3Dfy8onIchQ7rf6QWrJwdNPcxE8yHAzKklues5bqPy+J1usTqWib6fJtWOCshmI5qwx/rTmiy8Mvh4TJhY8YylLJ+ytkzIg6KtO0VlJ3b96qHpZRuC+UOJZ6T8A+TmxqvCs0xKMLtJqlcSUM1Z8pyRnfa/mdfIiJ5BLuTOeRITFihHJkYr2znRiy8VKmx+bhVce0yE5HojRZntTIrHwA1Bze5tKaRvdj/UqtwzmC2g/L5uxHLk04j7fXJpw9zrIqiJYfr0XOEjXrlEnrkKObcFgv9PKy5OT9eLrmo4eRN49qhQH6NaQjgsm/Dv45MggKRmSa9+G82KD68U33T7hHgec6kqbesJDdKsQborC2DxVJ3YYk7hazFzam0NIGknkbNF9JZg6LgozzN1zNIP30F+qzj0qvnTtxyP3LMaXtApDXIXjClLfhc6x960lZyAcryNBQ/YhUBa0bLP3pXk/+qtPZAQUiPgy7xuboEtR91ocEVW2TBa+ZNbvesUWU6eI3P+mMeIgVtS7hJPgq/fHuiWY1lkIcfamywZQXdWu4Hu99LkWCYXvsh88BHn0Qsgo/SuzqklyCXiRJa3a8RaJvrgw9E5+sWIffWpi20vvGxza+BpQQZ2ZcC1nKH22vbJSBQ/5LaSScJYhqnTUAELSgUIQ8zgr9iQnh1rBHMu/Qry0EqYr4hp8y/PzWjRh09DpuDs3b3XvKVHBxhmpPRjk42+d0rkV5j1uCyqNlmOcLKNpI+vl1XxcmYJ7A0/RhWZe1QRPEZt7PSVC8Q9zgDyt2VcM029ZJYkBzHJKpgRnHmiarGLQIjKfYOJth+a3V2z39Jt121m3d/KgnlVgvBMVVZkO8gasq0gHJDMbgl0iJnu7+cK0G12jE8GqTxEKBuUhZVEh7VqCTDiNXXVffsdmsvhCKdLSpE7lyalIdm/7HEbNDb5jStXsDXO3qYY2MbGe4mmP2DhGNlOvVPdjaPl4F1SCYM3Aq1gUa/HKILw87X37zrGfXDTgoHlXqMRq1rLtO7UijR0px9DmkKk1s073vp0wQjP2YDuwWh/cK5HtnpDJzE1KwmdnRDojYqg==

Thanks! I’d say it’s still a little confusing that one casts to the element handles and the other doesn’t. Plus for 3D triangulations it works the same for both iterators. 

I needed it because rather than extending the base classes for attaching information I like to create a hash map to int and than use the indices, like so:

    int nv = 0;
    CGAL::Unique_hash_map<T::Vertex_handle, int> VH;
    T::Finite_vertex_iterator vit=t.finite_vertices_begin();
    for (; vit != t.finite_vertices_end(); ++vit)
        VH[vit] = nv++; // error here: no known conversion

This works for the non-finite iterators. Which, frankly, took me some time to figure out. I believe this construction can also be found in the CGAL source code, at least for 3D triangulations. 

I guess you are saying that
VH[vit.base()] = nv++;
does the trick, correct? This is good to know. 

Best,
Marc



On 28. May 2020, at 08:00, Marc Glisse <> wrote:

On Wed, 27 May 2020, Marc Alexa  wrote:

I am having trouble to use the _finite_ element iterators in the dD triangulation package. I’d expect that I can extract vertex resp. full cell handles from the iterators, but I doesn’t work in the ways I tried.

They are boost::filtered_iterator, so you can use .base() for that, but why do you need it?

--
Marc Glisse

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss






Archive powered by MHonArc 2.6.19+.

Top of Page