From 5282cdc797aa16651e555971f5991b2ffba8c284 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 4 Feb 2023 22:17:41 +0100 Subject: [PATCH] bench: add NewfuncParams() --- bench/bench.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bench/bench.go b/bench/bench.go index dc20787..4cb1790 100644 --- a/bench/bench.go +++ b/bench/bench.go @@ -52,6 +52,12 @@ func (f *funcParams) Max() float64 { return f.max } +// NewfuncParams returns a pointer to a fresh instance of funcParams. +// nolint: revive +func NewfuncParams(min, max float64) *funcParams { + return &funcParams{min: min, max: max} +} + // GetGAMaxFES calculates the value of MaxFES for Genetic Algorithms. This is // an arbitrary specification where MaxFES is 5000xD. func GetGAMaxFES(dim int) int {