<commit_before>#Smolyak Sparse Grid Library
This library is an implementation of Smolyak’s Sparse Grid Algorithm for solving integration and interpolation problems
in d-dim spaces with far fewer function evaluations than needed with traditional tensor production
integration/interpolation.

This library currently implements Smolyak's algorithm for two polynomial bases:

    *Clenshaw-Curtis – Piecewise Linear Basis Functions (sup. [0,1])

    *Chebyshev Polynomials – Cos Basis Functions (sup. [0,1])

    *Fejer Polynomials - Coming Soon - (open sup. (-1,1))

I implement three sparse sampling integration rules based on Stroud's Theory (Stroud, 1957) that are useful when solving
numerical integration problems in n-dimensional Euclidean spaces with equally and explicitly-weighted points.

    *Stroud - Rules for n-dimensional Gaussian of degree two or three

    *Xiu - Rules for n-dimensional non-symmetric Euclidean spaces of degree two or three

I also implement several general sampling algorithms for utility :

    *Poisson Disk Random

    *Uniform Random

####Usage####

See /tests/sparse_grid_interp_tests.py for example usage for sparse-grid interpolation
See /tests/grid_random_sampler_tests.py for example usage for sparse-grid, Poisson, and Uniform random samplers

####User defined function####

fun_nd.py provides example code that evaluates functions in 2D for a given test function. The user must specify a
new funtion fun_nd.py that follows this same format and evaluates n-dim target functions desired for interpolation.

####Smolyak’s Sparse Grid Algorithm####

One approach to solving numerical integration (or polynomial interpolation) is to use 1D Gauss quadrature rules
(or Gauss-Hermite polynomials) that are applied separately to each dimension, forming a tensor-product rule. However,
for a 1D rule requiring m function evaluations, the associated tensor-product rule requires m^d evaluations in d dimensions;
such exponential growth makes this approach computationally intractable for more than a few dimensions. This so-called
curse of dimensionality is a feature of all tensor-product rules.

Another method that has received much attention for the evaluation of high-dimensional integrals is Monte-Carlo integration<commit_msg>added documentation for Stroud and Xui grids<commit_after>#Smolyak Sparse Grid Library
This library is an implementation of Smolyak’s Sparse Grid Algorithm for solving integration and interpolation problems
in d-dim spaces with far fewer function evaluations than needed with traditional tensor production
integration/interpolation.

This library currently implements Smolyak's algorithm for two polynomial bases:

    Clenshaw-Curtis – Piecewise Linear Basis Functions (sup. [0,1])

    Chebyshev Polynomials – Cos Basis Functions (sup. [0,1])

    Fejer Polynomials - Coming Soon - (open sup. (-1,1))

I implement three sparse sampling integration rules based on Stroud's Theory (Stroud, 1957) that are useful when solving
numerical integration problems in n-dimensional Euclidean spaces with equally and explicitly-weighted points.

    Stroud - Rules for n-dimensional Gaussian of degree two or three

    Xiu - Rules for n-dimensional non-symmetric Euclidean spaces of degree two or three

I also implement several general sampling algorithms for utility :

    Poisson Disk Random - Samples drawn from uniform probability distribution with accept/reject rule for optimal point placement

    Uniform Random - Samples drawn from uniform probability distribution

####Usage####

See /tests/sparse_grid_interp_tests.py for example usage for sparse-grid interpolation
See /tests/grid_random_sampler_tests.py for example usage for sparse-grid, Poisson, and Uniform random samplers

####User defined function####

fun_nd.py provides example code that evaluates functions in 2D for a given test function. The user must specify a
new funtion fun_nd.py that follows this same format and evaluates n-dim target functions desired for interpolation.

####Smolyak’s Sparse Grid Algorithm####

One approach to solving numerical integration (or polynomial interpolation) is to use 1D Gauss quadrature rules
(or Gauss-Hermite polynomials) that are applied separately to each dimension, forming a tensor-product rule. However,
for a 1D rule requiring m function evaluations, the associated tensor-product rule requires m^d evaluations in d dimensions;
such exponential growth makes this approach computationally intractable for more than a few dimensions. This so-called
curse of dimensionality is a feature of all tensor-product rules.

Another method that has received much attention for the evaluation of high-dimensional integrals is Monte-Carlo integration
{'fraction_non_alphanumeric': 0.047073791348600506, 'fraction_numerical': 0.00551314673452078, 'mean_word_length': 4.993646759847522, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6706337', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1068, 'n_words': 600}