Sat, 07 Dec 2024 14:08:27 -0500
Update README and dependencies.
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 | |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
19 | only need to manually install the “stable” Rust system itself. |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
20 | At the time of writing this README, [alg_tools] also needs to be downloaded |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
21 | separately. |
26 | 22 | |
23 | 1. Install the [Rust] infrastructure (including Cargo) with [rustup]. | |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
24 | 2. Download [alg_tools] and unpack it under the same directory as this |
26 | 25 | package. |
26 | ||
27 | [rustup]: https://rustup.rs | |
28 | [alg_tools]: https://tuomov.iki.fi/software/alg_tools/ | |
29 | [Rust]: https://www.rust-lang.org/ | |
30 | [GNU Scientific Library]: https://www.gnu.org/software/gsl/ | |
31 | [Homebrew]: https://brew.sh | |
32 | [arXiv:????]: https://arxiv.org/abs/???? | |
33 | ||
34 | ### Building and running the experiments | |
35 | ||
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
36 | To compile and install the program, use: |
26 | 37 | ```console |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
38 | cargo install --path=. |
26 | 39 | ``` |
40 | When doing this for the first time, several dependencies will be downloaded. | |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
41 | After this, you may run the experiment with |
26 | 42 | ```console |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
43 | non-riemannian-opt |
26 | 44 | ``` |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
45 | |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
46 | Alternatively, you may build (without installing) and run the experiments with |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
47 | ```console |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
48 | cargo run --release |
26 | 49 | ``` |
50 | ||
51 | ## Internals | |
52 | ||
53 | If you are interested in the program internals, the integrated source code | |
54 | documentation may be built and opened with | |
55 | ```console | |
56 | cargo doc # build dependency docs | |
57 | misc/cargo-d --open # build and open KaTeX-aware docs for this crate | |
58 | ``` | |
59 | The `cargo-d` script ensures that KaTeX mathematics is rendered in the | |
60 | generated documentation through an ugly workaround. Unfortunately, | |
61 | `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII | |
62 | world, and does not support modern markdown features, such as mathematics. | |
63 |