#ifndef __NEAREST__
#define __NEAREST__

#define ROBOT_RADIUS 0.5
#define SIZE_X 40
#define SIZE_Y 40
#define MAXPOINT_IN_CELL 50
#define MAX_POINTS_NUM 1200

/*---------------defines--------------------*/
/*------------global variables------------------*/
typedef struct _point *PointPtr;
typedef struct _point{
  double x;
  double y;
}PointXY;

typedef struct _point_index *PointIndexPtr;
typedef struct _point_index{
  int num;
  int points[MAXPOINT_IN_CELL];
}PointIndex;



void init_table(void);
void add_point(double x, double y);
void add_point_table(int n);
double search_min_dist(double x,double y);
int regist_points(void);

#endif
