| 85 | } |
| 86 | |
| 87 | int AddSimple(double *p) { |
| 88 | double x = p[0], y = p[offset]; |
| 89 | |
| 90 | assert(n < nx); |
| 91 | P[n] = p; |
| 92 | |
| 93 | int k = ncase(x, y) % m; |
| 94 | assert(k >= 0); |
| 95 | next[n] = head[k]; |
| 96 | head[k] = n; |
| 97 | if (debug) { |
| 98 | cout << " AddSimple " << n << " <- " << k << " / " << x << " " << y << " / " << offset |
| 99 | << endl; |
| 100 | } |
| 101 | |
| 102 | return n++; |
| 103 | } |
| 104 | |
| 105 | private: |
| 106 | Point *Exist(double *p) const { |
no outgoing calls
no test coverage detected