blob: b188955a4c9cb31441807aa0dbcd4649f60a9a0f (
plain) (
tree)
|
|
#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
|