You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #41 points to an interesting package that provides an integrate(fun, dom) interface. I believe moving Integrals.jl to an interface like this could also allow developers to include more integration algorithms, because the current (lb, ub) interface to domains in IntegralProblems are restricted to hypercubes. Some algorithms can support integration over polyhedral domains (see IteratedIntegration.jl) and eventually people may want to do integration on manifolds. Although I don't want to reinvent the wheel with integration domains, it seems to me that certain algorithms only work with certain domains and rely crucially on the data representation of that domain.
My proposal is to switch from the (lb, ub) interface to a domain-like interface, where each domain type implements traits indicating the algorithms it is compatible with. For example, the (lb, ub) interface could be recast as a HyperCube(lb, ub) type that supports a method endpoints to interface with all of the current algorithms in Integrals.jl. Already within Integrals.jl, the feature set of QuadGK.jl isn't fully supported, since quadgk(f, a, b, c...) is a valid expression of limits of integration with breakpoints. This could be amended with a PuncturedSegment(a,b,c...) type that supports a method segments to pass the limits to quadgk, which for HyperCube would fall back to endpoints.
I am not very familiar with the AD internals, so I'm not sure if this change would create new problems, but if there is support for this modification I will gladly start a PR in this direction. I am unsure whether all of these new domain types would be a new package or whether this could work with some of DomainSets.jl by adding new methods to their types.
The text was updated successfully, but these errors were encountered:
Issue #41 points to an interesting package that provides an
integrate(fun, dom)
interface. I believe moving Integrals.jl to an interface like this could also allow developers to include more integration algorithms, because the current(lb, ub)
interface to domains inIntegralProblem
s are restricted to hypercubes. Some algorithms can support integration over polyhedral domains (see IteratedIntegration.jl) and eventually people may want to do integration on manifolds. Although I don't want to reinvent the wheel with integration domains, it seems to me that certain algorithms only work with certain domains and rely crucially on the data representation of that domain.My proposal is to switch from the
(lb, ub)
interface to a domain-like interface, where each domain type implements traits indicating the algorithms it is compatible with. For example, the(lb, ub)
interface could be recast as aHyperCube(lb, ub)
type that supports a methodendpoints
to interface with all of the current algorithms in Integrals.jl. Already within Integrals.jl, the feature set of QuadGK.jl isn't fully supported, sincequadgk(f, a, b, c...)
is a valid expression of limits of integration with breakpoints. This could be amended with aPuncturedSegment(a,b,c...)
type that supports a methodsegments
to pass the limits toquadgk
, which forHyperCube
would fall back toendpoints
.I am not very familiar with the AD internals, so I'm not sure if this change would create new problems, but if there is support for this modification I will gladly start a PR in this direction. I am unsure whether all of these new domain types would be a new package or whether this could work with some of DomainSets.jl by adding new methods to their types.
The text was updated successfully, but these errors were encountered: