Ensure crossover logic is correct in DE

Corrected a small typo where the offspring vector component was never
selected from the pair of parent and offspring.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Generate discrete uniform numbers correctly.

The algorithm that was used to calculate discrete uniform numbers
in the range [from, to) was incorrect and resulted in strange values
which were not as random as expected. The new implementation corrects
this problem and also changes the manner in which the solection is done
so that the range for the selection is now [from, to], i.e: the upper
bound is now inclusive.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Update DE code to have all parameters provided via lenses.

This is the initial set of changes needed to make the algorithm have a
parameter type that can be changed, based on the usage thereof. All the
code related to reading (and potentially the updating) of the parameter
state is provided through Lens instances.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Initial PSO related changes

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Total function: RVar#choices

If the requested number of elements to select is more than what can be
selected from the provided list, then return a None value. As a result
of this, the function is now total (in my mind) as it will always
terminate and the resulting value is logical by either working or not
working without any "magic".

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Further changes -> iteration continues

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Initial pass at simplifying PSO

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
All computations are in the context of RVar.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Use the swarm collection

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Heterogeneous code, runner, charged PSO, prolly gonna change.