sbn_create.Rd
An SBN river network as a downstream directed igraph object.
sbn_create(n, p)
desired number of nodes.
branching probability, from 0 - 1. Passed to stats::rbinom()
, the probability of success in two attempts at adding upstream branches.
A river network as an igraph object.
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).
sbn_create(10, 0.7)
#> IGRAPH e206a22 D--- 10 9 --
#> + edges from e206a22:
#> [1] 2->1 3->2 4->2 5->3 6->5 7->6 8->7 9->8 10->9