bench: add NewfuncParams()
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-02-04 22:17:41 +01:00
parent cb48a6dd56
commit 5282cdc797
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -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 {