Class Utilities
java.lang.Object
math.differentialcalculus.Utilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
evaluateTokens
(ArrayList<String> scan) Evaluates products of numbers or divisions of numbers.static void
freeSpaces
(List<String> scan) static String
static boolean
isAutoGenNameFormat
(String name) static boolean
isDifferentiable
(String value) static boolean
static void
static void
static void
void
openBrackets
(ArrayList<String> scan) Checks for the pattern..static void
static void
Simplifies portions of math code that involve products or quotients of -1.private static void
simplifyOneProducts
(int index, ArrayList<String> list) static void
simplifyOneProducts
(ArrayList<String> list) static void
simplifyZeroes
(ArrayList<String> array) static void
simplifyZeroesAt
(int index, ArrayList<String> list) static void
tokenRearranger
(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 tovalue
is 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
-