Class: RosenbrockSolution

Inherits:
FunctionBasedSolution show all
Defined in:
lib/gimuby/problem/rosenbrock/rosenbrock_solution.rb

Instance Attribute Summary

Attributes inherited from Solution

#check_strategy, #mutation_strategy, #new_generation_strategy

Instance Method Summary collapse

Methods inherited from FunctionBasedSolution

#get_solution_representation, #set_solution_representation

Methods inherited from Solution

#get_fitness, #get_solution_representation, #mutate, #reproduce, #reset_fitness_state, #set_solution_representation

Constructor Details

#initialize(x_values = nil) ⇒ RosenbrockSolution

Returns a new instance of RosenbrockSolution.



13
14
15
# File 'lib/gimuby/problem/rosenbrock/rosenbrock_solution.rb', line 13

def initialize(x_values = nil)
  super(x_values)
end

Instance Method Details

#evaluateObject



17
18
19
# File 'lib/gimuby/problem/rosenbrock/rosenbrock_solution.rb', line 17

def evaluate
  get_rosenbrock.evaluate(@x_values.clone)
end