Wed, 22 Apr 2026 23:41:59 -0500
Fix internal links in documentation
| 5 | 1 | /*! |
| 2 | Geometrical bisection trees and efficient representations of sums of functions. | |
| 3 | ||
| 4 | [Bisection trees][BTImpl] subdivide at each branching node a [cubical][crate::sets::Cube] domain of | |
| 5 | dimension $N$ into $P=2^N$ subcubes at a branching point. Objects implementing [`Support`] can be | |
| 6 | [inserted][BTImpl::insert] into the leaves of the tree via a low storage requirement identifier. | |
| 7 | The identifier is inserted into *every* leaf node of the tree intersected by the cube provided | |
| 8 | by [`Support::support_hint`]. | |
| 9 | ||
| 10 | Bisection tree functions or [`BTFN`]s use bisection trees for efficient presentations of sums | |
| 11 | $\sum_{k=1}^m f_k$ of mathematical functions $f_k$, where each $f_k$ typically has a small | |
| 12 | support, i.e., set $\\{x \mid f(x) ≠ 0 \\}$, compared to the support of the entire sum. | |
| 13 | To do so, the data type representing $f_k$ needs to implement [`Support`]. To evaluate the | |
| 14 | value of the sum, each $f_k$ also needs to implement [`Mapping`][crate::mapping::Mapping]. | |
| 15 | Moreover, the sum needs to be represented by a [`SupportGenerator`] that associates to a | |
| 16 | low-storage-requirement identifier (typically `usize`) an object of the type that represents | |
|
197
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
17 | $f_k$. [`BTFN`]s support basic vector space operations, and |
|
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
18 | [minimisation][crate::bounds::MinMaxMapping::minimise] and |
|
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
19 | [maximisation][crate::bounds::MinMaxMapping::maximise] |
|
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
20 | via a [branch-and-bound strategy][BTSearch::search_and_refine]. |
| 5 | 21 | |
| 22 | The nodes of a bisection tree also store aggregate information about the objects stored in the | |
| 23 | tree via an [`Aggregator`]. This way, rough upper and lower [bound][Bounds] estimates on | |
| 24 | $\sum_{k=1}^m f_k$ can be efficiently maintained in the tree, based on corresponding estimates | |
| 25 | on each $f_k$. This is done [locally][LocalAnalysis] for every node and corresponding subcube | |
| 26 | of the domain of the tree. | |
| 27 | ||
| 28 | ## Type parameters | |
| 29 | ||
| 30 | The various types and traits herein depend on several type parameters: | |
| 31 | ||
| 32 | - `N` is the geometrical dimension and `F` the numerical type for coordinates. | |
| 33 | - `P` is the branching factor and would generally equal $2^N$, but has to be explicitly specified | |
| 34 | due to current restrictions in Rust's const generics. | |
| 35 | - `D` is the data/identifier stored in the bisection tree, and `A` the [aggregate][Aggregator] | |
| 36 | information of all the data in a branch. | |
| 37 | ||
| 38 | ## Starting points | |
| 39 | ||
| 40 | [`BTImpl::new`] creates a new bisection tree. [`BTImpl::insert`] can be used to insert new data | |
| 41 | into it. [`BTImpl::iter_at`] iterates over the data at a point `x` of the domain of the tree. | |
| 42 | ||
| 43 | A new [`BTFN`] can be constructed with [`BTFN::construct`] given an implementation of | |
| 44 | a [`SupportGenerator`]. They can be summed and multipliced by a schalar using standard arithmetic | |
| 45 | operations. The types of the objects in two summed `BTFN`s do not need to be the same. | |
| 46 | To find an approximate minimum of a `BTFN` using a branch-and-bound strategy, | |
|
197
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
47 | use [`crate::bounds::MinMaxMapping::minimise`]. |
|
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
48 | [`crate::bounds::Bounded::bounds`] provides a shortcut to [`GlobalAnalysis`] with the |
| 5 | 49 | [`Bounds`] aggregator. If the rough bounds so obtained do not indicate that the `BTFN` is in some |
| 50 | given bounds, instead of doing a full minimisation and maximisation for higher quality bounds, | |
|
197
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
51 | it is more efficient to use [`crate::bounds::MinMaxMapping::has_upper_bound`] and |
|
1f301affeae3
Fix internal links in documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
52 | [`crate::bounds::MinMaxMapping::has_lower_bound`]. |
| 5 | 53 | */ |
| 0 | 54 | |
| 55 | mod supportid; | |
| 56 | pub use supportid::*; | |
| 57 | mod aggregator; | |
| 58 | pub use aggregator::*; | |
| 59 | mod either; | |
| 60 | pub use either::*; | |
| 61 | mod support; | |
| 62 | pub use support::*; | |
| 63 | mod bt; | |
| 64 | pub use bt::*; | |
| 65 | mod refine; | |
| 66 | pub use refine::*; | |
| 67 | mod btfn; | |
| 68 | pub use btfn::*; |