rpa_control_edgeweight: Control weight of new edges. Defined for 'rpanet'.

View source: R/rpa_control.R

rpa_control_edgeweightR Documentation

Control weight of new edges. Defined for rpanet.

Description

Control weight of new edges. Defined for rpanet.

Usage

rpa_control_edgeweight(sampler = NULL)

Arguments

sampler

A function used for sampling edge weights. If NULL, all new edges will default to a weight of 1. If a function is provided, it must accept a single argument, n, and return a vector of length n that represents the sampled edge weights.

Value

A list of class rpacontrol containing the sampler function.

Examples

# Sample edge weights from Gamma(5, 0.2).
my_gamma <- function(n) rgamma(n, shape = 5, scale = 0.2)
control <- rpa_control_edgeweight(
  sampler = my_gamma
)


wdnet documentation built on May 29, 2024, 9:32 a.m.