-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.h
62 lines (46 loc) · 1.2 KB
/
helpers.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/********************************************************************
FILE NAME:
helpers.h
PROJECT IDENTIFICATION:
Subject: IAL
Number: 6
Name: Obarveni grafu
AUTHORS:
- Josef Adamek (xadame42)
- Diana Barnova (xbarno00)
- Jozef Vanicky (xvanic09)
- Filip Weigel (xweige01)
BRIEF FILE DESCRIPTION:
This file contains structures representing undirected graph (node structure,
array of nodes and matrix of connections)declarations of functions from
file helpers.c and global variables used in both main.c and helpers.c
CREATED:
27.9.2018
LAST CHANGE:
05.12.2018
********************************************************************/
#include <stdbool.h>
/* Global variables */
bool brief_flag;
int num_of_nodes;
/* Enumerating codes for printing solution */
typedef enum {
NORMAL,
SMALLER,
MINIMAL
} MODE;
/* Structure for node in graph */
typedef struct {
int id; // id of node equals index in node_array
int color;
bool *color_set;
} Node;
/* Heavily used data structures */
bool *graph_matrix;
Node *node_array;
/* Declarations of functions in helpers.c */
void print_info();
void print_coloring(int min_chromatic_num,
int mode);
char* parse_arguments(int argc, char** argv);
void check_matrix();