code: public static void add(DMatrixD1 a , double val ) {
          final int length = a.getNumElements();
  
          for( int i = 0; i < length; i++ ) {
              a.plus(i, val);
          }
      }
docs: <p>Performs an in-place scalar addition:<br>
  <br>
  a = a + val<br>
  a<sub>ij</sub> = a<sub>ij</sub> + val<br>
  </p>
  
  @param a A matrix.  Modified.
  @param val The value that's added to each element.