org.matheclipse.core.eval.interfaces
Class AbstractCoreFunctionEvaluator
- java.lang.Object
-
- org.matheclipse.core.eval.interfaces.AbstractCoreFunctionEvaluator
-
- All Implemented Interfaces:
- ICoreFunctionEvaluator, IFunctionEvaluator, IEvaluator
- Direct Known Subclasses:
- Append, AppendTo, Apply, Array, AtomQ, Attributes, Blank, Block, Break, Cases, Catch, Clear, ClearAll, Condition, Continue, Defer, Definition, Delete, DeleteCases, Depth, Do, Drop, EvenQ, First, FixedPoint, Flatten, Fold, FoldList, For, FreeQ, FullForm, Head, If, Insert, Last, LeafCount, Length, MemberQ, Module, N, Nest, NestList, NestWhileList, NumberQ, NumericQ, Position, Prepend, PrependTo, Print, Quiet, Reap, Rest, Return, Riffle, RotateLeft, RotateRight, SetAttributes, Sow, Switch, Throw, TimeConstrained, Unevaluated, Unique, ValueQ, Which, While
public abstract class AbstractCoreFunctionEvaluator extends java.lang.Object implements ICoreFunctionEvaluator
Abstract interface for built-in Symja functions. ThenumericEval()method delegates to theevaluate()
-
-
Constructor Summary
Constructors Constructor and Description AbstractCoreFunctionEvaluator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract IExprevaluate(IAST ast)Symbolic evaluation of a function.IExprnumericEval(IAST ast)Numeric evaluation of a function.voidsetUp(ISymbol symbol)Evaluate built-in rules and define Attributes for a function.
-
-
-
Method Detail
-
numericEval
public IExpr numericEval(IAST ast)
Numeric evaluation of a function.ast.get(0)contains the head (i.e. the function symbol) of this abstract syntax tree (AST).ast.get(1)toast.get(n)contains the first to n-th argument of the function.
If necessary use the methods from theValidateclass to check the number or types of arguments in the evaluate method.- Specified by:
numericEvalin interfaceIFunctionEvaluator- Parameters:
ast- the abstract syntax tree (AST) which should be evaluated- Returns:
- the evaluated object or
null, if evaluation isn't possible - See Also:
Validate
-
setUp
public void setUp(ISymbol symbol) throws SyntaxError
Evaluate built-in rules and define Attributes for a function.- Specified by:
setUpin interfaceIEvaluator- Parameters:
symbol- the symbol which should be set up- Throws:
SyntaxError
-
evaluate
public abstract IExpr evaluate(IAST ast)
Symbolic evaluation of a function.ast.get(0)contains the head (i.e. the function symbol) of this abstract syntax tree (AST).ast.get(1)toast.get(n)contains the first to n-th argument of the function.
If necessary use the methods from theValidateclass to check the number or types of arguments in the evaluate method.
Note: if the symbolic evaluation isn't possible or no result is found the evaluate method returns with anullvalue without throwing an exception!- Specified by:
evaluatein interfaceIFunctionEvaluator- Parameters:
ast- the abstract syntax tree (AST) which should be evaluated- Returns:
- the evaluated object or
null, if evaluation isn't possible - See Also:
Validate
-
-
DMelt 3.0 © DataMelt by jWork.ORG