added a computePvectForRows method for computing the P vector and Updated SVD