An implementation of "Cartesian k-means, M. Norouzi, D. J. Fleet, CVPR 2013"