Here is the sinc function we will be trying to learn with the kcentroid object.
| 26 | // Here is the sinc function we will be trying to learn with the kcentroid |
| 27 | // object. |
| 28 | double sinc(double x) |
| 29 | { |
| 30 | if (x == 0) |
| 31 | return 1; |
| 32 | return sin(x)/x; |
| 33 | } |
| 34 | |
| 35 | int main() |
| 36 | { |