Class: EvoSynth::Adjustments::PredifinedAdjustment

Inherits:
Object
  • Object
show all
Defined in:
lib/evosynth/operators/adjustments/predefined_adjustment.rb

Overview

VORDEFINIERTE-ANPASSUNG (Weicker page 111)

Constant Summary collapse

DEFAULT_ALPHA =
0.99

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alpha = DEFAULT_ALPHA) ⇒ PredifinedAdjustment

Returns a new instance of PredifinedAdjustment.



35
36
37
# File 'lib/evosynth/operators/adjustments/predefined_adjustment.rb', line 35

def initialize(alpha = DEFAULT_ALPHA)
  @alpha = alpha
end

Instance Attribute Details

#alphaObject

Returns the value of attribute alpha.



31
32
33
# File 'lib/evosynth/operators/adjustments/predefined_adjustment.rb', line 31

def alpha
  @alpha
end

Instance Method Details

#adjust(sigma) ⇒ Object



39
40
41
# File 'lib/evosynth/operators/adjustments/predefined_adjustment.rb', line 39

def adjust(sigma)
  sigma * @alpha
end