code: public static void transpose( DMatrixRMaj mat ) {
          if( mat.numCols == mat.numRows ){
              TransposeAlgs_DDRM.square(mat);
          } else {
              DMatrixRMaj b = new DMatrixRMaj(mat.numCols,mat.numRows);
              transpose(mat,b);
              mat.set(b);
          }
      }
docs: <p>Performs an "in-place" transpose.</p>
  
  <p>
  For square matrices the transpose is truly in-place and does not require
  additional memory.  For non-square matrices, internally a temporary matrix is declared and
  {@link #transpose(DMatrixRMaj, DMatrixRMaj)} is invoked.
  </p>
  
  @param mat The matrix that is to be transposed. Modified.