maxFlow now makes neighbor list and capacity matrix