-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrph.h
More file actions
49 lines (39 loc) · 795 Bytes
/
grph.h
File metadata and controls
49 lines (39 loc) · 795 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
42
43
44
45
46
47
48
49
#ifndef _GRPH_H_
#define _GRPH_H_
#define DENSE 1
#define SPARSE 0
#define PROFILING 0
#define NANO 1
#if PROFILING
#define MAX_P 20
double compact_list_time[MAX_P];
double sort_time[MAX_P];
double compact_time[MAX_P];
double distinct_time[MAX_P];
#endif
typedef struct ele {
int v,w;
} ele_t;
typedef struct ent {
int n_neighbors;
ele_t * my_neighbors;
int wk_space1;
} ent_t;
typedef ent_t WV;
typedef struct adj_l {
int n_neighbors;
ele_t * my_neighbors;
struct adj_l * next;
} adj_t;
typedef struct ent_1 {
int n_neighbors;
adj_t * head,*tail;
int wk_space1;
} ent1_t;
typedef struct edge {
int v1, v2;
int w;
} edge_t;
int read_graph(char * graph_name,int * n_vertices, int *d_or_s,ent_t** p_grph_list, int *** p_grph_matrix );
WV* r_graph(int n,int m);
#endif