code: public static Discrete discretize(Term term, double start, double end, int resolution,
              boolean boundedMembershipFunction) {
          Discrete result = new Discrete(term.getName());
          double dx = (end - start) / resolution;
          double x, y;
          for (int i = 0; i <= resolution; ++i) {
              x = start + i * dx;
              y = term.membership(x);
              if (boundedMembershipFunction) {
                  y = Op.bound(y, 0.0, 1.0);
              }
              result.add(new Discrete.Pair(x, y));
          }
          return result;
      }
docs: Discretizes the given term
  
  @param term is the term to discretize
  @param start is the value from which discretization starts
  @param end is the value at which discretization ends
  @param resolution is the number of equally-distributed samples to perform
  between start and end
  @param boundedMembershipFunction indicates whether to ensure that
  `\mu(x)\in[0.0,1.0]`
  @return a Discrete term that approximates the given term