Subject: CGAL users discussion list
List archive
- From: Edoardo Milotti <>
- To:
- Subject: Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3
- Date: Mon, 25 Jan 2010 09:00:10 +0100
Dear Sylvain , thank very much you for you answer, however I have one further question. I insert points in the triangulation as follows (to maintain the original order I use a sequential insertion) for(vector<Point>::iterator it=v.begin(); it!=v.end(); it++) T.insert(*it); I add vertex info for (Finite_vertices_iterator vit = T.finite_vertices_begin(); vit != T.finite_vertices_end(); ++vit) { vit->info() = k; k++; } then I use the named vertices in a further loop for (Finite_vertices_iterator vit = T.finite_vertices_begin(); vit != T.finite_vertices_end(); ++vit) { T.incident_vertices(vit, back_inserter(vn)); // list of named neighbors ... ... etc ... The order of the list of finite incident vertices in the last loop turns out different at some point, like this first run - 8 1.93693532e-11 9.08382265e-06 2.132290991e-06 - 5 3.478538238e-11 8.274341753e-06 4.204006e-06 - 10 1.273731276e-11 9.54219939e-06 1.334840348e-06 - 6 1.795678855e-11 9.23188419e-06 1.945083818e-06 - 9 2.62181266e-11 8.721762172e-06 3.006058419e-06 - 1 4.740207202e-12 1.002035364e-05 4.730578752e-07 - 0 7.036177754e-11 3.051055408e-06 2.306145518e-05 second run - 8 1.93693532e-11 9.08382265e-06 2.132290991e-06 - 10 1.273731276e-11 9.54219939e-06 1.334840348e-06 - 5 3.478538238e-11 8.274341753e-06 4.204006e-06 - 6 1.795678855e-11 9.23188419e-06 1.945083818e-06 - 9 2.62181266e-11 8.721762172e-06 3.006058419e-06 - 0 7.036177754e-11 3.051055408e-06 2.306145518e-05 - 1 4.740207202e-12 1.002035364e-05 4.730578752e-07 here the first column is the vertex name, while the other three columns contain geometric information, and in particular the second one is the distance between the finite vertex under consideration and on of its finite incident vertices. The distances are the same, only the order appears to be shuffled. I guessed that this is due to the internal random number generator, however I am no longer so sure now. I use long double's to represent point coordinates (16 bytes): could it be some type conversion and precision problem inside CGAL that determines a different output order? Thank you very much, Edoardo Milotti On 23/gen/2010, at 15.02, Sylvain Pion wrote:
|
- [cgal-discuss] random number seed in Triangulation_hierarchy_3, Edoardo Milotti, 01/23/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Sylvain Pion, 01/23/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Edoardo Milotti, 01/25/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Sylvain Pion, 01/25/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Edoardo Milotti, 01/25/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Sylvain Pion, 01/25/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Edoardo Milotti, 01/25/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Sylvain Pion, 01/25/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Edoardo Milotti, 01/25/2010
- Re: [cgal-discuss] random number seed in Triangulation_hierarchy_3, Sylvain Pion, 01/23/2010
Archive powered by MHonArc 2.6.16.