Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3
  • Date: Sat, 23 Jan 2010 15:02:09 +0100

Le 23/01/10 10:03, Edoardo Milotti a écrit :
I use Triangulation_hierarchy_3, and I insert vertices one by one in a
fixed order: I noticed that the triangulation output is shuffled and the
order is different every time I run my program. Can anybody please tell
me how to set the seed of the internal random number generator in order
to obtain a reproducible output? Thanks.

By "output order", you meant the Cell_iterator order, not
the Vertex_iterator order, right ?

Does the following patch solve your problem ?

--- Triangulation_3.h (revision 52267)
+++ Triangulation_3.h (working copy)
@@ -207,7 +207,6 @@
Tds _tds;
GT _gt;
Vertex_handle infinite; //infinite vertex
- mutable Random rng;
Comparison_result
compare_xyz(const Point &p, const Point &q) const
@@ -1501,6 +1500,8 @@
start = start->neighbor(ind_inf);
}
+ Random rng (0L);
+
switch (dimension()) {
case 3:
{

--
Sylvain Pion
INRIA Sophia Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page