diff --git a/algo/ga/jde.go b/algo/ga/jde.go index 9e846ca..e3b7f45 100644 --- a/algo/ga/jde.go +++ b/algo/ga/jde.go @@ -76,7 +76,14 @@ const ( var jDELogger = newLogger(" *** δ jDE:") // Init initialises the jDE algorithm, performs sanity checks on the inputs. -func (j *JDE) Init(generations, benchMinIters, mutStrategy, adptScheme, np int, f, cr float64, dimensions []int, bench string, ch chan []stats.Stats, chAlgoMeans chan *stats.AlgoBenchMean) { +func (j *JDE) Init( + generations, benchMinIters, mutStrategy, adptScheme, np int, + f, cr float64, + dimensions []int, + bench string, + ch chan []stats.Stats, + chAlgoMeans chan *stats.AlgoBenchMean, +) { if j == nil { jDELogger.Fatalln("jDE needs to be initialised before calling Run(), exiting...") } @@ -124,8 +131,16 @@ func (j *JDE) Init(generations, benchMinIters, mutStrategy, adptScheme, np int, rngsrc := rand.NewSource(uint64(rand.Int63())) - j.rngF = distuv.Uniform{Min: fMin, Max: fMax, Src: rngsrc} - j.rngCR = distuv.Uniform{Min: crMin, Max: crMax, Src: rngsrc} + j.rngF = distuv.Uniform{ + Min: fMin, + Max: fMax, + Src: rngsrc, + } + j.rngCR = distuv.Uniform{ + Min: crMin, + Max: crMax, + Src: rngsrc, + } j.Dimensions = dimensions j.BenchName = bench @@ -139,12 +154,25 @@ func (j *JDE) Init(generations, benchMinIters, mutStrategy, adptScheme, np int, // InitAndRun initialises the jDE algorithm, performs sanity checks on the // inputs and calls the Run method. -func (j *JDE) InitAndRun(generations, benchMinIters, mutStrategy, adptScheme, np int, f, cr float64, dimensions []int, bench string, ch chan []stats.Stats, chAlgoMeans chan *stats.AlgoBenchMean) { +func (j *JDE) InitAndRun( + generations, benchMinIters, mutStrategy, adptScheme, np int, + f, cr float64, + dimensions []int, + bench string, + ch chan []stats.Stats, + chAlgoMeans chan *stats.AlgoBenchMean, +) { if j == nil { jDELogger.Fatalln("jDE is nil, NewjDE() needs to be called first. exiting...") } - j.Init(generations, benchMinIters, mutStrategy, adptScheme, np, f, cr, dimensions, bench, ch, chAlgoMeans) + j.Init( + generations, benchMinIters, mutStrategy, adptScheme, np, + f, cr, + dimensions, + bench, + ch, chAlgoMeans, + ) j.Run() }