public DenseMatrix getS ( ) { DenseMatrix S = Matrix . zeros ( U . nrows ( ) , V . nrows ( ) ) ; for ( int i = 0 ; i < s . length ; i ++ ) { S . set ( i , i , s [ i ] ) ; } return S ; }
Returns the diagonal matrix of singular values