dot-balance_flow_encode: The flow a matched set corresponds to

.balance_flow_encodeR Documentation

The flow a matched set corresponds to

Description

Builds the flow vector a candidate matched set maps to: unit and pair arcs at one, the slack each category needs to fill its budget, and the transfers that carry its imbalance, each crossing at the lowest level its two cells share.

Usage

.balance_flow_encode(matching, index, hier = index$hier)

Details

Returns NULL when the matched set is not balanced at the levels the design enforces exactly, since no flow in this network represents it.


couplr documentation built on Sept. 17, 2026, 1:08 a.m.