SparseGrids.combvecMethod
combvec(vecs)

Counterpart of Matlab's combvec: Creates all combinations of vectors in vecs, an array of vectors.

SparseGrids.kpnMethod
kpn(D::Int) -> nodes, weights

Return the Konrod-Patterson nodes and weights of accuracy D as vectors.

SparseGrids.listNdqMethod
listNdq(D::Int, q::Int)

Find elements in the set

\[N_q^D = {i in N^D : sum(i) = q}\]

The algorithm and the formula for computing the number of elements in this set is found in the thesis mentioned in the README

SparseGrids.sparsegridFunction
sparsegrid( D::Int, k::Int, f::Function=gausshermite; sym::Bool=true )

Computation of sparse grid nodes and the associated weights

  • D : Dimension of integrant
  • k : Order of quadrature rule
  • f : Function generating 1D nodes and weights – in that order – for an integer input
  • sym : Boolean variable determining if the nodes should be symmetrized

If the nodes are supposed to be symmetric (as those in the Gauss-Hermite rule), they should be so in order to correctly identify multiply occuring nodes in the union of sparse sets

SparseGrids.symmetrize!Method

To correctly reduce "overlapping" nodes the middle node in an uneven number must be exactly zero

SparseGrids.tensorgridMethod
tensorgrid( N::Vector, W::Vector, D::Int )

Compute tensor grid of `N` nodes and corresponding weights `W` for `D` dimensions.
SparseGrids.uniquenodesMethod
uniquenodes(nodes, weights)

Find unique nodes and sum the weights of identical nodes