code: public double evaluate(Map<String, Double> localVariables) {
          if (this.root == null) {
              throw new RuntimeException("[function error] evaluation failed " +
                      "because function is not loaded");
          }
          return this.root.evaluate(localVariables);
      }
docs: Computes the function value of this term using the given map of variable
  substitutions.
  
  @param localVariables is a map of substitution variables
  @return the function value of this term using the given map of variable
  substitutions.