public BreadthFirstSearchWithShortestPath(AdjacencyListGraph <long> g)
 {
     _graph       = g;
     _visitedFrom = new SearchData <int>(g.Size(), -1);
     _distance    = new SearchData <int>(g.Size(), -1);
 }
Example #2
0
 public DepthFirstSearchWithComponents(AdjacencyListGraph <long> g)
 {
     _graph     = g;
     _component = new SearchData <int>(g.Size(), -1);
 }
 public PrimsResult(int size)
 {
     Parent = new SearchData <int>(size, -1);
     Cost   = new SearchData <decimal>(size, decimal.MaxValue);
 }
Example #4
0
 public BreadthFirstSearchWithBipartiteDetection(AdjacencyListGraph <long> g)
 {
     _graph = g;
     _color = new SearchData <int>(g.Size(), -1);
 }