
Index the walks by source and river size, for the exception test
Source:R/rule_in.R
knw_walk_index.Rdknw_rule_in() tests a rule's exception by looking up, for each visit, the
distance downstream to the first river of at least exc_q m³/s on one flow
source. This turns knw_link_walks()'s long table into that lookup once, so a
grid of thousands of rules does not re-filter it.
Arguments
- walks
the table
knw_link_walks()returns, with the target flagstarget_lakeandtarget_regulatedwhere the caller has them (absent columns read asFALSE).