class Graph and algorithms(andEdmonds-Karp)