p and j are only nonzero when psi-twiddle is btw 0 and 1.  minor misprint in gauss seidel