sbn_create: Create SBNs

Description Usage Arguments Details Value Examples

View source: R/sbn_create.R

Description

An SBN river network as a downstream directed igraph object.

Usage

1
sbn_create(n, p)

Arguments

n

desired number of nodes.

p

branching probability, from 0 - 1. Passed to stats::rbinom(), the probability of success in two attempts at adding upstream branches.

Details

SBNs are generated using a stochastic branching process. The network generation process starts from an initial downstream node (the river mouth). At each iteration a random node in the network, with no upstream connections is selected, and zero, one or two nodes are added upstream of it, depending on a branching probability (p). This process is repeated until a pre-determined number of nodes across the entire network is attained (n).

Value

A river network as an igraph object.

Examples

1
sbn_create(10, 0.7)

flee598/SBN documentation built on Jan. 24, 2022, 11:37 p.m.