java.lang.Object
coneforest.psylla.core.PsyComplex
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
,PsyValue
The representation of
complex
, a complex number.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PsyComplex
Imaginary unit.static final PsyComplex
Munus imaginary unit.static final ContextAction
Context action of thearg
operator.static final ContextAction
Context action of thecomplex
operator.static final ContextAction
Context action of thecomplexpolar
operator.static final ContextAction
Context action of theconjugate
operator.static final ContextAction
Context action of theimagpart
operator.static final ContextAction
Context action of therealpart
operator.Fields inherited from interface coneforest.psylla.core.PsyAdditive
PSY_ADD, PSY_ISZERO, PSY_NEG, PSY_NONZERO, PSY_SUB
Fields inherited from interface coneforest.psylla.core.PsyMultiplicative
PSY_DIV, PSY_MUL, PSY_RECIPROCAL
Fields inherited from interface coneforest.psylla.core.PsyNumeric
PSY_ABS, PSY_ACOS, PSY_ASIN, PSY_ATAN, PSY_CBRT, PSY_COS, PSY_COSH, PSY_EXP, PSY_LOG, PSY_POW, PSY_SIGNUM, PSY_SIN, PSY_SINH, PSY_SQRT, PSY_TAN, PSY_TANH
Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionPsyComplex
(double re) PsyComplex
(double re, double im) PsyComplex
(PsyRealNumeric oNumeric) PsyComplex
(PsyRealNumeric oRealPart, PsyRealNumeric oImagPart) -
Method Summary
Modifier and TypeMethodDescriptionstatic PsyComplex
fromPolar
(double abs, double arg) double
Returns the imaginary part of this object.boolean
isZero()
psyAbs()
Returns thenumeric
absolute value of this object.psyAcos()
Returns thenumeric
arc cosine of this object.psyAdd
(PsyNumeric oNumeric) Returns theadditive
result of arithmetic addition of specified object to this object.psyArg()
Returns areal
representing the complex argument of this object.psyAsin()
Returns thenumeric
arc sine of this object.psyAtan()
Returns thenumeric
arc tangent of this object.psyCbrt()
Returns thenumeric
cubic root of this object.Returns acomplex
representing the complex conjugate of this object.psyCos()
Returns thenumeric
cosine of this object.psyCosh()
Returns thenumeric
hyperbolic cosine of this object.psyDiv
(PsyNumeric oNumeric) Returns a result of arithmetic division of this object by given object.psyExp()
Returns thenumeric
exponent of this object.static PsyComplex
psyFromPolar
(PsyRealNumeric oAbs, PsyRealNumeric oArg) Returns areal
imaginary part of this object.psyLog()
Returns thenumeric
natural logarithm of this object.psyMul
(PsyNumeric oNumeric) Returns a result of arithmetic multiplication of this number by given object.psyNeg()
Returns theadditive
result of arithmetic negation of this object.psyPow
(PsyNumeric oNumeric) Returns areal
real part of this object.Returns the multiplicative inverse of this object.Returns thenumeric
signum of this object.psySin()
Returns thenumeric
sine of this object.psySinh()
Returns thenumeric
hyperbolic sine of this object.psySqrt()
Returns thenumeric
square root of this object.psySub
(PsyNumeric oNumeric) Returns theadditive
result of arithmetic subtraction of specified object from this object.psyTan()
Returns thenumeric
tangent of this object.psyTanh()
Returns thenumeric
hyperbolic tangent of this object.double
Returns the real part of this object.Returns the syntactic representation of this object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface coneforest.psylla.core.PsyAdditive
psyIsZero, psyNonZero
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
-
Field Details
-
PSY_ARG
Context action of thearg
operator. -
PSY_COMPLEX
Context action of thecomplex
operator. -
PSY_COMPLEXPOLAR
Context action of thecomplexpolar
operator. -
PSY_CONJUGATE
Context action of theconjugate
operator. -
PSY_IMAGPART
Context action of theimagpart
operator. -
PSY_REALPART
Context action of therealpart
operator. -
I
Imaginary unit. -
MINUS_I
Munus imaginary unit.
-
-
Constructor Details
-
PsyComplex
public PsyComplex(double re, double im) -
PsyComplex
public PsyComplex(double re) -
PsyComplex
-
PsyComplex
-
-
Method Details
-
realValue
public double realValue()Description copied from interface:PsyNumeric
Returns the real part of this object.- Specified by:
realValue
in interfacePsyNumeric
- Returns:
- the real part of this object
-
imagValue
public double imagValue()Description copied from interface:PsyNumeric
Returns the imaginary part of this object.- Specified by:
imagValue
in interfacePsyNumeric
- Returns:
- the imaginary part of this object
-
isZero
public boolean isZero()- Specified by:
isZero
in interfacePsyAdditive<PsyNumeric>
-
psyAbs
Description copied from interface:PsyNumeric
Returns thenumeric
absolute value of this object.- Specified by:
psyAbs
in interfacePsyNumeric
- Returns:
- the
numeric
absolute value of this object
-
psySignum
Description copied from interface:PsyNumeric
Returns thenumeric
signum of this object.- Specified by:
psySignum
in interfacePsyNumeric
- Returns:
- the
numeric
signum of this object
-
toSyntaxString
Description copied from interface:PsyObject
Returns the syntactic representation of this object.- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- the syntactic representation of this object
-
psyRealPart
Returns areal
real part of this object.- Returns:
- a
real
real part of this object
-
psyImagPart
Returns areal
imaginary part of this object.- Returns:
- a
real
imaginary part of this object
-
psyArg
Returns areal
representing the complex argument of this object. The argument belongs to the range (−π; π].- Returns:
- a
real
representing the complex argument of this object
-
psyConjugate
Returns acomplex
representing the complex conjugate of this object.- Returns:
- a
complex
representing the complex conjugate of this object
-
psyNeg
Description copied from interface:PsyAdditive
Returns theadditive
result of arithmetic negation of this object.- Specified by:
psyNeg
in interfacePsyAdditive<PsyNumeric>
- Returns:
- the
additive
result of arithmetic negation of this object
-
psyAdd
Description copied from interface:PsyAdditive
Returns theadditive
result of arithmetic addition of specified object to this object.- Specified by:
psyAdd
in interfacePsyAdditive<PsyNumeric>
- Parameters:
oNumeric
- the specified object.- Returns:
- the
additive
result of arithmetic addition of specified object to this object
-
psySub
Description copied from interface:PsyAdditive
Returns theadditive
result of arithmetic subtraction of specified object from this object.- Specified by:
psySub
in interfacePsyAdditive<PsyNumeric>
- Parameters:
oNumeric
- the specified object.- Returns:
- the
additive
result of arithmetic subtraction of specified object from this object
-
psyReciprocal
Description copied from interface:PsyMultiplicative
Returns the multiplicative inverse of this object.- Specified by:
psyReciprocal
in interfacePsyMultiplicative<PsyNumeric>
- Returns:
- the multiplicative inverse of this object
-
psyMul
Description copied from interface:PsyMultiplicative
Returns a result of arithmetic multiplication of this number by given object.- Specified by:
psyMul
in interfacePsyMultiplicative<PsyNumeric>
- Parameters:
oNumeric
- a given number.- Returns:
- a result of arithmetic multiplication of this number by given object
-
psyDiv
Description copied from interface:PsyMultiplicative
Returns a result of arithmetic division of this object by given object.- Specified by:
psyDiv
in interfacePsyMultiplicative<PsyNumeric>
- Parameters:
oNumeric
- a given object.- Returns:
- a result of arithmetic division of this object by given object
-
psyPow
- Specified by:
psyPow
in interfacePsyNumeric
-
psyExp
Description copied from interface:PsyNumeric
Returns thenumeric
exponent of this object.- Specified by:
psyExp
in interfacePsyNumeric
- Returns:
- the
numeric
exponent of this object
-
psyCos
Description copied from interface:PsyNumeric
Returns thenumeric
cosine of this object.- Specified by:
psyCos
in interfacePsyNumeric
- Returns:
- the
numeric
cosine of this object
-
psySin
Description copied from interface:PsyNumeric
Returns thenumeric
sine of this object.- Specified by:
psySin
in interfacePsyNumeric
- Returns:
- the
numeric
sine of this object
-
psyLog
Description copied from interface:PsyNumeric
Returns thenumeric
natural logarithm of this object.- Specified by:
psyLog
in interfacePsyNumeric
- Returns:
- the
numeric
natural logarithm of this object
-
psyAcos
Description copied from interface:PsyNumeric
Returns thenumeric
arc cosine of this object.- Specified by:
psyAcos
in interfacePsyNumeric
- Returns:
- the
numeric
arc cosine of this object
-
psyAsin
Description copied from interface:PsyNumeric
Returns thenumeric
arc sine of this object.- Specified by:
psyAsin
in interfacePsyNumeric
- Returns:
- the
numeric
arc sine of this object
-
psyAtan
Description copied from interface:PsyNumeric
Returns thenumeric
arc tangent of this object.- Specified by:
psyAtan
in interfacePsyNumeric
- Returns:
- the
numeric
arc tangent of this object
-
psySqrt
Description copied from interface:PsyNumeric
Returns thenumeric
square root of this object.- Specified by:
psySqrt
in interfacePsyNumeric
- Returns:
- the
numeric
square root of this object
-
psyCbrt
Description copied from interface:PsyNumeric
Returns thenumeric
cubic root of this object.- Specified by:
psyCbrt
in interfacePsyNumeric
- Returns:
- the
numeric
cubic root of this object
-
psyCosh
Description copied from interface:PsyNumeric
Returns thenumeric
hyperbolic cosine of this object.- Specified by:
psyCosh
in interfacePsyNumeric
- Returns:
- the
numeric
hyperbolic cosine of this object
-
psyTan
Description copied from interface:PsyNumeric
Returns thenumeric
tangent of this object.- Specified by:
psyTan
in interfacePsyNumeric
- Returns:
- the
numeric
tangent of this object
-
psySinh
Description copied from interface:PsyNumeric
Returns thenumeric
hyperbolic sine of this object.- Specified by:
psySinh
in interfacePsyNumeric
- Returns:
- the
numeric
hyperbolic sine of this object
-
psyTanh
Description copied from interface:PsyNumeric
Returns thenumeric
hyperbolic tangent of this object.- Specified by:
psyTanh
in interfacePsyNumeric
- Returns:
- the
numeric
hyperbolic tangent of this object
-
psyFromPolar
-
fromPolar
-