-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod_graph.h
30 lines (22 loc) · 861 Bytes
/
mod_graph.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef MOD_GRAPH_H_INCLUDED
#define MOD_GRAPH_H_INCLUDED 1
#include "mod_tabela_hash.h"
#include "dados.h"
#define VISITADO 1
#define ORLA 0
#define DESCONHECIDO -1
typedef TabelaHashPTR GraphPTR;
typedef struct GraphElem{
char *nome;
char *nomeAnterior;
double distancia;
double custoCaminho;
double custoCamiaoKm;
int estado;
} *GraphElemPTR;
GraphElemPTR newVertex(char* nome, char* nomeAnterior, double distancia, double custoCaminho, double custoCamiaoKm, int estado);
GraphElemPTR chooseNextCheapestVertex (GraphPTR graph, GraphElemPTR proxVertice);
GraphPTR cheapestPathGraph(TabelaHashPTR localidades, char* localidadeorigem, char* localidadedestino, double custoCamiaoKm);
int buildPathGraph(GraphPTR graph, LigacoesidaPTR ligacao,GraphElemPTR vertex, int naOrla) ;
void imprimedijkstra(GraphPTR graphDijkstra);
#endif