Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Constrained delaunay triangulation and boost's graph minimum spanning tree

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Constrained delaunay triangulation and boost's graph minimum spanning tree


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Constrained delaunay triangulation and boost's graph minimum spanning tree
  • Date: Thu, 23 Mar 2017 15:31:37 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:qyrlfBHtttO4tIth9HvcLJ1GYnF86YWxBRYc798ds5kLTJ7zocSwAkXT6L1XgUPTWs2DsrQf2raQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbQhFgDWwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VjO+4qplShLlhj4LOyI2/WrKjsB9jL5XrBenqhdiwYDbfZuVOeJjcK3Dc9MURW1BUMVfWSNPDYyzbZcAAeUaMOZErYTwvUcCoQewCASuAu7k1z9GhmXx3a0/y+ksDQfG0xE6H90QqnvUt8j+OqcIXu+u1qnIzCjIYvRM1jf79YfIaA4uruuXXb5qf8re01IgFxnEjliLpozqITSV1uETvGiH9ephVeyvhHQ7pAFtpTiv3McthpPViYISz1DJ7CN0y5s7K92/TU50e9+kEJ1IuiGVNot2XsMiQ3xztyog1rIGvpu7cS4Xw5ok3x7Sc/OKfomS7h7+SOqcIS10iXJmdb6lhhu+7VCsx+L9W8WuzVpHrSRInsPDu30JzRDf98aKR/R780y8wziAzRrT5ftBIU0slarUNZohwrkom5cdq0jDGyj2lUT1gaOMc0Ur4Omo6+D+brXhu5+cK5V4igbgMqQugMC/B/o3MhQWU2ia/+SzyqHj8FX2TbhLlPE6j7XVvZDAKckbpaO1GQ5Y3po75xa6FTim0dAYnXcdLFJCfRKKl5LmO1fTL/DiE/iwmU+snC1lx//cJbLhGJTNI2PMkLj/erZ97lBTyBYpzdFf6ZJbEK0OIO70Wk/rtN3UFAM2Mwuxw+r/EtVyypseWX6TAq+eKK7drVCI6fgrI+WVeYAVuS39JOQ45/71ln80gkQdfKms3ZsPcn+0BPVmI0ODYXrtmNgNC2kKvhBtBNDt3VaNWDoWa3epVL8n/Rk6DpinBMHNXNODmruEiQ69Eodbb3sOJFmGC3agI4yCV+0BYTnULMZriD0sWrWmToI9zwCgvQTmzKB2aOHT/3tL5trYyNFp6riLxlkJ/jtuApHAi2w=
  • Organization: GeometryFactory


Hello,

In the pull request https://github.com/CGAL/cgal/pull/1991
I added the graph_traits and free functions so that now
all triangulation classes can be used with the BGL.

Concerning the edge weights, you might store them in
a boost::unordered_map<edge_descriptor,double>,
fill it as you like, wrap it in a boost associative
property map, and then pass it to the MST algorithm,
instead of redefining T2_edge_weight_map. The weight map
is a parameter of the MST algorithm.

best,

andreas

On 21/03/2017 03:34, Ch'Gans wrote:
Hi there,

I'm doing some experiment with CGAL Constrained Delaunay Triangulation
and boost graph Minimum Spanning Tree.

The constrained edges of CDT correspond to path that already exist,
the non constrained edges of CDT are transient edges for the MST
algorithm.
To make sure that MST will use the constrained edges, i'm setting
their associated 'weight' (length) to zero, and for the
non-constrained edges i'm setting their 'weight' to their squared
length.

I'm currently doing all of these manually, including 'transforming'
the data structures between the steps of my 'pipeline'. I know it is
not optimal, but at least i am able to get the whole pipeline working.

I went through the chapter 'CGAL and the Boost Graph Library' (BTW big
thumb up for the documentation!) and saw that CGAL provides all the
bolts and nuts to bind CGAL with boost graph. For example, CGAL
provide the edge weight map needed by MST, filters that allow to
filter out infinite edges, ...

I am now wondering if I could use a filter to hide/proxy the weight of
the constrained edges or if i should use a different approach.
Maybe I should redefine T2_edge_weight_map
(CGAL/boost/graph/graph_traits_Triangulation_2.h) so that it takes a
CDT as a ctor argument...

Actually it looks like i cannot use graph_traits_Triangulation_2.h or
graph_traits_Delaunay_Triangulation_2.h, i would need to write my own
version for CDT, do I?

Any clarification or point out are very welcome,
Chris


--
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912 skype: andreas.fabri



Archive powered by MHonArc 2.6.18.

Top of Page