Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7622 for trunk/sources


Ignore:
Timestamp:
03/15/12 14:30:41 (13 years ago)
Author:
abeham
Message:

#1782: fixed two small bugs

Location:
trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBInstanceProvider.cs

    r7618 r7622  
    5454        using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
    5555          foreach (var entry in GetZipContents(solutionsZipFile))
    56             solutions.Add(entry.Substring(0, entry.Length - ".opt.tour".Length) + FileExtension, entry);
     56            solutions.Add(entry.Substring(0, entry.Length - ".opt.tour".Length) + "." + FileExtension, entry);
    5757        }
    5858      }
  • trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBParser.cs

    r7523 r7622  
    476476      var tours = new List<List<int>>();
    477477      do {
    478         string[] nodes = NextLine().Split(itemSeparator, StringSplitOptions.RemoveEmptyEntries);
     478        var line = NextLine();
     479        if (String.IsNullOrEmpty(line)) break;
     480        string[] nodes = line.Split(itemSeparator, StringSplitOptions.RemoveEmptyEntries);
    479481        if (!nodes.Any()) break;
    480482
Note: See TracChangeset for help on using the changeset viewer.