blob: f00a2698a31ffc95e3b579a8edca5c28d07a6db0 (
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);
void shuffle_items(struct data *, int);
#endif
|