begin
using HCubature
z(x, y) = exp(-x^2)
a = (0, 0)
b = (3, 3)
hcubature(z, a, b)
end
code above returns error
MethodError: no method matching z(::StaticArrays.SVector{2, Float64})
Closest candidates are:
z(::Any, !Matched::Any) at D:\Julia-1.6.3\source\ispit20220214#==#03469600-3e27-445f-aeac-dde1f92256d9:3
- (::HCubature.GenzMalik{2, Float64})(::typeof(Main.workspace#36.z), ::StaticArrays.SVector{2, Float64}, ::StaticArrays.SVector{2, Float64}, ::typeof(LinearAlgebra.norm))@ genz-malik.jl:121
- hcubature_ (::Function, ::StaticArrays.SVector{2, Float64}, ::StaticArrays.SVector{2, Float64}, ::typeof(LinearAlgebra.norm), ::Int64, ::Int64, ::Int64, ::Int64)@ HCubature.jl:60
- hcubature_ @ HCubature.jl:131 [inlined]
- #hcubature#3 @ HCubature.jl:178 [inlined]
- hcubature (::Function, ::Tuple{Int64, Int64}, ::Tuple{Int64, Int64})@ HCubature.jl:178
- top-level scope @ Local: 6