org.matheclipse.core.expression
Class ComplexSym
- java.lang.Object
-
- org.matheclipse.core.expression.ExprImpl
-
- org.matheclipse.core.expression.ComplexSym
-
- All Implemented Interfaces:
- AbelianGroupElem<IExpr>, Element<IExpr>, MonoidElem<IExpr>, RingElem<IExpr>, java.io.Serializable, java.lang.Comparable<IExpr>, IBigNumber, IComplex, IExpr, INumber
public class ComplexSym extends ExprImpl implements IComplex
A concrete complex implementation- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static ComplexSymZEROHolds the factory constructing complex instances.-
Fields inherited from interface org.matheclipse.core.interfaces.IExpr
ASTID, COMPLEXID, DOUBLECOMPLEXID, DOUBLEID, FRACTIONID, INTEGERID, METHODSYMBOLID, PATTERNID, STRINGID, SYMBOLID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description <T> Taccept(IVisitor<T> visitor)Accept a visitor with return type Tbooleanaccept(IVisitorBoolean visitor)Accept a visitor with return typebooleanintaccept(IVisitorInt visitor)Accept a visitor with return typeintComplexSymadd(ComplexSym parm1)IComplexadd(IComplex parm1)intcompareTo(IExpr obj)Compares this expression with the specified expression for order.intcomplexSign()Gets the signum value of a complex numberIComplexconjugate()IExpreabs()Get the absolute value for a given numberbooleanequals(java.lang.Object obj)Test if this is equal to b.booleanequalsInt(int i)Is this number equal an integer number?IExprevaluate(EvalEngine engine)Evaluate an expressionjava.lang.StringfullFormString()Return the FullForm of this expressionISignedNumbergetIm()Returns the imaginary part of a complex numberBigFractiongetImaginaryPart()Returns the imaginary part of a complex numberISignedNumbergetRe()Returns the real part of a complex numberBigFractiongetRealPart()Returns the real part of a complex numberinthashCode()Hashcode of this Element.ISymbolhead()If this object is an instance ofIASTget the first element (offset 0) of theIASTlist (i.e.inthierarchy()A unique integer ID for the implementation of this expressionjava.lang.StringinternalFormString(boolean symbolsAsFactoryMethod, int depth)Return the internal Java form of this expression.IExprinverse()Returns the multiplicative inverse of this object.booleanisZero()Test if this expression equals0in symbolic or numeric mode.static voidmain(java.lang.String[] args)IComplexmultiply(IComplex parm1)INumbernormalize()Return the normalized form of this number (i.e.INumbernumericNumber()Create a numeric number from this exact "symbolic" number.INumberopposite()IExprplus(IExpr that)IComplexpow(int parm1)IExprtimes(IExpr that)Returns the product of this object with the one specified.java.lang.StringtoString()static ComplexSymvalueOf(BigFraction real)static ComplexSymvalueOf(BigFraction real, BigFraction imaginary)static ComplexSymvalueOf(java.math.BigInteger real)static ComplexSymvalueOf(java.math.BigInteger real, java.math.BigInteger imaginary)static ComplexSymvalueOf(IFraction real)static ComplexSymvalueOf(IFraction real, IFraction imaginary)static ComplexSymvalueOf(IInteger real)static ComplexSymvalueOf(IInteger real, IInteger imaginary)static ComplexSymvalueOf(long real_numerator, long real_denominator, long imag_numerator, long imag_denominator)-
Methods inherited from class org.matheclipse.core.expression.ExprImpl
abs, and, apply, apply, asType, copy, divide, egcd, factory, gcd, getAt, isAnd, isArcCos, isArcCosh, isArcSin, isArcSinh, isArcTan, isArcTanh, isAST, isAST, isAST, isAST, isAST, isAST, isASTSizeGE, isAtom, isComplex, isComplexInfinity, isComplexNumeric, isCondition, isConstant, isCos, isCosh, isDirectedInfinity, isFalse, isFlatAST, isFraction, isFree, isFree, isFunction, isGEOrdered, isGTOrdered, isInfinity, isInteger, isLEOrdered, isList, isListOfLists, isLog, isLTOrdered, isMatrix, isMember, isMember, isMinusOne, isModule, isNegative, isNegativeInfinity, isNot, isNumber, isNumEqualInteger, isNumeric, isNumericFunction, isNumIntValue, isOne, isONE, isOr, isOrderlessAST, isPattern, isPatternExpr, isPatternSequence, isPlus, isPositive, isPower, isRational, isRealFunction, isRuleAST, isSame, isSame, isSequence, isSignedNumber, isSin, isSinh, isSlot, isSlotSequence, isSymbol, isTan, isTanh, isTimes, isTrue, isUnit, isValue, isVector, isZERO, leaves, minus, mod, multiply, negate, negative, or, power, power, remainder, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceRepeated, replaceSlots, signum, subtract, sum, topHead, toScript, toScriptFactory, variables2Slots
-
Methods inherited from interface org.matheclipse.core.interfaces.IExpr
and, apply, apply, asType, getAt, isAnd, isArcCos, isArcCosh, isArcSin, isArcSinh, isArcTan, isArcTanh, isAST, isAST, isAST, isAST, isAST, isAST, isASTSizeGE, isAtom, isComplex, isComplexInfinity, isComplexNumeric, isCondition, isConstant, isCos, isCosh, isDirectedInfinity, isFalse, isFlatAST, isFraction, isFree, isFree, isFunction, isGEOrdered, isGTOrdered, isInfinity, isInteger, isLEOrdered, isList, isListOfLists, isLog, isLTOrdered, isMatrix, isMember, isMember, isMinusOne, isModule, isNegative, isNegativeInfinity, isNot, isNumber, isNumEqualInteger, isNumeric, isNumericFunction, isNumIntValue, isOne, isOr, isOrderlessAST, isPattern, isPatternExpr, isPatternSequence, isPlus, isPositive, isPower, isRational, isRealFunction, isRuleAST, isSame, isSame, isSequence, isSignedNumber, isSin, isSinh, isSlot, isSlotSequence, isSymbol, isTan, isTanh, isTimes, isTrue, isValue, isVector, leaves, minus, mod, multiply, negative, or, power, power, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceSlots, signum, topHead, variables2Slots
-
Methods inherited from interface edu.jas.structure.AbelianGroupElem
abs, isZERO, negate, subtract, sum
-
Methods inherited from interface edu.jas.structure.MonoidElem
divide, isONE, isUnit, remainder
-
Methods inherited from interface edu.jas.structure.Element
copy, factory, toScript, toScriptFactory
-
-
-
-
Field Detail
-
ZERO
public static final ComplexSym ZERO
Holds the factory constructing complex instances.
-
-
Method Detail
-
valueOf
public static ComplexSym valueOf(java.math.BigInteger real, java.math.BigInteger imaginary)
-
valueOf
public static ComplexSym valueOf(java.math.BigInteger real)
-
valueOf
public static ComplexSym valueOf(IInteger real, IInteger imaginary)
-
valueOf
public static ComplexSym valueOf(IInteger real)
-
valueOf
public static ComplexSym valueOf(BigFraction real)
-
valueOf
public static ComplexSym valueOf(BigFraction real, BigFraction imaginary)
-
valueOf
public static ComplexSym valueOf(long real_numerator, long real_denominator, long imag_numerator, long imag_denominator)
-
valueOf
public static ComplexSym valueOf(IFraction real)
-
valueOf
public static ComplexSym valueOf(IFraction real, IFraction imaginary)
-
eabs
public IExpr eabs()
Description copied from interface:INumberGet the absolute value for a given number
-
add
public ComplexSym add(ComplexSym parm1) throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:ElementTest if this is equal to b.
-
evaluate
public IExpr evaluate(EvalEngine engine)
Evaluate an expression
-
numericNumber
public final INumber numericNumber()
Description copied from interface:IBigNumberCreate a numeric number from this exact "symbolic" number.- Specified by:
numericNumberin interfaceIBigNumber- Returns:
-
getImaginaryPart
public BigFraction getImaginaryPart()
Returns the imaginary part of a complex number- Specified by:
getImaginaryPartin interfaceIComplex- Returns:
- imaginary part
-
getIm
public ISignedNumber getIm()
Description copied from interface:INumberReturns the imaginary part of a complex number
-
getRealPart
public BigFraction getRealPart()
Returns the real part of a complex number- Specified by:
getRealPartin interfaceIComplex- Returns:
- real part
-
getRe
public ISignedNumber getRe()
Description copied from interface:INumberReturns the real part of a complex number
-
hashCode
public final int hashCode()
Description copied from interface:ElementHashcode of this Element.
-
hierarchy
public int hierarchy()
Description copied from interface:IExprA unique integer ID for the implementation of this expression
-
isZero
public boolean isZero()
Description copied from interface:IExprTest if this expression equals0in symbolic or numeric mode.
-
opposite
public INumber opposite()
-
times
public IExpr times(IExpr that)
Description copied from interface:IExprReturns the product of this object with the one specified.
-
inverse
public IExpr inverse()
Description copied from interface:IExprReturns the multiplicative inverse of this object. It is the object such asthis.times(this.inverse()) == ONE, withONEbeing the multiplicative identity.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fullFormString
public java.lang.String fullFormString()
Description copied from interface:IExprReturn the FullForm of this expression- Specified by:
fullFormStringin interfaceIExpr- Overrides:
fullFormStringin classExprImpl
-
internalFormString
public java.lang.String internalFormString(boolean symbolsAsFactoryMethod, int depth)Description copied from interface:IExprReturn the internal Java form of this expression.- Specified by:
internalFormStringin interfaceIExpr- Overrides:
internalFormStringin classExprImpl- Parameters:
symbolsAsFactoryMethod- iftrueuse theF.symbol()method, otherwise print the symbol name.depth- the recursion depth of this call.0indicates "recurse without a limit".
-
normalize
public INumber normalize()
Description copied from interface:IComplexReturn the normalized form of this number (i.e. if the imaginary part equals zero, return the real part as a fractional or integer number).
-
complexSign
public int complexSign()
Description copied from interface:INumberGets the signum value of a complex number- Specified by:
complexSignin interfaceINumber- Returns:
- 0 for
this == 0; +1 forreal(this) > 0or( real(this)==0 && imaginary(this) > 0 ); -1 forreal(this) < 0 || ( real(this) == 0 && imaginary(this) < 0 )
-
main
public static void main(java.lang.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.
-
head
public ISymbol head()
Description copied from interface:IExprIf this object is an instance ofIASTget the first element (offset 0) of theIASTlist (i.e. get(0) ).
-
accept
public <T> T accept(IVisitor<T> visitor)
Accept a visitor with return type T
-
accept
public boolean accept(IVisitorBoolean visitor)
Accept a visitor with return typeboolean
-
accept
public int accept(IVisitorInt visitor)
Accept a visitor with return typeint
-
-
DMelt 3.0 © DataMelt by jWork.ORG