README.md

Sat, 07 Dec 2024 14:08:27 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 07 Dec 2024 14:08:27 -0500
changeset 52
1d8e5731a4d3
parent 51
e9ce0256d0aa
child 54
cfd8d2304e9e
permissions
-rw-r--r--

Update README and dependencies.

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
50
8c7fb7f3d7e5 typofix
Tuomo Valkonen <tuomov@iki.fi>
parents: 48
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
5 ⟨tuomov@iki.fi⟩. It concerns the solution of problems of the type
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
6 $$
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
7 \min_{x ∈ M} F(x) + G(x)
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 where $F$ is a smooth function and $G$ a possibly nonsmooth convex function
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
10 on a manifold $M$, which we do not assume to be Riemannian.
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
11 It may, for example, be an embedded manifold in $ℝ^3$, which sharp corners.
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
12 We have implemented the cube, as well as squared and non-squared distance functions.
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
13
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
14 ## Installation and usage
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
15
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
16 ### Installing dependencies
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
17
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
22
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
25 package.
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
27 [rustup]: https://rustup.rs
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
28 [alg_tools]: https://tuomov.iki.fi/software/alg_tools/
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
29 [Rust]: https://www.rust-lang.org/
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
30 [GNU Scientific Library]: https://www.gnu.org/software/gsl/
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
31 [Homebrew]: https://brew.sh
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
32 [arXiv:????]: https://arxiv.org/abs/????
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
33
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
34 ### Building and running the experiments
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
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 cargo install --path=.
26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
39 ```
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
42 ```console
52
1d8e5731a4d3 Update README and dependencies.
Tuomo Valkonen <tuomov@iki.fi>
parents: 51
diff changeset
43 non-riemannian-opt
26
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
49 ```
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
50
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
51 ## Internals
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
52
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
53 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
54 documentation may be built and opened with
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
55 ```console
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
56 cargo doc # build dependency docs
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
57 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
58 ```
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
59 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
60 generated documentation through an ugly workaround. Unfortunately,
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
61 `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
62 world, and does not support modern markdown features, such as mathematics.
be0f9185b075 README, LICENSE, doc-building.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
63

mercurial