1. Please correct me if I am wrong: I guess the model should contain weights of the hypothesis too, right? Otherwise, how do you combine the hypothesis in the prediction function?
2. If you change the extensions of the .c files to .cpp, they get compiled in Linux too. They will complain about a few void* to double* conversion which can be fixed by reinterpret_cast<double *> (...) before the expressions.