|
1 |
|
2 # Non-Riemannian optimisation |
|
3 |
|
4 This package contains [Rust] codes for the manuscript “_Forward-backward methods in bilaterally bounded Alenxandov spaces_” ([arXiv:????]) by Heikki von Koch and Tuomo Valkonen |
|
5 ⟨tuomov@iki.fi⟩. It concerns the solution of problems of the type |
|
6 $$ |
|
7 \min_{x ∈ M} F(x) + G(x) |
|
8 $$ |
|
9 where $F$ is a smooth function and $G$ a possibly nonsmooth convex function |
|
10 on a manifold $M$, which we do not assume to be Riemannian. |
|
11 It may, for example, be an embedded manifold in $ℝ^3$, which sharp corners. |
|
12 We have implemented the cube, as well as squared and non-squared distance functions. |
|
13 |
|
14 ## Installation and usage |
|
15 |
|
16 ### Installing dependencies |
|
17 |
|
18 Most dependencies are managed by the Cargo build system of [Rust]. You will |
|
19 only need to install the “nightly” Rust compiler and the |
|
20 [GNU Scientific Library] manually. At the time of writing this README, |
|
21 [alg_tools] also needs to be downloaded separately. |
|
22 |
|
23 1. Install the [Rust] infrastructure (including Cargo) with [rustup]. |
|
24 2. Install a “nightly” release of the Rust compiler. With rustup, installed in |
|
25 the previous step, this can be done with |
|
26 ```console |
|
27 rustup toolchain install nightly |
|
28 ``` |
|
29 3. Download [alg_tools] and unpack it under the same directory as this |
|
30 package. |
|
31 |
|
32 [rustup]: https://rustup.rs |
|
33 [alg_tools]: https://tuomov.iki.fi/software/alg_tools/ |
|
34 [Rust]: https://www.rust-lang.org/ |
|
35 [GNU Scientific Library]: https://www.gnu.org/software/gsl/ |
|
36 [rust-GSL]: https://docs.rs/GSL/6.0.0/rgsl/ |
|
37 [Homebrew]: https://brew.sh |
|
38 [arXiv:????]: https://arxiv.org/abs/???? |
|
39 |
|
40 ### Building and running the experiments |
|
41 |
|
42 To compile the code and run the experiments in the manuscript, use |
|
43 ```console |
|
44 cargo run |
|
45 ``` |
|
46 When doing this for the first time, several dependencies will be downloaded. |
|
47 |
|
48 Alternatively, you may build the executable with |
|
49 ```console |
|
50 cargo build --release |
|
51 ``` |
|
52 and then run it with |
|
53 ``` |
|
54 target/release/non-riemannian-opt |
|
55 ``` |
|
56 |
|
57 ## Internals |
|
58 |
|
59 If you are interested in the program internals, the integrated source code |
|
60 documentation may be built and opened with |
|
61 ```console |
|
62 cargo doc # build dependency docs |
|
63 misc/cargo-d --open # build and open KaTeX-aware docs for this crate |
|
64 ``` |
|
65 The `cargo-d` script ensures that KaTeX mathematics is rendered in the |
|
66 generated documentation through an ugly workaround. Unfortunately, |
|
67 `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII |
|
68 world, and does not support modern markdown features, such as mathematics. |
|
69 |