I want to write program in haskell which will find the maximum flow in a flow network. However, I don't know Haskell well, so I don't know what is the best way to do it.
My biggest problem is finding augmenting path.
In Java I would create array of booleans
Visited (to know which Node is visited) and residual graph
rGraph and using DFS I would find augmenting paths (if there were some).
But in Haskell...
That's my definition of type Graph.
type Node = Char
type Edge = (Node ,Node, Int)
type Graph = ([Node], [Edge])
So graph with 5 nodes and 6 edges I can represent this way
I can try to do it "java style", but I think there is a better way.
What is the best way to find augmenting path in graph in haskell?