public interface IExpr extends java.lang.Comparable<IExpr>, edu.jas.structure.GcdRingElem<IExpr>, java.io.Serializable, org.apache.commons.math4.FieldElement<IExpr>
IExpr is the main interface for the Symja object type hierarchy:
java.lang.Object
|--- java.util.AbstractCollection
| |--- java.util.AbstractList
| |--- org.matheclipse.core.expression.HMArrayList
| |--- org.matheclipse.core.expression.AST - abstract syntax tree which represents lists, vectors, matrices and functions
| implements IAST, List, IExpr
|
|--- org.matheclipse.core.expression.ExprImpl
| implements IExpr
|
|--- org.matheclipse.core.expression.ApcomplexNum - Apcomplex number
| implements IComplexNum, INumber, IExpr
|
|--- org.matheclipse.core.expression.ApfloatNum - Apfloat number
| implements INum, ISignedNumber, INumber, IExpr
|
|--- org.matheclipse.core.expression.ComplexNum - a complex number with real and imaginary part represented by Java double
| implements IComplexNum, INumber, IExpr
|
|--- org.matheclipse.core.expression.ComplexSym - exact complex number
| implements IComplex, IBigNumber, INumber, IExpr
|
|--- org.matheclipse.core.expression.FractionSym - exact fraction number
| implements IFraction, IRational, ISignedNumber, IBigNumber, INumber, IExpr
|
|--- org.matheclipse.core.expression.IntegerSym - exact integer number
| implements IInteger, IRational, ISignedNumber, IBigNumber, INumber, IExpr
|
|--- org.matheclipse.core.expression.Num - a real number which is represented by a Java double value
| implements INum, ISignedNumber, INumber, IExpr
|
|--- org.matheclipse.core.expression.Pattern - a pattern object (i.e. x_)
| implements IPattern, IPatternObject, IExpr
|
|--- org.matheclipse.core.expression.PatternSequence - a pattern sequence object (i.e. x__)
| implements IPatternSequence, IPatternObject, IExpr
|
|--- org.matheclipse.core.expression.StringX - a Java string wrapper
| implements IStringX, IExpr
|
|--- org.matheclipse.core.expression.Symbol - represents variables, function names or constants
implements ISymbol, IExpr
| Modifier and Type | Field and Description |
|---|---|
static int |
ASTID |
static int |
BLANKID |
static int |
COMPLEXID |
static int |
DOUBLECOMPLEXID |
static int |
DOUBLEID |
static int |
FRACTIONID |
static int |
INTEGERID |
static int |
METHODSYMBOLID |
static int |
PATTERNID |
static int |
STRINGID |
static int |
SYMBOLID |
| Modifier and Type | Method and Description |
|---|---|
IExpr |
$div(IExpr that)
Operator overloading for Scala operator
/. |
IExpr |
$minus(IExpr that)
Operator overloading for Scala operator
/. |
IExpr |
$plus(IExpr that)
Operator overloading for Scala operator
+. |
IExpr |
$times(IExpr that)
Operator overloading for Scala operator
*. |
IExpr |
$up(IExpr that)
Operator overloading for Scala operator
^. |
<T> T |
accept(IVisitor<T> visitor)
Accept a visitor with return type T
|
boolean |
accept(IVisitorBoolean visitor)
Accept a visitor with return type
boolean |
int |
accept(IVisitorInt visitor)
Accept a visitor with return type
int |
long |
accept(IVisitorLong visitor)
Accept a visitor with return type
long |
IExpr |
and(IExpr that) |
IExpr |
apply(IExpr... leaves) |
IExpr |
apply(java.util.List<? extends IExpr> leaves) |
java.lang.Object |
asType(java.lang.Class<?> clazz) |
int |
compareTo(IExpr obj)
Compares this expression with the specified expression for order.
|
IExpr |
dec()
Returns an
IExpr whose value is (this - 1). |
IExpr |
divide(IExpr that)
Returns an
IExpr whose value is (this / that). |
org.apache.commons.math4.complex.Complex |
evalComplex()
Evaluate the expression to a
INumber value. |
double |
evalDouble()
Evaluate the expression to a Java
double value. |
INumber |
evalNumber()
Evaluate the expression to a
INumber value. |
ISignedNumber |
evalSignedNumber()
Evaluate the expression to a
ISignedNumber value. |
default IExpr |
evaluate(EvalEngine engine)
Evaluate an expression
|
default IExpr |
evaluateHead(IAST ast,
EvalEngine engine) |
java.lang.String |
fullFormString()
Return the
FullForm() of this expression |
IExpr |
getAt(int index)
Get the element at the specified
index if this object is of
type IAST. |
default org.apache.commons.math4.Field<IExpr> |
getField()
Get the
Field to which the instance belongs. |
IExpr |
head()
If this object is an instance of
IAST get the first element
(offset 0) of the IAST list (i.e. get(0) ). |
int |
hierarchy()
A unique integer ID for the implementation of this expression
|
default void |
ifPresent(java.util.function.Consumer<? super IExpr> consumer)
If this expression unequals
F.NIL, invoke the specified
consumer with the this object, otherwise do nothing. |
IExpr |
inc()
Returns an
IExpr whose value is (this + 1). |
java.lang.String |
internalFormString(boolean symbolsAsFactoryMethod,
int depth)
Return the internal Java form of this expression.
|
java.lang.String |
internalJavaString(boolean symbolsAsFactoryMethod,
int depth,
boolean useOperators)
Return the internal Java form of this expression.
|
java.lang.String |
internalScalaString(boolean symbolsAsFactoryMethod,
int depth)
Return the internal Scala form of this expression.
|
IExpr |
inverse()
Returns the multiplicative inverse of this object.
|
default boolean |
isAllExpanded()
Test if this expression and all subexpressions are already expanded i.e.
|
default boolean |
isAnd()
Test if this expression is the function
And[<arg>,...] |
default boolean |
isArcCos()
Test if this expression is the function
ArcCos[<arg>] |
default boolean |
isArcCosh()
Test if this expression is the function
ArcCosh[<arg>] |
default boolean |
isArcSin()
Test if this expression is the function
ArcSin[<arg>] |
default boolean |
isArcSinh()
Test if this expression is the function
ArcSinh[<arg>] |
default boolean |
isArcTan()
Test if this expression is the function
ArcTan[<arg>] |
default boolean |
isArcTanh()
Test if this expression is the function
ArcTanh[<arg>] |
default boolean |
isAST()
Test if this expression is an AST list, which contains a header
element (i.e. the function name) at index position
0 and
some optional argument elements at the index positions
1..n. |
default boolean |
isAST(IExpr header)
Test if this expression is an AST list, which contains the given
header element at index position
0 and some optional
argument elements at the index positions
1.. |
default boolean |
isAST(IExpr header,
int length)
Test if this expression is an AST list, which contains the given
header element at index position
0 and optional
argument elements at the index positions
1.. |
default boolean |
isAST(IExpr header,
int length,
IExpr... args)
Test if this expression is an AST list, which contains the given
header element at index position
0 and optional
argument elements at the index positions
1.. |
default boolean |
isAST(IExpr header,
int minLength,
int maxLength)
Test if this expression is an AST list, which contains the given
header element at index position
0 and optional
argument elements at the index positions
1.. |
default boolean |
isAST(java.lang.String symbol)
Test if this expression is an AST list, where the string representation
of the header element at index position
0 equals the
given symbol and some optional argument elements at
the index positions 1.. |
default boolean |
isAST(java.lang.String symbol,
int length)
Test if this expression is an AST list, where the string representation
of the header element at index position
0 equals the
given symbol and some optional argument elements at
the index positions 1.. |
default boolean |
isASTSizeGE(IExpr header,
int length)
Test if this expression is an AST list, which contains the given
header element at index position
0 and optional
argument elements at the index positions 1..n. |
default boolean |
isAtom()
Test if this expression is an atomic expression (i.e. no AST expression)
|
default boolean |
isBlank()
Test if this expression is a
Blank[] object |
default boolean |
isComplex()
Test if this expression is a symbolic complex number (i.e.
|
default boolean |
isComplexInfinity()
Test if this expression is representing ComplexInfinity (i.e.
|
default boolean |
isComplexNumeric()
Test if this expression is a numeric complex number (i.e.
|
default boolean |
isCondition()
Test if this expression is the Condition function
Condition[<arg1>, <arg2>] |
default boolean |
isConstant()
Test if this expression is a symbol with attribute
Constant. |
default boolean |
isCos()
Test if this expression is the function
Cos[<arg>] |
default boolean |
isCosh()
Test if this expression is the function
Cosh[<arg>] |
default IAST[] |
isDerivative()
Test if this expression is a
Derivative[number,...] |
default boolean |
isDirectedInfinity()
Test if this expression is representing a DirectedInfinity (i.e.
|
default boolean |
isE()
Test if this expression equals
E (base of the natural
logarithm; approximately equal to 2.71828...) in symbolic or numeric
mode. |
default boolean |
isExpanded()
Test if this expression is already expanded i.e.
|
default boolean |
isFalse()
Test if this expression equals the symbol "False"
|
default boolean |
isFlatAST()
Test if this expression is an AST list, which contains a header
element (i.e. a function symbol like for example
Dot, Plus or Times) with attribute Flat at
index position 0 and some optional argument elements
at the index positions 1.. |
default boolean |
isFraction()
Test if this expression is a fractional number, but no integer number.
|
default boolean |
isFree(IExpr pattern)
Returns
true, if all of the elements in the
subexpressions or the expression itself, did not match the given pattern. |
default boolean |
isFree(IExpr pattern,
boolean heads)
Returns
true, if all of the elements in the
subexpressions or the expression itself, did not match the given pattern. |
default boolean |
isFree(java.util.function.Predicate<IExpr> predicate,
boolean heads)
Returns
true, if all of the elements in the
subexpressions or the expression itself, did not satisfy the given unary
predicate. |
default boolean |
isFreeAST(IExpr pattern)
Returns
true, if all of the elements in the
subexpressions or the expression itself, aren't ASTs with a head which
match the given pattern. |
default boolean |
isFreeAST(java.util.function.Predicate<IExpr> predicate)
Returns
true, if all of the elements in the
subexpressions or the expression itself, aren't ASTs with a head which
match the given predicate. |
default boolean |
isFreeOfPatterns()
Returns
true, if all of the elements in the
subexpressions or the expression itself, are no pattern objects. |
default boolean |
isFunction()
Test if this expression is a
Function( arg1 ) expression
with at least 1 argument. |
default boolean |
isGEOrdered(IExpr expr)
Compares this expression with the specified expression for order.
|
default boolean |
isGTOrdered(IExpr expr)
Compares this expression with the specified expression for order.
|
default boolean |
isIndeterminate()
Test if this expression is representing
Indeterminate |
default boolean |
isInfinity()
Test if this expression is representing
Infinity (i.e. |
default boolean |
isInteger()
Test if this expression is a integer number
|
default boolean |
isIntegerResult()
Test if this expression is a integer function (i.e. a number, a symbolic
constant or an integer function where all arguments are also
"integer functions")
|
default boolean |
isLEOrdered(IExpr obj)
Compares this expression with the specified expression for order.
|
default boolean |
isList()
Test if this expression is a list (i.e. an AST with head List)
|
default boolean |
isListOfLists()
Test if this expression is a list of lists
|
default boolean |
isLog()
Test if this expression is the function
Log[<arg>] |
default boolean |
isLTOrdered(IExpr expr)
Compares this expression with the specified expression for order.
|
default int[] |
isMatrix()
Test if this expression is a matrix and return the dimensions as array
[row-dimension, column-dimension].
|
default boolean |
isMember(IExpr pattern,
boolean heads)
Returns
true, if at least one of the elements in the
subexpressions or the expression itself, match the given pattern. |
default boolean |
isMember(java.util.function.Predicate<IExpr> predicate,
boolean heads)
Returns
true, if at least one of the elements in the
subexpressions or the expression itself, satisfy the given unary
predicate. |
default boolean |
isMinusOne()
Test if this expression equals
-1 in symbolic or numeric
mode. |
default boolean |
isModule()
Test if this expression is the Module function
Module[<arg1>, <arg2>] |
default boolean |
isNegative()
Test if this object is a negative signed number.
|
default boolean |
isNegativeInfinity()
Test if this expression is representing
-Infinity (i.e. |
default boolean |
isNegativeResult()
Test if this expression has a negative result (i.e. less than 0).
|
default boolean |
isNonNegativeResult()
Test if this expression has a non-negative result (i.e. greater equal 0).
|
default boolean |
isNot()
Test if this expression is the function
Not[<arg>] |
default boolean |
isNumber()
Test if this expression is a number.
|
default boolean |
isNumEqualInteger(IInteger value)
Check if this expression equals an
IInteger value. |
default boolean |
isNumEqualRational(IRational value)
Check if this expression equals an
IRational value. |
default boolean |
isNumeric()
Test if this expression is a numeric number (i.e. an instance of type
INum or type IComplexNum. |
default boolean |
isNumericFunction()
Test if this expression is a numeric function (i.e. a number, a symbolic
constant or a function (with attribute NumericFunction) where all
arguments are also "numeric functions")
|
default boolean |
isNumericMode()
Test if this expression contains a numeric number (i.e. of type
INum or IComplexNum. |
default boolean |
isNumIntValue()
Check if this expression represents an
int value. |
default boolean |
isOne()
Test if this expression equals
1 in symbolic or numeric
mode. |
default boolean |
isONE()
Deprecated.
use
isOne() instead. |
default boolean |
isOr()
Test if this expression is the function
Or[<arg>,...] |
default boolean |
isOrderlessAST()
Test if this expression is an AST list, which contains a header
element (i.e. a function symbol like for example
Plus or Times) with attribute Orderless at
index position 0 and some optional argument elements
at the index positions 1..n. |
default boolean |
isPattern()
Test if this expression is a
Pattern[symbol] object |
default boolean |
isPatternDefault()
Return
true, if the expression is a pattern object with an
associated default value (for example 0 is the default value
for the addition expression x_+y_. |
default boolean |
isPatternExpr()
Test if this expression or a subexpression is a pattern object.
|
default boolean |
isPatternSequence()
Test if this expression is a pattern sequence object
|
default boolean |
isPi()
Test if this expression equals
Pi (the ratio of a circle's
circumference to its diameter, approx. 3.141592...) in symbolic or
numeric mode. |
default boolean |
isPlus()
Test if this expression is the addition function
Plus[<arg1>, <arg2>, ...] |
default boolean |
isPlusTimesPower()
Test if this expression is a
Plus, Power or Times function. |
default boolean |
isPolynomial(IAST variables)
Test if this expression is a polynomial for the given list of
variables. |
default boolean |
isPolynomial(ISymbol variable)
Test if this expression is a polynomial for the given
variable. |
default boolean |
isPolynomialOfMaxDegree(ISymbol variable,
long maxDegree)
Test if this expression is a polynomial of
maxDegree (i.e. |
default boolean |
isPositive()
Test if this object is a positive signed number.
|
default boolean |
isPositiveResult()
Test if this expression has a positive result (i.e. greater than 0).
|
default boolean |
isPower()
Test if this expression is the function
Power[<arg1>, <arg2>] |
default boolean |
isPresent()
Return
true if this expression unequals F.NIL,
otherwise false. |
default boolean |
isRational()
Test if this expression is a rational number, i.e. integer or fraction
number.
|
default boolean |
isRationalResult()
Test if this expression is a rational function (i.e. a number, a symbolic
constant or an rational function where all arguments are also
"rational functions")
|
default boolean |
isRationalValue(IRational value)
Test if this expression equals
value in symbolic or numeric
mode. |
default boolean |
isRealResult()
Test if this expression is a real function (i.e. a number, a symbolic
constant or an integer function where all arguments are also "reals
functions")
|
default boolean |
isRuleAST()
Test if this expression is of the form
Rule[<arg1>, <arg2>] or
RuleDelayed[<arg1>, <arg2>]. |
default boolean |
isSame(IExpr expression)
Test if this expression equals the given expression.
|
default boolean |
isSame(IExpr expression,
double epsilon)
Test if this expression equals the given expression.
|
default boolean |
isSequence()
Test if this expression is a sequence (i.e. an AST with head Sequence)
|
default boolean |
isSignedNumber()
Test if this expression is a signed number.
|
default boolean |
isSin()
Test if this expression is the function
Sin[<arg>] |
default boolean |
isSinh()
Test if this expression is the function
Sinh[<arg>] |
default boolean |
isSlot()
Test if this expression is the function
Slot[<integer-value>] |
default boolean |
isSlotSequence()
Test if this expression is the function
SlotSequence[<integer-value>] |
default boolean |
isSpan() |
default boolean |
isSymbol()
Test if this expression is a symbol
|
default boolean |
isTan()
Test if this expression is the function
TAn[<arg>] |
default boolean |
isTanh()
Test if this expression is the function
Tanh[<arg>] |
default boolean |
isTimes()
Test if this expression is the multiplication function
Times[<arg1>, <arg2>, ...] |
default boolean |
isTrue()
Test if this expression equals the symbol
True. |
default boolean |
isUnit()
Test if this is a unit.
|
default boolean |
isValue()
Returns
true, if this symbol or ast expression is bound to a
value (i.e. the evaluation returns an assigned value). |
default boolean |
isVariable()
Test if this expression is a symbol which doesn't has attribute
Constant. |
default int |
isVector()
Test if this expression is a vector and return the dimension of the
vector.
|
default boolean |
isZero()
Test if this expression equals
0 in symbolic or numeric
mode. |
default boolean |
isZERO()
Deprecated.
use
isZero() instead. |
long |
leafCount()
Count the number of leaves of this expression.
|
java.util.List<IExpr> |
leaves()
Get a list of the leaf expressions.
|
IExpr |
minus(IExpr that)
Returns an
IExpr whose value is (this - that). |
IExpr |
mod(IExpr that) |
IExpr |
multiply(IExpr that)
Additional multiply method which works like
times() to
fulfill groovy's method signature |
default IExpr |
multiply(int n)
Compute n × this.
|
IExpr |
negative()
Additional negative method, which works like opposite to fulfill groovy's
method signature
|
static IExpr |
ofNullable(IExpr value)
Returns an
IExpr describing the specified value, if non-null,
otherwise returns F.NIL . |
IExpr |
opposite()
Returns an
IExpr whose value is (-1) * this. |
IExpr |
optional(IExpr that)
The
ExprNull.NIL#optional() method always returns
that. |
IExpr |
or(IExpr that) |
default IExpr |
orElse(IExpr other)
Return
this if this unequals F.NIL
, otherwise return other. . |
default IExpr |
orElseGet(java.util.function.Supplier<? extends IExpr> other)
Return
this if this unequals F.NIL
, otherwise invoke other and return the result of that
invocation. |
default <X extends java.lang.Throwable> |
orElseThrow(java.util.function.Supplier<? extends X> exceptionSupplier)
Return
this if this unequals F.NIL
, otherwise throw an exception to be created by the provided supplier. |
IExpr |
plus(IExpr that)
Returns an
IExpr whose value is (this + that). |
IExpr |
power(IExpr that)
Returns an
IExpr whose value is (this ^ that). |
IExpr |
power(long n)
Returns an
IExpr whose value is (this ^ n). |
default IExpr |
reciprocal()
Returns the multiplicative inverse of
this element. |
IExpr |
replaceAll(java.util.function.Function<IExpr,IExpr> function)
Replace all (sub-) expressions with the given unary function.
|
IExpr |
replaceAll(IAST astRules)
Replace all (sub-) expressions with the given rule set.
|
IExpr |
replacePart(IAST astRules)
Replace all subexpressions with the given rule set.
|
IExpr |
replaceRepeated(java.util.function.Function<IExpr,IExpr> function)
Repeatedly replace all (sub-) expressions with the given unary function.
|
IExpr |
replaceRepeated(IAST astRules)
Repeatedly replace all (sub-) expressions with the given rule set.
|
IExpr |
replaceSlots(IAST slotsList)
Replace all occurrences of Slot[<index>] expressions with the
expression at the appropriate
index in the given
slotsList. |
int |
signum()
Deprecated.
|
IExpr |
subtract(IExpr that)
Subtract S from this.
|
IExpr |
sum(IExpr that)
Sum of this and S.
|
IExpr |
times(IExpr that)
Returns an
IExpr whose value is (this * that). |
default IExpr |
timesDistributed(IExpr that)
Returns an
IExpr whose value is (this * that). |
ISymbol |
topHead()
The 'highest level' head of the expression, before Symbol, Integer, Real
or String. for example while the head of a[b][c] is a[b], the top head is
a.
|
IExpr |
variables2Slots(java.util.Map<IExpr,IExpr> map,
java.util.Collection<IExpr> variableCollector)
Convert the variables (i.e. expressions of type
ISymbol
which aren't constants) in this expression into Slot[] s. |
static final int ASTID
static final int BLANKID
static final int COMPLEXID
static final int DOUBLECOMPLEXID
static final int DOUBLEID
static final int FRACTIONID
static final int INTEGERID
static final int METHODSYMBOLID
static final int PATTERNID
static final int STRINGID
static final int SYMBOLID
static IExpr ofNullable(IExpr value)
IExpr describing the specified value, if non-null,
otherwise returns F.NIL .value - the possibly-null value to describeIExpr with a present value if the specified value is
non-null, otherwise an empty OptionalIExpr $div(IExpr that)
/. Calls
divide(that).that - IExpr $minus(IExpr that)
/. Calls
divide(that).that - IExpr $plus(IExpr that)
+. Calls
plus(that).that - IExpr $times(IExpr that)
*. Calls
times(that).that - IExpr $up(IExpr that)
^. Calls
power(that).that - <T> T accept(IVisitor<T> visitor)
boolean accept(IVisitorBoolean visitor)
booleanint accept(IVisitorInt visitor)
intvisitor - long accept(IVisitorLong visitor)
longvisitor - IExpr apply(IExpr... leaves)
leaves - IExpr apply(java.util.List<? extends IExpr> leaves)
leaves - java.lang.Object asType(java.lang.Class<?> clazz)
int compareTo(IExpr obj)
IExpr dec()
IExpr whose value is (this - 1).
Calculates F.eval(F.Subtract(this, C1)) in the common case
and uses a specialized implementation for derived number classes.IExpr divide(IExpr that)
IExpr whose value is (this / that).
Calculates F.eval(F.Times(this, F.Power(that, F.CN1))) in
the common case and uses a specialized implementation for derived number
classes.org.apache.commons.math4.complex.Complex evalComplex()
INumber value.null if the conversion is not possible.double evalDouble()
double value. If the
conversion to a double value is not possible, the method throws a
WrongArgumentType exception.double value.INumber evalNumber()
INumber value.null if the conversion is not possible.ISignedNumber evalSignedNumber()
ISignedNumber value.null if the conversion is not possible.default IExpr evaluate(EvalEngine engine)
engine - the evaluation engineF.NIL if the evaluation is
not possible (i.e. the evaluation doesn't change the object).default IExpr evaluateHead(IAST ast, EvalEngine engine)
java.lang.String fullFormString()
FullForm() of this expressionIExpr getAt(int index)
index if this object is of
type IAST.index - default org.apache.commons.math4.Field<IExpr> getField()
org.apache.commons.math4.FieldElementField to which the instance belongs.getField in interface org.apache.commons.math4.FieldElement<IExpr>Field to which the instance belongsIExpr head()
IAST get the first element
(offset 0) of the IAST list (i.e. get(0) ).int hierarchy()
default void ifPresent(java.util.function.Consumer<? super IExpr> consumer)
F.NIL, invoke the specified
consumer with the this object, otherwise do nothing.consumer - block to be executed if this expression unequals
F.NILOptional.ifPresent(Consumer)IExpr inc()
IExpr whose value is (this + 1).
Calculates F.eval(F.Plus(this, C1)) in the common case and
uses a specialized implementation for derived number classes.java.lang.String internalFormString(boolean symbolsAsFactoryMethod,
int depth)
symbolsAsFactoryMethod - if true use the F.symbol() method,
otherwise print the symbol name.depth - the recursion depth of this call. 0 indicates
"recurse without a limit".java.lang.String internalJavaString(boolean symbolsAsFactoryMethod,
int depth,
boolean useOperators)
symbolsAsFactoryMethod - if true use the F.symbol() method,
otherwise print the symbol name.depth - the recursion depth of this call. 0 indicates
"recurse without a limit".useOperators - use operators instead of function names for representation of
Plus, Times, Power,...java.lang.String internalScalaString(boolean symbolsAsFactoryMethod,
int depth)
symbolsAsFactoryMethod - if true use the F.symbol() method,
otherwise print the symbol name.depth - the recursion depth of this call. 0 indicates
"recurse without a limit".IExpr inverse()
this.times(this.inverse()) == ONE , with ONE
being the multiplicative identity. Calculates
F.eval(F.Power(this, F.CN1)) in the common case and uses a
specialized implmentation for derived number classes.inverse in interface edu.jas.structure.MonoidElem<IExpr>ONE / this.default boolean isAllExpanded()
Plus, Times, Power (sub-)expressions are expanded.default boolean isAnd()
And[<arg>,...]default boolean isArcCos()
ArcCos[<arg>]default boolean isArcCosh()
ArcCosh[<arg>]default boolean isArcSin()
ArcSin[<arg>]default boolean isArcSinh()
ArcSinh[<arg>]default boolean isArcTan()
ArcTan[<arg>]default boolean isArcTanh()
ArcTanh[<arg>]default boolean isAST()
0 and
some optional argument elements at the index positions
1..n. Therefore this expression is no atomic
expression.isAtom()default boolean isAST(IExpr header)
0 and some optional
argument elements at the index positions
1..(size()-1). Therefore this expression is not an atomic
expression.isAtom()default boolean isAST(IExpr header, int length)
0 and optional
argument elements at the index positions
1..(length-1). Therefore this expression is not an atomic
expression.header - the header element to chck forlength - the length the AST expression must haveisAtom()default boolean isAST(IExpr header, int length, IExpr... args)
0 and optional
argument elements at the index positions
1..(length-1). Therefore this expression is not an atomic
expression.args - the arguments of this AST which should be tested, if they are
equal, a null value argument skips the equals
chack.isAtom()default boolean isAST(IExpr header, int minLength, int maxLength)
0 and optional
argument elements at the index positions
1..(length-1). Therefore this expression is not an atomic
expression.header - the header element to chck forminLength - the minimum size the AST expression must havemaxLength - the maximum size the AST expression must haveisAtom()default boolean isAST(java.lang.String symbol)
0 equals the
given symbol and some optional argument elements at
the index positions 1..(size()-1). Therefore this expression
is no atomic expression. Example: isAST("Sin") gives
true for Sin[Pi/2].isAtom()default boolean isAST(java.lang.String symbol,
int length)
0 equals the
given symbol and some optional argument elements at
the index positions 1..(length-1). Therefore this expression
is no atomic expression. Example: isAST("Sin", 2)
gives true for Sin[0].isAtom()default boolean isASTSizeGE(IExpr header, int length)
0 and optional
argument elements at the index positions 1..n.
n must be greater equal than the given length.
Therefore this expression is no atomic expression.isAtom()default boolean isAtom()
default boolean isBlank()
Blank[] objectdefault boolean isComplex()
instanceof IComplex)default boolean isComplexInfinity()
default boolean isComplexNumeric()
instanceof IComplexNum)default boolean isCondition()
Condition[<arg1>, <arg2>]default boolean isConstant()
Constant.
Therefore numbers return false for this method!#isRealFunction(),
isNumericFunction()default boolean isCos()
Cos[<arg>]default boolean isCosh()
Cosh[<arg>]default IAST[] isDerivative()
Test if this expression is a
Derivative[number,...][symbol][arg] or
Derivative[number,...][symbol] expression and return the
corresponding IAST structures.
[0] contains the
Derivative[number,...] AST part.[1] contains the
Derivative[...][symbol] AST part.[2] contains the
Derivative[...][...][arg] AST part, if available.
Note: the result at index [2] maybe null
, if no argument is available.
null if the expression is not a
Derivative[number,...][symbol][arg] or
Derivative[number,...][symbol] expression.default boolean isDirectedInfinity()
Infinity->DirectedInfinity[1],
-Infinity->DirectedInfinity[-1],
ComplexInfinity->DirectedInfinity[])default boolean isE()
E (base of the natural
logarithm; approximately equal to 2.71828...) in symbolic or numeric
mode.
default boolean isExpanded()
Plus, Times, Power expression is expanded.default boolean isFalse()
default boolean isFlatAST()
Dot, Plus or Times) with attribute Flat at
index position 0 and some optional argument elements
at the index positions 1..(size()-1). Examples for
Flat functions are Dot[], Plus[] or Times[].
Therefore this expression is no atomic expression.isAtom()default boolean isFraction()
default boolean isFree(IExpr pattern)
true, if all of the elements in the
subexpressions or the expression itself, did not match the given pattern.
Calls isFree(pattern, true).pattern - a pattern-matching expressiondefault boolean isFree(IExpr pattern, boolean heads)
true, if all of the elements in the
subexpressions or the expression itself, did not match the given pattern.pattern - a pattern-matching expressionheads - if set to false, only the arguments of an IAST
should be tested and not the Head[] element.default boolean isFree(java.util.function.Predicate<IExpr> predicate, boolean heads)
true, if all of the elements in the
subexpressions or the expression itself, did not satisfy the given unary
predicate.predicate - a unary predicateheads - if set to false, only the arguments of an IAST
should be tested and not the Head[] element.default boolean isFreeAST(IExpr pattern)
true, if all of the elements in the
subexpressions or the expression itself, aren't ASTs with a head which
match the given pattern.pattern - a pattern-matching expressiondefault boolean isFreeAST(java.util.function.Predicate<IExpr> predicate)
true, if all of the elements in the
subexpressions or the expression itself, aren't ASTs with a head which
match the given predicate.pattern - a unary predicatedefault boolean isFreeOfPatterns()
true, if all of the elements in the
subexpressions or the expression itself, are no pattern objects.true if the expression contains no
IPatternObject.default boolean isFunction()
Function( arg1 ) expression
with at least 1 argument.default boolean isGEOrdered(IExpr expr)
expr - an expression to compare withdefault boolean isGTOrdered(IExpr expr)
expr - an expression to compare withdefault boolean isIndeterminate()
Indeterminatedefault boolean isInfinity()
Infinity (i.e.
Infinity->DirectedInfinity[1])default boolean isInteger()
default boolean isIntegerResult()
true, if the given expression is a integer function
or value.#isRealFunctiondefault boolean isLEOrdered(IExpr obj)
expr - an expression to compare withdefault boolean isList()
default boolean isListOfLists()
isList(),
isMatrix(),
isVector()default boolean isLog()
Log[<arg>]default boolean isLTOrdered(IExpr expr)
expr - an expression to compare withdefault int[] isMatrix()
List and have the
same size.null if the expression is not a matrixdefault boolean isMember(IExpr pattern, boolean heads)
true, if at least one of the elements in the
subexpressions or the expression itself, match the given pattern.pattern - a pattern-matching expressionheads - if set to false, only the arguments of an IAST
should be tested and not the Head[] element.default boolean isMember(java.util.function.Predicate<IExpr> predicate, boolean heads)
true, if at least one of the elements in the
subexpressions or the expression itself, satisfy the given unary
predicate.predicate - a unary predicateheads - if set to false, only the arguments of an IAST
should be tested and not the Head[] element.default boolean isMinusOne()
-1 in symbolic or numeric
mode.default boolean isModule()
Module[<arg1>, <arg2>]default boolean isNegative()
IAST
object the method checks, if it is a numeric constant. If the
IAST object evaluates to a negative numeric expression this
method returns true.true, if this < 0; false
in all other case.default boolean isNegativeInfinity()
-Infinity (i.e.
-Infinity->DirectedInfinity[-1])default boolean isNegativeResult()
true, if the given expression is a negative function
or value.#isRealFunctiondefault boolean isNonNegativeResult()
true, if the given expression is a non-negative
function or value.#isRealFunctiondefault boolean isNot()
Not[<arg>]default boolean isNumber()
INumber.default boolean isNumEqualInteger(IInteger value) throws java.lang.ArithmeticException
IInteger value. The value
of an INum or the value of an IInteger object
can be equal to value.value - java.lang.ArithmeticExceptiondefault boolean isNumEqualRational(IRational value) throws java.lang.ArithmeticException
IRational value. The
value of an IInteger, IFraction or the value of
an INum object can be equal to value.value - java.lang.ArithmeticExceptionisRational()default boolean isNumeric()
INum or type IComplexNum.default boolean isNumericFunction()
true, if the given expression is a numeric function
or value.#isRealFunctiondefault boolean isNumericMode()
INum or IComplexNum.true, if the given expression contains numeric
number (i.e. of type INum or
IComplexNum.#isRealFunctiondefault boolean isNumIntValue()
int value. The value
of an INum object can be an int value.default boolean isOne()
1 in symbolic or numeric
mode.default boolean isONE()
isOne() instead.isONE in interface edu.jas.structure.MonoidElem<IExpr>default boolean isOr()
Or[<arg>,...]default boolean isOrderlessAST()
Plus or Times) with attribute Orderless at
index position 0 and some optional argument elements
at the index positions 1..n. Examples for
Orderless functions are Plus[] or Times[].
Therefore this expression is no atomic expression.isAtom()default boolean isPattern()
Pattern[symbol] objectdefault boolean isPatternDefault()
true, if the expression is a pattern object with an
associated default value (for example 0 is the default value
for the addition expression x_+y_.)default boolean isPatternExpr()
IAST with flag
IAST.CONTAINS_PATTERN_EXPR.default boolean isPatternSequence()
default boolean isPi()
Pi (the ratio of a circle's
circumference to its diameter, approx. 3.141592...) in symbolic or
numeric mode.
default boolean isPlus()
Plus[<arg1>, <arg2>, ...]default boolean isPlusTimesPower()
Plus, Power or Times function.default boolean isPolynomial(IAST variables)
Test if this expression is a polynomial for the given list of
variables.
true for a Symbol expression.variables - a list of variables or an empty listtrue if this expression is a polynomial;
falseotherwisedefault boolean isPolynomial(ISymbol variable)
Test if this expression is a polynomial for the given
variable.
null, this method
returns true for a Symbol expression.default boolean isPolynomialOfMaxDegree(ISymbol variable, long maxDegree)
maxDegree (i.e.
the maximum exponent <= maxDegree) for the given variable.maxDegree - the maximum degree of the polynomial; maxDegree must be
greater 0default boolean isPositive()
IAST
object the method checks, if it is a numeric constant. If the
IAST object evaluates to a positive numeric expression this
method returns true.true, if this > 0; false
in all other case.default boolean isPositiveResult()
true, if the given expression is a positive function
or value.#isRealFunctiondefault boolean isPower()
Power[<arg1>, <arg2>]default boolean isPresent()
true if this expression unequals F.NIL,
otherwise false. This method is similar to
java.util.Optional#isPresent().true if the expression unequals F.NIL,
otherwise false.Optional.isPresent()default boolean isRational()
#isNumEqualRational()default boolean isRationalResult()
true, if the given expression is a rational function
or value.#isRealFunctiondefault boolean isRationalValue(IRational value)
value in symbolic or numeric
mode.default boolean isRealResult()
true, if the given expression is a real function or
value.isIntegerResult()default boolean isRuleAST()
Rule[<arg1>, <arg2>] or
RuleDelayed[<arg1>, <arg2>].default boolean isSame(IExpr expression)
default boolean isSame(IExpr expression, double epsilon)
default boolean isSequence()
default boolean isSignedNumber()
ISignedNumber.default boolean isSin()
Sin[<arg>]default boolean isSinh()
Sinh[<arg>]default boolean isSlot()
Slot[<integer-value>]default boolean isSlotSequence()
SlotSequence[<integer-value>]default boolean isSpan()
default boolean isSymbol()
default boolean isTan()
TAn[<arg>]default boolean isTanh()
Tanh[<arg>]default boolean isTimes()
Times[<arg1>, <arg2>, ...]default boolean isTrue()
True.true if the expression equals symbol
True and false in all other casesdefault boolean isUnit()
isUnit in interface edu.jas.structure.MonoidElem<IExpr>default boolean isValue()
true, if this symbol or ast expression is bound to a
value (i.e. the evaluation returns an assigned value).default boolean isVariable()
Constant.isConstant(),
isSymbol()default int isVector()
List(...) and no element is itself a List(...).-1 if the expression is no vector or
size()-1 of this vector AST.default boolean isZero()
0 in symbolic or numeric
mode.default boolean isZERO()
isZero() instead.isZERO in interface edu.jas.structure.AbelianGroupElem<IExpr>long leafCount()
java.util.List<IExpr> leaves()
IExpr minus(IExpr that)
IExpr whose value is (this - that).
Calculates F.eval(F.Plus(this, F.Times(F.CN1, that))) in the
common case and uses a specialized implementation for derived number
classes.that - IExpr multiply(IExpr that)
times() to
fulfill groovy's method signaturemultiply in interface org.apache.commons.math4.FieldElement<IExpr>multiply in interface edu.jas.structure.MonoidElem<IExpr>that - times(IExpr)default IExpr multiply(int n)
org.apache.commons.math4.FieldElementmultiply in interface org.apache.commons.math4.FieldElement<IExpr>n - Number of times this must be added to itself.IExpr negative()
opposite()IExpr opposite()
IExpr whose value is (-1) * this.
Calculates F.eval(F.Times(F.CN1, this)) in the common case
and uses a specialized implementation for derived number classes.negative()IExpr optional(IExpr that)
ExprNull.NIL#optional() method always returns
that. All other objects which implement this method returns
that if that!=null or this if
that==nullthat - that if that!=null or this
in all other cases.AbstractAST.optional(IExpr)default IExpr orElse(IExpr other)
this if this unequals F.NIL
, otherwise return other. .that - Optional.orElse(Object)default IExpr orElseGet(java.util.function.Supplier<? extends IExpr> other)
this if this unequals F.NIL
, otherwise invoke other and return the result of that
invocation.other - a Supplier whose result is returned if no value is
presentthis if this unequals
F.NIL, otherwise the result of other.get()default <X extends java.lang.Throwable> IExpr orElseThrow(java.util.function.Supplier<? extends X> exceptionSupplier) throws X extends java.lang.Throwable
this if this unequals F.NIL
, otherwise throw an exception to be created by the provided supplier.X - Type of the exception to be thrownexceptionSupplier - The supplier which will return the exception to be thrownthis if this unequals
F.NIL or throw an exceptionX - if there is no value presentX extends java.lang.ThrowableIExpr plus(IExpr that)
IExpr whose value is (this + that).
Calculates F.eval(F.Plus(this, that)) in the common case and
uses a specialized implementation for derived number classes.that - IExpr power(IExpr that)
IExpr whose value is (this ^ that).
Calculates F.eval(F.Power(this, that)) in the common case
and uses a specialized implementation for derived number classes.that - (this ^ that)IExpr power(long n)
IExpr whose value is (this ^ n).
Calculates F.eval(F.Power(this, that)) in the common case
and uses a specialized implementation for derived number classes.that - (this ^ n)default IExpr reciprocal() throws org.apache.commons.math4.exception.MathArithmeticException
org.apache.commons.math4.FieldElementthis element.reciprocal in interface org.apache.commons.math4.FieldElement<IExpr>this.org.apache.commons.math4.exception.MathArithmeticException - if this is zeroIExpr replaceAll(java.util.function.Function<IExpr,IExpr> function)
null.function - if the unary functions apply() method returns
F.NIL the expression isn't substituted.F.NIL if no substitution of a (sub-)expression was
possible.IExpr replaceAll(IAST astRules)
null.astRules - rules of the form x->y or
{a->b, c->d}; the left-hand-side of the
rule can contain pattern objects.F.NIL if no substitution of a (sub-)expression was
possible.IExpr replacePart(IAST astRules)
F.NIL.astRules - rules of the form position->y or
{position1->b, position2->d}F.NIL if no substitution of a subexpression was
possible.IExpr replaceRepeated(java.util.function.Function<IExpr,IExpr> function)
this.function - if the unary functions apply() method returns
null the expression isn't substituted.this if no substitution of a (sub-)expression was
possible.IExpr replaceRepeated(IAST astRules)
this.astRules - rules of the form x->y or
{a->b, c->d}; the left-hand-side of the
rule can contain pattern objects.this if no substitution of a (sub-)expression was
possible.IExpr replaceSlots(IAST slotsList)
Replace all occurrences of Slot[<index>] expressions with the
expression at the appropriate index in the given
slotsList.
Note: If a slot value is null the Slot will not be
substituted.
slotsList - the values for the slots.null if no substitution occurred.@Deprecated int signum()
signum in interface edu.jas.structure.AbelianGroupElem<IExpr>IExpr subtract(IExpr that)
edu.jas.structure.AbelianGroupElemIExpr sum(IExpr that)
edu.jas.structure.AbelianGroupElemIExpr times(IExpr that)
IExpr whose value is (this * that).
Calculates F.eval(F.Times(this, that)) in the common case
and uses a specialized implementation for derived number classes.that - the multiplier expression(this * that)default IExpr timesDistributed(IExpr that)
IExpr whose value is (this * that).
Calculates F.eval(F.Times(this, that)) in the common case
and uses a specialized implementation for derived number classes.that - the multiplier expression(this * that)ISymbol topHead()
IExpr variables2Slots(java.util.Map<IExpr,IExpr> map, java.util.Collection<IExpr> variableCollector)
ISymbol
which aren't constants) in this expression into Slot[] s.map - for every given symbol argument return the associated unique
slot from this mapvariableCollector - collects the variables which are used in the replacement
processF.NIL if no variable symbol was found.