Driver that can load up dense graphs whose input is stored using the TSP format as recognized by the community. More...
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <math.h>
#include <getopt.h>
#include <string.h>
#include <sys/time.h>
#include "report.h"
#include "singleSourceShortest.h"
#include "Graph.h"
Functions | |
int | gettimeofday (struct timeval *tp, void *tzp) |
int | dist (int i, int j, float **values) |
taken from TSP description | |
void | process (char *fileName, bool dense) |
load up TSP data file.a as stored within a file. | |
int | main (int argc, char **argv) |
Load up sample graph from TSP file and compute time to perform single source shortest path. | |
Variables | |
static struct timeval | before |
Time before process starts. | |
static struct timeval | after |
Time after process completes. | |
float | RRR = 6378.388 |
Key constant for converting TSP formats into ones we can deal with. | |
int | verbose = 0 |
Whether run is to be executing in verbose mode. | |
static char | buf [4096] |
Scratch buffer. |
Driver that can load up dense graphs whose input is stored using the TSP format as recognized by the community.
int dist | ( | int | i, | |
int | j, | |||
float ** | values | |||
) |
taken from TSP description
http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/TSPFAQ.html
int gettimeofday | ( | struct timeval * | tp, | |
void * | tzp | |||
) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
Load up sample graph from TSP file and compute time to perform single source shortest path.
User has option to select the dense graph processing or the traditional Dijsktra's Algorithm.
void process | ( | char * | fileName, | |
bool | dense | |||
) |
load up TSP data file.a as stored within a file.
Process graph using dense Dijkstra's algorithm, if requested.
NAME : ym7663 COMMENT : 7663 locations in Yemen COMMENT : Derived from National Imagery and Mapping Agency data TYPE : TSP DIMENSION : 7663 EDGE_WEIGHT_TYPE : EUC_2D NODE_COORD_SECTION ... EOF
struct timeval after [static] |
Time after process completes.
struct timeval before [static] |
Time before process starts.
char buf[4096] [static] |
Scratch buffer.
float RRR = 6378.388 |
Key constant for converting TSP formats into ones we can deal with.
int verbose = 0 |
Whether run is to be executing in verbose mode.
Algorithm Development Kit 1.0