Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::PdTspParser Class Reference

#include <pdtsp_parser.h>

Public Member Functions

 PdTspParser ()
 
 ~PdTspParser ()=default
 
bool LoadFile (const std::string &file_name)
 Loads and parse a PDTSP from a given file.
 
int depot () const
 Returns the index of the depot.
 
int Size () const
 Returns the number of nodes in the PDTSP.
 
bool IsPickup (int index) const
 Returns true if the index corresponding to a node is a pickup.
 
int DeliveryFromPickup (int index) const
 Returns the delivery corresponding to a pickup.
 
std::function< int64_t(int, int)> Distances () const
 Returns a function returning distances between nodes.
 

Detailed Description

Definition at line 29 of file pdtsp_parser.h.

Constructor & Destructor Documentation

◆ PdTspParser()

operations_research::PdTspParser::PdTspParser ( )

Definition at line 44 of file pdtsp_parser.cc.

◆ ~PdTspParser()

operations_research::PdTspParser::~PdTspParser ( )
default

Member Function Documentation

◆ DeliveryFromPickup()

int operations_research::PdTspParser::DeliveryFromPickup ( int index) const
inline

Returns the delivery corresponding to a pickup.

Definition at line 42 of file pdtsp_parser.h.

◆ depot()

int operations_research::PdTspParser::depot ( ) const
inline

Returns the index of the depot.

Definition at line 36 of file pdtsp_parser.h.

◆ Distances()

std::function< int64_t(int, int)> operations_research::PdTspParser::Distances ( ) const

Returns a function returning distances between nodes.

Definition at line 54 of file pdtsp_parser.cc.

◆ IsPickup()

bool operations_research::PdTspParser::IsPickup ( int index) const
inline

Returns true if the index corresponding to a node is a pickup.

Definition at line 40 of file pdtsp_parser.h.

◆ LoadFile()

bool operations_research::PdTspParser::LoadFile ( const std::string & file_name)

Loads and parse a PDTSP from a given file.

Definition at line 46 of file pdtsp_parser.cc.

◆ Size()

int operations_research::PdTspParser::Size ( ) const
inline

Returns the number of nodes in the PDTSP.

Definition at line 38 of file pdtsp_parser.h.


The documentation for this class was generated from the following files: