Package org.mariuszgromada.math.mxparser
Class Expression
Buy me a cup of coffee via donation
or support me purchasing the license via ORDER Page , or INFIMA online store
java.lang.Object
org.mariuszgromada.math.mxparser.PrimitiveElement
org.mariuszgromada.math.mxparser.Expression
- All Implemented Interfaces:
Serializable
Expression - base class for real expression definition.
Examples:
- '1+2'
- 'sin(x)+1'
- 'asin(3*x)^10-log(4,8)'
- in general 'f(x1,x2,...,xn)' where x1,...,xn are real arguments
Class provides easy way to define multivariate arithmetic expression.
- Version:
- 6.1.0
- Author:
- Mariusz Gromada
MathParser.org - mXparser project page
mXparser on GitHub
INFIMA place to purchase a commercial MathParser.org-mXparser software license
info@mathparser.org
ScalarMath.org - a powerful math engine and math scripting language
Scalar Lite
Scalar Pro
MathSpace.pl - See Also:
Buy me a cup of coffee via donation
or support me purchasing the license via ORDER Page , or INFIMA online store
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Status of the syntax - no syntax errorstatic final boolean
Status of the syntax - syntax error or syntax status unknownstatic final boolean
Deprecated.static String
static final int
Expression type id -
Constructor Summary
ConstructorDescriptionExpression
(String expressionString, PrimitiveElement... elements) Constructor - creates new expression from expression string.Expression
(PrimitiveElement... elements) Default constructor - empty expression -
Method Summary
Modifier and TypeMethodDescriptionvoid
addArguments
(Argument... arguments) Adds arguments (variadic) to the expression definition.void
addConstants
(List<Constant> constantsList) Adds constants to the expression definition.void
addConstants
(Constant... constants) Adds constants (variadic parameters) to the expression definition.void
addDefinitions
(PrimitiveElement... elements) Adds user defined elements (such as: Arguments, Constants, Functions) to the expressions.void
addFunctions
(Function... functions) Adds functions (variadic parameters) to the expression definition.double
Calculates the expression value and registers all the calculation stepsdouble
calculate
(CalcStepsRegister calcStepsRegister) Calculates the expression valueboolean
Gets attempt to fix expression string modeboolean
Gets implied multiplication statusboolean
Gets unicode built-in parser keywords modeboolean
Checks syntax of the expression string.boolean
Checks syntax of the expression string.void
Clears expression descriptionvoid
Clears expression stringprotected Expression
clone()
Expression cloning.Creates a completely independent 1-1 clone that can be safely used by a separate thread.void
Prints to the console copy of initial tokens.void
defineArgument
(String argumentName, double argumentValue) Enables to define the argument (associated with the expression) based on the argument name and the argument value.void
defineArguments
(String... argumentsNames) Enables to define the arguments (associated with the expression) based on the given arguments names.void
defineConstant
(String constantName, double constantValue) Enables to define the constant (associated with the expression) based on the constant name and constant value.void
defineFunction
(String functionName, String functionExpressionString, String... argumentsNames) Enables to define the function (associated with the expression) based on the function name, function expression string and arguments names (variadic parameters).void
Disables attempt to fix the expression String.void
Disables implied multiplicationvoid
Disables unicode built-in parser keywords, this flag informs the parser that built-in unicode keywords are not supported and will not be recognized as functions or operators.void
Enables attempt to fix the expression String.void
Sets implied multiplicationvoid
Enables unicode built-in parser keywords, this flag informs the parser that built-in unicode keywords are supported and will be recognized as functions or operators.getArgument
(int argumentIndex) Gets argument from the expression.getArgument
(String argumentName) Gets argument from the expression.int
getArgumentIndex
(String argumentName) Gets argument index from the expression.int
Gets number of arguments associated with the expression.double
getArgumentValue
(String argumentName) Gets argument vale.Returns expression stringdouble
Gets computing time.getConstant
(int constantIndex) Gets constant associated with the expression.getConstant
(String constantName) Gets constant associated with the expression.int
getConstantIndex
(String constantName) Gets constant index associated with the expression.int
Gets number of constants associated with the expression.Tokenizes expression string and returns tokens list, including: string, type, level.Gets expression description.Method return error message after calling checkSyntax() method or calculate().Returns expression stringgetFunction
(int functionIndex) Gets function associated with the expression.getFunction
(String functionName) Gets function associated with the expression.int
getFunctionIndex
(String functionName) Gets index of function associated with the expression.int
Gets number of functions associated with the expression.getHelp()
Returns detailed user help on the syntax of mathematical expressions.Returns detailed user help on the syntax of mathematical expressions.Returns detailed user help on the syntax of mathematical expressions.Returns detailed user help on the syntax of mathematical expressions.Returns (as CSV) detailed user help on the syntax of mathematical expressions.getHelpAsCsv
(String query) Returns (as CSV) detailed user help on the syntax of mathematical expressions.getHelpAsCsv
(String quote, String delimiter, boolean addHeader) Returns (as CSV) detailed user help on the syntax of mathematical expressions.getHelpAsCsv
(String query, String quote, String delimiter, boolean addHeader) Returns (as CSV) detailed user help on the syntax of mathematical expressions.Returns (as HTML table) detailed user help on the syntax of mathematical expressions.getHelpAsHtmlTable
(boolean addHeader, boolean addCaption, boolean addFigure, String caption, String cssClass) Returns (as HTML table) detailed user help on the syntax of mathematical expressions.getHelpAsHtmlTable
(String query) Returns (as HTML table) detailed user help on the syntax of mathematical expressions.getHelpAsHtmlTable
(String query, boolean addHeader, boolean addCaption, boolean addFigure, String caption, String cssClass) Returns (as HTML table) detailed user help on the syntax of mathematical expressions.Returns (as Json) detailed user help on the syntax of mathematical expressions.getHelpAsJson
(boolean addCaption, String caption) Returns (as Json) detailed user help on the syntax of mathematical expressions.getHelpAsJson
(String query) Returns (as Json) detailed user help on the syntax of mathematical expressions.getHelpAsJson
(String query, boolean addCaption, String caption) Returns (as Json) detailed user help on the syntax of mathematical expressions.Returns (as Markdown table) detailed user help on the syntax of mathematical expressions.getHelpAsMarkdownTable
(boolean addHeader, boolean addCaption, String caption) Returns (as Markdown table) detailed user help on the syntax of mathematical expressions.getHelpAsMarkdownTable
(String query) Returns (as Markdown table) detailed user help on the syntax of mathematical expressions.getHelpAsMarkdownTable
(String query, boolean addHeader, boolean addCaption, String caption) Returns (as Markdown table) detailed user help on the syntax of mathematical expressions.Returns list of keywords known to the parsergetKeyWords
(String query) Returns list of keywords known to the parser.String[]
Returns missing user defined arguments names, i.e.String[]
Returns missing user defined functions names, i.e.String[]
Returns missing user defined units names, i.e. 2*[w] + [q] where [w] and [q] are not defined function will return [w] and [q].boolean
Gets recursive mode statusboolean
Gets syntax status of the expression.boolean
Returns verbose mode status.void
Removes all arguments associated with the expression.void
Removes all constants associated with the expressionvoid
Removes all functions associated with the expression.void
removeArguments
(String... argumentsNames) Removes first occurrences of the arguments associated with the expression.void
removeArguments
(Argument... arguments) Removes first occurrences of the arguments associated with the expression.void
removeConstants
(String... constantsNames) Removes first occurrences of the constants associated with the expression.void
removeConstants
(Constant... constants) Removes first occurrences of the constants associated with the expressionvoid
removeDefinitions
(PrimitiveElement... elements) Removes user defined elements (such as: Arguments, Constants, Functions) to the expressions.void
removeFunctions
(String... functionsNames) Removes first occurrences of the functions associated with the expression.void
removeFunctions
(Function... functions) Removes first occurrences of the functions associated with the expression.void
setArgumentValue
(String argumentName, double argumentValue) Sets argument value.void
setDescription
(String description) Sets expression description.void
setExpressionString
(String expressionString) Sets (modifies expression) expression string.void
Disables verbose mode (default silent mode).void
Enables verbose mode.Methods inherited from class org.mariuszgromada.math.mxparser.PrimitiveElement
getMyTypeId
-
Field Details
-
TYPE_ID
public static final int TYPE_IDExpression type id- See Also:
-
TYPE_DESC
-
NO_SYNTAX_ERRORS
public static final boolean NO_SYNTAX_ERRORSStatus of the syntax - no syntax error- See Also:
-
SYNTAX_ERROR
public static final boolean SYNTAX_ERRORStatus of the syntax - syntax error or syntax status unknown- See Also:
-
SYNTAX_ERROR_OR_STATUS_UNKNOWN
Deprecated.Planned to be removed, useSYNTAX_ERROR
insteadStatus of the syntax - syntax error or syntax status unknown- See Also:
-
-
Constructor Details
-
Expression
Default constructor - empty expression- Parameters:
elements
- Optional elements list (variadic - comma separated) of types: Argument, Constant, Function- See Also:
-
Expression
Constructor - creates new expression from expression string.- Parameters:
expressionString
- definition of the expressionelements
- Optional elements list (variadic - comma separated) of types: Argument, Constant, Function- See Also:
-
-
Method Details
-
getErrorMessage
Method return error message after calling checkSyntax() method or calculate().- Returns:
- Error message as string.
-
getSyntaxStatus
public boolean getSyntaxStatus()Gets syntax status of the expression.- Returns:
- true if there are no syntax errors, false when syntax error was found or syntax status is unknown
-
setExpressionString
Sets (modifies expression) expression string.- Parameters:
expressionString
- the expression string
-
getExpressionString
Returns expression string- Returns:
- Expression string definition.
-
getCanonicalExpressionString
Returns expression string- Returns:
- Expression string definition.
-
clearExpressionString
public void clearExpressionString()Clears expression string -
setDescription
Sets expression description.- Parameters:
description
- the description string
-
getDescription
Gets expression description.- Returns:
- String description.
-
clearDescription
public void clearDescription()Clears expression description -
setVerboseMode
public void setVerboseMode()Enables verbose mode. -
setSilentMode
public void setSilentMode()Disables verbose mode (default silent mode). -
getVerboseMode
public boolean getVerboseMode()Returns verbose mode status.- Returns:
- true if verbose mode is on, otherwise returns false.
-
enableImpliedMultiplicationMode
public void enableImpliedMultiplicationMode()Sets implied multiplication -
disableImpliedMultiplicationMode
public void disableImpliedMultiplicationMode()Disables implied multiplication -
checkIfImpliedMultiplicationMode
public boolean checkIfImpliedMultiplicationMode()Gets implied multiplication status- Returns:
- true if implied multiplication is enabled, otherwise returns false.
-
enableUnicodeBuiltinKeyWordsMode
public void enableUnicodeBuiltinKeyWordsMode()Enables unicode built-in parser keywords, this flag informs the parser that built-in unicode keywords are supported and will be recognized as functions or operators. -
disableUnicodeBuiltinKeyWordsMode
public void disableUnicodeBuiltinKeyWordsMode()Disables unicode built-in parser keywords, this flag informs the parser that built-in unicode keywords are not supported and will not be recognized as functions or operators. -
checkIfUnicodeBuiltinKeyWordsMode
public boolean checkIfUnicodeBuiltinKeyWordsMode()Gets unicode built-in parser keywords mode- Returns:
- true if unicode built-in parser keywords is enabled, otherwise returns false.
-
enableAttemptToFixExpStrMode
public void enableAttemptToFixExpStrMode()Enables attempt to fix the expression String. For example, situations such as: "++" change to "+", "+-" changed to "-" "-+" changed to "-" "--" changed to "+" -
disableAttemptToFixExpStrMode
public void disableAttemptToFixExpStrMode()Disables attempt to fix the expression String. For example, situations such as: "++" change to "+", "+-" changed to "-" "-+" changed to "-" "--" changed ro "+" -
checkIfAttemptToFixExpStrMode
public boolean checkIfAttemptToFixExpStrMode()Gets attempt to fix expression string mode- Returns:
- true attempt to fix expression string mode is enabled, otherwise returns false.
-
getRecursiveMode
public boolean getRecursiveMode()Gets recursive mode status- Returns:
- true if recursive mode is enabled, otherwise returns false.
-
getComputingTime
public double getComputingTime()Gets computing time.- Returns:
- computing time in seconds.
-
addDefinitions
Adds user defined elements (such as: Arguments, Constants, Functions) to the expressions.- Parameters:
elements
- Elements list (variadic), where Argument, Constant, Function extend the same class PrimitiveElement- See Also:
-
removeDefinitions
Removes user defined elements (such as: Arguments, Constants, Functions) to the expressions.- Parameters:
elements
- Elements list (variadic), where Argument, Constant, Function extend the same class PrimitiveElement- See Also:
-
addArguments
Adds arguments (variadic) to the expression definition.- Parameters:
arguments
- the arguments list (comma separated list)- See Also:
-
defineArguments
Enables to define the arguments (associated with the expression) based on the given arguments names.- Parameters:
argumentsNames
- the arguments names (variadic) comma separated list- See Also:
-
defineArgument
Enables to define the argument (associated with the expression) based on the argument name and the argument value.- Parameters:
argumentName
- the argument nameargumentValue
- the argument value- See Also:
-
getArgumentIndex
Gets argument index from the expression.- Parameters:
argumentName
- the argument name- Returns:
- The argument index if the argument name was found, otherwise returns Argument.NOT_FOUND
- See Also:
-
getArgument
Gets argument from the expression.- Parameters:
argumentName
- the argument name- Returns:
- The argument if the argument name was found, otherwise returns null.
- See Also:
-
getArgument
Gets argument from the expression.- Parameters:
argumentIndex
- the argument index- Returns:
- Argument if the argument index is between 0 and the last available argument index (getArgumentsNumber()-1), otherwise returns null.
- See Also:
-
getArgumentsNumber
public int getArgumentsNumber()Gets number of arguments associated with the expression.- Returns:
- The number of arguments (int >= 0)
- See Also:
-
setArgumentValue
Sets argument value.- Parameters:
argumentName
- the argument nameargumentValue
- the argument value
-
getArgumentValue
Gets argument vale.- Parameters:
argumentName
- the argument name- Returns:
- Argument value if argument name was found, otherwise return Double.NaN.
-
removeArguments
Removes first occurrences of the arguments associated with the expression.- Parameters:
argumentsNames
- the arguments names (variadic parameters) comma separated list- See Also:
-
removeArguments
Removes first occurrences of the arguments associated with the expression.- Parameters:
arguments
- the arguments (variadic parameters) comma separated list- See Also:
-
removeAllArguments
public void removeAllArguments()Removes all arguments associated with the expression.- See Also:
-
addConstants
Adds constants (variadic parameters) to the expression definition.- Parameters:
constants
- the constants (comma separated list)- See Also:
-
addConstants
Adds constants to the expression definition.- Parameters:
constantsList
- the list of constants- See Also:
-
defineConstant
Enables to define the constant (associated with the expression) based on the constant name and constant value.- Parameters:
constantName
- the constant nameconstantValue
- the constant value- See Also:
-
getConstantIndex
Gets constant index associated with the expression.- Parameters:
constantName
- the constant name- Returns:
- Constant index if constant name was found, otherwise return Constant.NOT_FOUND.
- See Also:
-
getConstant
Gets constant associated with the expression.- Parameters:
constantName
- the constant name- Returns:
- Constant if constant name was found, otherwise return null.
- See Also:
-
getConstant
Gets constant associated with the expression.- Parameters:
constantIndex
- the constant index- Returns:
- Constant if the constantIndex is between 0 and the last available constant index (getConstantsNumber() - 1), otherwise it returns null.
- See Also:
-
getConstantsNumber
public int getConstantsNumber()Gets number of constants associated with the expression.- Returns:
- number of constants (int >= 0)
- See Also:
-
removeConstants
Removes first occurrences of the constants associated with the expression.- Parameters:
constantsNames
- the constants names (variadic parameters) comma separated list- See Also:
-
removeConstants
Removes first occurrences of the constants associated with the expression- Parameters:
constants
- the constants (variadic parameters) comma separated list- See Also:
-
removeAllConstants
public void removeAllConstants()Removes all constants associated with the expression- See Also:
-
addFunctions
Adds functions (variadic parameters) to the expression definition.- Parameters:
functions
- the functions (variadic parameters) comma separated list- See Also:
-
defineFunction
public void defineFunction(String functionName, String functionExpressionString, String... argumentsNames) Enables to define the function (associated with the expression) based on the function name, function expression string and arguments names (variadic parameters).- Parameters:
functionName
- the function namefunctionExpressionString
- the expression stringargumentsNames
- the function arguments names (variadic parameters) comma separated list- See Also:
-
getFunctionIndex
Gets index of function associated with the expression.- Parameters:
functionName
- the function name- Returns:
- Function index if function name was found, otherwise returns Function.NOT_FOUND
- See Also:
-
getFunction
Gets function associated with the expression.- Parameters:
functionName
- the function name- Returns:
- Function if function name was found, otherwise returns null.
- See Also:
-
getFunction
Gets function associated with the expression.- Parameters:
functionIndex
- the function index- Returns:
- Function if function index is between 0 and the last available function index (getFunctionsNumber()-1), otherwise returns null.
- See Also:
-
getFunctionsNumber
public int getFunctionsNumber()Gets number of functions associated with the expression.- Returns:
- number of functions (int >= 0)
- See Also:
-
removeFunctions
Removes first occurrences of the functions associated with the expression.- Parameters:
functionsNames
- the functions names (variadic parameters) comma separated list- See Also:
-
removeFunctions
Removes first occurrences of the functions associated with the expression.- Parameters:
functions
- the functions (variadic parameters) comma separated list.- See Also:
-
removeAllFunctions
public void removeAllFunctions()Removes all functions associated with the expression.- See Also:
-
checkLexSyntax
public boolean checkLexSyntax()Checks syntax of the expression string.- Returns:
- true if syntax is ok
-
checkSyntax
public boolean checkSyntax()Checks syntax of the expression string.- Returns:
- true if syntax is ok
-
calculate
public double calculate()Calculates the expression value and registers all the calculation steps- Returns:
- The expression value if syntax was ok, otherwise returns Double.NaN.
-
calculate
Calculates the expression value- Parameters:
calcStepsRegister
- A collection to store list of calculation steps, steps registered as strings.- Returns:
- The expression value if syntax was ok, otherwise returns Double.NaN.
-
getCopyOfInitialTokens
Tokenizes expression string and returns tokens list, including: string, type, level.- Returns:
- Copy of initial tokens.
- See Also:
-
consolePrintCopyOfInitialTokens
public void consolePrintCopyOfInitialTokens()Prints to the console copy of initial tokens. Presents how expression string is interpreted by the parser.- See Also:
-
getMissingUserDefinedArguments
Returns missing user defined arguments names, i.e. sin(x) + cos(y) where x and y are not defined function will return x and y.- Returns:
- Array of missing user defined arguments names - distinct strings.
-
getMissingUserDefinedUnits
Returns missing user defined units names, i.e. 2*[w] + [q] where [w] and [q] are not defined function will return [w] and [q].- Returns:
- Array of missing user defined units names - distinct strings.
-
getMissingUserDefinedFunctions
Returns missing user defined functions names, i.e. sin(x) + fun(x,y) where fun is not defined function will return fun.- Returns:
- Array of missing user defined functions names - distinct strings.
-
getHelp
Returns detailed user help on the syntax of mathematical expressions.- Returns:
- One string value containing all the help.
-
getHelp
Returns detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.- Returns:
- One string value containing all the help.
-
getHelp
Returns detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
addHeader
- Indicator whether to add a header.addCaption
- Indicator whether to add caption.caption
- If a non-standard caption is to be added, any string other than "" will replace the standard caption with the one specified by the user.- Returns:
- One string value containing all the help.
-
getHelp
Returns detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.addHeader
- Indicator whether to add a header.addCaption
- Indicator whether to add caption.caption
- If a non-standard caption is to be added, any string other than ""- Returns:
- One string value containing all the help.
-
getHelpAsCsv
Returns (as CSV) detailed user help on the syntax of mathematical expressions.- Returns:
- One string value in CSV format containing all the help.
-
getHelpAsCsv
Returns (as CSV) detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.- Returns:
- One string value in CSV format containing all the help.
-
getHelpAsCsv
Returns (as CSV) detailed user help on the syntax of mathematical expressions.- Parameters:
quote
- Text qualifier.delimiter
- Delimiter.addHeader
- Indicator whether to add a header.- Returns:
- One string value in CSV format containing all the help.
-
getHelpAsCsv
Returns (as CSV) detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.quote
- Text qualifier.delimiter
- Delimiter.addHeader
- Indicator whether to add a header.- Returns:
- One string value in CSV format containing all the help.
-
getHelpAsHtmlTable
Returns (as HTML table) detailed user help on the syntax of mathematical expressions.- Returns:
- One string value containing all the help. String in HTML table format.
-
getHelpAsHtmlTable
Returns (as HTML table) detailed user help on the syntax of mathematical expressions.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.- Returns:
- One string value containing all the help. String in HTML table format.
-
getHelpAsHtmlTable
public String getHelpAsHtmlTable(boolean addHeader, boolean addCaption, boolean addFigure, String caption, String cssClass) Returns (as HTML table) detailed user help on the syntax of mathematical expressions.- Parameters:
addHeader
- Indicator whether to add a header.addCaption
- Indicator whether to add caption.addFigure
- Indicator whether to add a FIGURE tag.caption
- If a non-standard caption is to be added, use any string other than "".cssClass
- If CSS class is to be added, use any string other than "".- Returns:
- One string value containing all the help. String in HTML table format.
-
getHelpAsHtmlTable
public String getHelpAsHtmlTable(String query, boolean addHeader, boolean addCaption, boolean addFigure, String caption, String cssClass) Returns (as HTML table) detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.addHeader
- Indicator whether to add a header.addCaption
- Indicator whether to add caption.addFigure
- Indicator whether to add a FIGURE tag.caption
- If a non-standard caption is to be added, use any string other than "".cssClass
- If CSS class is to be added, use any string other than "".- Returns:
- One string value containing all the help. String in HTML table format.
-
getHelpAsMarkdownTable
Returns (as Markdown table) detailed user help on the syntax of mathematical expressions.- Returns:
- One string value containing all the help. String in Markdown table format.
-
getHelpAsMarkdownTable
Returns (as Markdown table) detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.- Returns:
- One string value containing all the help. String in Markdown table format.
-
getHelpAsMarkdownTable
Returns (as Markdown table) detailed user help on the syntax of mathematical expressions.- Parameters:
addHeader
- Indicator whether to add a header.addCaption
- Indicator whether to add caption.caption
- If a non-standard caption is to be added, use any string other than "".- Returns:
- One string value containing all the help. String in Markdown table format.
-
getHelpAsMarkdownTable
public String getHelpAsMarkdownTable(String query, boolean addHeader, boolean addCaption, String caption) Returns (as Markdown table) detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.addHeader
- Indicator whether to add a header.addCaption
- Indicator whether to add caption.caption
- If a non-standard caption is to be added, use any string other than "".- Returns:
- One string value containing all the help. String in Markdown table format.
-
getHelpAsJson
Returns (as Json) detailed user help on the syntax of mathematical expressions.- Returns:
- One string value containing all the help. String in Json format.
-
getHelpAsJson
Returns (as Json) detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.- Returns:
- One string value containing all the help. String in Json format.
-
getHelpAsJson
Returns (as Json) detailed user help on the syntax of mathematical expressions.- Parameters:
addCaption
- Indicator whether to add caption.caption
- If a non-standard caption is to be added, use any string other than "".- Returns:
- One string value containing all the help. String in Json format.
-
getHelpAsJson
Returns (as Json) detailed user help on the syntax of mathematical expressions. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.addCaption
- Indicator whether to add caption.caption
- If a non-standard caption is to be added, use any string other than "".- Returns:
- One string value containing all the help. String in Json format.
-
getKeyWords
Returns list of keywords known to the parser- Returns:
- List of keywords known to the parser.
- See Also:
-
getKeyWords
Returns list of keywords known to the parser. Allows simple and advanced searches.- Parameters:
query
- For a simple search, simply enter a word (e.g.: "sine"). Advanced search is also possible, please use one of the tags below: "key=" - keyword (e.g.: "key=sin"), "desc=" - description (e.g.: "desc=trigonometric"), "syn=" - syntax (e.g.: "syn=sin"), "type=" - type (e.g.: "type=unit"), "since=" - since (e.g.: "since=4.1"), "typeid=" - please refer to parser tokens (e.g.: "typeid=3"), "keyid=" - please refer to parser tokens (e.g.: "keyid=1004"). Only one tag can be used per search.- Returns:
- List of keywords known to the parser filter against query string.
- See Also:
-
clone
Expression cloning. -
cloneForThreadSafe
Creates a completely independent 1-1 clone that can be safely used by a separate thread. If the cloned element contains references to other elements (e.g. arguments, functions, constants), then they will also be cloned and the newly created element will contain references to the corresponding clones. Important - the API allows you to extract all these clones.- Returns:
- Cloned object.
-
SYNTAX_ERROR
instead