Other available revisons

Instead of keeping a vector of length 2*d as in the previous version, now the algorithm only maintain a vector of length d, where d is the number of features. This slightly reduces both the code length and run-time.