code: public static void addEquals(DMatrixD1 a , double beta, DMatrixD1 b )
      {
          if( a.numCols != b.numCols || a.numRows != b.numRows ) {
              throw new MatrixDimensionException("The 'a' and 'b' matrices do not have compatible dimensions");
          }
  
          final int length = a.getNumElements();
  
          for( int i = 0; i < length; i++ ) {
              a.plus(i, beta * b.get(i));
          }
      }
docs: <p>Performs the following operation:<br>
  <br>
  a = a +  &beta; * b  <br>
  a<sub>ij</sub> = a<sub>ij</sub> + &beta; * b<sub>ij</sub>
  </p>
  
  @param beta The number that matrix 'b' is multiplied by.
  @param a A Matrix. Modified.
  @param b A Matrix. Not modified.