-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphBellmanFordAlg.h
36 lines (23 loc) · 980 Bytes
/
GraphBellmanFordAlg.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
//
// Algoritmos e Estruturas de Dados --- 2024/2025
//
// Joaquim Madeira - Dec 2024
//
// GraphBellmanFord - Bellman-Ford Algorithm
//
#ifndef _GRAPH_BELLMAN_FORD_ALG_
#define _GRAPH_BELLMAN_FORD_ALG_
#include "Graph.h"
#include "IntegersStack.h"
typedef struct _GraphBellmanFordAlg GraphBellmanFordAlg;
GraphBellmanFordAlg* GraphBellmanFordAlgExecute(Graph* g,
unsigned int startVertex);
void GraphBellmanFordAlgDestroy(GraphBellmanFordAlg** p);
// Getting the result
int GraphBellmanFordAlgReached(const GraphBellmanFordAlg* p, unsigned int v);
int GraphBellmanFordAlgDistance(const GraphBellmanFordAlg* p, unsigned int v);
Stack* GraphBellmanFordAlgPathTo(const GraphBellmanFordAlg* p, unsigned int v);
// DISPLAYING on the console
void GraphBellmanFordAlgShowPath(const GraphBellmanFordAlg* p, unsigned int v);
void GraphBellmanFordAlgDisplayDOT(const GraphBellmanFordAlg* p);
#endif // _GRAPH_BELLMAN_FORD_ALG_