Flow class for the max flow (or min cut) problems