check that a network graph doesn't contain localized loops.
Usage
check_hy_graph(x, loop_check = FALSE)
Value
if no localized loops are found, returns TRUE. If localized
loops are found, problem rows with a row number added.
Arguments
x
data.frame network compatible with hydroloom_names.
loop_check
logical if TRUE, the entire network is walked from
top to bottom searching for loops. This loop detection algorithm visits
a node in the network only once all its upstream neighbors have been
visited. A complete depth first search is performed at each node, searching
for paths that lead to an already visited (upstream) node. This algorithm
is often referred to as "recursive depth first search".