Kernel perceptron implementation in c