Class: EvoSynth::Adjustments::PredifinedAdjustment
- Inherits:
-
Object
- Object
- EvoSynth::Adjustments::PredifinedAdjustment
- 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
-
#alpha ⇒ Object
Returns the value of attribute alpha.
Instance Method Summary collapse
- #adjust(sigma) ⇒ Object
-
#initialize(alpha = DEFAULT_ALPHA) ⇒ PredifinedAdjustment
constructor
A new instance of PredifinedAdjustment.
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
#alpha ⇒ Object
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 |