Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] how do you seed the random number generator?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] how do you seed the random number generator?


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Subject: Re: [cgal-discuss] how do you seed the random number generator?
  • Date: Sat, 10 Dec 2011 19:28:41 +0100

Edoardo Milotti
<>
writes:

> I am developing a program where the order of vertices of a Delaunay
> triangulation matters, and I wish to obtain the same sequence of vertices
> in repeated runs. Thus I need to set the seed of the CGAL random number
> generator. Does anybody know how to do it in the current version of CGAL?
> Thank you.

CGAL::Random takes an unsigned int as its seed argument and the
generator constructors take a CGAL::Random as an argument (which
defaults to a default constructed CGAL::Random).

See:
http://www.cgal.org/Manual/3.8/doc_html/cgal_manual/Generator_ref/Class_Random.html
and
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Generator_ref/Concept_PointGenerator.html

HTH,
Philipp



Archive powered by MHonArc 2.6.16.

Top of Page