-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraph.h
executable file
·38 lines (20 loc) · 873 Bytes
/
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
31
32
33
34
35
36
37
38
#include "generics/List.h"
typedef struct graph Graph;
//Mount Graph
Graph * mountGraph();
void destroyGraph(Graph * g);
void addVertex(Graph * g, int key, void * item);
void addEdge(Graph * g, int key,int weight, int keyVFrom, int keyVTo);
void addDoubleEdge(Graph * g, int key1, int key2, int weight, int keyV1, int keyV2);
void rmVertex(Graph * g, int key);
void rmEdge(Graph * g, int key);
List * getEdgeList(Graph * g);
List * getVertexList(Graph * g);
int calculateCost(Graph * g, List * path);
int getWeightEdge(Graph * g, int keyEdge);
int getVertexByFromKeyEdge(Graph * g, int keyEdge);
int getVertexByToKeyEdge(Graph * g, int keyEdge);
void setWeightEdge(Graph * g, int keyEdge, int w);
void printGraph(Graph * g);
char * getName(Graph * g, int keyVertex);
void setName(Graph * g, int keyVertex, char * str);