-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathlevel.h
More file actions
29 lines (23 loc) · 768 Bytes
/
level.h
File metadata and controls
29 lines (23 loc) · 768 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
#ifndef __LEVEL_H__
#define __LEVEL_H__
#include "graph.h"
#include "hash_set.h"
#include "priority_queue.h"
typedef struct {
unsigned min_m; // minimum m (n - 1)
unsigned num_m; // number of possible values of m
unsigned n;
unsigned p;
unsigned max_k;
hash_set **sets; //one hash set for each m
priority_queue **queues;
} level;
level *level_create(unsigned n, unsigned p, unsigned max_k);
void level_delete(level *my_level);
void level_empty_and_print(level *my_level);
void level_extend(level *old, level *new);
void extend_graph_and_add_to_level(graph_info input, level *new_level);
bool add_graph_to_level(graph_info *new_graph, level *my_level);
void _add_graph_to_level(graph_info *new_graph, level *my_level);
void test_extend_graph(void);
#endif