go: add Min,Max methods for funcParams
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ae7e912284
commit
5388aeb8c9
@ -25,6 +25,16 @@ var (
|
||||
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.
|
||||
func Schwefel(x []float64) float64 {
|
||||
var res float64
|
||||
|
Loading…
Reference in New Issue
Block a user