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

Merge branch 'devel'

parents 30d4a4c4 b80f6655
No related branches found
No related tags found
No related merge requests found
test_tmp* test_tmp*
ackley_mc ackley_mc
ackley_mc.exe ackley_mc.exe
# Use the normal go build system for everything, but we want to automate some simple # Use the normal go build system for everything, but we want to automate some simple
# commands. # commands.
# The annoying syntax for debugging is, # The annoying syntax for debugging is,
# dlv debug --build-flags -tags=no_gfx -- examples/example1 # dlv debug --build-flags -tags=no_gfx -- examples/example1
.POSIX: .POSIX:
GO=go
GOFMT=gofmt
# The lint target only makes sense for Andrew's setup.
LINTER=~/go/bin/linux_amd64/golangci-lint LINTER=~/go/bin/linux_amd64/golangci-lint
all: all:
go build ./... $(GO) build -o bin .
$(GO) build -o bin/ackley_nogfx -tags no_gfx -- .
test: test:
go test ./... $(GO) test ./...
go test -tags no_gfx ./... $(GO) test -tags no_gfx ./...
gofmt: gofmt:
gofmt -s -w . $(GOFMT) -s -w .
lint: lint:
$(LINTER) run $(LINTER) run
clean: clean:
go clean $(GO) clean
rm -rf bin/*
rm -rf */*_delme.* rm -rf */*_delme.*
rm -rf */test_tmp* rm -rf */test_tmp*
rm -rf /tmp/go-build[0-9]* rm -rf /tmp/go-build[0-9]*
......
I want to remove the adaptive step size code from the version used for teaching. I will keep the code in this version. The code for adaptive step sizes in now in a separate branch. It has been removed since it was
It works, but the implementation is ugly and full of arbitrary numbers, like checking every n-hundred steps if we should do something. a. ugly
\ No newline at end of file b. complicated the code and the idea is to have a simple model solution.
\ No newline at end of file
...@@ -5,8 +5,11 @@ ...@@ -5,8 +5,11 @@
// Ackley_mc is for playing with Monte Carlo or simulated annealing on the // Ackley_mc is for playing with Monte Carlo or simulated annealing on the
// ackley function in N dimensions. // ackley function in N dimensions.
// //
// ackley_mc input_file // ackley_mc [input_file]
// where input_file has a list of keywords and values. // where input_file has a list of keywords and values.
// This is mostly the same as the version without graphics, but it does
// not require a command line argument. It will open a graphics window
// so you can type in values and play with it.
package main package main
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment