diff --git a/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py b/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py index 734692506..31ab179cf 100644 --- a/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py +++ b/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py @@ -18,11 +18,12 @@ def uniform_to_gaussian_quadprob( quadprob: QuadratureProblem, mean: FloatLike = 0.0, var: FloatLike = 1.0 ) -> QuadratureProblem: - r"""Creates a new QuadratureProblem for integration against a Gaussian on R^d by - using an existing QuadratureProblem whose integrand is suitable for integration - against the Lebesgue measure on [0,1]^d. + r"""Creates a new QuadratureProblem for integration against a Gaussian on + :math:`\mathbb{R}^d` by using an existing QuadratureProblem whose integrand is + suitable for integration against the Lebesgue measure on :math:`[0,1]^d`. - The multivariate Gaussian is of the form N(mean*(1,...,1),var^2 I_d). + The multivariate Gaussian is of the form :math:`\mathcal{N}(mean \cdot (1, \dotsc, + 1)^\top, var^2 \cdot I_d)`. Using the change of variable formula, we have that @@ -110,11 +111,12 @@ def sum_polynomials( dim: int, a: np.ndarray = None, b: np.ndarray = None, var: FloatLike = 1.0 ) -> QuadratureProblem: r"""Quadrature problem with an integrand taking the form of a sum of polynomials - over :math:'\mathbb{R}^d'. + over :math:`\mathbb{R}^d`. .. math:: f(x) = \sum_{j=0}^p \prod_{i=1}^dim a_{ji} x_i^{b_ji} - The integrand is integrated against a multivariate normal N(0,var * I_d). See [1]_. + The integrand is integrated against a multivariate normal :math:`\mathcal{N}(0,var * + I_d)`. See [1]_. Parameters ---------- diff --git a/src/probnum/problems/zoo/quad/_quadproblems_uniform.py b/src/probnum/problems/zoo/quad/_quadproblems_uniform.py index b84271c14..c4f577d3c 100644 --- a/src/probnum/problems/zoo/quad/_quadproblems_uniform.py +++ b/src/probnum/problems/zoo/quad/_quadproblems_uniform.py @@ -25,7 +25,7 @@ def genz_continuous( dim: int, a: np.ndarray = None, u: np.ndarray = None ) -> QuadratureProblem: - r"""Genz 'continuous' test function on [0,1]^d. + r"""Genz 'continuous' test function on :math:`[0,1]^d`. .. math:: f(x) = \exp(- \sum_{i=1}^d a_i |x_i - u_i|). @@ -112,7 +112,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def genz_cornerpeak( dim: int, a: np.ndarray = None, u: np.ndarray = None ) -> QuadratureProblem: - r"""Genz 'corner peak' test function on [0,1]^d. + r"""Genz 'corner peak' test function on :math:`[0,1]^d`. .. math:: f(x) = (1+\sum_{i=1}^d a_i x_i)^{-d+1} @@ -194,7 +194,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def genz_discontinuous( dim: int, a: np.ndarray = None, u: np.ndarray = None ) -> QuadratureProblem: - r"""Genz 'discontinuous' test function on [0,1]^d. + r"""Genz 'discontinuous' test function on :math:`[0,1]^d`. .. math:: f(x) = @@ -277,7 +277,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def genz_gaussian( dim: int, a: np.ndarray = None, u: np.ndarray = None ) -> QuadratureProblem: - r"""Genz 'Gaussian' test function on [0,1]^d. + r"""Genz 'Gaussian' test function on :math:`[0,1]^d`. .. math:: f(x) = \exp(- \sum_{i=1}^d a_i^2 (x_i - u_i)^2). @@ -355,7 +355,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def genz_oscillatory( dim: int, a: np.ndarray = None, u: np.ndarray = None ) -> QuadratureProblem: - r"""Genz 'oscillatory' test function on [0,1]^d. + r"""Genz 'oscillatory' test function on :math:`[0,1]^d`. .. math:: f(x) = \cos( 2 \pi u_1 + \sum_{i=1}^d a_i x_i). @@ -455,7 +455,7 @@ def hfunc(x): def genz_productpeak( dim: int, a: np.ndarray = None, u: np.ndarray = None ) -> QuadratureProblem: - r"""Genz 'Product Peak' test function on [0,1]^d. + r"""Genz 'Product Peak' test function on :math:`[0,1]^d`. .. math:: f(x) = \prod_{i=1}^d ( a_i^{-2} + (x_i-u_i)^2)^{-1}. @@ -530,7 +530,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def bratley1992(dim: int) -> QuadratureProblem: - r"""'Bratley 1992' test function on [0,1]^d. + r"""'Bratley 1992' test function on :math:`[0,1]^d`. .. math:: f(x) = \sum_{i=1}^d (-1)^i \prod_{j=1}^i x_j. @@ -581,7 +581,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def roos_arnold(dim: int) -> QuadratureProblem: - r"""'Roos & Arnold 1963' test function on [0,1]^d. + r"""'Roos & Arnold 1963' test function on :math:`[0,1]^d`. .. math:: f(x) = \prod_{i=1}^d |4 x_i - 2 |. @@ -628,7 +628,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def gfunction(dim: int) -> QuadratureProblem: - r"""'G-function' test function on [0,1]^d. + r"""'G-function' test function on :math:`[0,1]^d`. .. math:: f(x) = \prod_{i=1}^d \frac{|4 x_i - 2 |+a_i}{1+a_i} @@ -677,7 +677,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def morokoff_caflisch_1(dim: int) -> QuadratureProblem: - r"""'Morokoff & Caflisch 1995' test function number 1 on [0,1]^d. + r"""'Morokoff & Caflisch 1995' test function number 1 on :math:`[0,1]^d`. .. math:: f(x) = (1+1/d)^d \prod_{i=1}^d x_i^{1/d} @@ -726,7 +726,7 @@ def integrand(x: np.ndarray) -> np.ndarray: def morokoff_caflisch_2(dim: int) -> QuadratureProblem: - r"""'Morokoff & Caflisch 1995' test function number 2 on [0,1]^d. + r"""'Morokoff & Caflisch 1995' test function number 2 on :math:`[0,1]^d`. .. math:: f(x) = \frac{1}{(d-0.5)^d} \prod_{i=1}^d (d-x_i)