Some machine learning code in C++11