Skip to content
Snippets Groups Projects
Commit 2a2de5db authored by Andrew E. Torda's avatar Andrew E. Torda
Browse files

Tidying.

parent 7e04a1f4
No related branches found
No related tags found
No related merge requests found
// Put ackley in here, so we can also write a little test
// We will code it in the n-dimensional version, even if we do not need it.
// Hard-coding 2, 3 or 4 dimensions would be faster (no for loop), but not so elegant.
// Put ackley in here, so we can also write a little test, separate from
// the Monte Carlo code.
package ackley
......@@ -14,8 +13,8 @@ const (
c = 2 * math.Pi
)
// ackley calculates the n-dimensional ackley function for a slice x. The constants
// are hard-coded above.
// ackley calculates the n-dimensional ackley function for a slice x.
//The constants are hard-coded above.
func Ackley(x []float32) float64 {
var sum1, sum2 float64
for i := range x {
......
the ackley function .. in the word file
Run dlv in emacs under windows
dlv --allow-non-terminal-interactive=true debug
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment