PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pgrouting::tsp::Tour Class Reference

#include "tour.h"

Public Member Functions

 Tour (const Tour &)=default
 
 Tour (const std::vector< size_t > &cities_order)
 
 Tour (size_t n)
 
void reverse (size_t c1, size_t c2)
 
void rotate (size_t c1, size_t c2, size_t c3)
 
size_t size () const
 
void slide (size_t place, size_t first, size_t last)
 
void swap (size_t c1, size_t c2)
 

Public Attributes

std::vector< size_t > cities
 

Friends

double Dmatrix::tourCost (const Tour &tour) const
 
std::ostream & operator<< (std::ostream &log, const Tour &tour)
 

Detailed Description

Definition at line 42 of file tour.h.

Constructor & Destructor Documentation

pgrouting::tsp::Tour::Tour ( const Tour )
default
pgrouting::tsp::Tour::Tour ( const std::vector< size_t > &  cities_order)
inlineexplicit

Definition at line 46 of file tour.h.

pgrouting::tsp::Tour::Tour ( size_t  n)
inlineexplicit

Definition at line 50 of file tour.h.

References cities.

Member Function Documentation

void pgrouting::tsp::Tour::reverse ( size_t  c1,
size_t  c2 
)

Definition at line 47 of file tour.cpp.

References cities, and pgassert.

void pgrouting::tsp::Tour::rotate ( size_t  c1,
size_t  c2,
size_t  c3 
)

Definition at line 77 of file tour.cpp.

References cities, and pgassert.

size_t pgrouting::tsp::Tour::size ( ) const
inline

Definition at line 55 of file tour.h.

References cities.

void pgrouting::tsp::Tour::slide ( size_t  place,
size_t  first,
size_t  last 
)

Definition at line 56 of file tour.cpp.

References cities, and pgassert.

Referenced by pgrouting::tsp::TSP< MATRIX >::getDeltaSlide().

void pgrouting::tsp::Tour::swap ( size_t  c1,
size_t  c2 
)

Definition at line 90 of file tour.cpp.

References cities, and pgassert.

Friends And Related Function Documentation

double Dmatrix::tourCost ( const Tour tour) const
friend
std::ostream& operator<< ( std::ostream &  log,
const Tour tour 
)
friend

Definition at line 36 of file tour.cpp.

Member Data Documentation


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