-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
JuliaMath/MeasureBase.jl
#88Description
In JuliaManifolds/ManifoldMeasures.jl#7 we were discussing that we need a way to map an (unnormalized) Hausdorff measure to the corresponding probability measure by normalizing. This seems general enough that it could be defined here.
What about something like this?
LinearAlgebra.normalize(μ::AbstractMeasure) = inv(total_mass(μ)) * μ
unit() = true # just a function to use for dispatch.
total_mass(μ::AbstractMeasure) = ∫(unit, μ)
total_mass(μ::AbstractWeightedMeasure) = exp(μ.logweight) * total_mass(μ.base)
is_probability_measure(μ::AbstractMeasure) = isone(total_mass(μ))
Perhaps there is a more measure-theoretic term than "normalization", and we should not then overload normalize
. In the case of a Hausdorff measure, total_mass
would compute the volume/area of the manifold in some embedded metric space.
It might be preferable to define log_total_mass
instead.
Metadata
Metadata
Assignees
Labels
No labels