-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
A possible implementation would be a type PushforwardMeasure(f, μ)
with a shorthand syntax ν = f.(μ)
- this implies a monadic view of measures:
struct PushforwardMeasure{F,M} <: AbstractMeasure
f::F
orig::M
end
Random.rand(m::PushforwardMeasure) = m.f(rand(m.orig))
map(f, μ::AbstractMeasure) = PushforwardMeasure(f, μ)
Base.Broadcast.broadcasted(f, μ::AbstractMeasure) = map(f, μ)
Metadata
Metadata
Assignees
Labels
No labels