Skip to content

Commit 67b3627

Browse files
committed
Documented benchmark_scenario.
1 parent e4f3911 commit 67b3627

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

libs/organigraph.r

+8-7
Original file line numberDiff line numberDiff line change
@@ -291,18 +291,19 @@ plot_role_network <- function(role_network,
291291
}
292292

293293

294-
#' Bootstraps measure by sampling n_samples networks from the role_ensemble.
294+
#' Bootstraps measure by sampling networks from role_ensemble.
295295
#'
296-
#' @param role_ensemble ...
297-
#' @param measure ...
298-
#' @param n_samples ...
299-
#' @param n_cores ...
300-
#' @returns ...
296+
#' @param role_ensemble BCCM ensemble from which to sample networks.
297+
#' @param measure The measure to bootstrap. It must be a function taking 1 arg,
298+
#' an igraph::graph.
299+
#' @param n_samples Number of networks to sample.
300+
#' @param n_cores Number of cores for parallel execution.
301+
#' @returns The bootstrapped values as a vector of length `n_samples`.
301302
#' @export
302303
benchmark_scenario <- function(role_ensemble, measure, n_samples = 10000,
303304
n_cores = 1) {
304305

305-
# Define helper function run in parallel
306+
# Helper function
306307
boot <- function(adj, measure, directed) {
307308
mode <- if (directed) "directed" else "undirected"
308309
return(measure(graph_from_adjacency_matrix(adj, mode = mode)))

0 commit comments

Comments
 (0)