linear pegasos code and test code