24 lines
401 B
Go
24 lines
401 B
Go
// Copyright 2022 wanderer <a_mirre at utb dot cz>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package algo
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func getSHCLogPrefix() string {
|
|
return " *** stochastic hill climbing:"
|
|
}
|
|
|
|
func fmtSHCOut(input string) string {
|
|
return getSHCLogPrefix() + " " + input
|
|
}
|
|
|
|
func printSHC(input string) error {
|
|
_, err := fmt.Fprintln(os.Stderr, fmtSHCOut(input))
|
|
|
|
return err
|
|
}
|