public GraphStuff.Graph Do() { KeyValuePair <GraphStuff.Graph, GraphStuff.Graph> vp = graph.PrepareGraphForMatching(); GraphStuff.Graph tree = vp.Key; GraphStuff.Graph prepared = vp.Value; GraphStuff.Graph matched = prepared.MinimalMatching(); GraphStuff.Graph merged = tree.MergeWithMatching(matched.Edges); EulerPath eulerAlg = new EulerPath(merged); Queue <Edge> eulerPath = eulerAlg.FindEuler(); CutToHamilton cutAlg = new CutToHamilton(eulerPath, graph); return(cutAlg.Cut()); }
public Prim(GraphStuff.Graph inputG) { inputGraph = inputG; }
public Christofides(GraphStuff.Graph g) { graph = g; }
public DFS(GraphStuff.Graph g) { zajete = new List <Node>(); this.g = g; }