library(igraph)
edgelist <- as.vector(t(igraph::as_edgelist(exampleGraph, names=FALSE))) - 1
edgelist_len <- length(edgelist) ## The length of the graph edge list
n_vertices <- length(igraph::V(exampleGraph)) - 1 ## The number of vertices in the graph
direct <- igraph::is_weighted(exampleGraph) ## Whether the graph is directed or undirected
edge_weights <- E(exampleGraph)$weight
find_partition_with_rep_rcpp(edgelist, edgelist_len, n_vertices, direct, edge_weights, nrep = 10)
Run the code above in your browser using DataLab