Sat, 07 Dec 2024 14:04:26 -0500
Zenodo packaging hacks
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 |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
5 | methods in bilaterally bounded Alexandov spaces_” ([arXiv:????]) |
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, |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
13 | for example, be an embedded manifold in $ℝ^3$, which sharp corners. |
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 | ||
62 | 21 | Most dependencies are managed by the Cargo build system of [Rust]. You will only need to |
22 | manually install the “stable” Rust system itself. This can be done with [rustup]. | |
26 | 23 | |
24 | [rustup]: https://rustup.rs | |
25 | [alg_tools]: https://tuomov.iki.fi/software/alg_tools/ | |
26 | [Rust]: https://www.rust-lang.org/ | |
27 | [arXiv:????]: https://arxiv.org/abs/???? | |
28 | ||
29 | ### Building and running the experiments | |
30 | ||
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
31 | To compile and install the program, use: |
26 | 32 | ```console |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
33 | cargo install --path=. |
26 | 34 | ``` |
35 | 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
|
36 | After this, you may run the experiment with |
26 | 37 | ```console |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
38 | non-riemannian-opt |
26 | 39 | ``` |
52
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
40 | |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
41 | 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
|
42 | ```console |
1d8e5731a4d3
Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents:
51
diff
changeset
|
43 | cargo run --release |
26 | 44 | ``` |
45 | ||
54
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
46 | ### Generating the graphical illustrations |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
47 | |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
48 | 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
|
49 | 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
|
50 | `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
|
51 | ```console |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
52 | cd visualisations |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
53 | pdflatex cube |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
54 | pdflatex cylinder |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
55 | ``` |
cfd8d2304e9e
Some README and Cargo.toml details
Tuomo Valkonen <tuomov@iki.fi>
parents:
52
diff
changeset
|
56 | |
59 | 57 | ## Internals and auxiliary results |
26 | 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 | ||
59 | 70 | In the `doc/` subdirectory, you can find `aux_results.pdf` (and `.tex`) that |
71 | includes additional detailed geodesic formulas that are not included in the | |
72 | main manuscript. | |
73 |