java.lang.Object
coneforest.psylla.core.PsyComplex
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyAtomic
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
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_TONAME, PSY_TOSTRING, PSY_TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionPsyComplex
(double re) PsyComplex
(double re, double im) PsyComplex
(PsyRealNumeric oNumeric) PsyComplex
(PsyRealNumeric oRealPart, PsyRealNumeric oImagPart) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the real part of this object.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
(double abs, double arg) static PsyComplex
psyFromPolar
(PsyRealNumeric oAbs, PsyRealNumeric oArg) Returns areal
imaginary part of this object.Returns aboolean
indicating whether this object represents a zero value.psyLog()
Returns thenumeric
natural logarithm of this object.psyMul
(PsyNumeric oNumeric) Returns a result of arithmetic multiplication of given object by this object.psyNeg()
Returns theadditive
result of arithmetic negation of this object.psyPow
(PsyNumeric oNumeric) Returns areal
real part 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
psyNonZero
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
-
Field Details
-
I
Imaginary unit. -
MINUS_I
Munus imaginary unit. -
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.
-
-
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.
-
imagValue
public double imagValue()Description copied from interface:PsyNumeric
Returns the real part of this object.- Specified by:
imagValue
in interfacePsyNumeric
- Returns:
- the imaginary part.
-
psyIsZero
Description copied from interface:PsyAdditive
Returns aboolean
indicating whether this object represents a zero value.- Specified by:
psyIsZero
in interfacePsyAdditive<PsyNumeric>
- Returns:
- a
boolean
indicating whether this object represents a zero value.
-
psyAbs
Description copied from interface:PsyNumeric
Returns thenumeric
absolute value of this object.- Specified by:
psyAbs
in interfacePsyNumeric
- Returns:
- the
numeric
absolute value.
-
psySignum
Description copied from interface:PsyNumeric
Returns thenumeric
signum of this object.- Specified by:
psySignum
in interfacePsyNumeric
- Returns:
- the
numeric
signum.
-
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.
-
psyImagPart
Returns areal
imaginary part of this object.- Returns:
- a
real
imaginary part.
-
psyArg
Returns areal
representing the complex argument of this object. The argument belongs to the range (−π; π].- Returns:
- a
real
argument.
-
psyConjugate
Returns acomplex
representing the complex conjugate of this object.- Returns:
- a
complex
conjugate of this number.
-
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.
-
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 sum.
-
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:
- a difference.
-
psyReciprocal
- Specified by:
psyReciprocal
in interfacePsyMultiplicative<PsyNumeric>
-
psyMul
Description copied from interface:PsyMultiplicative
Returns a result of arithmetic multiplication of given object by this object.- Specified by:
psyMul
in interfacePsyMultiplicative<PsyNumeric>
- Parameters:
oNumeric
- a given object.- Returns:
- a product.
-
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 fraction.
-
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.
-
psyCos
Description copied from interface:PsyNumeric
Returns thenumeric
cosine of this object.- Specified by:
psyCos
in interfacePsyNumeric
- Returns:
- the
numeric
cosine.
-
psySin
Description copied from interface:PsyNumeric
Returns thenumeric
sine of this object.- Specified by:
psySin
in interfacePsyNumeric
- Returns:
- the
numeric
sine.
-
psyLog
Description copied from interface:PsyNumeric
Returns thenumeric
natural logarithm of this object.- Specified by:
psyLog
in interfacePsyNumeric
- Returns:
- the
numeric
natural logarithm.
-
psyAcos
Description copied from interface:PsyNumeric
Returns thenumeric
arc cosine of this object.- Specified by:
psyAcos
in interfacePsyNumeric
- Returns:
- the
numeric
arc cosine.
-
psyAsin
Description copied from interface:PsyNumeric
Returns thenumeric
arc sine of this object.- Specified by:
psyAsin
in interfacePsyNumeric
- Returns:
- the
numeric
arc sine.
-
psyAtan
Description copied from interface:PsyNumeric
Returns thenumeric
arc tangent of this object.- Specified by:
psyAtan
in interfacePsyNumeric
- Returns:
- the
numeric
arc tangent.
-
psySqrt
Description copied from interface:PsyNumeric
Returns thenumeric
square root of this object.- Specified by:
psySqrt
in interfacePsyNumeric
- Returns:
- the
numeric
square root.
-
psyCbrt
Description copied from interface:PsyNumeric
Returns thenumeric
cubic root of this object.- Specified by:
psyCbrt
in interfacePsyNumeric
- Returns:
- the
numeric
cubic root.
-
psyCosh
Description copied from interface:PsyNumeric
Returns thenumeric
hyperbolic cosine of this object.- Specified by:
psyCosh
in interfacePsyNumeric
- Returns:
- the
numeric
hyperbolic cosine.
-
psyTan
Description copied from interface:PsyNumeric
Returns thenumeric
tangent of this object.- Specified by:
psyTan
in interfacePsyNumeric
- Returns:
- the
numeric
tangent.
-
psySinh
Description copied from interface:PsyNumeric
Returns thenumeric
hyperbolic sine of this object.- Specified by:
psySinh
in interfacePsyNumeric
- Returns:
- the
numeric
hyperbolic sine.
-
psyTanh
Description copied from interface:PsyNumeric
Returns thenumeric
hyperbolic tangent of this object.- Specified by:
psyTanh
in interfacePsyNumeric
- Returns:
- the
numeric
hyperbolic tangent.
-
psyFromPolar
-
psyFromPolar
-