v <- c(
0, 0, 0, 0,
1, 1, 1, 0, 0, 0,
1, 1, 1, 1,
1
)
graph_edges <- list(c(2,3),c(3,1),c(1,4))
unions <- list(c(2,3),c(1),c(4))
myerson_unions(v, unions = unions, graph_edges = graph_edges, method = "exact")
myerson_unions(v, unions = unions, graph_edges = graph_edges, method = "appro", n_rep = 2000)
Run the code above in your browser using DataLab