A roulette wheel selector for making weighted random choices. http://en.wikipedia.org/wiki/Fitness_proportionate_selection http://stackoverflow.com/a/3995038 <- this is a clear explanation of how it works. More...
#include <RouletteWheelSelector.h>
Public Member Functions | |
void | UpdateFitnessValues (const std::vector< float > &fitness) |
size_t | SelectItemIndex (Random &rand) const |
Static Public Member Functions | |
static RouletteWheelSelector * | CreateWithFitnessValues (const std::vector< float > &fitness) |
Additional Inherited Members | |
Private Member Functions inherited from Eegeo::NonCopyable | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
A roulette wheel selector for making weighted random choices. http://en.wikipedia.org/wiki/Fitness_proportionate_selection http://stackoverflow.com/a/3995038 <- this is a clear explanation of how it works.