lsqr++/Lsqr.cpp
void dvec_scale(double scal, dvec *vec)
{
  long   indx;

  for(indx = 0; indx < vec->length; indx++)
    vec->elements[indx] *= scal;

  return;
}
/*-------------------------------------------------------------------------*/
/*                                                                         */
/*  Define the function 'dvec_scale()'.  This function takes a vector      */
/*  and a scalar as arguments and multiplies each element of the vector    */
/*  by the scalar.  Note  that this is a version of the BLAS function      */
/*  'dscal()' rewritten to use the current data structures.                */
/*                                                                         */
/*-------------------------------------------------------------------------*/
Define the function 'dvec_scale()'.  This function takes a vector
and a scalar as arguments and multiplies each element of the vector
by the scalar.  Note  that this is a version of the BLAS function
'dscal()' rewritten to use the current data structures.
Define the function ' dvec_scale () ' . This function takes a vector and a scalar as arguments and multiplies each element of the vector by the scalar . Note that this is a version of the BLAS function ' dscal () ' rewritten to use the current data structures .
void dvec_scale(double scal, dvec *vec)
{
  long   indx;
  for(indx = 0; indx < vec->length; indx++)
    vec->elements[indx] *= scal;
  return;
}
void dvec_scale ( double scal , dvec * vec ) { long indx ; for ( indx = 0 ; indx < vec -> length ; indx ++ ) vec -> elements [ indx ] *= scal ; return ; }
Define the function 'dvec_scale()'.
Define the function ' dvec_scale () ' .