All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
Eegeo::Helpers::RouletteWheelSelector Class Reference

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>

Inheritance diagram for Eegeo::Helpers::RouletteWheelSelector:
Eegeo::NonCopyable

Public Member Functions

void UpdateFitnessValues (const std::vector< float > &fitness)
 
size_t SelectItemIndex (Random &rand) const
 

Static Public Member Functions

static RouletteWheelSelectorCreateWithFitnessValues (const std::vector< float > &fitness)
 

Additional Inherited Members

- Private Member Functions inherited from Eegeo::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 

Detailed Description

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.


The documentation for this class was generated from the following files: