Changeset 884 for trunk/sources/HeuristicLab.Routing.TSP/TSPParser.cs
- Timestamp:
- 12/02/08 12:41:21 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Routing.TSP/TSPParser.cs
r2 r884 27 27 28 28 namespace HeuristicLab.Routing.TSP { 29 /// <summary> 30 /// Parses a *.tsp file and extracts its information about a TSP. 31 /// </summary> 29 32 public class TSPParser { 30 33 private const int EOF = 0; … … 39 42 40 43 private string myName; 44 /// <summary> 45 /// Gets the name of the parsed TSP. 46 /// </summary> 41 47 public string Name { 42 48 get { return myName; } 43 49 } 44 50 private double[,] myVertices; 51 /// <summary> 52 /// Gets the vertices of the parsed TSP. 53 /// </summary> 45 54 public double[,] Vertices { 46 55 get { return myVertices; } 47 56 } 48 57 private int myWeightType; 58 /// <summary> 59 /// Gets the weight type of the parsed TSP. 60 /// </summary> 49 61 public int WeightType { 50 62 get { return myWeightType; } 51 63 } 52 64 65 /// <summary> 66 /// Initializes a new instance of <see cref="TSPParser"/> with the given <paramref name="path"/>. 67 /// </summary> 68 /// <exception cref="ArgumentException">Thrown when the input file name is not in TSP format (*.tsp) 69 /// </exception> 70 /// <param name="path">The path where the TSP is stored.</param> 53 71 public TSPParser(String path) { 54 72 if (!path.EndsWith(".tsp")) … … 61 79 } 62 80 81 /// <summary> 82 /// Reads the TSP file and parses the elements. 83 /// </summary> 84 /// <exception cref="InvalidDataException">Thrown when file contains unknown (edge) types.</exception> 63 85 public void Parse() { 64 86 int section = -1;
Note: See TracChangeset
for help on using the changeset viewer.