Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Extending some records of the Arrangment_2 DCEL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Extending some records of the Arrangment_2 DCEL


Chronological Thread 
  • From: Efraim Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Extending some records of the Arrangment_2 DCEL
  • Date: Wed, 14 Dec 2011 15:14:23 +0200


wrote:
Hi all,

The Arr_extended_dcel<Traits, VertexData, HalfedgeData, FaceData> class
template allows to associate auxiliary data fields to the DCEL of an
Arrangement_2. My question is how to extend only two of the three records (say
with VertexData and HalfedgeData) without wasting memory space for the last
record (say FaceData) since it is not needed.

Thanks in advance for your help,
Hichem Barki

You have two options:
1. Use Arr_extended_dcel<> with empty data records.
2. Develop your own extended DCEL. Start with the code in Arr_dcel_base.h, and remove those parts that you don't need. It's straight forward.

Option (1.) has a disadvantage: The compiler allocates a single byte for every empty nested construct. I believe that it is possible to improve Arr_extended_dcel using meta programming to avoid the empty byte.

--
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/



  • Re: [cgal-discuss] Extending some records of the Arrangment_2 DCEL, Efraim Fogel, 12/14/2011

Archive powered by MHonArc 2.6.16.

Top of Page