ComplexSym
org.matheclipse.core.expression

Class ComplexSym

    • Field Detail

      • ZERO

        public static final ComplexSym ZERO
        Holds the factory constructing complex instances.
    • Method Detail

      • valueOf

        public static ComplexSym valueOf(long real_numerator,                 long real_denominator,                 long imag_numerator,                 long imag_denominator)
      • eabs

        public IExpr eabs()
        Description copied from interface: INumber
        Get the absolute value for a given number
        Specified by:
        eabs in interface INumber
        Returns:
      • equals

        public boolean equals(Object obj)
        Description copied from interface: Element
        Test if this is equal to b.
        Specified by:
        equals in interface Element<IExpr>
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to b, else false.
      • evaluate

        public IExpr evaluate(EvalEngine engine)
        Evaluate an expression
        Specified by:
        evaluate in interface IExpr
        Overrides:
        evaluate in class ExprImpl
        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).
      • numericNumber

        public final INumber numericNumber()
        Description copied from interface: IBigNumber
        Create a numeric number from this exact "symbolic" number.
        Specified by:
        numericNumber in interface IBigNumber
        Returns:
      • getImaginaryPart

        public BigFraction getImaginaryPart()
        Returns the imaginary part of a complex number
        Specified by:
        getImaginaryPart in interface IComplex
        Returns:
        imaginary part
      • getIm

        public ISignedNumber getIm()
        Description copied from interface: INumber
        Returns the imaginary part of a complex number
        Specified by:
        getIm in interface INumber
        Returns:
        real part
      • getRealPart

        public BigFraction getRealPart()
        Returns the real part of a complex number
        Specified by:
        getRealPart in interface IComplex
        Returns:
        real part
      • getRe

        public ISignedNumber getRe()
        Description copied from interface: INumber
        Returns the real part of a complex number
        Specified by:
        getRe in interface INumber
        Returns:
        real part
      • hashCode

        public final int hashCode()
        Description copied from interface: Element
        Hashcode of this Element.
        Specified by:
        hashCode in interface Element<IExpr>
        Overrides:
        hashCode in class Object
        Returns:
        the hashCode.
      • hierarchy

        public int hierarchy()
        Description copied from interface: IExpr
        A unique integer ID for the implementation of this expression
        Specified by:
        hierarchy in interface IExpr
        Returns:
        a unique integer id for the implementation of this expression
      • 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
        Overrides:
        isZero in class ExprImpl
      • 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
        Overrides:
        times in class ExprImpl
        Parameters:
        that - the object multiplier.
        Returns:
        this \xc2\xb7 that.
      • 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
        Overrides:
        inverse in class ExprImpl
        Returns:
        ONE / this.
      • 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
        Overrides:
        internalFormString in class ExprImpl
        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".
      • normalize

        public INumber normalize()
        Description copied from interface: IComplex
        Return the normalized form of this number (i.e. if the imaginary part equals zero, return the real part as a fractional or integer number).
        Specified by:
        normalize in interface IComplex
        Returns:
      • complexSign

        public int complexSign()
        Description copied from interface: INumber
        Gets the signum value of a complex number
        Specified by:
        complexSign in interface INumber
        Returns:
        0 for this == 0; +1 for real(this) > 0 or ( real(this)==0 && imaginary(this) > 0 ); -1 for real(this) < 0 || ( real(this) == 0 && imaginary(this) < 0 )
      • main

        public static void main(String[] args)
      • compareTo

        public int compareTo(IExpr obj)
        Compares this expression with the specified expression for order. Returns a negative integer, zero, or a positive integer as this expression is canonical less than, equal to, or greater than the specified expression.
        Specified by:
        compareTo in interface Element<IExpr>
        Specified by:
        compareTo in interface Comparable<IExpr>
        Specified by:
        compareTo in interface IExpr
        Returns:
        0 if this is equal to b, -1 if this is less then b, else +1.
      • head

        public 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
        Specified by:
        head in class ExprImpl
        Returns:
        the head of the expression, which must not be null.
      • accept

        public <T> T accept(IVisitor<T> visitor)
        Accept a visitor with return type T
        Specified by:
        accept in interface IExpr
      • accept

        public boolean accept(IVisitorBoolean visitor)
        Accept a visitor with return type boolean
        Specified by:
        accept in interface IExpr
      • accept

        public int accept(IVisitorInt visitor)
        Accept a visitor with return type int
        Specified by:
        accept in interface IExpr
        Returns:
      • equalsInt

        public boolean equalsInt(int i)
        Description copied from interface: INumber
        Is this number equal an integer number?
        Specified by:
        equalsInt in interface INumber
        Returns:

SCaVis 1.8 © jWork.org