- Timestamp:
- 03/10/11 01:49:10 (14 years ago)
- Location:
- branches/QAP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/QAP
- Property svn:ignore
-
old new 1 1 *.suo 2 TestResults
-
- Property svn:ignore
-
branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBParser.cs
r5563 r5648 41 41 Distances = new double[Size, Size]; 42 42 Weights = new double[Size, Size]; 43 reader.ReadLine();43 string valLine = reader.ReadLine(); 44 44 char[] delim = new char[] { ' ' }; 45 45 for (int i = 0; i < Size; i++) { 46 string valLine = reader.ReadLine(); 46 if (i > 0 || String.IsNullOrWhiteSpace(valLine)) 47 valLine = reader.ReadLine(); 47 48 string[] vals = new string[Size]; 48 49 string[] partVals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries); … … 59 60 } 60 61 } 61 reader.ReadLine();62 valLine = reader.ReadLine(); 62 63 int read = 0; 63 64 int k = 0; 64 65 while (!reader.EndOfStream) { 65 string valLine = reader.ReadLine(); 66 if (read > 0 || String.IsNullOrWhiteSpace(valLine)) 67 valLine = reader.ReadLine(); 66 68 string[] vals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries); 67 69 for (int j = 0; j < vals.Length; j++) { -
branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBSolutionParser.cs
r5598 r5648 38 38 try { 39 39 StreamReader reader = new StreamReader(stream); 40 char[] delim = new char[] { ' ' };40 char[] delim = new char[] { ' ', ',' }; // comma is added for nug30.sln which is the only file that separates the permutation with commas 41 41 string[] firstline = reader.ReadLine().Split(delim, StringSplitOptions.RemoveEmptyEntries); 42 42 Size = int.Parse(firstline[0]);
Note: See TracChangeset
for help on using the changeset viewer.