Method: MHL::RechenbergController#initialize

Defined in:
lib/mhl/rechenberg_controller.rb

#initialize(generations = 5, threshold = DEFAULT_THRESHOLD, logger = nil) ⇒ RechenbergController

Returns a new instance of RechenbergController.



11
12
13
14
15
16
17
18
19
# File 'lib/mhl/rechenberg_controller.rb', line 11

def initialize(generations=5, threshold=DEFAULT_THRESHOLD, logger=nil)
  unless threshold > 0.0 and threshold < 1.0
    raise ArgumentError, "The threshold parameter must be in the (0.0,1.0) range!"
  end
  @generations = generations
  @threshold   = threshold
  @logger      = logger
  @history     = []
end