MeasureBase.jl icon indicating copy to clipboard operation
MeasureBase.jl copied to clipboard

AbstractProductMeasure

Open cscherrer opened this issue 1 year ago • 2 comments

It's currently awkward to define methods for AbstractProductMeasures, 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 :)

cscherrer avatar Oct 26 '22 13:10 cscherrer