Mon, 31 Mar 2025 21:02:35 -0500
arXiv link
26 | 1 | |
2 | # Non-Riemannian optimisation | |
3 | ||
54
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
4 | This package contains [Rust] codes for the manuscript “_Forward-backward |
64 | 5 | methods in bilaterally bounded Alexandrov spaces_” ([arXiv:2503.24126]) |
54
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
6 | by Heikki von Koch and Tuomo Valkonen ⟨tuomov@iki.fi⟩. |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
7 | It concerns the solution of problems of the type |
26 | 8 | $$ |
9 | \min_{x ∈ M} F(x) + G(x) | |
10 | $$ | |
11 | where $F$ is a smooth function and $G$ a possibly nonsmooth convex function | |
54
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
12 | on a manifold $M$, which we do not assume to be Riemannian. It may, |
63 | 13 | for example, be an embedded manifold in $ℝ^3$ with sharp edges. |
54
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
14 | We have implemented the cube and the cylinder, as well as squared and |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
15 | non-squared distance functions. |
26 | 16 | |
17 | ## Installation and usage | |
18 | ||
19 | ### Installing dependencies | |
20 | ||
21 | 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
|
22 | only need to manually install the “stable” Rust system itself. |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
23 | 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
|
24 | separately. |
26 | 25 | |
54
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
26 | 1. Install the [Rust] infrastructure (including Cargo) with [rustup]. |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
27 | 2. Download [alg_tools] and unpack it under the same directory as this |
26 | 28 | package. |
29 | ||
30 | [rustup]: https://rustup.rs | |
31 | [alg_tools]: https://tuomov.iki.fi/software/alg_tools/ | |
32 | [Rust]: https://www.rust-lang.org/ | |
64 | 33 | [arXiv:2503.24126]: https://arxiv.org/abs/2503.24126 |
26 | 34 | |
35 | ### Building and running the experiments | |
36 | ||
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
37 | To compile and install the program, use: |
26 | 38 | ```console |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
39 | cargo install --path=. |
26 | 40 | ``` |
41 | 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
|
42 | After this, you may run the experiment with |
26 | 43 | ```console |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
44 | non-riemannian-opt |
26 | 45 | ``` |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
46 | |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
47 | 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
|
48 | ```console |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
49 | cargo run --release |
26 | 50 | ``` |
51 | ||
54
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
52 | ### Generating the graphical illustrations |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
53 | |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
54 | We include LaTeX/PGFPLOTS files for graphically illustrating the numerical results. |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
55 | To generate `cube.pdf` and `cylinder.pdf` that visualise the computations, after running |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
56 | `non-riemannian-opt` as indicated above, you can use: |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
57 | ```console |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
58 | cd visualisations |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
59 | pdflatex cube |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
60 | pdflatex cylinder |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
61 | ``` |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
62 | |
59 | 63 | ## Internals and auxiliary results |
26 | 64 | |
65 | If you are interested in the program internals, the integrated source code | |
66 | documentation may be built and opened with | |
67 | ```console | |
68 | cargo doc # build dependency docs | |
69 | misc/cargo-d --open # build and open KaTeX-aware docs for this crate | |
70 | ``` | |
71 | The `cargo-d` script ensures that KaTeX mathematics is rendered in the | |
72 | generated documentation through an ugly workaround. Unfortunately, | |
73 | `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII | |
74 | world, and does not support modern markdown features, such as mathematics. | |
75 | ||
59 | 76 | In the `doc/` subdirectory, you can find `aux_results.pdf` (and `.tex`) that |
77 | includes additional detailed geodesic formulas that are not included in the | |
64 | 78 | main manuscript. |