Method: EvoSynth::Problems::FloatBenchmarkFuntions.sphere
- Defined in:
- lib/evosynth/problems/float_benchmark_functions.rb
.sphere(xs) ⇒ Object
Sphere function (Rechenberg 1973 and De Jong 1975)
global minimum: f(x) = 0 at x(i) = 0, i = 1..n
55 56 57 |
# File 'lib/evosynth/problems/float_benchmark_functions.rb', line 55 def FloatBenchmarkFuntions.sphere(xs) xs.inject(0.0) { |sum, x| sum += x**2 } end |