Class BaseNFunction
java.lang.Object
com.github.gbenroscience.parser.MathExpression
com.github.gbenroscience.math.otherBaseParser.BaseNFunction
- All Implemented Interfaces:
Savable,Solvable,Serializable
- Author:
- JIBOYE Oluwagbemiro Olaoluwa
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.gbenroscience.parser.MathExpression
MathExpression.ExpressionSolver -
Field Summary
Fields inherited from class com.github.gbenroscience.parser.MathExpression
correctFunction, hasListReturningOperators, lastResult, noOfListReturningOperators, parser_Result, scanner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic voidvoidsetBaseOfOperation(int baseOfOperation) solve()Method solve is the main parser used to evaluate the input multi-bracket pair (MBP) expressions used to initialize the constructor of class MathExpressionMethods inherited from class com.github.gbenroscience.parser.MathExpression
codeModifier, copyArrayToArray, detectKeyOperators, functionComponentsAssociation, getBracket, getDRG, getExpression, getLastResult, getNoOfListReturningOperators, getReturnObjectName, getReturnType, getScanner, getValue, getVariableManager, getVars, getWhitespaceremover, isAutoInitOn, isCorrectFunction, isHasListReturningOperators, isHasLogicOperators, isHasMulOrDivOperators, isHasNumberReturningStatsOperators, isHasPermOrCombOperators, isHasPlusOrMinusOperators, isHasPostNumberOperators, isHasPowerOperators, isHasPreNumberOperators, isHasRemainderOperators, isOptimizable, isScannedAndOptimized, isVariableHandlerOnly, listToString, main1, mapBrackets, mapBrackets, modifyBracketIndices, parse, serialize, setAutoInitOn, setBracket, setCorrectFunction, setDRG, setDRG, setExpression, setHasListReturningOperators, setHasLogicOperators, setHasMulOrDivOperators, setHasNumberReturningStatsOperators, setHasPermOrCombOperators, setHasPlusOrMinusOperators, setHasPostNumberOperators, setHasPowerOperators, setHasPreNumberOperators, setHasRemainderOperators, setLastResult, setNoOfListReturningOperators, setOptimizable, setReturnType, setScanner, setValue, setVariableHandlerOnly, setVariableManager, setVariableValuesInFunction, setWhitespaceremover, solve, solve1, solveSubPortions, statsVerifier, unBracketDataSetReturningStatsOperators
-
Constructor Details
-
BaseNFunction
- Parameters:
input- The function to be evaluated. The general format contains variable and constant declarations for variables and constants that are not yet initialized,assignment expressions for those that have been initialized and then an expression to evaluate. e.g. var x =-12; var y =x+1/12; const x1,x2,x3=10; var z =sin(3x-1)+2.98cos(4x);cos(3x+12); The last expression is function to be evaluated and it is always without any equals sign and may or may not end with a semicolon.baseOfOperation- The number base that objects of this class will use in computations.
-
-
Method Details
-
setBaseOfOperation
public void setBaseOfOperation(int baseOfOperation) -
getBaseOfOperation
public int getBaseOfOperation() -
solve
Description copied from class:MathExpressionMethod solve is the main parser used to evaluate the input multi-bracket pair (MBP) expressions used to initialize the constructor of class MathExpression- Specified by:
solvein interfaceSolvable- Overrides:
solvein classMathExpression- Returns:
- the result of the evaluation
-
main
-