From 21b48882778a4f0236e1fd1f447c8ada935c7ec7 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 13 Jan 2023 22:01:44 +0100 Subject: [PATCH] chore(go): add comments [skip ci] --- algo/stochasticHillClimbing.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/algo/stochasticHillClimbing.go b/algo/stochasticHillClimbing.go index fc4320a..ef90f67 100644 --- a/algo/stochasticHillClimbing.go +++ b/algo/stochasticHillClimbing.go @@ -246,6 +246,7 @@ func HillClimb( funcStats.BenchResults = make([]stats.BenchRound, minIters) // create and seed a source of preudo-randomness + // rand.Seed(uint64(time.Now().UnixNano())) src := rand.NewSource(uint64(rand.Int63())) // src := rand.NewSource(uint64(time.Now().UnixNano())) @@ -291,7 +292,7 @@ func HillClimb( bestVals, ) - // first or any other iteration. + // first or any of the subsequent iterations. switch i { case 0: bestResult = r