summaryrefslogtreecommitdiffstats
path: root/include/common.h
blob: b188955a4c9cb31441807aa0dbcd4649f60a9a0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _COMMON_H
#define _COMMON_H

#include "structs.h"

#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))

struct data * input(char[]);
void print_data(struct data *);
void print_front(struct front_item *);
void free_data(struct data *);
void free_front(struct front_item *);
struct front_item * new_front_item(double,  double, struct front_item *, struct front_item *);
struct tree_item * new_tree_item(long int, long int, double, double, struct tree_item *, struct tree_item *);
double dist_items(struct item *, struct item *);
int len_front(struct front_item *);
int cmp_items_ratio(const void * a, const void * b);
int cmp_items_random(const void * a, const void * b);

#endif