TSPLIB
|
Defines the constants, some basic functions and some basic classes necessary for the IO. More...
#include <limits>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <string>
Go to the source code of this file.
Classes | |
class | CommandLineArgumentsInvalid |
class | ValidationSchemaDoesNotExist |
class | ValidationFailed |
Functions | |
void | trimLeft (std::string &s, const std::string &t=" \t\r\n") |
void | trimRight (std::string &s, const std::string &t=" \t\r\n") |
void | trim (std::string &s, const std::string &t=" \t\r\n") |
Variables | |
const std::string | INPUT_FILE_FILENAME_EXTENSION = ".xml" |
const std::string | VALIDATION_SCHEMA = "TSPConfiguration.xsd" |
const std::string | XML_ENCODING = "UTF-8" |
const std::ios::fmtflags | DOUBLE_FLOATFIELD = std::ios::scientific |
const std::string | XML_DOCUMENT_NODE = "travellingSalesmanProblemInstance" |
const std::string | XML_NAME = "name" |
const std::string | XML_SOURCE = "source" |
const std::string | XML_DESCRIPTION = "description" |
const std::string | XML_DOUBLE_PRECISION = "doublePrecision" |
const std::string | XML_IGNORED_DIGITS = "ignoredDigits" |
const std::string | XML_GRAPH = "graph" |
const std::string | XML_VERTEX = "vertex" |
const std::string | XML_EDGE = "edge" |
const std::string | XML_EDGE_ATTRIBUTE_COST = "cost" |
Defines the constants, some basic functions and some basic classes necessary for the IO.
Defines the constants, some basic functions and some basic functions necessary for the IO.
Definition in file ValidateConstantsFunctionsAndClasses.hpp.
void trim | ( | std::string & | s, |
const std::string & | t = " \t\r\n" |
||
) | [inline] |
Trims the string from left and from right.
s | The string. |
t | The trimmed characters. |
Definition at line 124 of file ValidateConstantsFunctionsAndClasses.hpp.
References trimLeft(), and trimRight().
void trimLeft | ( | std::string & | s, |
const std::string & | t = " \t\r\n" |
||
) | [inline] |
Trims the string from left.
s | The string. |
t | The trimmed characters. |
Definition at line 100 of file ValidateConstantsFunctionsAndClasses.hpp.
void trimRight | ( | std::string & | s, |
const std::string & | t = " \t\r\n" |
||
) | [inline] |
Trims the string from right.
s | The string. |
t | The trimmed characters. |
Definition at line 109 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::ios::fmtflags DOUBLE_FLOATFIELD = std::ios::scientific |
Floatfield flag of doubles writed to stringstreams.
Definition at line 41 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string INPUT_FILE_FILENAME_EXTENSION = ".xml" |
Filename extension for xml files.
Definition at line 26 of file ValidateConstantsFunctionsAndClasses.hpp.
Referenced by parseCommandLineArguments().
const std::string VALIDATION_SCHEMA = "TSPConfiguration.xsd" |
Validation schema for the xml files.
Definition at line 31 of file ValidateConstantsFunctionsAndClasses.hpp.
Referenced by instanceIn().
const std::string XML_DESCRIPTION = "description" |
Xml tag: Description of the instance.
Definition at line 61 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_DOCUMENT_NODE = "travellingSalesmanProblemInstance" |
Xml tag: Name of the document node.
Definition at line 46 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_DOUBLE_PRECISION = "doublePrecision" |
Precision of doubles.
Definition at line 66 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_EDGE = "edge" |
Xml tag: One edge
Definition at line 87 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_EDGE_ATTRIBUTE_COST = "cost" |
Xml tag - attribute: Cost of the edge.
Definition at line 92 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_ENCODING = "UTF-8" |
Encoding of the xml file
Definition at line 36 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_GRAPH = "graph" |
Xml tag: Underlying graph.
Definition at line 77 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_IGNORED_DIGITS = "ignoredDigits" |
Number of ignored digits of double types. (The deviation of double values can be at most 1e-(DoublePrecision - IgnoredDigits).)
Definition at line 72 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_NAME = "name" |
Xml tag: Name of the instance.
Definition at line 51 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_SOURCE = "source" |
Xml tag: Source of the instance.
Definition at line 56 of file ValidateConstantsFunctionsAndClasses.hpp.
const std::string XML_VERTEX = "vertex" |
Xml tag: One vertex.
Definition at line 82 of file ValidateConstantsFunctionsAndClasses.hpp.