Class ShuntingYard


public final class ShuntingYard extends Object
Shunting yard implementation to convert infix to reverse polish notation
  • Method Details

    • convertToRPN

      public static Token[] convertToRPN(boolean simplify, String expression, Map<String,Function> userFunctions, Map<String,Operator> userOperators, Set<String> variableNames, boolean useBuiltInFunctions)
      Convert a Set of tokens from infix to reverse polish notation
      simplify - tells the method to apply the simplifier to returned expression
      expression - the expression to convert
      userFunctions - the custom functions used
      userOperators - the custom operators used
      variableNames - the variable names used in the expression
      useBuiltInFunctions - tells if builtin functions should be enabled
      a Token array containing the result