1#if defined(STACK_SIZE) && STACK_SIZE < 65536 2# define GITT_SIZE 75 3#endif 4 5#ifndef GITT_SIZE 6# define GITT_SIZE 150 7#endif 8 9typedef struct { 10 double x, y; 11} vector_t; 12double sqrt(); 13f(int count,vector_t*pos,double r,double *rho) 14{ 15 int i, j, miny, maxy, hy; 16 float help, d; 17 int gitt[GITT_SIZE][GITT_SIZE]; 18 int *data = (int *)malloc(count*sizeof(int)); 19 for (i = 0; i < count; i++) 20 rho[i] = 0; 21 for (i = 1; i < count; i++) 22 for (hy = miny; hy<= maxy; hy++) 23 while(j >=0) { 24 d = pos[i].y - pos[j].y; 25 if ( d <= r) { 26 d = sqrt(d); 27 rho[i] += help; 28 } 29 } 30} 31 32