register-methods: Register two histograms on a common cdf

registerR Documentation

Register two histograms on a common cdf

Description

Given two distributionH objects, returns two equivalent distributions sharing the same cdf values (the union of the two p vectors). This is the basis for computing the statistics based on the L2 Wasserstein distance.

Usage

register(object1, object2)

Arguments

object1, object2

Two distributionH objects.

Value

A list: the two distributionH objects, with the same p slot, and a matrix with their quantiles and the common cdf.

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))
regDist <- register(mydist1, mydist2)
regDist[[1]]@p
regDist[[1]]@x
regDist[[2]]@x

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