コード例 #1
0
        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;
        }
コード例 #2
0
        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 + ".");
            }
        }
コード例 #3
0
ファイル: TSPLIBParser.cs プロジェクト: t-h-e/HeuristicLab
 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 + ".");
 }
コード例 #4
0
ファイル: TSPLIBParser.cs プロジェクト: t-h-e/HeuristicLab
    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;
    }