public abstract class AbstractFunctionEvaluator extends AbstractEvaluator
numericEval() method delegates to the evaluate()| Constructor and Description |
|---|
AbstractFunctionEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
void |
createRuleFromMethod(ISymbol symbol,
java.lang.String patternString,
java.lang.String methodName)
Create a rule which invokes the method name in this class instance.
|
abstract IExpr |
evaluate(IAST ast,
EvalEngine engine)
Symbolic evaluation of a function.
|
static IExpr |
getNormalizedNegativeExpression(IExpr expr)
Check if the expression is canonical negative.
|
static IExpr |
getNormalizedNegativeExpression(IExpr expr,
boolean checkTimesPlus)
Check if the expression is canonical negative.
|
static IAST |
getPeriodicParts(IExpr expr,
IExpr period)
Try to split a periodic part from the expression:
expr == part[0] + part[1] * period |
static IExpr |
getPureImaginaryPart(IExpr expr)
Check if
expr is a pure imaginary number without a real
part. |
IAST |
getRuleAST()
Get the predefined rules for this function symbol.
|
static void |
initSerializedRules(ISymbol symbol)
Initialize the serialized Rubi integration rules from ressource
/ser/integrate.ser. |
static boolean |
isNegativeExpression(IExpr expr)
Check if the expression is canonical negative.
|
void |
setUp(ISymbol symbol)
Evaluate built-in rules and define Attributes for a function.
|
numericEvalpublic IAST getRuleAST()
null if no rules are definedpublic void setUp(ISymbol symbol) throws SyntaxError
setUp in interface IEvaluatorsetUp in class AbstractEvaluatorsymbol - the symbol which should be set upSyntaxErrorpublic abstract IExpr evaluate(IAST ast, EvalEngine engine)
ast.get(0) (or alternatively ast.head()) contains the
head (i.e. the function symbol) of this abstract syntax tree (AST). ast.arg1() to ast.get(n) the ast contains the first to n-th argument of the
function (alternatively you get the first to fifth argument with the methods arg1(), arg2(),...
arg5()).Validate class to check the number or types of arguments in the evaluate
method.null value without throwing an exception!evaluate in interface IFunctionEvaluatorevaluate in class AbstractEvaluatorast - the abstract syntax tree (AST) which should be evaluatedengine - the users current evaluation enginenull, if evaluation isn't possibleValidate,
IExpr.head(),
IAST.arg1(),
IAST.arg2(),
IAST.arg3()public void createRuleFromMethod(ISymbol symbol, java.lang.String patternString, java.lang.String methodName)
symbol - patternString - methodName - public static boolean isNegativeExpression(IExpr expr)
true if the first argument is canonical negativepublic static IExpr getNormalizedNegativeExpression(IExpr expr)
null if a
negative expression couldn't be extracted.public static IExpr getNormalizedNegativeExpression(IExpr expr, boolean checkTimesPlus)
checkTimesPlus - check Times(...) and Plus(...)
expressionsF.NIL if a
negative expression couldn't be extracted.public static IAST getPeriodicParts(IExpr expr, IExpr period)
expr == part[0] + part[1] * periodexpr - period - F.NIL if no periodicity was found or the rest at
argument 1 and the factor of the period at argument 2public static IExpr getPureImaginaryPart(IExpr expr)
expr is a pure imaginary number without a real
part.expr - null, if expr is not a pure imaginary
number.public static void initSerializedRules(ISymbol symbol)
/ser/integrate.ser.symbol -