hdbeukel / james-core

Core module of the JAMES framework
Apache License 2.0
6 stars 5 forks source link

Dedicated customizable random generator per search #1

Closed hdbeukel closed 9 years ago

hdbeukel commented 9 years ago

Allow user to set a custom random generator in all randomized components.

hdbeukel commented 9 years ago

Will be implemented through a utility class Randomization that stores a global random generator, which can be set with Randomization.setRandom(...). All randomized components will retrieve a random generator by calling Randomization.getRandom(). By default, a thread local random generator is used to avoid synchronization overhead and contention in parallel searches.

hdbeukel commented 9 years ago

The previously proposed (and implemented) solution can not impose determinism in parallel searches, since different searches might share the same random generator.

Proposed alternative solution: