smolyax
Overview
ℹ️ For installation guidelines and examples see the project README.
smolyax.interpolation
: Smolyak barycentric operator
Central class SmolyakBarycentricInterpolator
constructs the interpolant to a multivariate and vector-valued
function $f$
$$
I^{\Lambda_{\boldsymbol{k},t}} [f] =
\sum \limits_{\boldsymbol{\nu} \in \Lambda_{\boldsymbol{k},t}}
\zeta_{\Lambda_{\boldsymbol{k},t}, \boldsymbol{\nu}} I^\boldsymbol{\nu}[f]
$$
on sparse grids governed by anisotropic multi-index sets $\Lambda_{\boldsymbol{k},t}$.
Additionally supports computing the integral (which corresponds to a quadrature approximation of the integral of $f$),
as well as evaluating its gradient.
smolyax.indices
: Multi-index sets
Provides numba-accelerated routines to
- construct anisotropic total degree multi-index sets of the form $$ \Lambda_{\boldsymbol{k}, t} := \{\boldsymbol{\nu} \in \mathbb{N}_0^{d} \ : \ \sum_{j=1}^{d} k_j \nu_j < t\}. $$
- compute the Smolyak coefficients $\zeta_{\Lambda_{\boldsymbol{k},t}, \boldsymbol{\nu}} := \sum \limits_{\boldsymbol{e} \in \{0,1\}^d : \boldsymbol{\nu}+\boldsymbol{e} \in \Lambda_{\boldsymbol{k},t}} (-1)^{|\boldsymbol{e}|}$.
- find thresholds $t$ that for given $\boldsymbol{k}$ allows to construct $\Lambda_{\boldsymbol{k}, t}$ with a specified target cardinality.
smolyax.nodes
: Interpolation node generators
Unifies different 1-D rules under an abstract Generator1D
interface:
Class | Domain | Nested |
---|---|---|
Leja1D |
bounded interval | yes |
GaussHermite1D |
$\mathbb R$ (Gaussian) | no |
The interface allows for affine scaling of the domains and random sampling.
A Generator
container bundles per-dimension generators.
smolyax.barycentric
and smolyax.quadrature
: Tensor-product kernels
Implements the barycentric formula in one dimension and extends it to high-dimensional tensor-product form $I^\boldsymbol{\nu}$. Provides the accompanying expressions for integrals and gradients of the tensor-product terms. The routines are JIT-compatible and serve as internal utilities for the high-level interpolator.
1r""" 2# Overview 3 4--- 5 6ℹ️ **For installation guidelines and examples see the 7 [project README](https://github.com/JoWestermann/smolyax#readme).** 8 9--- 10 11### `smolyax.interpolation`: Smolyak barycentric operator 12 13Central class **`SmolyakBarycentricInterpolator`** constructs the interpolant to a multivariate and vector-valued 14function $f$ 15$$ 16 I^{\Lambda_{\boldsymbol{k},t}} [f] = 17 \sum \limits_{\boldsymbol{\nu} \in \Lambda_{\boldsymbol{k},t}} 18 \zeta_{\Lambda_{\boldsymbol{k},t}, \boldsymbol{\nu}} I^\boldsymbol{\nu}[f] 19$$ 20on sparse grids governed by anisotropic multi-index sets $\Lambda_{\boldsymbol{k},t}$. 21Additionally supports computing the integral (which corresponds to a quadrature approximation of the integral of $f$), 22as well as evaluating its gradient. 23 24### `smolyax.indices`: Multi-index sets 25Provides numba-accelerated routines to 26* construct anisotropic total degree multi-index sets of the form 27$$ 28 \Lambda_{\boldsymbol{k}, t} := \\{\boldsymbol{\nu} \in \mathbb{N}_0^{d} \ : \ \sum_{j=1}^{d} k_j \nu_j < t\\}. 29$$ 30* compute the Smolyak coefficients $\zeta_{\Lambda_{\boldsymbol{k},t}, \boldsymbol{\nu}} := \sum \limits_{\boldsymbol{e} 31 \in \\{0,1\\}^d : \boldsymbol{\nu}+\boldsymbol{e} \in \Lambda_{\boldsymbol{k},t}} (-1)^{|\boldsymbol{e}|}$. 32* find thresholds $t$ that for given $\boldsymbol{k}$ allows to construct $\Lambda_{\boldsymbol{k}, t}$ with a 33 specified target cardinality. 34 35### `smolyax.nodes`: Interpolation node generators 36 37Unifies different 1-D rules under an abstract `Generator1D` interface: 38 39| Class | Domain | Nested | 40|-------|--------|--------| 41| `Leja1D` | bounded interval | yes | 42| `GaussHermite1D` | $\mathbb R$ (Gaussian) | no | 43 44The interface allows for affine scaling of the domains and random sampling. 45 46A `Generator` container bundles per-dimension generators. 47 48### `smolyax.barycentric` and `smolyax.quadrature`: Tensor-product kernels 49Implements the barycentric formula in one dimension and extends it to high-dimensional tensor-product form 50$I^\boldsymbol{\nu}$. Provides the accompanying expressions for integrals and gradients of the tensor-product terms. 51The routines are JIT-compatible and serve as internal utilities for the high-level interpolator. 52"""