Ensures consistency in SVD output by flipping signs so that each left singular vector has a majority of positive entries.
rotateSVD(svdres)A list as returned by svd(), with components
u, d, and v.
A modified svd-result list where each column of $u
has been sign-flipped so that its entries sum to a nonnegative value;
$v is flipped correspondingly.