README.md

Mon, 05 Dec 2022 23:50:22 +0200

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 05 Dec 2022 23:50:22 +0200
changeset 80
24e470b278e4
parent 74
df92e78cc3f4
permissions
-rw-r--r--

Zenodo packaging hacks

0
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
1
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
2 # Proximal methods for point source localisation: the implementation
0
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
3
40
896b42b5ac1a README updates
Tuomo Valkonen <tuomov@iki.fi>
parents: 35
diff changeset
4 This package contains the [Rust] codes for the numerical experiments in the articles
74
df92e78cc3f4 README typofix
Tuomo Valkonen <tuomov@iki.fi>
parents: 72
diff changeset
5 * T. Valkonen, “_Proximal methods for point source localisation_”, Journal of Nonsmooth Analysis and Optimization 4 (2023), 10433, [doi:10.46298/jnsao-2023-10433] ([arXiv:2212.02991])
57
5c9c5649c35d Add arXiv link of second paper to README
Tuomo Valkonen <tuomov@iki.fi>
parents: 50
diff changeset
6 * T. Valkonen, “_Point source localisation with unbalanced optimal transport_” (2025), submitted, [arXiv:2502.12417]
40
896b42b5ac1a README updates
Tuomo Valkonen <tuomov@iki.fi>
parents: 35
diff changeset
7
896b42b5ac1a README updates
Tuomo Valkonen <tuomov@iki.fi>
parents: 35
diff changeset
8 It concerns solution of problems of the type
0
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
9 $$
12
861f6c033646 Oops, some μ were x in the README.
Tuomo Valkonen <tuomov@iki.fi>
parents: 9
diff changeset
10 \min_{μ ∈ ℳ(Ω)}~ F(μ) + λ \|μ\|_{ℳ(Ω)} + δ_{≥ 0}(μ),
0
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
11 $$
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
12 where $F$ is a data term, and $ℳ(Ω)$ is the space of Radon measures on the
12
861f6c033646 Oops, some μ were x in the README.
Tuomo Valkonen <tuomov@iki.fi>
parents: 9
diff changeset
13 (rectangular) domain $Ω ⊂ ℝ^n$. Implemented are $F(μ)=\frac12\|Aμ-b\|_2^2$ and
861f6c033646 Oops, some μ were x in the README.
Tuomo Valkonen <tuomov@iki.fi>
parents: 9
diff changeset
14 $F(μ)=\|Aμ-b\|_1$ for the forward operator $A \in 𝕃(ℳ(Ω); ℝ^m)$ modelling a
40
896b42b5ac1a README updates
Tuomo Valkonen <tuomov@iki.fi>
parents: 35
diff changeset
15 simple sensor grid.
0
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
16
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
17 ## Installation and usage
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
18
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
19 ### Installing dependencies
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
20
13
bdc57366d4f5 arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
21 Most dependencies are managed by the Cargo build system of [Rust]. You will
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
22 only need to install the “nightly” Rust compiler and the
80
24e470b278e4 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
23 [GNU Scientific Library] manually.
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
24
13
bdc57366d4f5 arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
25 1. Install the [Rust] infrastructure (including Cargo) with [rustup].
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
26 2. Install a “nightly” release of the Rust compiler. With rustup, installed in
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
27 the previous step, this can be done with
72
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
28
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
29 rustup toolchain install nightly
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
30
13
bdc57366d4f5 arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
31 3. Install [GNU Scientific Library]. On a Mac with [Homebrew] installed,
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
32 this can be done with
72
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
33
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
34 brew install gsl
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
35
17
de8d43ebfd0d Oops, broke some README external links
Tuomo Valkonen <tuomov@iki.fi>
parents: 13
diff changeset
36 For other operating systems, suggestions are available in the [rust-GSL]
61
4f468d35fa29 General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents: 57
diff changeset
37 crate documentation. If not correctly installed, you may need to pass
4f468d35fa29 General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents: 57
diff changeset
38 extra `RUSTFLAGS` options to Cargo in the following steps to locate the
4f468d35fa29 General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents: 57
diff changeset
39 library.
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
40
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
41 [rustup]: https://rustup.rs
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
42 [alg_tools]: https://tuomov.iki.fi/software/alg_tools/
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
43 [Rust]: https://www.rust-lang.org/
17
de8d43ebfd0d Oops, broke some README external links
Tuomo Valkonen <tuomov@iki.fi>
parents: 13
diff changeset
44 [GNU Scientific Library]: https://www.gnu.org/software/gsl/
de8d43ebfd0d Oops, broke some README external links
Tuomo Valkonen <tuomov@iki.fi>
parents: 13
diff changeset
45 [rust-GSL]: https://docs.rs/GSL/6.0.0/rgsl/
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
46 [Homebrew]: https://brew.sh
13
bdc57366d4f5 arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
47 [arXiv:2212.02991]: https://arxiv.org/abs/2212.02991
57
5c9c5649c35d Add arXiv link of second paper to README
Tuomo Valkonen <tuomov@iki.fi>
parents: 50
diff changeset
48 [arXiv:2502.12417]: https://arxiv.org/abs/2502.12417
40
896b42b5ac1a README updates
Tuomo Valkonen <tuomov@iki.fi>
parents: 35
diff changeset
49 [doi:10.46298/jnsao-2023-10433]: http://doi.org/10.46298/jnsao-2023-10433
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
50
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
51 ### Building and running the experiments
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
52
35
b087e3eab191 New version of sliding.
Tuomo Valkonen <tuomov@iki.fi>
parents: 17
diff changeset
53 To compile and install the program, use
72
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
54
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
55 cargo install --path=.
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
56
35
b087e3eab191 New version of sliding.
Tuomo Valkonen <tuomov@iki.fi>
parents: 17
diff changeset
57 When doing this for the first time, several dependencies will be downloaded.
40
896b42b5ac1a README updates
Tuomo Valkonen <tuomov@iki.fi>
parents: 35
diff changeset
58 Now you can run the default set of experiments with
72
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
59
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
60 pointsource_experiments -o results --max-iter 4000 1d_fast 2d_fast 1d_tv_fast 2d_tv_fast
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
61
35
b087e3eab191 New version of sliding.
Tuomo Valkonen <tuomov@iki.fi>
parents: 17
diff changeset
62 The `-o results` option tells `pointsource_algs` to write results in the
b087e3eab191 New version of sliding.
Tuomo Valkonen <tuomov@iki.fi>
parents: 17
diff changeset
63 `results` directory. The option is required.
b087e3eab191 New version of sliding.
Tuomo Valkonen <tuomov@iki.fi>
parents: 17
diff changeset
64
b087e3eab191 New version of sliding.
Tuomo Valkonen <tuomov@iki.fi>
parents: 17
diff changeset
65 Alternatively, you may build and run the program without installing with
72
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
66
74
df92e78cc3f4 README typofix
Tuomo Valkonen <tuomov@iki.fi>
parents: 72
diff changeset
67 cargo run --release -- -o results --max-iter 4000 1d_fast 2d_fast 1d_tv_fast 2d_tv_fast
72
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
68
57
5c9c5649c35d Add arXiv link of second paper to README
Tuomo Valkonen <tuomov@iki.fi>
parents: 50
diff changeset
69 The double-dash separates the options for the Cargo build system
61
4f468d35fa29 General forward operators, separation of measures into own crate, and other architecture improvements to support the pointsource_pde crate.
Tuomo Valkonen <tuomov@iki.fi>
parents: 57
diff changeset
70 and `pointsource_experiments`.
0
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
71
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
72 ### Documentation
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
73
9
21b0e537ac0e Command line parameter passing simplifications and make `-o` required.
Tuomo Valkonen <tuomov@iki.fi>
parents: 6
diff changeset
74 Use the `--help` option to get an extensive listing of command line options to
35
b087e3eab191 New version of sliding.
Tuomo Valkonen <tuomov@iki.fi>
parents: 17
diff changeset
75 customise algorithm parameters and the experiments performed.
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
76
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
77 ## Internals
0
eb3c7813b67a Initial version
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
78
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
79 If you are interested in the program internals, the integrated source code
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
80 documentation may be built and opened with
72
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
81
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
82 cargo doc # build dependency docs
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
83 misc/cargo-d --open # build and open KaTeX-aware docs for this crate
e9a460a0e638 New simplified sliding a posteriori rule. Enable scaling heuristic from fixed `measure` crate. “Fast” spread Lipschitz factor fixes, etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 61
diff changeset
84
6
bcb508479948 README fine-tuning and build.rs for uglifying it for rustdoc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
85 The `cargo-d` script ensures that KaTeX mathematics is rendered in the
13
bdc57366d4f5 arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
86 generated documentation through an ugly workaround. Unfortunately,
bdc57366d4f5 arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
87 `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII
bdc57366d4f5 arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
88 world, and does not support modern markdown features, such as mathematics.
80
24e470b278e4 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
89
24e470b278e4 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
90 ## Source repository
24e470b278e4 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
91
24e470b278e4 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
92 A Mercurial repository is available; see
24e470b278e4 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
93 https://tuomov.iki.fi/software/pointsource_algs/.

mercurial