Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Triangulation_3: creating all triangulations reachable by a flip
Chronological Thread
- From: Marc Alexa <>
- To:
- Subject: Re: [cgal-discuss] Triangulation_3: creating all triangulations reachable by a flip
- Date: Fri, 14 Dec 2018 10:28:22 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:DM9pkB3hqstC9mAysmDT+DRfVm0co7zxezQtwd8ZseMULfad9pjvdHbS+e9qxAeQG9mDu7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPYAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb5Sq06WSm576dzVhDnlDsHOTA+8GHSkMNwjaRbqw+lqxFwx4PYZYeYP+d8cKzAZ9MXXWpPUdpeWCJcDI28YZUBAOgCM+hftITyvUcCrR6kCAmsGO/iyDlFjWL2060g1OQhFBnL0gs6ENIUrHvfscn4NKMMXuG61qbD0DLOb/ZM1jfn9IfEaAouofWSUrN/a8Xc0kYvFwbfgVWRrYzpJS+a1uMIs2WC6edrSOyhi2kiqw5rozivwN8hio7Rho0LzFDI7D55wJooKtGiT057e9GkHINRtyGcLYt2Q9ktT3tmuCYg0rEGuoC0fSgRx5s93B7QdeaLc4mP4h77W+aRICt4hHJ4eL2knRqy8E+gx+vhXce3yFZHtjRJnsXIu3wX1BHe6tKLRuVh8kqiwzqC2B7f5vlZLU06iabXMYMtz7E0m5YJrEjOHDH6lF/rgKOLdkgp/PWj5f79bbX8vJCcMpd5igHgPaQqncyyGeE4PRIPX2if4OizyqDs8VDgTLVEgfA6jLPVsJ/dJcQcqa65BxFa3pw/5Ba4CjeqyNUYnX8ZI1JZYB+LkZTlNlXULP37DfqzmUqgnCtoyvzcMbDtHI3BLn3Zn7fgebZ95VRcyA02zd1H4pJbEKsBL+7pVkDrsNzXEBA4PBavzuboDdVyzIIeWWaVDqCFN6PStEeE5vgzLOmUeI8VpDH9JuA56P7hl3A5nUYRcrSo3ZsMdH+4A+9mI16CbHr3gtYBFH8KsRAkQOzrjl2CSz9TaGyoU6Iy/DFoQL+gFprJE4CxnKSajmD8BYxTfmkAC1aWEH6ueZ/DQOYJcCvVI8lvlXsPWrGlDoMgzhqzrxSp970yJeXd/mgUtInoycNuz+zVjxA7szJuXOqH1GTYamhulSshQzIm1egrpEVnwRGK1aVoitRXENVS47VCVQJsZs2U9PBzF92nAlGJRdyOUlvzHoT/UGMBC+kpytpLWH5TXtCrjxTNxS2vWuZHmLmCBZhy+aXZjSGoe5RNjk3e3axktGEIB9NVPDT/1KF6/gnXQYXOlhfBzvv4ReEnxCfIsVy74y+OsUVfClMiVKzEWTUSahKTo4ijoEzFSLCqBPIsNQ4TkcM=
Hi Adam,
Thanks a lot for the information and the references. I realized that you probably need to iterate through the lists of elements during the copy. I thought I might as well use CGAL’s Triangulation_3, copy it, and then iterate through the elements to identify the element I want to flip. It seems the copy preserves the order of elements in the iterators, making the identification of an element in the copy trivial. Not elegant, but it works fine.
Thanks!
-Marc
Hi Marc,I’m doing something related, which requires large numbers of flips (and other moves) on Delaunay Triangulations.What I’ve done is written a class which contains a Triangulation_3 as well as other containers of cells, facets, edges, and vertices.I use the container (i.e. a vector) of edges to determine the edge -> facet flip locations, and the container of facets to determine the facet -> edge flip locations.I make copies of this class to perform proposed moves; the copy constructors take care of the various containers.That gives you the triangulation and iterator (but look at Ranges, which are coming in C++20).I’d been using Boost::optional to provide the semantics that Expected<T,E> is supposed to provide, that is, return a T or an exception E (except that option types return a T if the move succeeds or null if it fails). However, this seems to be not recommended, so I’m probably going to use simple error codes and wait for Zero overhead deterministic failures.--Adam Getchell
https://keybase.io/adamgetchellDear all,
I am trying to achieve the following: given a Triangulation_3 T, enumerate all triangulations that can be reached from T by a flip. The problem is that T.flip(C) (where C is either an Edge or a Facet) changes T, so that creating other flips starting from T is cumbersome.
Concretely, I am iterating over Edges or Facets. Flipping will invalidate the iterator. But I also cannot use the iterator (which is a Face or Edge of T) on a copy of T.
One way out would be a method for generating a copy of T that also provides a handle to a given Cell in T. But I cannot see any method doing this.
Any help would be appreciated.
Thanks,
Marc
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Triangulation_3: creating all triangulations reachable by a flip, Marc Alexa, 12/10/2018
- Re: [cgal-discuss] Triangulation_3: creating all triangulations reachable by a flip, Adam Getchell, 12/10/2018
- Re: [cgal-discuss] Triangulation_3: creating all triangulations reachable by a flip, Marc Alexa, 12/14/2018
- Re: [cgal-discuss] Triangulation_3: creating all triangulations reachable by a flip, Adam Getchell, 12/10/2018
Archive powered by MHonArc 2.6.18.