Ivan Karnasevich created LANG-1673:
--------------------------------------
Summary: Roulette wheel selection
Key: LANG-1673
URL: https://issues.apache.org/jira/browse/LANG-1673
Project: Commons Lang
Issue Type: New Feature
Components: lang.*
Affects Versions: 3.12.0
Reporter: Ivan Karnasevich
Implement roulette wheel selection
[https://en.wikipedia.org/wiki/Fitness_proportionate_selection]
For example, if you want to have a probability distribution like this:
* 1 - 30%
* 2 - 40%
* 3 - 25%
* 4 - 5%
You will be able to easily achieve this by passing the following argument to
the new component:
{code:java}
{1 : 0.3, 2: 0.4, 3: 0.25, 4: 0.05}
{code}
or
{code:java}
{1 : 0.6, 2: 0.8, 3: 0.5, 4: 0.1}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)