To build and run the project, use make
or make run
(faster, no test). To only build the project
binary, use make project
.
To build and run all assignment code with default data and generate the assignment report a simple
make assignment
should suffice.
To generate the submitted report run make pdf
and to generate the submitted ZIP archive run make zip
.
There have been complaints about the graphs being generated as .pdf
files. When running make pdf
,
the graphs are generated in .pdf
format to produce a high-quality report document. If the marker
wishes to inspect the graphs in some other format (e.g. .png
), they are free to run ./main -graph
,
in the /project
directory. (Run ./main
to see available options and make sure to build the project
first!)
There is the option to run a time-intensive calculation. Use the -heavy
flag when running the
project binary (i.e. ./main -heavy
). Running this may take some time.
For markers inclined to save time, here is the output of this command:
Running heavy calculation. This may take a while ...
INFO: 20000000000 steps max at 1e-06 target accuracy
Result: P = 0.4976607485895988
Statistics:
&{19999997952 1.9059153608037185e-06 integral did not converge}
Time elapsed: 11m44.577711857s (35.22888920028826 nanosecond/sample)
To run tests, use make test
. (To see a code coverage breakdown, use make cover
.)
This project uses Go. To build the go source, multiple open source compilers are available. See the Go website for more information on how to obtain a compiler for your operating system and architecture.
If you are using homebrew on macOs, the installation should be as simple as:
brew install golang
If you are using Ubuntu, you might want to install Go using snap:
sudo snap install --classic go
Any files generated by Go when building this project will either be located in this folder, or in
$HOME/go
(unless you manually changed your GOPATH
, run go help gopath
for more information).
To remove everything, deinstall Go using your package manager, then delete $HOME/go
.
/assignment
--- answers to assignment problems/pdf
---------- LaTeX code for submission PDFs/pkg
---------- reusable packages/problems
----- answers to problem sheets/project
------ project binary code
Unless explicitly stated otherwise, the code in this repository is authored by Tilman Roeder and
licensed under the MIT license (seen LICENSE
).