public class RecursiveArgument extends Argument
When creating an argument you should avoid:
Argument,
Expression,
Function,
Constant| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_DESC_RECURSIVE |
static int |
TYPE_ID_RECURSIVE
Type identifier for recursive arguments.
|
ARGUMENT_INITIAL_VALUE, BODY_EXTENDED, BODY_RUNTIME, DEPENDENT_ARGUMENT, FREE_ARGUMENT, n, NO_SYNTAX_ERRORS, NOT_FOUND, RECURSIVE_ARGUMENT, SYNTAX_ERROR_OR_STATUS_UNKNOWN, TYPE_DESC, TYPE_ID| Constructor and Description |
|---|
RecursiveArgument(String argumentDefinitionString,
PrimitiveElement... elements)
Constructor - creates argument based on the argument definition string.
|
RecursiveArgument(String argumentName,
String recursiveExpressionString,
Argument n,
PrimitiveElement... elements)
Constructor - creates recursive argument.
|
RecursiveArgument(String argumentName,
String recursiveExpressionString,
String indexName)
Constructor - creates recursive argument.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBaseCase(int index,
double value)
Adds base case
|
double |
getArgumentValue(double index)
Gets recursive argument value
|
void |
resetAllCases()
Clears all based cases and stored calculated values
|
addArguments, addConstants, addConstants, addDefinitions, addFunctions, checkSyntax, clone, defineArgument, defineArguments, defineConstant, defineFunction, getArgument, getArgument, getArgumentBodyType, getArgumentExpressionString, getArgumentIndex, getArgumentName, getArgumentsNumber, getArgumentType, getArgumentValue, getComputingTime, getConstant, getConstant, getConstantIndex, getConstantsNumber, getDescription, getErrorMessage, getFunction, getFunction, getFunctionIndex, getFunctionsNumber, getRecursiveMode, getVerboseMode, removeAllArguments, removeAllConstants, removeAllFunctions, removeArguments, removeArguments, removeConstants, removeConstants, removeDefinitions, removeFunctions, removeFunctions, setArgumentExpressionString, setArgumentName, setArgumentValue, setDescription, setSilentMode, setVerboseModegetMyTypeIdpublic static final int TYPE_ID_RECURSIVE
public static final String TYPE_DESC_RECURSIVE
public RecursiveArgument(String argumentName, String recursiveExpressionString, String indexName)
argumentName - the argument namerecursiveExpressionString - the recursive expression stringindexName - index argument namepublic RecursiveArgument(String argumentName, String recursiveExpressionString, Argument n, PrimitiveElement... elements)
argumentName - the argument namerecursiveExpressionString - the recursive expression stringn - the index argumentelements - Optional elements list (variadic - comma
separated) of types: Argument, Constant, FunctionPrimitiveElement,
Argumentpublic RecursiveArgument(String argumentDefinitionString, PrimitiveElement... elements)
argumentDefinitionString - Argument definition string, i.e.:
elements - Optional elements list
(variadic - comma separated) of types: Argument,
Constant, FunctionPrimitiveElement,
Argumentpublic void addBaseCase(int index,
double value)
index - the base case indexvalue - the base case valuepublic void resetAllCases()
public double getArgumentValue(double index)
index - the indexCopyright © 2020 MathParser.org. All rights reserved.