Quadrature
Index
TransportMaps.GaussHermiteWeightsTransportMaps.LatinHypercubeWeightsTransportMaps.MonteCarloWeightsTransportMaps.SparseSmolyakWeightsTransportMaps.gaussquadrature
Types
TransportMaps.GaussHermiteWeights Type
GaussHermiteWeightsTensor product Gauss-Hermite quadrature for numerical integration with Gaussian reference measure. Uses numberpoints points per dimension, resulting in numberpoints^dimension total quadrature points.
Fields
points::Matrix{Float64}: Quadrature pointsweights::Vector{Float64}: Quadrature weights
Constructors
GaussHermiteWeights(numberpoints::Int64, dimension::Int64): Construct weights for number of points per dimension anddimension.GaussHermiteWeights(numberpoints::Int64, map::AbstractTransportMap): Get number of dimensions frommap.
TransportMaps.MonteCarloWeights Type
MonteCarloWeightsMonte Carlo quadrature using random samples from the reference distribution. All points receive uniform weights 1/numberpoints.
Fields
points::Matrix{Float64}: Quadrature points (random samples)weights::Vector{Float64}: Quadrature weights (uniform)
Constructors
MonteCarloWeights(numberpoints::Int64, dimension::Int64): Construct weights with random sampling.MonteCarloWeights(numberpoints::Int64, map::AbstractTransportMap): Get number of dimensions and reference density frommap.MonteCarloWeights(points::Matrix{Float64}, weights::Vector{Float64}=Float64[]): Construct from custom points and weights.
TransportMaps.LatinHypercubeWeights Type
LatinHypercubeWeightsLatin Hypercube sampling for quasi-Monte Carlo integration. Provides better space-filling properties than pure Monte Carlo. All points receive uniform weights 1/n.
Fields
points::Matrix{Float64}: Quadrature points (Latin Hypercube samples)weights::Vector{Float64}: Quadrature weights (uniform)
Constructors
LatinHypercubeWeights(n::Int64, d::Int64): Construct Latin Hypercube samples forddimensions.LatinHypercubeWeights(n::Int64, map::AbstractTransportMap): Get number of dimensions and reference density frommap.
TransportMaps.SparseSmolyakWeights Type
SparseSmolyakWeightsSparse Smolyak quadrature using Gauss-Hermite rules. Reduces the curse of dimensionality by using a sparse grid construction. The level parameter controls accuracy (higher level = more points and higher accuracy).
Fields
points::Matrix{Float64}: Quadrature points (sparse grid)weights::Vector{Float64}: Quadrature weights
Constructors
SparseSmolyakWeights(level::Int64, dimension::Int64): Construct sparse Smolyak grid with specifiedlevelanddimension.SparseSmolyakWeights(level::Int64, map::AbstractTransportMap): Get number of dimensions frommap.
Functions
TransportMaps.gaussquadrature Function
gaussquadrature(fun::Function, n::Int, a::Real, b::Real)Numerically integrates the function fun over the interval [a, b] using the Gauss-Legendre quadrature rule with n points.
Arguments
fun::Function: The function to integrate. Should accept a singleFloat64argument.n::Int: The number of quadrature points to use.a::Real: The lower bound of the integration interval.b::Real: The upper bound of the integration interval.
Returns
Float64: The approximate value of the integral offunover[a, b].