private TSPLIBParser() { Name = String.Empty; Comment = String.Empty; Type = TSPLIBTypes.UNKNOWN; EdgeWeightType = TSPLIBEdgeWeightTypes.UNKNOWN; edgeWeightFormat = TSPLIBEdgeWeightFormats.UNKNWON; edgeWeightDataFormat = TSPLIBEdgeWeightDataFormats.UNKNOWN; nodeCoordType = TSLPLIBNodeCoordTypes.UNKNOWN; displayDataType = TSPLIBDisplayDataTypes.UNKNOWN; }
private void ReadNodeCoordType(string value) { TSLPLIBNodeCoordTypes n; if (Enum.TryParse(value.Trim().ToUpper(), out n)) { nodeCoordType = n; } else { throw new InvalidDataException("Input file contains an unsupported node coordinates type (" + value + ") in line " + currentLineNumber + "."); } }
private void ReadNodeCoordType(string value) { TSLPLIBNodeCoordTypes n; if (Enum.TryParse(value.Trim().ToUpper(), out n)) nodeCoordType = n; else throw new InvalidDataException("Input file contains an unsupported node coordinates type (" + value + ") in line " + currentLineNumber + "."); }