README.md

Sat, 07 Dec 2024 14:04:26 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 07 Dec 2024 14:04:26 -0500
changeset 62
6d9de6d05ef7
parent 59
743984f4664e
permissions
-rw-r--r--

Zenodo packaging hacks

26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
1
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
2 # Non-Riemannian optimisation
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
8 $$
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
9 \min_{x ∈ M} F(x) + G(x)
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
10 $$
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
16
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
17 ## Installation and usage
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
18
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
19 ### Installing dependencies
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
20
62
6d9de6d05ef7 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 59
diff changeset
21 Most dependencies are managed by the Cargo build system of [Rust]. You will only need to
6d9de6d05ef7 Zenodo packaging hacks
Tuomo Valkonen <tuomov@iki.fi>
parents: 59
diff changeset
22 manually install the “stable” Rust system itself. This can be done with [rustup].
26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
23
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
24 [rustup]: https://rustup.rs
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
25 [alg_tools]: https://tuomov.iki.fi/software/alg_tools/
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
26 [Rust]: https://www.rust-lang.org/
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
27 [arXiv:????]: https://arxiv.org/abs/????
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
28
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
29 ### Building and running the experiments
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
32 ```console
52
1d8e5731a4d3 Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents: 51
diff changeset
33 cargo install --path=.
26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
34 ```
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
37 ```console
52
1d8e5731a4d3 Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents: 51
diff changeset
38 non-riemannian-opt
26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
44 ```
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
743984f4664e Add auxiliary results
Tuomo Valkonen <tuomov@iki.fi>
parents: 54
diff changeset
57 ## Internals and auxiliary results
26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
58
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
59 If you are interested in the program internals, the integrated source code
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
60 documentation may be built and opened with
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
61 ```console
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
62 cargo doc # build dependency docs
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
63 misc/cargo-d --open # build and open KaTeX-aware docs for this crate
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
64 ```
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
65 The `cargo-d` script ensures that KaTeX mathematics is rendered in the
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
66 generated documentation through an ugly workaround. Unfortunately,
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
67 `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
68 world, and does not support modern markdown features, such as mathematics.
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
69
59
743984f4664e Add auxiliary results
Tuomo Valkonen <tuomov@iki.fi>
parents: 54
diff changeset
70 In the `doc/` subdirectory, you can find `aux_results.pdf` (and `.tex`) that
743984f4664e Add auxiliary results
Tuomo Valkonen <tuomov@iki.fi>
parents: 54
diff changeset
71 includes additional detailed geodesic formulas that are not included in the
743984f4664e Add auxiliary results
Tuomo Valkonen <tuomov@iki.fi>
parents: 54
diff changeset
72 main manuscript.
743984f4664e Add auxiliary results
Tuomo Valkonen <tuomov@iki.fi>
parents: 54
diff changeset
73

mercurial