[gecode-users] Value selection when branching

Mikael 'Zayenz' Lagerkvist zayenz at gmail.com
Tue Feb 7 17:47:18 CET 2006


On 2/7/06, Lars Otten <ottenl at student.chalmers.se> wrote:
> If I recall correctly there's a function rand_r(int*) that might be useful
> for my purposes, as an alternative to implementing my own generator --
> which, on the other hand, shouldn't be that much work after all (a basic one
> is given in the manpage for rand() as well).

In test/random.cc in the gecode directory, there is a linear
congruential random number generator suggested as "good enough" by
Knuth for applications where "true" randomness is not that important.
It is simple, and has a clear value for it's state. This could be a
good starting-point for you.

Cheers
Mikael

--
Mikael 'Zayenz' Lagerkvist, http://www.imit.kth.se/~zayenz/




More information about the gecode-users mailing list