MeasureBase.jl
MeasureBase.jl copied to clipboard
AbstractProductMeasure
It's currently awkward to define methods for AbstractProductMeasure
s, because that abstract type doesn't know anything about the underlying structure.
This PR explores one possibility for fixing that. The idea is that types
T <: AbstractProductMeasure{M}
should satisfy
marginals(mu::T) isa M
The M
could be an abstract type, even as far as struct T <: AbstractProductMeasure{AbstractArray}
or even struct T <: AbstractProductMeasure{Any}
. More specific instances would just inherit more methods.
What do you think @oschulz? No rush :)