code: @Override
      public double membership(double x) {
          if (this.root == null) {
              throw new RuntimeException(String.format(
                      "[function error] function <%s> not loaded.", formula));
          }
          if (this.engine != null) {
              for (InputVariable inputVariable : this.engine.getInputVariables()) {
                  this.variables.put(inputVariable.getName(), inputVariable.getValue());
              }
              for (OutputVariable outputVariable : this.engine.getOutputVariables()) {
                  this.variables.put(outputVariable.getName(), outputVariable.getValue());
              }
          }
          this.variables.put("x", x);
          return evaluate(this.variables);
      }
docs: Computes the membership function value of `x` at the root node. If the
  engine has been set, the current values of the input variables and output
  variables are added to the map of Function::variables. In addition, the
  variable `x` will also be added to the map.
  
  @param x
  @return the membership function value of `x` at the root node