Skip to contents

Calculates the proportion of simulated paths (e.g., from random walk runout simulations) that intersect a binary connectivity feature mask.

Usage

sourceConnect(sim_paths, feature_mask, trials = NULL)

Arguments

sim_paths

A list of matrices, each containing (row, col) indices of cells visited by a simulation path.

feature_mask

A binary matrix indicating presence (1) of a connectivity feature (from makeConnFeature()).

trials

Optional integer specifying how many simulation paths to consider. Defaults to all paths.

Value

A numeric value between 0 and 1 indicating the estimated probability of connection.

Examples

if (FALSE) { # \dontrun{
p_connect <- sourceConnect(sim_paths, feature_mask, trials = 1000)
} # }