public class Apart extends AbstractFunctionEvaluator
Constructor and Description |
---|
Apart() |
Modifier and Type | Method and Description |
---|---|
IExpr |
evaluate(IAST ast,
EvalEngine engine)
Symbolic evaluation of a function.
|
static IExpr[] |
getFractionalParts(IExpr arg,
boolean trig)
Split the expression into numerator and denominator parts, by separating
positive and negative powers.
|
static IExpr[] |
getFractionalPartsPower(IAST powerAST,
boolean trig)
Return the denominator for the given
Power[...] |
static IExpr[] |
getFractionalPartsRational(IExpr arg)
Split the expression into numerator and denominator parts, by separating
positive and negative powers.
|
static IExpr[] |
getFractionalPartsTimes(IAST timesAST,
boolean splitNumeratorOne,
boolean splitFractionalNumbers,
boolean trig,
boolean evalParts)
Return the numerator and denominator for the given
Times[...] |
static IAST |
partialFractionDecompositionInteger(IExpr[] parts,
IAST variableList)
Deprecated.
untested at the moment
|
static IExpr |
partialFractionDecompositionRational(IPartialFractionGenerator pf,
IExpr[] parts,
ISymbol x)
Returns an AST with head
Plus , which contains the partial
fraction decomposition of the numerator and denominator parts. |
createRuleFromMethod, getNormalizedNegativeExpression, getNormalizedNegativeExpression, getPeriodicParts, getPureImaginaryPart, getRuleAST, initSerializedRules, isNegativeExpression, setUp
numericEval
public IExpr evaluate(IAST ast, EvalEngine engine)
AbstractFunctionEvaluator
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 IFunctionEvaluator
evaluate
in class AbstractFunctionEvaluator
ast
- 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()
@Deprecated public static IAST partialFractionDecompositionInteger(IExpr[] parts, IAST variableList)
Plus
, which contains the partial
fraction decomposition of the numerator and denominator parts.parts
- variableList
- null
if the partial fraction decomposition wasn't
constructedpublic static IExpr partialFractionDecompositionRational(IPartialFractionGenerator pf, IExpr[] parts, ISymbol x)
Plus
, which contains the partial
fraction decomposition of the numerator and denominator parts.parts
- variableList
- F.NIL
if the partial fraction decomposition wasn't
constructedpublic static IExpr[] getFractionalPartsRational(IExpr arg)
arg
- public static IExpr[] getFractionalParts(IExpr arg, boolean trig)
arg
- trig
- determine the denominator by splitting up functions like
Tan[9,Cot[], Csc[],...
null
if
no denominator was found.public static IExpr[] getFractionalPartsTimes(IAST timesAST, boolean splitNumeratorOne, boolean splitFractionalNumbers, boolean trig, boolean evalParts)
Times[...]
AST, by separating positive and negative powers.timesAST
- a times expression (a*b*c....)splitNumeratorOne
- split a fractional number into numerator and denominator, only
if the numerator is 1, if true
, ignore
splitFractionalNumbers
parameter.splitFractionalNumbers
- split a fractional number into numerator and denominatortrig
- try to find a trigonometric numerator/denominator form
(Example: Csc[x] gives 1 / Sin[x])null
), if splitNumeratorOne
is true
.public static IExpr[] getFractionalPartsPower(IAST powerAST, boolean trig)
Power[...]
AST, by
separating positive and negative powers.powerAST
- a power expression (a^b)trig
- TODO