Fri, 14 Feb 2025 23:31:24 -0500
slice_assume_init_mut deprecation workaround
0 | 1 | |
20 | 2 | # alg_tools |
0 | 3 | |
16 | 4 | This package contains some general utility routines and tools for implementing |
20 | 5 | iterative algorithms and (abstract) numerical computing in [Rust]. Former versions |
6 | of the package were for Julia. They are no longer maintained. Included are: | |
0 | 7 | |
17 | 8 | * [Linear operator], [mapping], [Euclidean space], and [norm] abstractions. |
9 | Matrices and vectors are supported via [nalgebra]. | |
16 | 10 | There is also abstraction for [`AXPY`][AXPY] and [`GEMV`][GEMV] operations. |
88 | 11 | * A facility to create [`Instance`][Instance]s of other types, for easy application |
12 | of functions to various concrete and reference types. | |
13 | * Abstraction of [Fenchel conjugates] and [proximal operators] of convex | |
14 | functions. | |
17 | 15 | * Small (on stack) [vectors] and [cubes] that implement the relevant |
16 | 16 | abstractions and vector space operations. |
17 | 17 | * Multi-dimensional [linear grids], including the familiar-from-Matlab |
16 | 18 | one-dimensional [`linspace`][linspace]. |
17 | 19 | * [Algorithm iterator abstraction] for generically implementing |
16 | 20 | intermittent verbosity and stopping rules in iterative algorithms. |
17 | 21 | * The algorithm iterators can employ a [logger] to store intermittent results |
22 | (e.g. function values) in memory to later [write] into a csv-file. | |
20 | 23 | * Additional [iterators and iteration tools], especially variants of `map` |
16 | 24 | with predictable type signatures. |
17 | 25 | * The `Float` and [associated traits] build upon [num_traits] to |
16 | 26 | conveniently write code that works with any floating point number type. |
17 | 27 | * Geometrical [bisection trees] for efficient representations of sums of |
16 | 28 | functions and branch-and-bound optimisation. |
29 | ||
30 | ## Building the documentation | |
0 | 31 | |
16 | 32 | Integrated source code documentation may be built and opened with |
33 | ```console | |
34 | cargo doc # build dependency docs | |
35 | misc/cargo-d --open # build and open KaTeX-aware docs for this crate | |
36 | ``` | |
37 | The `cargo-d` script ensures that KaTeX mathematics is rendered in the | |
20 | 38 | generated documentation through an ugly workaround. Unfortunately, |
39 | `rustdoc`, akin to Rust largely itself, is stuck in 80's 7-bit gringo ASCII | |
40 | world, and does not support modern markdown features, such as mathematics. | |
16 | 41 | |
42 | ||
20 | 43 | [Rust]: https://www.rust-lang.org |
16 | 44 | [nalgebra]: https://www.nalgebra.org |
20 | 45 | [num_traits]: https://docs.rs/num-traits/latest/num_traits/ |
16 | 46 | [norm]: crate::norms |
47 | [linear grids]: crate::lingrid | |
48 | [Euclidean space]: crate::euclidean | |
49 | [Linear operator]: crate::linops | |
50 | [AXPY]: crate::linops::AXPY | |
51 | [GEMV]: crate::linops::GEMV | |
52 | [linspace]: crate::lingrid::linspace | |
53 | [Algorithm iterator abstraction]: crate::iterate | |
54 | [logger]: crate::logger | |
55 | [write]: crate::tabledump | |
56 | [iterators and iteration tools]: crate::iter | |
57 | [Float]: crate::types::Float | |
58 | [bisection trees]: crate::bisection_tree | |
59 | [mapping]: crate::mapping::Mapping | |
60 | [associated traits]: crate::types | |
61 | [vectors]: crate::loc::Loc | |
62 | [cubes]: crate::sets::Cube | |
88 | 63 | [Instance]: crate::instance::Instance |
64 | [Fenchel conjugates]: crate::convex::Conjugable | |
65 | [proximal operators]: crate::convex::Prox | |
0 | 66 |