// Turgay Korkmaz
// korkmaz@cs.utsa.edu  turgay@ece.arizona.edu


#include <stdio.h>
#include <sys/types.h>
#include <time.h>
#include <limits.h>
#include <math.h>

#ifndef _COMMON_H_
#define _COMMON_H_

#define MAX_INT  2147483647

#define min(_x,_y)   ((_x) > (_y) ? _y : _x)
#define max(_x,_y)   ((_x) > (_y) ? _x : _y)

/* Dynamic memory allocation functions */
#define VALID( _ptr_ )  if(!((int)_ptr_) ){                        \
			   printf(" Not enough memory ");          \
                           exit( -1 );                             \
                        }

#define INF       1.0e+300

typedef  struct {
  short  valid;  /* 0: no link 1: there is a link     */
  double c;      /* additive cost associated with a link */
} t_link;

#endif

