Generate block-structured similarity matrices corresponding to cluster structures.

generate_similarity_matrix(cluster_sizes)

Arguments

cluster_sizes

List of cluster sizes.

Value

Similarity matrix with samples as row-/colnames.

Examples

generate_similarity_matrix(c(1, 2, 3))
#>           [,1]       [,2]       [,3]      [,4]      [,5]      [,6]
#> [1,] 0.9287626 0.00000000 0.00000000 0.0000000 0.0000000 0.0000000
#> [2,] 0.0000000 0.02787708 0.57664766 0.0000000 0.0000000 0.0000000
#> [3,] 0.0000000 0.22561865 0.06381028 0.0000000 0.0000000 0.0000000
#> [4,] 0.0000000 0.00000000 0.00000000 0.7446661 0.2848286 0.2073929
#> [5,] 0.0000000 0.00000000 0.00000000 0.2673284 0.3759651 0.2332625
#> [6,] 0.0000000 0.00000000 0.00000000 0.0536692 0.5026242 0.4552570