Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ackley_mc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Torda, Prof. Dr. Andrew Ernest
ackley_mc
Commits
a5fec802
Commit
a5fec802
authored
3 years ago
by
Andrew E. Torda
Browse files
Options
Downloads
Patches
Plain Diff
Makefile now uses symbolic names.
parent
14bb4804
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
Makefile
+12
-5
12 additions, 5 deletions
Makefile
main_gfx.go
+4
-1
4 additions, 1 deletion
main_gfx.go
with
18 additions
and
6 deletions
.gitignore
+
2
−
0
View file @
a5fec802
test_tmp*
ackley
ackley_mc
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Makefile
+
12
−
5
View file @
a5fec802
# Use the normal go build system for everything, but we want to automate some simple
# commands.
# The annoying syntax for debugging is,
# dlv debug --build-flags -tags=no_gfx -- examples/example1
.POSIX
:
GO
=
go
GOFMT
=
gofmt
# The lint target only makes sense for Andrew's setup.
LINTER
=
~/go/bin/linux_amd64/golangci-lint
all
:
go build ./...
$(
GO
)
build
-o
bin .
$(
GO
)
build
-o
bin/ackley_nogfx
-tags
no_gfx
--
.
test
:
go
test
./...
go
test
-tags
no_gfx ./...
$(
GO
)
test
./...
$(
GO
)
test
-tags
no_gfx ./...
gofmt
:
gofmt
-s
-w
.
$(
GOFMT
)
-s
-w
.
lint
:
$(
LINTER
)
run
clean
:
go clean
$(
GO
)
clean
rm
-rf
bin/
*
rm
-rf
*
/
*
_delme.
*
rm
-rf
*
/test_tmp
*
rm
-rf
/tmp/go-build[0-9]
*
...
...
This diff is collapsed.
Click to expand it.
main_gfx.go
+
4
−
1
View file @
a5fec802
...
...
@@ -5,8 +5,11 @@
// Ackley_mc is for playing with Monte Carlo or simulated annealing on the
// ackley function in N dimensions.
//
// ackley_mc input_file
// ackley_mc
[
input_file
]
// 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment