Sha256: 1f16d512f986d4a5d685bee55d69128543a755ebc18ab2ff66282fb0d796639e
Contents?: true
Size: 364 Bytes
Versions: 4
Compression:
Stored size: 364 Bytes
Contents
class PickStrategy def initialize @pick_proportion ||= 25.to_f / 100.to_f end attr_accessor :pick_proportion # pick some solution inside the population def pick(population) raise NotImplementedError end protected def get_number_to_pick(population) number = population.solutions.length * @pick_proportion number.round end end
Version data entries
4 entries across 4 versions & 1 rubygems