| 25 [alg_tools] also needs to be downloaded separately. |
25 [alg_tools] also needs to be downloaded separately. |
| 26 |
26 |
| 27 1. Install the [Rust] infrastructure (including Cargo) with [rustup]. |
27 1. Install the [Rust] infrastructure (including Cargo) with [rustup]. |
| 28 2. Install a “nightly” release of the Rust compiler. With rustup, installed in |
28 2. Install a “nightly” release of the Rust compiler. With rustup, installed in |
| 29 the previous step, this can be done with |
29 the previous step, this can be done with |
| 30 ```console |
30 |
| 31 rustup toolchain install nightly |
31 rustup toolchain install nightly |
| 32 ``` |
32 |
| 33 3. Install [GNU Scientific Library]. On a Mac with [Homebrew] installed, |
33 3. Install [GNU Scientific Library]. On a Mac with [Homebrew] installed, |
| 34 this can be done with |
34 this can be done with |
| 35 ```console |
35 |
| 36 brew install gsl |
36 brew install gsl |
| 37 ``` |
37 |
| 38 For other operating systems, suggestions are available in the [rust-GSL] |
38 For other operating systems, suggestions are available in the [rust-GSL] |
| 39 crate documentation. If not correctly installed, you may need to pass |
39 crate documentation. If not correctly installed, you may need to pass |
| 40 extra `RUSTFLAGS` options to Cargo in the following steps to locate the |
40 extra `RUSTFLAGS` options to Cargo in the following steps to locate the |
| 41 library. |
41 library. |
| 42 |
42 |
| 54 [doi:10.46298/jnsao-2023-10433]: http://doi.org/10.46298/jnsao-2023-10433 |
54 [doi:10.46298/jnsao-2023-10433]: http://doi.org/10.46298/jnsao-2023-10433 |
| 55 |
55 |
| 56 ### Building and running the experiments |
56 ### Building and running the experiments |
| 57 |
57 |
| 58 To compile and install the program, use |
58 To compile and install the program, use |
| 59 ```console |
59 |
| 60 cargo install --path=. |
60 cargo install --path=. |
| 61 ``` |
61 |
| 62 When doing this for the first time, several dependencies will be downloaded. |
62 When doing this for the first time, several dependencies will be downloaded. |
| 63 Now you can run the default set of experiments with |
63 Now you can run the default set of experiments with |
| 64 ``` |
64 |
| 65 pointsource_experiments -o results |
65 pointsource_experiments -o results --max-iter 4000 1d_fast 2d_fast 1d_tv_fast 2d_tv_fast |
| 66 ``` |
66 |
| 67 The `-o results` option tells `pointsource_algs` to write results in the |
67 The `-o results` option tells `pointsource_algs` to write results in the |
| 68 `results` directory. The option is required. |
68 `results` directory. The option is required. |
| 69 |
69 |
| 70 Alternatively, you may build and run the program without installing with |
70 Alternatively, you may build and run the program without installing with |
| 71 ```console |
71 |
| 72 cargo run --release -- -o results |
72 cargo run --release -- -o results --maxiter 4000 1d_fast 2d_fast 1d_tv_fast 2d_tv_fast |
| 73 ``` |
73 |
| 74 The double-dash separates the options for the Cargo build system |
74 The double-dash separates the options for the Cargo build system |
| 75 and `pointsource_experiments`. |
75 and `pointsource_experiments`. |
| 76 |
76 |
| 77 ### Documentation |
77 ### Documentation |
| 78 |
78 |
| 81 |
81 |
| 82 ## Internals |
82 ## Internals |
| 83 |
83 |
| 84 If you are interested in the program internals, the integrated source code |
84 If you are interested in the program internals, the integrated source code |
| 85 documentation may be built and opened with |
85 documentation may be built and opened with |
| 86 ```console |
86 |
| 87 cargo doc # build dependency docs |
87 cargo doc # build dependency docs |
| 88 misc/cargo-d --open # build and open KaTeX-aware docs for this crate |
88 misc/cargo-d --open # build and open KaTeX-aware docs for this crate |
| 89 ``` |
89 |
| 90 The `cargo-d` script ensures that KaTeX mathematics is rendered in the |
90 The `cargo-d` script ensures that KaTeX mathematics is rendered in the |
| 91 generated documentation through an ugly workaround. Unfortunately, |
91 generated documentation through an ugly workaround. Unfortunately, |
| 92 `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII |
92 `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII |
| 93 world, and does not support modern markdown features, such as mathematics. |
93 world, and does not support modern markdown features, such as mathematics. |