Skip to contents

C++ implementation of similarity matrix computation using pre-computed distances

Usage

NuMatParC(c, d)

Arguments

c

an MCMC partitions of length n.

d

a symmetric n x n matrix containing distances between each group distributions.

Author

Boris Hejblum, Chariff Alkhassim

Examples

c <- c(1,1,2,3,2,3)
d <- matrix(runif(length(c)^2),length(c))
NuMatParC(c,d)
#> $NuMatParC
#>           [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
#> [1,] 0.0000000 0.0000000 0.8303850 0.3175697 0.8303850 0.3175697
#> [2,] 0.0000000 0.0000000 0.8303850 0.3175697 0.8303850 0.3175697
#> [3,] 0.8303850 0.8303850 0.0000000 0.1533055 0.0000000 0.1533055
#> [4,] 0.3175697 0.3175697 0.1533055 0.0000000 0.7461493 0.0000000
#> [5,] 0.8303850 0.8303850 0.0000000 0.7461493 0.0000000 0.1533055
#> [6,] 0.3175697 0.3175697 0.1533055 0.0000000 0.1533055 0.0000000
#>