registerMH-methods: Register the histograms of a matrix on a common cdf

registerMHR Documentation

Register the histograms of a matrix on a common cdf

Description

registerMH recomputes all the histograms of a MatH object so that they share the same cdf values (the same p slot), without changing the distributions. This allows a fast computation of all the methods based on the L2 Wasserstein metric. is.registeredMH checks whether the histograms already share the same cdf.

Usage

is.registeredMH(object)

registerMH(object)

Arguments

object

A MatH object.

Value

registerMH returns a MatH object whose histograms share the same cdf; is.registeredMH returns TRUE or FALSE.

References

Irpino, A., Lechevallier, Y. and Verde, R. (2006): Dynamic clustering of histograms using Wasserstein metric In: Rizzi, A., Vichi, M. (eds.) COMPSTAT 2006. Physica-Verlag, Berlin, 869-876.

Examples

mydist1 <- distributionH(c(1, 2, 3), c(0, 0.4, 1))
mydist2 <- distributionH(c(7, 8, 10, 15), c(0, 0.2, 0.7, 1))
mydist3 <- distributionH(c(9, 11, 20), c(0, 0.8, 1))
MyMAT <- MatH(x = list(mydist1, mydist2, mydist3), nrows = 1, ncols = 3)
is.registeredMH(MyMAT) # FALSE
MATregistered <- registerMH(MyMAT)
is.registeredMH(MATregistered) # TRUE
MATregistered@M[[1, 1]]@p

HistDAWass documentation built on Oct. 29, 2026, 5:07 p.m.