We currently don't have a common function to query the domain or support of something (a distribution, measure, ML model, etc.) yet, right? We could add something like getdomain(something) and getsupport(some_function)
For functions, the situation is more tricky since their domain/support will often not only depend on the argument type, but also on the actual shape of the argument (array sizes, etc.). We could do getdomain(f, shp::ValueShapes.AbstractValueShape) for the kind of stuff ValueShapes currently covers (could extend that).
Distributions currently offers support, but it's limited to univariate distributions. Having getdomain/getsupport in DomainSets would allow packages to add support for complex types of domains in a clean fashion without depending on DomainSets.
Would a getdomain/getsupport API be welcome in DomainSets (I could do a PR)?
(Edit: Also some discussion about domain/set type hierarchies further down.)
We currently don't have a common function to query the domain or support of something (a distribution, measure, ML model, etc.) yet, right? We could add something like
getdomain(something)andgetsupport(some_function)For functions, the situation is more tricky since their domain/support will often not only depend on the argument type, but also on the actual shape of the argument (array sizes, etc.). We could do
getdomain(f, shp::ValueShapes.AbstractValueShape)for the kind of stuff ValueShapes currently covers (could extend that).Distributions currently offers
support, but it's limited to univariate distributions. Havinggetdomain/getsupportin DomainSets would allow packages to add support for complex types of domains in a clean fashion without depending on DomainSets.Would a
getdomain/getsupportAPI be welcome in DomainSets (I could do a PR)?(Edit: Also some discussion about domain/set type hierarchies further down.)