static void svd_dscal ( int n , double da , double [ ] dx , int incx ) { if ( n <= 0 || incx == 0 ) return ; int ix = ( incx < 0 ) ? n - 1 : 0 ; for ( int i = 0 ; i < n ; i ++ ) { dx [ ix ] *= da ; ix += incx ; } return ; }
Function scales a vector by a constant . * Based on Fortran-77 routine from Linpack by J. Dongarra