docs: public boolean decompose( DMatrixRMaj mat ) {
          if( mat.numRows > maxWidth ) {
              setExpectedMaxSize(mat.numRows,mat.numCols);
          } else if( mat.numRows != mat.numCols ) {
              throw new RuntimeException("Can only decompose square matrices");
          }
          n = mat.numRows;
  
          L.set(mat);
          double []el = L.data;
  
          double d_inv=0;
          for( int i = 0; i < n; i++ ) {
              for( int j = i; j < n; j++ ) {
                  double sum = el[i*n+j];
  
                  for( int k = 0; k < i; k++ ) {
                      sum -= el[i*n+k]*el[j*n+k]*d[k];
                  }
  
                  if( i == j ) {
                      // is it positive-definite?
                      if( sum <= 0.0 )
                          return false;
  
                      d[i] = sum;
                      d_inv = 1.0/sum;
                      el[i*n+i] = 1;
                  } else {
                      el[j*n+i] = sum*d_inv;
                  }
              }
          }
          // zero the top right corner.
          for( int i = 0; i < n; i++ ) {
              for( int j = i+1; j < n; j++ ) {
                  el[i*n+j] = 0.0;
              }
          }
  
          return true;
      }