Method: EvoSynth::Mutations::ExchangeMutation#initialize
- Defined in:
- lib/evosynth/operators/mutations/exchange_mutation.rb
#initialize(swap_count = DEFAULT_SWAP_COUNT) ⇒ ExchangeMutation
:call-seq: ExchangeMutation.new ExchangeMutation(Fixnum) -> ExchangeMutation (overrides default swap count)
Returns a new ExchangeMutation. In the first form, the default swap count is used. In the second it creates a ExchangeMutation with the given swap count.
ExchangeMutation.new
ExchangeMutation.new(3)
52 53 54 |
# File 'lib/evosynth/operators/mutations/exchange_mutation.rb', line 52 def initialize(swap_count = DEFAULT_SWAP_COUNT) @swap_count = swap_count end |