62 tok = strtok(S,
" \n");
67 sscanf(tok,
"%le", &p->x[i]);
68 p->x[i] = p->x[i] / max;
69 tok = strtok(NULL,
" \n");
81 p->x[i] = (double)random()/(double)RAND_MAX;
#define D
D is the number of dimensions.
Simple point interface. Contains simple point manipulation functions.
void randomPoint(point *p)
void parsePoint(char *S, point *p, double max)
Point is an array of coordinates, in a struct for simple and fast copy.