@@ -24,18 +24,18 @@ const DEFAULT_DITHER: f64 = 0.05;
2424
2525/// # The MISER Algorithm
2626///
27- /// The Monte Carlo integration algorithm MISER by Press and Farrar (See [1 ]) uses stratified
27+ /// The Monte Carlo integration algorithm MISER by Press and Farrar (See \[1\ ]) uses stratified
2828/// sampling based on variance of the integrand's value on the sampled points. More specifically,
2929/// the original subregion (which must be a Cartesian product of intervals `[a, b]` for real `a,
3030/// b`) is bisected along some dimension such that the integrand's value in those two subregions
3131/// gives the smallest total variance amongst all other bisections. The total samples points are
3232/// then distributed to those subregions according to the variance. This procedure is continued
3333/// recursively until either the recursion depth is reached or the number of sample points
3434/// allocated to that subregion fall under an (adjustable) threshold. The procedure is implemented
35- /// in [ `miser_recurse`] .
35+ /// in (private function) `miser_recurse`.
3636///
3737/// There are several adjustable parameters in this implementation of [`MISER`]. The parameters are
38- /// inspired by those used in [1 ]. The parameters in [`MISER`] are:
38+ /// inspired by those used in \[1\ ]. The parameters in [`MISER`] are:
3939///
4040/// - **Sample Count**: (Default `1000`) A lower bound on the number of points to sample in total.
4141/// The reason this is a lower bound is because if the minimum threshold is fallen under then
@@ -84,7 +84,7 @@ const DEFAULT_DITHER: f64 = 0.05;
8484/// ## References:
8585/// (1) Press, W.H. and Farrar, G.R., 1990. Recursive stratified sampling for multidimensional
8686/// Monte Carlo integration. Computers in Physics, 4(2), pp.190-195.
87- /// (2) https://www.gnu.org/software/gsl/doc/html/montecarlo.html
87+ /// (2) < https://www.gnu.org/software/gsl/doc/html/montecarlo.html>
8888pub struct MISER < F , V , T > {
8989 f : F ,
9090 sample_count : usize ,
@@ -205,9 +205,10 @@ where
205205 ///
206206 /// The alpha value changes the proportions of the allocated samples points to each subregion
207207 /// of the bisection that happens in every recursion call of [`MISER`]. More precisely, the
208- /// allocated points for each subregions follow the following formulas.
208+ /// allocated points for each subregions follow the following formulas:
209209 /// - `N_1 = N * (Var_1^beta / (Var_1^beta + Var_2^beta))`
210210 /// - `N_2 = N * (Var_2^beta / (Var_1^beta + Var_2^beta))`
211+ ///
211212 /// where `N` is the total sample points, `Var_1` and `Var_2` are the variances of the
212213 /// integrand on the first and second subregions, respectively, and `beta = 1 / (1 + alpha)`.
213214 ///
@@ -280,7 +281,7 @@ where
280281 rng : & mut impl rand:: Rng ,
281282 ) -> SolverResult < MeanVariance < T > > {
282283 miser_recurse (
283- & self ,
284+ self ,
284285 & mut from,
285286 & mut to,
286287 rng,
0 commit comments