37 lines
1.0 KiB
Go
37 lines
1.0 KiB
Go
|
// Copyright 2023 wanderer <a_mirre at utb dot cz>
|
||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
||
|
package ga
|
||
|
|
||
|
import (
|
||
|
"git.dotya.ml/wanderer/math-optim/stats"
|
||
|
"gonum.org/v1/gonum/stat/distuv"
|
||
|
)
|
||
|
|
||
|
// SOMAT3A holds the settings for an instance of SOMA T3A algorithm.
|
||
|
// nolint: unused
|
||
|
type SOMAT3A struct {
|
||
|
// Generations is the number of generations to evolve for. Disable limit
|
||
|
// with -1.
|
||
|
Generations int
|
||
|
// BenchMinIters is the number of iterations that the bench function will
|
||
|
// be re-run.
|
||
|
BenchMinIters int
|
||
|
// Dimensions in which to look for a solution.
|
||
|
Dimensions []int
|
||
|
// NP is the initial population size.
|
||
|
NP int
|
||
|
// BenchName is the human-friendly name of the benchmarking function.
|
||
|
BenchName string
|
||
|
// ch is a channel for writing back computed results.
|
||
|
ch chan []stats.Stats
|
||
|
// chAlgoMeans is a channel for writing back algo means.
|
||
|
chAlgoMeans chan *stats.AlgoBenchMean
|
||
|
|
||
|
// rng is a random number generator.
|
||
|
rng distuv.Uniform
|
||
|
|
||
|
// initialised denotes the initialisation state of the struct.
|
||
|
initialised bool
|
||
|
}
|