Quadrature
Index
TransportMaps.ClenshawCurtisKnotsTransportMaps.GaussHermiteKnotsTransportMaps.GaussLegendreKnotsTransportMaps.LatinHypercubeWeightsTransportMaps.MonteCarloWeightsTransportMaps.SparseSmolyakWeightsTransportMaps.TensorProductWeightsTransportMaps.GaussHermiteWeightsTransportMaps.GaussLegendreWeightsTransportMaps.gaussquadrature
Quadrature Knots
TransportMaps.GaussHermiteKnots Type
GaussHermiteKnotsOne-dimensional Gauss-Hermite quadrature weights for computing integrals for the form:
where
TransportMaps.GaussLegendreKnots Type
GaussLegendreKnotsOne-dimensional Gauss-Legendre quadrature weights for computing integrals for the form:
where
TransportMaps.ClenshawCurtisKnots Type
ClenshawCurtisKnotsOne-dimensional Clenshaw-Curtis quadrature weights for computing integrals for the form:
where
Types
TransportMaps.TensorProductWeights Type
TensorProductWeights{T<:AbstractQuadratureKnots}Multi-dimensional quadrature rule constructed from a tensor-product of one-dimensional quadrature knots. The level parameter controls accuracy.
Fields
points::Matrix{Float64}: Quadrature points (tensor grid)weights::Vector{Float64}: Quadrature weightsknots::AbstractQuadratureKnots: The 1D quadrature knots, e.g.,GaussHermiteKnotsorGaussLegendreKnots
Constructors
TensorProductWeights(level::Int64, dim::Int64, knots::AbstractQuadratureKnots)TensorProductWeights(level::Int64, map::AbstractTransportMap)
See also GaussHermiteWeights and GaussLegendreWeights, and SparseSmolyakWeights for spare grids.
TransportMaps.GaussHermiteWeights Function
GaussHermiteWeights(level::Int64, dim::Int64)Tensor-product Gauss-Hermite weights for integration with respect to standard Gaussian. Returns a TensorProductWeights object.
GaussHermiteWeights(level::Int64, map::AbstractTransportMap)Tensor-product Gauss-Hermite weights for integration with respect to standard Gaussian constructed from the transport map map with normal reference density. Returns a TensorProductWeights object.
TransportMaps.GaussLegendreWeights Function
GaussLegendreWeights(level::Int64, dim::Int64, domain=[0, 1])Tensor-product Gauss-Legendre weights for integration with respect to Uniform[0,1]. Returns a TensorProductWeights object.
GaussLegendreWeights(level::Int64, map::AbstractTransportMap)Tensor-product Gauss-Legendre weights for integration with respect to Uniform[a,b] constructed from the transport map map with uniform reference density. Returns a TensorProductWeights object.
TransportMaps.SparseSmolyakWeights Type
SparseSmolyakWeights{T<:AbstractQuadratureKnots}Multi-dimensional quadrature rule constructed using a sparse Smolyak grid of one-dimensional quadrature knots. The level parameter controls accuracy.
Fields
points::Matrix{Float64}: Quadrature points (sparse grid)weights::Vector{Float64}: Quadrature weightsknots::AbstractQuadratureKnots: The 1D quadrature knots, e.g.,GaussHermiteKnotsorGaussLegendreKnots
Constructors
SparseSmolyakWeights(level::Int64, dim::Int64, knots=GaussHermiteKnots()): Construct sparse Smolyak grid with specifiedlevel,dimandknots.SparseSmolyakWeights(level::Int64, map::AbstractTransportMap): Construct sparse Smolyak grid with the help of the transport map. The knots are chosen based on the reference distribution (GaussHermiteKnotsfor a Normal reference andGaussLegendreKnotsfor a Uniform reference).
See also TensorProductWeights.
TransportMaps.MonteCarloWeights Type
MonteCarloWeightsMonte Carlo quadrature using random samples from a reference distribution. All points receive uniform weights 1/numberpoints.
Fields
points::Matrix{Float64}: Quadrature points (random samples)weights::Vector{Float64}: Quadrature weights (uniform)distribution::Distributions.UnivariateDistribution: Reference distribution
Constructors
MonteCarloWeights(numberpoints::Int64, dimension::Int64, distr::Distributions.UnivariateDistribution=Normal()): Construct weights with random sampling fromdistr(defaults toNormal()).MonteCarloWeights(numberpoints::Int64, map::AbstractTransportMap): Get number of dimensions and sample from the map's reference density.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)distribution::Distributions.UnivariateDistribution: Reference distribution
Constructors
LatinHypercubeWeights(n::Int64, d::Int64, dist::Distributions.UnivariateDistribution=Normal()): Construct Latin Hypercube samples forddimensions usingdist(defaults toNormal()).LatinHypercubeWeights(n::Int64, map::AbstractTransportMap): Get number of dimensions and sample according to the map's reference density.
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].