Class Utilities
java.lang.Object
math.differentialcalculus.Utilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidevaluateTokens(ArrayList<String> scan) Evaluates products of numbers or divisions of numbers.static voidfreeSpaces(List<String> scan) static Stringstatic booleanisAutoGenNameFormat(String name) static booleanisDifferentiable(String value) static booleanstatic voidstatic voidstatic voidvoidopenBrackets(ArrayList<String> scan) Checks for the pattern..static voidstatic voidSimplifies portions of math code that involve products or quotients of -1.private static voidsimplifyOneProducts(int index, ArrayList<String> list) static voidsimplifyOneProducts(ArrayList<String> list) static voidsimplifyZeroes(ArrayList<String> array) static voidsimplifyZeroesAt(int index, ArrayList<String> list) static voidtokenRearranger(ArrayList<String> scan) Condenses numbers and variables to be added within a bracket to the end of the bracket.
-
Field Details
-
whitespaceremover
-
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
freeSpaces
-
print
-
isAutoGenNameFormat
- Parameters:
name- The name to check.- Returns:
- true if the name is automatically generated and so, most likely refers to a stored Differentiable.
-
getText
-
isDifferentiable
- Parameters:
value- The item to check Always double check in the scanner where this item exists that the next token tovalueis not an open bracket if value is a valid variable name.- Returns:
- true if it can be differentiated to get a value.
-
isFormula
-
simplifyNegOneProducts
-
simplifyZeroes
-
simplifyZeroesAt
-
simplifyOneProducts
-
simplifyOneProducts
-
openBrackets
-
evaluateTokens
-
tokenRearranger
-
multipleBracketRemover
-
multipleBracketRemover_
-
main
-