private Matrix augNorm(Matrix mat) {
    Matrix localMat = new Matrix(new double[mat.numRows()][mat.numColumns()]);
    for(int doc = 0; doc < mat.numRows(); doc++) {
      double maxTf = 0;
      for(int term = 0; term < mat.numColumns(); term++) {
        double tf = mat.m[doc][term];
        maxTf = Math.max(maxTf, tf);
      }
      for(int term = 0; term < mat.numColumns(); term++) {
        double tf = mat.m[doc][term];
        if (tf > 0)
          localMat.m[doc][term] = (tf / maxTf + 1) / 2;
      }
    }
    return localMat;
  }