Class ExpressionSimplifier

java.lang.Object
com.github.gbenroscience.math.differentialcalculus.ExpressionSimplifier

public class ExpressionSimplifier extends Object
Objects of this class seek to simplify a math expression, by taking it through a series of transformative processes.
Author:
GBEMIRO
  • Constructor Details

    • ExpressionSimplifier

      public ExpressionSimplifier(ArrayList<String> scanned)
  • Method Details

    • getSimplifiedExpression

      public ArrayList<String> getSimplifiedExpression()
      Returns:
      an ArrayList containing the simplified expression.
    • simplifyCompoundBrackets

      public static void simplifyCompoundBrackets(List<String> list)
      Simplifies tokens in a List that have no + or - operator, but may have brackets. e.g. ((x^2)*(2/x)*...)
      Parameters:
      list - The List containing the tokens.
    • solve

      public static List<String> solve(List<String> list)
      Used by the main parser solve to figure out SBP portions of a multi-bracketed expression (MBP)
      Parameters:
      list - a list of scanner tokens of a maths expression
      Returns:
      the solution to a SBP maths expression