18#ifndef OR_TOOLS_ROUTING_PARSERS_PDTSP_PARSER_H_
19#define OR_TOOLS_ROUTING_PARSERS_PDTSP_PARSER_H_
34 bool LoadFile(
const std::string& file_name);
36 int depot()
const {
return depot_; }
38 int Size()
const {
return x_.size(); }
44 std::function<int64_t(
int,
int)>
Distances()
const;
47 enum Sections { SIZE_SECTION, DEPOT_SECTION, NODE_SECTION, EOF_SECTION };
48 void ProcessNewLine(
const std::string&
line);
52 std::vector<double> x_;
53 std::vector<double> y_;
54 std::vector<int> deliveries_;
std::function< int64_t(int, int)> Distances() const
Returns a function returning distances between nodes.
int Size() const
Returns the number of nodes in the PDTSP.
int depot() const
Returns the index of the depot.
int DeliveryFromPickup(int index) const
Returns the delivery corresponding to a pickup.
bool LoadFile(const std::string &file_name)
Loads and parse a PDTSP from a given file.
bool IsPickup(int index) const
Returns true if the index corresponding to a node is a pickup.
In SWIG mode, we don't want anything besides these top-level includes.