-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalgos.h
More file actions
41 lines (33 loc) · 871 Bytes
/
algos.h
File metadata and controls
41 lines (33 loc) · 871 Bytes
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
39
40
41
#ifndef ALGOS_H
#define ALGOS_H
#include <stdint.h>
/*
*structura pentru a retine o stare din
*parcurgere de la task-ul 3
*/
typedef struct node_state{
//numarul nodului
int node_nr;
//masca
uint32_t mask;
//costul pentru a ajunge in starea aceasta
double cost;
} node_state;
/*
*structura pentru a retine componentele conexe
*si numarul lor
*/
typedef struct CTCList{
//vector de bitmask-uri, fiecare reprezentand cate o componenta
uint32_t* components;
//numarul de componente
int nr_components;
}CTCList;
double** RoyFloyd(graph* gr);
double Dijkstra_vec(graph* gr, int from, int to, int* parents);
double* Bellman_Ford(graph* gr, int from);
CTCList* Kosaraju(graph* gr, int from);
void sort_CTCList(CTCList* list);
void disp_CTCs(CTCList* list);
double TSP_modif(graph* gr, int from, int to, int included_nodes);
#endif