1 |
1 |
2 # Proximal methods for point source localisation: the implementation |
2 # Proximal methods for point source localisation: the implementation |
3 |
3 |
4 This package contains [Rust][] codes for the manuscript “_Proximal methods for |
4 This package contains [Rust] codes for the manuscript “_Proximal methods for |
5 point source localisation_” by Tuomo Valkonen ⟨tuomov@iki.fi⟩. It concerns |
5 point source localisation_” ([arXiv:2212.02991]) by Tuomo Valkonen |
6 solution of problems of the type |
6 ⟨tuomov@iki.fi⟩. It concerns solution of problems of the type |
7 $$ |
7 $$ |
8 \min_{μ ∈ ℳ(Ω)}~ F(μ) + λ \|μ\|_{ℳ(Ω)} + δ_{≥ 0}(μ), |
8 \min_{μ ∈ ℳ(Ω)}~ F(μ) + λ \|μ\|_{ℳ(Ω)} + δ_{≥ 0}(μ), |
9 $$ |
9 $$ |
10 where $F$ is a data term, and $ℳ(Ω)$ is the space of Radon measures on the |
10 where $F$ is a data term, and $ℳ(Ω)$ is the space of Radon measures on the |
11 (rectangular) domain $Ω ⊂ ℝ^n$. Implemented are $F(μ)=\frac12\|Aμ-b\|_2^2$ and |
11 (rectangular) domain $Ω ⊂ ℝ^n$. Implemented are $F(μ)=\frac12\|Aμ-b\|_2^2$ and |
17 |
17 |
18 ## Installation and usage |
18 ## Installation and usage |
19 |
19 |
20 ### Installing dependencies |
20 ### Installing dependencies |
21 |
21 |
22 Most dependencies are managed by the Cargo build system of [Rust][]. You will |
22 Most dependencies are managed by the Cargo build system of [Rust]. You will |
23 only need to install the “nightly” Rust compiler and the |
23 only need to install the “nightly” Rust compiler and the |
24 [GNU Scientific Library][gsl] manually. At the time of writing this README, |
24 [GNU Scientific Library] manually. At the time of writing this README, |
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 ```console |
31 rustup toolchain install nightly |
31 rustup toolchain install nightly |
32 ``` |
32 ``` |
33 3. Install [GNU Scientific Library][gsl]. 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 ```console |
36 brew install gsl |
36 brew install gsl |
37 ``` |
37 ``` |
38 For other operating systems, suggestions are available in the |
38 For other operating systems, suggestions are available in the |
39 [rust-GSL crate documentation][rust-GSL]. |
39 [rust-GSL crate documentation][rust-GSL]. |
40 On Windows, you will likely need to pass extra `RUSTFLAGS` options to |
40 On Windows, you will likely need to pass extra `RUSTFLAGS` options to |
41 Cargo in the following steps to locate the library. |
41 Cargo in the following steps to locate the library. |
42 |
42 |
43 4. Download [alg_tools][] and unpack it under the same directory as this |
43 4. Download [alg_tools] and unpack it under the same directory as this |
44 package. |
44 package. |
45 |
45 |
46 [rustup]: https://rustup.rs |
46 [rustup]: https://rustup.rs |
47 [alg_tools]: https://tuomov.iki.fi/software/alg_tools/ |
47 [alg_tools]: https://tuomov.iki.fi/software/alg_tools/ |
48 [Rust]: https://www.rust-lang.org/ |
48 [Rust]: https://www.rust-lang.org/ |
49 [rust-GSL]: https://docs.rs/GSL/6.0.0/rgsl/ |
49 [GNU Scientific Library]: https://docs.rs/GSL/6.0.0/rgsl/ |
50 [gsl]: https://www.gnu.org/software/gsl/ |
50 [gsl]: https://www.gnu.org/software/gsl/ |
51 [Homebrew]: https://brew.sh |
51 [Homebrew]: https://brew.sh |
|
52 [arXiv:2212.02991]: https://arxiv.org/abs/2212.02991 |
52 |
53 |
53 ### Building and running the experiments |
54 ### Building and running the experiments |
54 |
55 |
55 To compile the code and run the experiments in the manuscript, use |
56 To compile the code and run the experiments in the manuscript, use |
56 ```console |
57 ```console |
89 ```console |
90 ```console |
90 cargo doc # build dependency docs |
91 cargo doc # build dependency docs |
91 misc/cargo-d --open # build and open KaTeX-aware docs for this crate |
92 misc/cargo-d --open # build and open KaTeX-aware docs for this crate |
92 ``` |
93 ``` |
93 The `cargo-d` script ensures that KaTeX mathematics is rendered in the |
94 The `cargo-d` script ensures that KaTeX mathematics is rendered in the |
94 generated documentation. Unfortunately, `rustdoc`, akin to Rust largely itself, |
95 generated documentation through an ugly workaround. Unfortunately, |
95 is stuck in 80's 7-bit gringo ASCII world, and does not support modern markdown |
96 `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII |
96 features, such as mathematics. Instead, to render mathematics, an ugly |
97 world, and does not support modern markdown features, such as mathematics. |
97 workaround is needed together with lots of painful raw HTML escapes in the |
|
98 documentation. |
|
99 |
98 |