Class ShuntingYard


  • public final class ShuntingYard
    extends java.lang.Object
    Shunting yard implementation to convert infix to reverse polish notation
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Token[] convertToRPN​(boolean simplify, java.lang.String expression, java.util.Map<java.lang.String,Function> userFunctions, java.util.Map<java.lang.String,Operator> userOperators, java.util.Set<java.lang.String> variableNames, boolean useBuiltInFunctions)
      Convert a Set of tokens from infix to reverse polish notation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • convertToRPN

        public static Token[] convertToRPN​(boolean simplify,
                                           java.lang.String expression,
                                           java.util.Map<java.lang.String,Function> userFunctions,
                                           java.util.Map<java.lang.String,Operator> userOperators,
                                           java.util.Set<java.lang.String> variableNames,
                                           boolean useBuiltInFunctions)
        Convert a Set of tokens from infix to reverse polish notation
        Parameters:
        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
        Returns:
        a Token array containing the result