public void AllAdjacencyGraphRoots()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         Roots(g);
     }
 }
 public void FloydVsBellmannGraphML()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         Compare(graph, e => 1, (g, d) => new BellmanFordShortestPathAlgorithm <string, Edge <string> >(g, d));
     }
 }
示例#3
0
        public void TarjanOfflineLeastCommonAncestorAlgorithmAll()
        {
            foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
            {
                if (g.VertexCount == 0)
                {
                    continue;
                }

                var pairs = new List <SEquatableEdge <string> >();
                foreach (var v in g.Vertices)
                {
                    foreach (var w in g.Vertices)
                    {
                        if (!v.Equals(w))
                        {
                            pairs.Add(new SEquatableEdge <string>(v, w));
                        }
                    }
                }

                int count = 0;
                foreach (var root in g.Vertices)
                {
                    this.TarjanOfflineLeastCommonAncestorAlgorithm(
                        g,
                        root,
                        pairs.ToArray());
                    if (count++ > 10)
                    {
                        break;
                    }
                }
            }
        }
 public void WeaklyConnectedComponentsAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         Compute(graph);
     }
 }
示例#5
0
 public void GenerateAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         Generate(graph);
     }
 }
示例#6
0
 public void GenerateAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.Generate(g);
     }
 }
 public void AllAdjacencyGraphRoots()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         Roots(graph);
     }
 }
 public void StronglyConnectedCondensateAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         RunStronglyConnectedCondensateAndCheck(graph);
     }
 }
示例#9
0
 public void DepthFirstSearchAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.DepthFirstSearch(g);
     }
 }
 public void RoundRobinAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.RoundRobinTest(g);
     }
 }
示例#11
0
 public void EulerianTrailAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.ComputeTrail(g, (s, t) => new Edge <string>(s, t));
     }
 }
 public void AugmentAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         AugmentAndCheck(graph);
     }
 }
 public void SortAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         Sort(graph);
     }
 }
 public void SortAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.Sort(g);
     }
 }
 public void EulerianTrailAll()
 {
     Parallel.ForEach(TestGraphFactory.GetAdjacencyGraphs(), g =>
     {
         this.ComputeTrail(g, (s, t) => new Edge <string>(s, t));
     });
 }
 public void EulerianTrailAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         ComputeTrail(graph, (s, t) => new Edge <string>(s, t));
     }
 }
示例#17
0
 public void AugmentAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.Augment(g);
     }
 }
示例#18
0
 public void TopologicalSortAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.SortCyclic(g);
     }
 }
示例#19
0
 public void WeaklyConnectedComponentsAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.Compute(g);
     }
 }
 public void WeaklyConnectedCondensatAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.WeaklyConnectedCondensate(g);
     }
 }
示例#21
0
 public void TopologicalSortAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         SortCyclic(graph);
     }
 }
示例#22
0
 public void RoundRobinAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         NormalizedEdgeChainTest(graph);
     }
 }
 public void SameEdgeCountAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.SameEdgeCount(g);
     }
 }
 public void SameOutEdgesAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.SameOutEdges(g);
     }
 }
 public void DagShortestPathAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         Compute(graph);
         ComputeCriticalPath(graph);
     }
 }
示例#26
0
 public void DagShortestPathAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         this.Compute(g);
         this.ComputeCriticalPath(g);
     }
 }
 public void DagShortestPathAll()
 {
     System.Threading.Tasks.Parallel.ForEach(TestGraphFactory.GetAdjacencyGraphs(), g =>
     {
         this.Compute(g);
         this.ComputeCriticalPath(g);
     });
 }
 public void EdmondsKarpMaxFlowAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         if (g.VertexCount > 0)
         {
             this.EdmondsKarpMaxFlow(g, (source, target) => new Edge <string>(source, target));
         }
     }
 }
示例#29
0
 public void BreadthFirstSearchAll()
 {
     foreach (AdjacencyGraph <string, Edge <string> > graph in TestGraphFactory.GetAdjacencyGraphs())
     {
         foreach (string vertex in graph.Vertices)
         {
             RunBfsAndCheck(graph, vertex);
         }
     }
 }
示例#30
0
 public void BreadthFirstSearchAll()
 {
     foreach (var g in TestGraphFactory.GetAdjacencyGraphs())
     {
         foreach (var v in g.Vertices)
         {
             RunBfs(g, v);
         }
     }
 }