public class PlusOp
extends java.lang.Object
Plus operator for adding multiple arguments with the
plus(argument)
method and returning the result, with the
getSum()
method, if isEvaled()
returns
true
.
Constructor and Description |
---|
PlusOp(int size)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
IExpr |
getSum()
Get the current evaluated result of the summation as a
Plus() expression with respecting the
OneIdentity attribute. |
boolean |
isEvaled()
Test if any evaluation occurred by calling the
plus() method |
static IExpr |
plus(IAST plusAST)
Evaluate
Plus(a1, a2,...) |
IExpr |
plus(IExpr arg)
Add an argument
arg to this Plus() expression. |
static IExpr |
plus(IExpr a1,
IExpr a2)
Evaluate
a0 + a2 . |
IExpr |
plusUntilPosition(IAST ast,
int pos)
Add the elements of the given
ast from position
1 up to position pos exclusive. |
public PlusOp(int size)
size
- the approximated size of the resulting Plus()
AST.public IExpr getSum()
Plus()
expression with respecting the
OneIdentity
attribute.public boolean isEvaled()
plus()
methodtrue
if an evaluation occurred.public IExpr plus(IExpr arg)
arg
to this Plus()
expression.arg
- F.Indeterminate
if the result is indeterminated,
F.NIL
otherwise.public IExpr plusUntilPosition(IAST ast, int pos)
ast
from position
1
up to position pos
exclusive.ast
- position
- public static IExpr plus(IAST plusAST)
Plus(a1, a2,...)
.a0
- a1
-