ExprImpl
org.matheclipse.core.expression

Class ExprImpl

    • Constructor Summary

      Constructors 
      Constructor and Description
      ExprImpl() 
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      IExprabs()
      Absolute value of this.
      IExprand(IExpr that) 
      IExprapply(IExpr... leaves)
      IExprapply(List<? extends IExpr> leaves)
      ObjectasType(Class clazz) 
      IExprcopy()
      Clone this Element.
      IExprdivide(IExpr that)
      Divide this by S.
      IExpr[]egcd(IExpr b)
      Extended greatest common divisor.
      IExprevaluate(EvalEngine engine)
      Evaluate an expression
      ElemFactory<IExpr>factory()
      Get the corresponding element factory.
      StringfullFormString()
      Return the FullForm of this expression
      IExprgcd(IExpr b)
      Greatest common divisor.
      IExprgetAt(int index)
      Get the element at the specified index if this object is of type IAST.
      abstract ISymbolhead()
      If this object is an instance of IAST get the first element (offset 0) of the IAST list (i.e.
      StringinternalFormString(boolean symbolsAsFactoryMethod, int depth)
      Return the internal Java form of this expression.
      IExprinverse()
      Returns the multiplicative inverse of this object.
      booleanisAnd()
      Test if this expression is the function And[<arg>,...]
      booleanisArcCos()
      Test if this expression is the function ArcCos[<arg>]
      booleanisArcCosh()
      Test if this expression is the function ArcCosh[<arg>]
      booleanisArcSin()
      Test if this expression is the function ArcSin[<arg>]
      booleanisArcSinh()
      Test if this expression is the function ArcSinh[<arg>]
      booleanisArcTan()
      Test if this expression is the function ArcTan[<arg>]
      booleanisArcTanh()
      Test if this expression is the function ArcTanh[<arg>]
      booleanisAST()
      Test if this expression is an AST list, which contains a header element (i.e.
      booleanisAST(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..(size()-1).
      booleanisAST(IExpr header, int sz)
      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..(length-1).
      booleanisAST(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..(length-1).
      booleanisAST(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..(size()-1).
      booleanisAST(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..(length-1).
      booleanisASTSizeGE(IExpr header, int length)
      Test if this expression is an AST (i.e.
      booleanisAtom()
      Test if this expression is an atomic expression (i.e.
      booleanisComplex()
      Test if this expression is a symbolic complex number
      booleanisComplexInfinity()
      Test if this expression is representing ComplexInfinity (i.e.
      booleanisComplexNumeric()
      Test if this expression is a numeric complex number
      booleanisCondition()
      Test if this expression is the Condition function Condition[<arg1>, <arg2>]
      booleanisConstant()
      Test if this expression is a symbol with attribute Constant.
      booleanisCos()
      Test if this expression is the function Cos[<arg>]
      booleanisCosh()
      Test if this expression is the function Cosh[<arg>]
      booleanisDirectedInfinity()
      Test if this expression is representing a DirectedInfinity (i.e.
      booleanisFalse()
      Test if this expression equals the symbol "False"
      booleanisFlatAST()
      Test if this expression is an AST list, which contains a header element (i.e.
      booleanisFraction()
      Test if this expression is a fractional number, but no integer number.
      booleanisFree(IExpr pattern, boolean heads)
      Returns true, if all of the elements in the subexpressions or the expression itself, did not match the given pattern.
      booleanisFree(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.
      booleanisFunction()
      Test if this expression is a Funtion[ arg1 ] expression with at least 1 argument.
      booleanisGEOrdered(IExpr obj)
      Compares this expression with the specified expression for order.
      booleanisGTOrdered(IExpr obj)
      Compares this expression with the specified expression for order.
      booleanisInfinity()
      Test if this expression is representing Infinity (i.e.
      booleanisInteger()
      Test if this expression is a integer number
      booleanisLEOrdered(IExpr obj)
      Compares this expression with the specified expression for order.
      booleanisList()
      Test if this expression is a list (i.e.
      booleanisListOfLists()
      Test if this expression is a list of lists
      booleanisLog()
      Test if this expression is the function Log[<arg>]
      booleanisLTOrdered(IExpr obj)
      Compares this expression with the specified expression for order.
      int[]isMatrix()
      Test if this expression is a matrix and return the dimensions as array [row-dimension, column-dimension].
      booleanisMember(IExpr pattern, boolean heads)
      Returns true, if at least one of the elements in the subexpressions or the expression itself, match the given pattern.
      booleanisMember(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.
      booleanisMinusOne()
      Test if this expression equals -1 in symbolic or numeric mode.
      booleanisModule()
      Test if this expression is the Module function Module[<arg1>, <arg2>]
      booleanisNegative()
      Test if this object is a negative signed number.
      booleanisNegativeInfinity()
      Test if this expression is representing -Infinity (i.e.
      booleanisNot()
      Test if this expression is the function Not[<arg>]
      booleanisNumber()
      Test if this expression is a number
      booleanisNumEqualInteger(IInteger ii)
      Check if this expression equals an IInteger value.
      booleanisNumeric()
      Test if this expression is a numeric number (i.e.
      booleanisNumericFunction()
      Test if this expression is a numeric function (i.e.
      booleanisNumIntValue()
      Check if this expression represents an int value.
      booleanisOne()
      Test if this expression equals 1 in symbolic or numeric mode.
      booleanisONE()
      Test if this is one.
      booleanisOr()
      Test if this expression is the function Or[<arg>,...]
      booleanisOrderlessAST()
      Test if this expression is an AST list, which contains a header element (i.e.
      booleanisPattern()
      Test if this expression is a pattern object
      booleanisPatternExpr()
      Test if this expression or a subexpression is a pattern object.
      booleanisPatternSequence()
      Test if this expression is a pattern sequence object
      booleanisPlus()
      Test if this expression is the addition function Plus[<arg1>, <arg2>, ...]
      booleanisPositive()
      Test if this object is a positive signed number.
      booleanisPower()
      Test if this expression is the function Power[<arg1>, <arg2>]
      booleanisRational()
      Test if this expression is a rational number, i.e.
      booleanisRealFunction()
      Test if this expression is a real (non-complex) value (i.e.
      booleanisRuleAST()
      Test if this expression is of the form Rule[<arg1>, <arg2>] or RuleDelayed[<arg1>, <arg2>].
      booleanisSame(IExpr expression)
      Test if this expression equals the given expression.
      booleanisSame(IExpr expression, double epsilon)
      Test if this expression equals the given expression.
      booleanisSequence()
      Test if this expression is a sequence (i.e.
      booleanisSignedNumber()
      Test if this expression is a signed number
      booleanisSin()
      Test if this expression is the function Sin[<arg>]
      booleanisSinh()
      Test if this expression is the function Sinh[<arg>]
      booleanisSlot()
      Test if this expression is the function Slot[<integer-value>]
      booleanisSlotSequence()
      Test if this expression is the function SlotSequence[<integer-value>]
      booleanisSymbol()
      Test if this expression is a symbol
      booleanisTan()
      Test if this expression is the function TAn[<arg>]
      booleanisTanh()
      Test if this expression is the function Tanh[<arg>]
      booleanisTimes()
      Test if this expression is the multiplication function Times[<arg1>, <arg2>, ...]
      booleanisTrue()
      Test if this expression equals the symbol "True"
      booleanisUnit()
      Test if this is a unit.
      booleanisValue()
      Returns true, if this symbol or ast expression is bound to a value (i.e.
      intisVector()
      Test if this expression is a vector and return the dimension of the vector.
      booleanisZero()
      Test if this expression equals 0 in symbolic or numeric mode.
      booleanisZERO()
      Test if this is zero.
      List<IExpr>leaves()
      IExprminus(IExpr that) 
      IExprmod(IExpr that) 
      IExprmultiply(IExpr that)
      Additional multiply method which works like times to fulfill groovy\'s method signature
      IExprnegate()
      Negate this.
      IExprnegative()
      Additional negative method, which works like opposite to fulfill groovy\'s method signature
      IExpropposite() 
      IExpror(IExpr that) 
      IExprplus(IExpr that) 
      IExprpower(IExpr that) 
      IExprpower(Integer n) 
      IExprremainder(IExpr S)
      Remainder after division of this by S.
      IExprreplaceAll(Function<IExpr,IExpr> function)
      Replace all (sub-) expressions with the given unary function.
      IExprreplaceAll(IAST astRules)
      Replace all (sub-) expressions with the given rule set.
      IExprreplacePart(IAST astRules)
      IExprreplaceRepeated(Function<IExpr,IExpr> function)
      Repeatedly replace all (sub-) expressions with the given unary function.
      IExprreplaceRepeated(IAST astRules)
      Repeatedly replace all (sub-) expressions with the given rule set.
      static IExprreplaceRepeated(IExpr expr, VisitorReplaceAll visitor) 
      IExprreplaceSlots(IAST astSlots)
      intsignum()
      Deprecated.  
      IExprsubtract(IExpr that)
      Subtract S from this.
      IExprsum(IExpr that)
      Sum of this and S.
      IExprtimes(IExpr that)
      Returns the product of this object with the one specified.
      ISymboltopHead() 
      StringtoScript()
      Get a scripting compatible string representation.
      StringtoScriptFactory()
      Get a scripting compatible string representation of the factory.
      IExprvariables2Slots(Map<IExpr,IExpr> map, List<IExpr> variableList)
      Convert the variables (i.e.
    • Constructor Detail

      • ExprImpl

        public ExprImpl()
    • Method Detail

      • opposite

        public IExpr opposite()
      • negative

        public final IExpr negative()
        Additional negative method, which works like opposite to fulfill groovy\'s method signature
        Specified by:
        negative in interface IExpr
        Returns:
      • inverse

        public IExpr inverse()
        Description copied from interface: IExpr
        Returns the multiplicative inverse of this object. It is the object such as this.times(this.inverse()) == ONE , with ONE being the multiplicative identity.
        Specified by:
        inverse in interface MonoidElem<IExpr>
        Specified by:
        inverse in interface IExpr
        Returns:
        ONE / this.
      • times

        public IExpr times(IExpr that)
        Description copied from interface: IExpr
        Returns the product of this object with the one specified.
        Specified by:
        times in interface IExpr
        Parameters:
        that - the object multiplier.
        Returns:
        this \xc2\xb7 that.
      • multiply

        public final IExpr multiply(IExpr that)
        Additional multiply method which works like times to fulfill groovy\'s method signature
        Specified by:
        multiply in interface MonoidElem<IExpr>
        Specified by:
        multiply in interface IExpr
        Parameters:
        that -
        Returns:
      • getAt

        public IExpr getAt(int index)
        Description copied from interface: IExpr
        Get the element at the specified index if this object is of type IAST.
        Specified by:
        getAt in interface IExpr
        Returns:
      • head

        public abstract ISymbol head()
        Description copied from interface: IExpr
        If this object is an instance of IAST get the first element (offset 0) of the IAST list (i.e. get(0) ).
        Specified by:
        head in interface IExpr
        Returns:
        the head of the expression, which must not be null.
      • topHead

        public ISymbol topHead()
        Specified by:
        topHead in interface IExpr
        Returns:
        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.
      • isComplexInfinity

        public boolean isComplexInfinity()
        Test if this expression is representing ComplexInfinity (i.e. DirectedInfinity[])
        Specified by:
        isComplexInfinity in interface IExpr
      • isDirectedInfinity

        public boolean isDirectedInfinity()
        Test if this expression is representing a DirectedInfinity (i.e. Infinity->DirectedInfinity[1], -Infinity->DirectedInfinity[-1], ComplexInfinity->DirectedInfinity[])
        Specified by:
        isDirectedInfinity in interface IExpr
      • isInfinity

        public boolean isInfinity()
        Test if this expression is representing Infinity (i.e. Infinity->DirectedInfinity[1])
        Specified by:
        isInfinity in interface IExpr
      • isNegative

        public boolean isNegative()
        Test if this object is a negative signed number.
        Specified by:
        isNegative in interface IExpr
        Returns:
        true, if this < 0; false in all other case.
      • isNegativeInfinity

        public boolean isNegativeInfinity()
        Test if this expression is representing -Infinity (i.e. -Infinity->DirectedInfinity[-1])
        Specified by:
        isNegativeInfinity in interface IExpr
      • isList

        public final boolean isList()
        Test if this expression is a list (i.e. an AST with head List)
        Specified by:
        isList in interface IExpr
      • isSequence

        public final boolean isSequence()
        Test if this expression is a sequence (i.e. an AST with head Sequence)
        Specified by:
        isSequence in interface IExpr
      • isTrue

        public boolean isTrue()
        Test if this expression equals the symbol "True"
        Specified by:
        isTrue in interface IExpr
      • isFalse

        public boolean isFalse()
        Test if this expression equals the symbol "False"
        Specified by:
        isFalse in interface IExpr
      • isSame

        public boolean isSame(IExpr expression)
        Test if this expression equals the given expression. If the compared expressions are of the same numeric type, they are equal to a given EPSILON
        Specified by:
        isSame in interface IExpr
      • isSame

        public boolean isSame(IExpr expression,             double epsilon)
        Description copied from interface: IExpr
        Test if this expression equals the given expression. If the compared expressions are of the same numeric type, they are equal to a given EPSILON
        Specified by:
        isSame in interface IExpr
      • isMatrix

        public final int[] isMatrix()
        Description copied from interface: IExpr
        Test if this expression is a matrix and return the dimensions as array [row-dimension, column-dimension]. This expression is only a matrix, if all elements are lists with the header List and have the same size.
        Specified by:
        isMatrix in interface IExpr
        Returns:
        null if the expression is not a matrix
      • isValue

        public boolean isValue()
        Returns true, if this symbol or ast expression is bound to a value (i.e. the evaluation returns an assigned value).
        Specified by:
        isValue in interface IExpr
      • isVector

        public final int isVector()
        Description copied from interface: IExpr
        Test if this expression is a vector and return the dimension of the vector. This expression is only a vector, if the expression is a List(...) and no element is itself a List(...).
        Specified by:
        isVector in interface IExpr
        Returns:
        -1 if the expression is no vector or size()-1 of the corresponding IAST.
      • isAST

        public final 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. Therefore this expression is no atomic expression.
        Specified by:
        isAST in interface IExpr
        See Also:
        IExpr.isAtom()
      • isOrderlessAST

        public final 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. Examples for Orderless functions are Plus[] or Times[]. Therefore this expression is no atomic expression.
        Specified by:
        isOrderlessAST in interface IExpr
        See Also:
        IExpr.isAtom()
      • isFlatAST

        public final 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..(size()-1). Examples for Flat functions are Dot[], Plus[] or Times[]. Therefore this expression is no atomic expression.
        Specified by:
        isFlatAST in interface IExpr
        See Also:
        IExpr.isAtom()
      • isAST

        public final 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..(size()-1). Therefore this expression is not an atomic expression.
        Specified by:
        isAST in interface IExpr
        See Also:
        IExpr.isAtom()
      • isAST

        public final boolean isAST(IExpr header,            int sz)
        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..(length-1). Therefore this expression is not an atomic expression.
        Specified by:
        isAST in interface IExpr
        See Also:
        IExpr.isAtom()
      • isASTSizeGE

        public final boolean isASTSizeGE(IExpr header,                  int length)
        Test if this expression is an AST (i.e. no atomic expression) with the given head expression and size of elements greater equal than the AST#size() 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. n must be greater equal than the given length. Therefore this expression is no atomic expression.
        Specified by:
        isASTSizeGE in interface IExpr
        See Also:
        IExpr.isAtom()
      • isAST

        public final boolean isAST(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..(size()-1). Therefore this expression is no atomic expression. Example: isAST("Sin") gives true for Sin[Pi/2].
        Specified by:
        isAST in interface IExpr
        See Also:
        IExpr.isAtom()
      • isAST

        public final boolean isAST(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..(length-1). Therefore this expression is no atomic expression. Example: isAST("Sin", 2) gives true for Sin[0].
        Specified by:
        isAST in interface IExpr
        See Also:
        IExpr.isAtom()
      • isAST

        public 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..(length-1). Therefore this expression is not an atomic expression.
        Specified by:
        isAST in interface IExpr
        args - the arguments of this AST which should be tested, if they are equal, a null value argument skips the equals chack.
        See Also:
        IExpr.isAtom()
      • isPlus

        public final boolean isPlus()
        Description copied from interface: IExpr
        Test if this expression is the addition function Plus[<arg1>, <arg2>, ...]
        Specified by:
        isPlus in interface IExpr
      • isPower

        public final boolean isPower()
        Description copied from interface: IExpr
        Test if this expression is the function Power[<arg1>, <arg2>]
        Specified by:
        isPower in interface IExpr
      • isRuleAST

        public final boolean isRuleAST()
        Test if this expression is of the form Rule[<arg1>, <arg2>] or RuleDelayed[<arg1>, <arg2>].
        Specified by:
        isRuleAST in interface IExpr
      • isTimes

        public final boolean isTimes()
        Description copied from interface: IExpr
        Test if this expression is the multiplication function Times[<arg1>, <arg2>, ...]
        Specified by:
        isTimes in interface IExpr
      • isSin

        public final boolean isSin()
        Description copied from interface: IExpr
        Test if this expression is the function Sin[<arg>]
        Specified by:
        isSin in interface IExpr
      • isCos

        public final boolean isCos()
        Description copied from interface: IExpr
        Test if this expression is the function Cos[<arg>]
        Specified by:
        isCos in interface IExpr
      • isTan

        public final boolean isTan()
        Description copied from interface: IExpr
        Test if this expression is the function TAn[<arg>]
        Specified by:
        isTan in interface IExpr
      • isArcSin

        public final boolean isArcSin()
        Description copied from interface: IExpr
        Test if this expression is the function ArcSin[<arg>]
        Specified by:
        isArcSin in interface IExpr
      • isAnd

        public final boolean isAnd()
        Description copied from interface: IExpr
        Test if this expression is the function And[<arg>,...]
        Specified by:
        isAnd in interface IExpr
      • isArcCos

        public final boolean isArcCos()
        Description copied from interface: IExpr
        Test if this expression is the function ArcCos[<arg>]
        Specified by:
        isArcCos in interface IExpr
      • isArcTan

        public final boolean isArcTan()
        Description copied from interface: IExpr
        Test if this expression is the function ArcTan[<arg>]
        Specified by:
        isArcTan in interface IExpr
      • isSinh

        public final boolean isSinh()
        Description copied from interface: IExpr
        Test if this expression is the function Sinh[<arg>]
        Specified by:
        isSinh in interface IExpr
      • isCosh

        public final boolean isCosh()
        Description copied from interface: IExpr
        Test if this expression is the function Cosh[<arg>]
        Specified by:
        isCosh in interface IExpr
      • isTanh

        public final boolean isTanh()
        Description copied from interface: IExpr
        Test if this expression is the function Tanh[<arg>]
        Specified by:
        isTanh in interface IExpr
      • isArcSinh

        public final boolean isArcSinh()
        Description copied from interface: IExpr
        Test if this expression is the function ArcSinh[<arg>]
        Specified by:
        isArcSinh in interface IExpr
      • isArcCosh

        public final boolean isArcCosh()
        Description copied from interface: IExpr
        Test if this expression is the function ArcCosh[<arg>]
        Specified by:
        isArcCosh in interface IExpr
      • isArcTanh

        public final boolean isArcTanh()
        Description copied from interface: IExpr
        Test if this expression is the function ArcTanh[<arg>]
        Specified by:
        isArcTanh in interface IExpr
      • isLog

        public final boolean isLog()
        Description copied from interface: IExpr
        Test if this expression is the function Log[<arg>]
        Specified by:
        isLog in interface IExpr
      • isOne

        public boolean isOne()
        Description copied from interface: IExpr
        Test if this expression equals 1 in symbolic or numeric mode.
        Specified by:
        isOne in interface IExpr
      • isOr

        public boolean isOr()
        Test if this expression is the function Or[<arg>,...]
        Specified by:
        isOr in interface IExpr
      • isMinusOne

        public boolean isMinusOne()
        Description copied from interface: IExpr
        Test if this expression equals -1 in symbolic or numeric mode.
        Specified by:
        isMinusOne in interface IExpr
      • isZero

        public boolean isZero()
        Description copied from interface: IExpr
        Test if this expression equals 0 in symbolic or numeric mode.
        Specified by:
        isZero in interface IExpr
      • isSlot

        public boolean isSlot()
        Description copied from interface: IExpr
        Test if this expression is the function Slot[<integer-value>]
        Specified by:
        isSlot in interface IExpr
      • isSlotSequence

        public boolean isSlotSequence()
        Description copied from interface: IExpr
        Test if this expression is the function SlotSequence[<integer-value>]
        Specified by:
        isSlotSequence in interface IExpr
      • isFree

        public 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.
        Specified by:
        isFree in interface IExpr
        Parameters:
        pattern - a pattern-matching expression
        heads - if set to false, only the arguments of an IAST should be tested and not the Head[] element.
      • isFree

        public boolean isFree(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.
        Specified by:
        isFree in interface IExpr
        Parameters:
        predicate - a unary predicate
        heads - if set to false, only the arguments of an IAST should be tested and not the Head[] element.
      • isMember

        public 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.
        Specified by:
        isMember in interface IExpr
        Parameters:
        pattern - a pattern-matching expression
        heads - if set to false, only the arguments of an IAST should be tested and not the Head[] element.
      • isMember

        public boolean isMember(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.
        Specified by:
        isMember in interface IExpr
        Parameters:
        predicate - a unary predicate
        heads - if set to false, only the arguments of an IAST should be tested and not the Head[] element.
      • isFunction

        public boolean isFunction()
        Test if this expression is a Funtion[ arg1 ] expression with at least 1 argument.
        Specified by:
        isFunction in interface IExpr
      • isPattern

        public boolean isPattern()
        Test if this expression is a pattern object
        Specified by:
        isPattern in interface IExpr
      • isPatternExpr

        public boolean isPatternExpr()
        Test if this expression or a subexpression is a pattern object. Used in pattern-matching; checks flags in IAST with flag IAST.CONTAINS_PATTERN_EXPR.
        Specified by:
        isPatternExpr in interface IExpr
      • isPatternSequence

        public boolean isPatternSequence()
        Test if this expression is a pattern sequence object
        Specified by:
        isPatternSequence in interface IExpr
      • isPositive

        public boolean isPositive()
        Test if this object is a positive signed number.
        Specified by:
        isPositive in interface IExpr
        Returns:
        true, if this > 0; false in all other case.
      • isCondition

        public boolean isCondition()
        Test if this expression is the Condition function Condition[<arg1>, <arg2>]
        Specified by:
        isCondition in interface IExpr
      • isModule

        public boolean isModule()
        Test if this expression is the Module function Module[<arg1>, <arg2>]
        Specified by:
        isModule in interface IExpr
      • isSymbol

        public boolean isSymbol()
        Description copied from interface: IExpr
        Test if this expression is a symbol
        Specified by:
        isSymbol in interface IExpr
      • isComplex

        public boolean isComplex()
        Test if this expression is a symbolic complex number
        Specified by:
        isComplex in interface IExpr
      • isComplexNumeric

        public boolean isComplexNumeric()
        Test if this expression is a numeric complex number
        Specified by:
        isComplexNumeric in interface IExpr
      • isFraction

        public boolean isFraction()
        Test if this expression is a fractional number, but no integer number.
        Specified by:
        isFraction in interface IExpr
      • isInteger

        public boolean isInteger()
        Test if this expression is a integer number
        Specified by:
        isInteger in interface IExpr
      • isNumIntValue

        public boolean isNumIntValue()
        Check if this expression represents an int value. The value of an INum object can be an int value.
        Specified by:
        isNumIntValue in interface IExpr
        Returns:
      • isRational

        public boolean isRational()
        Test if this expression is a rational number, i.e. integer or fraction number.
        Specified by:
        isRational in interface IExpr
      • isSignedNumber

        public boolean isSignedNumber()
        Test if this expression is a signed number
        Specified by:
        isSignedNumber in interface IExpr
      • isNot

        public boolean isNot()
        Test if this expression is the function Not[<arg>]
        Specified by:
        isNot in interface IExpr
      • isNumeric

        public boolean isNumeric()
        Test if this expression is a numeric number (i.e. of type INum or IComplexNum.
        Specified by:
        isNumeric in interface IExpr
      • isNumericFunction

        public 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")
        Specified by:
        isNumericFunction in interface IExpr
        Returns:
        true, if the given expression is a numeric function or value.
        See Also:
        IExpr.isRealFunction()
      • isRealFunction

        public boolean isRealFunction()
        Test if this expression is a real (non-complex) value (i.e. a real number or a real symbolic constant or a Plus, Times expression with only real values)
        Specified by:
        isRealFunction in interface IExpr
        Returns:
        true, if the given expression is a real (non-complex) value.
        See Also:
        IExpr.isConstant(), IExpr.isNumericFunction()
      • isNumber

        public boolean isNumber()
        Test if this expression is a number
        Specified by:
        isNumber in interface IExpr
      • isLTOrdered

        public boolean isLTOrdered(IExpr obj)
        Compares this expression with the specified expression for order. Returns true if this expression is canonical less than the specified expression (< relation).
        Specified by:
        isLTOrdered in interface IExpr
        Parameters:
        obj - an expression to compare with
        Returns:
        true if this expression is canonical less than the specified expression.
      • isLEOrdered

        public boolean isLEOrdered(IExpr obj)
        Compares this expression with the specified expression for order. Returns true if this expression is canonical less than or equal to the specified expression (<= relation).
        Specified by:
        isLEOrdered in interface IExpr
        Returns:
        true if this expression is canonical less than or equal to the specified expression.
      • isGTOrdered

        public boolean isGTOrdered(IExpr obj)
        Compares this expression with the specified expression for order. Returns true if this expression is canonical greater than the specified expression (< relation).
        Specified by:
        isGTOrdered in interface IExpr
        Parameters:
        obj - an expression to compare with
        Returns:
        true if this expression is canonical greater than the specified expression.
      • isGEOrdered

        public boolean isGEOrdered(IExpr obj)
        Compares this expression with the specified expression for order. Returns true if this expression is canonical greater than or equal to the specified expression (<= relation).
        Specified by:
        isGEOrdered in interface IExpr
        Returns:
        true if this expression is canonical greater than or equal to the specified expression.
      • isAtom

        public boolean isAtom()
        Description copied from interface: IExpr
        Test if this expression is an atomic expression (i.e. no AST expression)
        Specified by:
        isAtom in interface IExpr
      • variables2Slots

        public IExpr variables2Slots(Map<IExpr,IExpr> map,                    List<IExpr> variableList)
        Description copied from interface: IExpr
        Convert the variables (i.e. ISymbol\'s with lower case character in the 0-th position of their name) in this expression into Slot[] s.
        Specified by:
        variables2Slots in interface IExpr
        Returns:
        null if the expression contains a variable with a \'$\' character in the 0-th position of its name and the math engine runs in server mode.
      • fullFormString

        public String fullFormString()
        Description copied from interface: IExpr
        Return the FullForm of this expression
        Specified by:
        fullFormString in interface IExpr
      • internalFormString

        public String internalFormString(boolean symbolsAsFactoryMethod,                        int depth)
        Description copied from interface: IExpr
        Return the internal Java form of this expression.
        Specified by:
        internalFormString in interface IExpr
        Parameters:
        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".
      • leaves

        public List<IExpr> leaves()
        Specified by:
        leaves in interface IExpr
        Returns:
        a list of the the leaf expressions. Instances of ExprImpl should return null, while any other expression may not return null (but can return an empty list).
      • apply

        public IExpr apply(List<? extends IExpr> leaves)
        Specified by:
        apply in interface IExpr
        Returns:
        an IExpr instance with the current expression as head(), and leaves as leaves().
      • apply

        public IExpr apply(IExpr... leaves)
        Specified by:
        apply in interface IExpr
        Returns:
        an IExpr instance with the current expression as head(), and leaves as leaves().
      • replaceAll

        public IExpr replaceAll(IAST astRules)
        Replace all (sub-) expressions with the given rule set. If no substitution matches, the method returns null.
        Specified by:
        replaceAll in interface IExpr
        Parameters:
        astRules - rules of the form x->y or {a->b, c->d}; the left-hand-side of the rule can contain pattern objects.
        Returns:
        null if no substitution of a (sub-)expression was possible.
      • replaceAll

        public IExpr replaceAll(Function<IExpr,IExpr> function)
        Replace all (sub-) expressions with the given unary function. If no substitution matches, the method returns null.
        Specified by:
        replaceAll in interface IExpr
        Parameters:
        function - if the unary functions apply() method returns null the expression isn\'t substituted.
        Returns:
        null if no substitution of a (sub-)expression was possible.
      • replaceRepeated

        public IExpr replaceRepeated(IAST astRules)
        Repeatedly replace all (sub-) expressions with the given rule set. If no substitution matches, the method returns this.
        Specified by:
        replaceRepeated in interface IExpr
        Parameters:
        astRules - rules of the form x->y or {a->b, c->d}; the left-hand-side of the rule can contain pattern objects.
        Returns:
        this if no substitution of a (sub-)expression was possible.
      • replaceRepeated

        public IExpr replaceRepeated(Function<IExpr,IExpr> function)
        Repeatedly replace all (sub-) expressions with the given unary function. If no substitution matches, the method returns this.
        Specified by:
        replaceRepeated in interface IExpr
        Parameters:
        function - if the unary functions apply() method returns null the expression isn\'t substituted.
        Returns:
        this if no substitution of a (sub-)expression was possible.
      • egcd

        public IExpr[] egcd(IExpr b)
        Description copied from interface: RingElem
        Extended greatest common divisor.
        Specified by:
        egcd in interface RingElem<IExpr>
        Parameters:
        b - other element.
        Returns:
        [ gcd(this,b), c1, c2 ] with c1*this + c2*b = gcd(this,b).
      • evaluate

        public IExpr evaluate(EvalEngine engine)
        Description copied from interface: IExpr
        Evaluate an expression
        Specified by:
        evaluate in interface IExpr
        Parameters:
        engine - the evaluation engine
        Returns:
        the evaluated Object or null if the evaluation is not possible (i.e. the evaluation doesn\'t change the object).
      • gcd

        public IExpr gcd(IExpr b)
        Description copied from interface: RingElem
        Greatest common divisor.
        Specified by:
        gcd in interface RingElem<IExpr>
        Parameters:
        b - other element.
        Returns:
        gcd(this,b).
      • signum

        @Deprecatedpublic int signum()
        Deprecated. 
        Signum functionality is used in JAS toString() method, don\'t use it as math signum function.
        Specified by:
        signum in interface AbelianGroupElem<IExpr>
        Specified by:
        signum in interface IExpr
        Returns:
        the sign of this.
      • toScript

        public String toScript()
        Description copied from interface: Element
        Get a scripting compatible string representation.
        Specified by:
        toScript in interface Element<IExpr>
        Returns:
        script compatible representation for this Element.
      • toScriptFactory

        public String toScriptFactory()
        Description copied from interface: Element
        Get a scripting compatible string representation of the factory.
        Specified by:
        toScriptFactory in interface Element<IExpr>
        Returns:
        script compatible representation for this ElemFactory.
      • isONE

        public boolean isONE()
        Description copied from interface: MonoidElem
        Test if this is one.
        Specified by:
        isONE in interface MonoidElem<IExpr>
        Returns:
        true if this is 1, else false.
      • isUnit

        public boolean isUnit()
        Description copied from interface: MonoidElem
        Test if this is a unit. I.e. there exists x with this.multiply(x).isONE() == true.
        Specified by:
        isUnit in interface MonoidElem<IExpr>
        Returns:
        true if this is a unit, else false.
      • copy

        public IExpr copy()
        Description copied from interface: Element
        Clone this Element.
        Specified by:
        copy in interface Element<IExpr>
        Returns:
        Creates and returns a copy of this Element.

SCaVis 2.1 © jWork.ORG