code: public static double elementSumAbs( DMatrixD1 mat ) {
          double total = 0;
  
          int size = mat.getNumElements();
  
          for( int i = 0; i < size; i++ ) {
              total += Math.abs(mat.get(i));
          }
  
          return total;
      }
docs: <p>
  Computes the sum of the absolute value all the elements in the matrix:<br>
  <br>
  sum(i=1:m , j=1:n ; |a<sub>ij</sub>|)
  <p>
  
  @param mat An m by n matrix. Not modified.
  @return The sum of the absolute value of each element.