sgpykit
Functions
|
Return entries from the Gauss-Kronrod level table. |
|
Compute an adaptive sparse grid approximation of a function f. |
|
Construct a reduced sparse grid structure from given points and weights. |
|
Evaluate the k-th Chebyshev polynomial of the first kind on [a,b]. |
|
Evaluate the multidimensional Chebyshev polynomial of the first kind of order k (multi-index) on [a,b]^N. |
|
Check if a multiindex is admissible with respect to an index set. |
|
Check if a given index set is admissible and return the admissible set. |
|
|
|
Compute the coefficients of the combination technique expression of a sparse grid. |
|
Compare the points of two sparse grids. |
|
Convert a tensor grid interpolant to a modal expansion in orthogonal polynomials. |
|
Compute Sobol indices from a sparse grid approximation of a scalar-valued function. |
|
Convert a sparse grid interpolant to a modal (spectral) expansion. |
|
Generate a sparse grid (and corresponding quadrature weights) as a linear combination of full tensor grids, employing formula (2.9) of [Nobile-Tempone-Webster, SINUM 46/5, pages 2309-2345]. |
|
Produce a grid obtained by adding a single multi-idx to a previously existing grid. |
|
Create a sparse grid starting from a multiindex-set rather than from a rule IDXSET(I) <= W. |
|
Create a sparse grid with a quick preset configuration. |
|
Define the level-to-knots and index set functions for a given sparse grid rule. |
|
Compute the combination technique contributions of a multi-index. |
|
Compute derivatives (gradients) of a scalar-valued function f: R^N -> R by centered finite differences formulas applied to the sparse grid approximation of f. |
|
Check if the given tolerance is sufficient to detect identical points. |
|
Evaluate a function on a sparse grid, possibly recycling previous calls. |
|
Save knots of a reduced sparse grid to an ASCII file. |
|
Generate the total-degree multi-index set TD(w) in N dimensions. |
|
|
|
Find specific rows of a matrix that is sorted lexicographically. |
|
Find specific rows of a matrix that is sorted lexicographically up to TOL. |
|
Evaluate the k-th generalized Laguerre polynomial orthonormal in [0, +inf). |
|
Evaluate the multidimensional generalized Laguerre polynomial of order k (multi-index) orthonormal on [0, +inf)^N with respect to the weight function: rho = prod_i beta_i^(alpha_i+1)/Gamma(alpha_i+1) * x^alpha_i * exp(-beta_i * x), where alpha_i > -1 and beta_i > 0. |
|
Generate a pattern matrix for the Cartesian product of sequences. |
|
Build a mapping function to shift sparse grids from a reference domain to a target domain. |
|
Evaluate the k-th orthonormal Hermite polynomial at points x. |
|
Evaluate the multidimensional Hermite polynomial of order k (multi-index) orthonormal on [-inf, +inf]^N with respect to the Gaussian weight function. |
|
Compute the Hessian of a scalar-valued function f: R^N -> R by finite differences applied to the sparse grids approximation of f. |
|
Interpolate a function on a sparse grid. |
|
Check if the input is a sparse grid. |
|
Check if a given struct is a tensor grid or a tensor grid in a sparse grid struct. |
|
Compare two sparse grids for equality. |
|
Compare two tensor grids field by field, checking that the two grids are identical and accounting for numerical tolerance when comparing knots and weights. |
|
Check lexicographic order of vectors. |
|
Check if vector a is lexicographically less-or-equal than vector b up to a numerical tolerance. |
|
Check if a given object is a reduced sparse grid. |
|
Evaluate the k-th Jacobi probabilistic polynomial orthonormal in [a,b]. |
|
Evaluate the multidimensional probabilistic Jacobi polynomial of order k (multi-index) orthonormal on [a1,b1] x [a2,b2] x [a3,b3] x . |
|
Calculate the collocation points and weights for the Clenshaw-Curtis integration formula. |
|
Compute collocation points and weights for Genz-Keister quadrature. |
|
Calculate the collocation points (x) and weights (w) for Gaussian integration with respect to the Beta distribution weight function. |
|
Compute the first n collocation points (x) and the corresponding weights (w) for the weighted Leja sequence for integration w.r.t to the weight function rho(x)=Gamma(alpha+beta+2)/ (Gamma(alpha+1)*Gamma(beta+1)*(x_b-x_a)^(alpha+beta+1)) * (x-x_a)^alpha * (x_b-x)^beta i.e. the density of a Beta random variable with range [x_a,x_b], alpha,beta>-1. |
|
Compute collocation points and weights for Gaussian integration with respect to the exponential weight function. |
|
Returns the collocation points (x) and the weights (w) for the weighted Leja sequence for integration with respect to the weight function rho(x) = exp(-lambda * abs(x)), lambda > 0, i.e., the density of an exponential random variable with rate parameter lambda. |
|
Compute collocation points and weights for Gaussian integration w.r.t. |
|
Compute the first n collocation points and corresponding weights for the weighted Leja sequence for integration with respect to the Gamma density. |
|
Compute Leja points and weights for numerical integration. |
|
Generate nodes and weights for the n-point midpoint quadrature rule. |
|
Calculate the collocation points (x) and weights (w) for Gaussian integration with respect to the weight function rho(x) = 1/sqrt(2*pi*sigma^2) * exp(-(x-mi)^2 / (2*sigma^2)), i.e., the density of a Gaussian random variable with mean mi and standard deviation sigma. |
|
Compute collocation points and weights for Gaussian-weighted Leja sequences. |
|
Compute knots and weights for the trapezoidal quadrature rule. |
|
Returns the collocation points (x) and the weights (w) for the weighted Leja sequence for integration with respect to the weight function rho(x) = 2/(b-a)^2 (b-x), i.e., a linear decreasing pdf over the interval [a, b]. |
|
Calculate collocation points and weights for Gaussian integration with respect to a uniform weight function. |
|
Evaluate the Lagrange basis polynomial at non-grid points. |
|
Evaluate the Lagrange basis polynomial at non-grid points. |
|
Evaluate the multidimensional Lagrange function centered at current_knot in non_grid_points. |
|
Evaluate the k-th Laguerre polynomial orthonormal in [0, +inf) w.r.t. |
|
Evaluate the multidimensional Laguerre polynomial of order k (multi-index) orthonormal on [0, +inf)^N with respect to rho=prod_i lambda_i*exp(-lambda_i*x), lambda_i>0 on the list of points X (each column is a point in R^N). |
|
Evaluate the k-th orthonormal Legendre polynomial on the interval [a, b]. |
|
Evaluate the multidimensional Legendre polynomial of order k (multi-index) orthonormal on [a,b]^N on the list of points X (each column is a point in R^N). |
|
Convert level index to number of knots using the 2-step rule. |
|
Map sparse-grid levels to the corresponding number of knots using the Genz-Keister (GK) table. |
|
Convert level index to number of knots using a doubling rule. |
|
Relation between level and number of points for linear level-to-knots mapping. |
|
Convert sparse-grid level index to number of knots using a tripling rule. |
|
Identify points to compute, recycle, and discard between two sparse grids. |
|
Generate a set of multi-dimensional box indices up to a given shape. |
|
Generate all multi-indexes of length N with elements such that rule(M_I) <= w. |
|
Sort the rows of a matrix in lexicographic order with a tolerance. |
|
Plot data on a given axis with optional formatting. |
|
Plot a sparse grid in 3D. |
|
Plot the status of a two-dimensional adaptive sparse grid. |
|
Plot the index set I for 2D and 3D cases. |
|
Plot object based on the provided structure S and dimensions. |
|
Plot the sparse grid interpolant of a function. |
|
Compute the integral of a function using a sparse grid. |
|
Reduce a sparse grid by removing duplicate points within a given tolerance. |
|
Evaluate the k-th standard Legendre polynomial. |
|
Generate a tensor grid and compute the corresponding weights. |
|
Convert a tensor grid into a sparse grid structure. |
|
Interpolates values at non_grid_points using a Lagrange interpolant built from given grid_points and tabulated function_on_grid. |
Modules