go(plot): print info with appropriate func
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-07-08 19:20:21 +02:00
parent 79ed004754
commit d2ab681218
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -17,6 +17,8 @@ import (
const preferredFontStyle = "Mono"
// violating the limit of 30, TODO(me): split this up.
// nolint: gocognit
func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string) {
pWidth := 13 * vg.Centimeter
pHeight := 13 * vg.Centimeter
@ -93,7 +95,13 @@ func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string) {
fmt.Sprint(len(dim.Solution)) + "I" +
fExt
printRandomSearch("saving img to file: " + filename)
info := "saving img to file: " + filename
if s.Algo == "Random Search" {
printRandomSearch(info)
} else {
printSHC(info)
}
// Save the plot to a file using the above-constructed 'filename'.
if err := p.Save(