Fri, 06 Dec 2024 22:36:50 -0500
README improvements
| 26 | 1 | |
| 2 | # Non-Riemannian optimisation | |
| 3 | ||
| 50 | 4 | This package contains [Rust] codes for the manuscript “_Forward-backward methods in bilaterally bounded Alexandov spaces_” ([arXiv:????]) by Heikki von Koch and Tuomo Valkonen |
| 26 | 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 | |
| 51 | 19 | only need to manually install the “stable” Rust system itself. At the time |
| 20 | of writing this README, [alg_tools] also needs to be downloaded separately. | |
| 26 | 21 | |
| 22 | 1. Install the [Rust] infrastructure (including Cargo) with [rustup]. | |
|
48
854e914f99c5
alg_tools now support stable, so return to edition 2021 now to allow stable rust.
Tuomo Valkonen <tuomov@iki.fi>
parents:
26
diff
changeset
|
23 | 2. Install a “stable” release of the Rust compiler. With rustup, installed in |
| 26 | 24 | the previous step, this can be done with |
| 25 | ```console | |
|
48
854e914f99c5
alg_tools now support stable, so return to edition 2021 now to allow stable rust.
Tuomo Valkonen <tuomov@iki.fi>
parents:
26
diff
changeset
|
26 | rustup toolchain install stable |
| 26 | 27 | ``` |
| 28 | 3. Download [alg_tools] and unpack it under the same directory as this | |
| 29 | package. | |
| 30 | ||
| 31 | [rustup]: https://rustup.rs | |
| 32 | [alg_tools]: https://tuomov.iki.fi/software/alg_tools/ | |
| 33 | [Rust]: https://www.rust-lang.org/ | |
| 34 | [GNU Scientific Library]: https://www.gnu.org/software/gsl/ | |
| 35 | [Homebrew]: https://brew.sh | |
| 36 | [arXiv:????]: https://arxiv.org/abs/???? | |
| 37 | ||
| 38 | ### Building and running the experiments | |
| 39 | ||
| 40 | To compile the code and run the experiments in the manuscript, use | |
| 41 | ```console | |
| 42 | cargo run | |
| 43 | ``` | |
| 44 | When doing this for the first time, several dependencies will be downloaded. | |
| 45 | ||
| 46 | Alternatively, you may build the executable with | |
| 47 | ```console | |
| 48 | cargo build --release | |
| 49 | ``` | |
| 50 | and then run it with | |
| 51 | ``` | |
| 52 | target/release/non-riemannian-opt | |
| 53 | ``` | |
| 54 | ||
| 55 | ## Internals | |
| 56 | ||
| 57 | If you are interested in the program internals, the integrated source code | |
| 58 | documentation may be built and opened with | |
| 59 | ```console | |
| 60 | cargo doc # build dependency docs | |
| 61 | misc/cargo-d --open # build and open KaTeX-aware docs for this crate | |
| 62 | ``` | |
| 63 | The `cargo-d` script ensures that KaTeX mathematics is rendered in the | |
| 64 | generated documentation through an ugly workaround. Unfortunately, | |
| 65 | `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII | |
| 66 | world, and does not support modern markdown features, such as mathematics. | |
| 67 |