TSPLIB
Functions
src/ValidateIO.hpp File Reference

Defines the functions necessary for the IO. More...

#include <string>
#include <stdexcept>
#include "ValidateInstance.hpp"
#include "ValidateGraph.hpp"

Go to the source code of this file.

Functions

std::string parseCommandLineArguments (int argc, char *argv[])
InstanceinstanceIn (const std::string &inputFileName)

Detailed Description

Defines the functions necessary for the IO.

Defines the functions and classes necessary for the IO.

Author:
Ulrich Pferschy and Rostislav Stanek (Institut fuer Statistik und Operations Research, Universitaet Graz)

Definition in file ValidateIO.hpp.


Function Documentation

Instance* instanceIn ( const std::string &  inputFileName)

Reads one travelling salesman problem instance from the file inputFileName.

Parameters:
inputFileNameName of the input file.
Returns:
Instance of the travelling salesman problem.

Definition at line 121 of file ValidateIO.cpp.

References SAX2ContentHandler::getAdjacencyMatrix(), SAX2ContentHandler::getDescription(), SAX2ContentHandler::getDoublePrecision(), SAX2ErrorHandler::getFailed(), SAX2ContentHandler::getFailed(), SAX2ContentHandler::getIgnoredDigits(), SAX2ContentHandler::getName(), SAX2ContentHandler::getSource(), and VALIDATION_SCHEMA.

Referenced by main().

std::string parseCommandLineArguments ( int  argc,
char *  argv[] 
)

Parses the command-line arguments.

Parameters:
argcNumber of arguments.
argvArguments.
Returns:
Name of the input file.

Definition at line 33 of file ValidateIO.cpp.

References INPUT_FILE_FILENAME_EXTENSION.

Referenced by main().

 All Classes Files Functions Variables Friends Defines