Here's the minimal maximum flow rate algorithm in Java . There is no license with a code, so you may need to contact the owner of the page for this information. I have not used this code myself yet. If it does not do this job and you want to port some code, I have seen many C / C ++ implementations.
source share