code: public static void scale( double alphaReal, double alphaImag , ZMatrixD1 a )
      {
          // on very small matrices (2 by 2) the call to getNumElements() can slow it down
          // slightly compared to other libraries since it involves an extra multiplication.
          final int size = a.getNumElements()*2;
  
          for( int i = 0; i < size; i += 2 ) {
              double real = a.data[i];
              double imag = a.data[i+1];
  
              a.data[i] = real*alphaReal - imag*alphaImag;
              a.data[i+1] = real*alphaImag + imag*alphaReal;
          }
      }
docs: <p>
  Performs an in-place element by element scalar multiplication.<br>
  <br>
  a<sub>ij</sub> = &alpha;*a<sub>ij</sub>
  </p>
  
  @param a The matrix that is to be scaled.  Modified.
  @param alphaReal real component of scale factor
  @param alphaImag imaginary component of scale factor