Method: FeldtRuby::Optimize::PopulationSampler#initialize_all_indices

Defined in:
lib/feldtruby/optimize/optimizer.rb

#initialize_all_indicesObject



107
108
109
110
111
112
# File 'lib/feldtruby/optimize/optimizer.rb', line 107

def initialize_all_indices
	# We set up an array of the indices to all candidates of the population so we can later sample from it
	# This should always contain all indices even if they might be out of order. This is because we
	# only swap! elements in this array, never delete any.
	@all_indices = (0...@population_size).to_a
end