math-optim/bench/bench.go

35 lines
773 B
Go
Raw Normal View History

// Copyright 2022 wanderer <a_mirre at utb dot cz>
// SPDX-License-Identifier: GPL-3.0-or-later
package bench
type funcParams struct {
min float64
max float64
}
const (
Neighbourhood = 10
// MaxFES is the maximum number of allowed function evaluations.
MaxFES = 10000
)
var (
// Dimensions to compute for (spatial complexity..?).
2022-06-17 01:54:30 +02:00
Dimensions = []uint{5, 10, 20}
SchwefelParams = funcParams{min: -500.0, max: 500.0}
DeJong1Params = funcParams{min: -5.0, max: 5.0}
DeJong2Params = funcParams{min: -5.0, max: 5.0}
)
2022-06-15 23:27:05 +02:00
// Min returns the non-exported "min" field of a funcParams struct.
2022-06-17 01:54:30 +02:00
func (f *funcParams) Min() float64 {
return f.min
2022-06-15 23:27:05 +02:00
}
// Max returns the non-exported 'max' field of a funcParams struct.
2022-06-17 01:54:30 +02:00
func (f *funcParams) Max() float64 {
return f.max
2022-06-15 23:27:05 +02:00
}