update

In-place rank-1 update: mat := mat + x*x^T