Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
TSP Class Reference

#include <tsp.h>

Classes

struct  City
 

Public Member Functions

void create_tour (int)
 
void euler (int pos, vector< int > &)
 
void fillMatrix_threads ()
 
int find_best_path (int)
 
void findMST_old ()
 
double get_distance (struct City c1, struct City c2)
 
int get_size ()
 
void make_hamilton (vector< int > &, double &)
 
void make_shorter ()
 
void perfect_matching ()
 
void printAdjList ()
 
void printCities ()
 
void printEuler ()
 
void printPath ()
 
void printResult ()
 
void readCities ()
 
 TSP (string in, string out)
 
 TSP (vector< Eigen::Vector2d > nodes, vector< vector< double >> weights)
 
 ~TSP ()
 

Public Attributes

vector< int > * adjlist
 
vector< int > circuit
 
vector< Citycities
 
int end_idx [THREADS]
 
double ** graph
 
int n
 
double ** path_vals
 
double pathLength
 
int start_idx [THREADS]
 

Private Member Functions

void findOdds ()
 
void getNodeCount ()
 
int minKey (double key[], bool mstSet[])
 

Private Attributes

double ** cost
 
string inFname
 
vector< int > odds
 
string outFname
 

Detailed Description

Definition at line 54 of file tsp.h.

Constructor & Destructor Documentation

◆ TSP() [1/2]

TSP::TSP ( string  in,
string  out 
)

Definition at line 188 of file tsp.cpp.

◆ TSP() [2/2]

TSP::TSP ( vector< Eigen::Vector2d >  nodes,
vector< vector< double >>  weights 
)

Definition at line 149 of file tsp.cpp.

◆ ~TSP()

TSP::~TSP ( )

Definition at line 218 of file tsp.cpp.

Member Function Documentation

◆ create_tour()

void TSP::create_tour ( int  pos)

Definition at line 618 of file tsp.cpp.

◆ euler()

void TSP::euler ( int  pos,
vector< int > &  path 
)

Definition at line 533 of file tsp.cpp.

◆ fillMatrix_threads()

void TSP::fillMatrix_threads ( )

Definition at line 346 of file tsp.cpp.

◆ find_best_path()

int TSP::find_best_path ( int  pos)

Definition at line 630 of file tsp.cpp.

◆ findMST_old()

void TSP::findMST_old ( )

Definition at line 409 of file tsp.cpp.

◆ findOdds()

void TSP::findOdds ( )
private

Definition at line 482 of file tsp.cpp.

◆ get_distance()

double TSP::get_distance ( struct City  c1,
struct City  c2 
)
  • occlusion check */

Definition at line 273 of file tsp.cpp.

◆ get_size()

int TSP::get_size ( )
inline

Definition at line 169 of file tsp.h.

◆ getNodeCount()

void TSP::getNodeCount ( )
private

Definition at line 234 of file tsp.cpp.

◆ make_hamilton()

void TSP::make_hamilton ( vector< int > &  path,
double &  path_dist 
)

Definition at line 583 of file tsp.cpp.

◆ make_shorter()

void TSP::make_shorter ( )

Definition at line 651 of file tsp.cpp.

◆ minKey()

int TSP::minKey ( double  key[],
bool  mstSet[] 
)
private

Definition at line 469 of file tsp.cpp.

◆ perfect_matching()

void TSP::perfect_matching ( )

Definition at line 496 of file tsp.cpp.

◆ printAdjList()

void TSP::printAdjList ( )

Definition at line 697 of file tsp.cpp.

◆ printCities()

void TSP::printCities ( )

Definition at line 707 of file tsp.cpp.

◆ printEuler()

void TSP::printEuler ( )

Definition at line 692 of file tsp.cpp.

◆ printPath()

void TSP::printPath ( )

Definition at line 681 of file tsp.cpp.

◆ printResult()

void TSP::printResult ( )

Definition at line 661 of file tsp.cpp.

◆ readCities()

void TSP::readCities ( )

Definition at line 251 of file tsp.cpp.

Member Data Documentation

◆ adjlist

vector<int>* TSP::adjlist

Definition at line 110 of file tsp.h.

◆ circuit

vector<int> TSP::circuit

Definition at line 96 of file tsp.h.

◆ cities

vector<City> TSP::cities

Definition at line 99 of file tsp.h.

◆ cost

double** TSP::cost
private

Definition at line 76 of file tsp.h.

◆ end_idx

int TSP::end_idx[THREADS]

Definition at line 115 of file tsp.h.

◆ graph

double** TSP::graph

Definition at line 102 of file tsp.h.

◆ inFname

string TSP::inFname
private

Definition at line 66 of file tsp.h.

◆ n

int TSP::n

Definition at line 93 of file tsp.h.

◆ odds

vector<int> TSP::odds
private

Definition at line 72 of file tsp.h.

◆ outFname

string TSP::outFname
private

Definition at line 69 of file tsp.h.

◆ path_vals

double** TSP::path_vals

Definition at line 119 of file tsp.h.

◆ pathLength

double TSP::pathLength

Definition at line 105 of file tsp.h.

◆ start_idx

int TSP::start_idx[THREADS]

Definition at line 113 of file tsp.h.


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


co_scan
Author(s):
autogenerated on Mon Feb 28 2022 23:00:58