Exemplo n.º 1
0
 public void ReadAll()
 {
     string[] lines;
     List<string> dlines = null;
     for (int i = 0; i < 1372; i++) {
         SolveCompare current = new SolveCompare (i);
         lines = File.ReadAllLines (dirpath + "/" + i + ".txt");
         dlines = new List<string> ();
         for (int j = 0; j < lines.Length; ++j) {
             if (lines [j] == "") {
                 current.AddDatum (ReadDatum (dlines));
                 dlines = new List<string> ();
             } else {
                 dlines.Add (lines [j]);
             }
         }
         data.Add (current);
     }
 }
Exemplo n.º 2
0
 public void AdHocMergeData(List<SolveCompare> data2)
 {
     List<SolveCompare> newdata = new List<SolveCompare> ();
     foreach (var scold in data) {
         SolveCompare sc = new SolveCompare (scold.seed);
         SolveCompare scnew = data2 [scold.seed];
         if (scnew.pngraph != null)
             sc.AddDatum (scnew.pngraph);
         else
             sc.AddDatum (scold.pngraph);
         if (scnew.pntree != null)
             sc.AddDatum (scnew.pntree);
         else
             sc.AddDatum (scold.pntree);
         if (scnew.bfs != null)
             sc.AddDatum (scnew.bfs);
         else
             sc.AddDatum (scold.bfs);
         newdata.Add (sc);
     }
     data = newdata;
 }