go: add Min,Max methods for funcParams
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-06-15 23:27:05 +02:00
parent ae7e912284
commit 5388aeb8c9
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -25,6 +25,16 @@ var (
DeJong2Params = funcParams{min: -5.0, max: 5.0} DeJong2Params = funcParams{min: -5.0, max: 5.0}
) )
// Min returns the non-exported "min" field of a funcParams struct.
func (*funcParams) Min(self *funcParams) float64 {
return self.max
}
// Max returns the non-exported 'max' field of a funcParams struct.
func (*funcParams) Max(self *funcParams) float64 {
return self.max
}
// Schwefel computes a value of the Schwefel function for x. // Schwefel computes a value of the Schwefel function for x.
func Schwefel(x []float64) float64 { func Schwefel(x []float64) float64 {
var res float64 var res float64