Find river mouth node from a directed graph.

sbn_get_outlet(g)

Arguments

g

a river network as an igraph object. Must be a downstream directed graph.

Value

An integer identifying the id of river mouth node.

Examples

g <- sbn_create(10, 0.7)
sbn_get_outlet(g)
#> [1] 1