Algorithms
In this repository, some algorithms are implemented in go language.
About Maxflow problem:
A flow network is represented in a directed acyclic graph(DAG). Each edge has a nonnegative capacity, to which the flow is limited. There are a source node s and a sink node t. s has no incoming edges, and t has no outgoing edges. All other nodes are internal nodes, in which the amount of incoming flow must equal to the amount of ougoing flow. The goal of the maxflow problem is, given a flow network, to find a flow of maximum value.
maxflow
This package implements the maxflow(mincuts, graphcuts) algorithm that is used to solve the labeling problem in computer vision or graphics area.
Usage:
g := maxflow.NewGraph()
nodes := make([]*maxflow.Node, 2)
for i := range(nodes) {
nodes[i] = g.AddNode()
} // for i
g.SetTweights(nodes[0], 1, 5)
g.SetTweights(nodes[1], 2, 6)
g.AddEdge(nodes[0], nodes[1], 3, 4)
g.Run();
flow := g.Flow()
isSource0 := g.IsSource(nodes[0])
ed
This package implements the editdistance algorithm that is used to compute the similarity between two strings, or more generally defined lists.

For computing the standard editdistance of two strings, call ed.String or ed.StringFull function.

For generally defined lists, implement the ed.Interface, and use ed.EditDistance or ed.EditDistanceFull function.
LICENSE
BSD license