Implementation of a network flow algorithm. Finds minimum cuts of a graph and maximum flow from a source to a sink.