java.lang.Object
coneforest.psylla.core.PsyComplex
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyAtomic
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
The representation of
complex
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PsyComplex
static final PsyComplex
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_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 anumeric
absolute value of this object.psyAcos()
Returns anumeric
representing the arc cosine of this object.psyAdd
(PsyNumeric oNumeric) Returns anadditive
representing the result of arithmetic addition of given object to this object.psyArg()
Returns areal
representing the complex argument of this object.psyAsin()
Returns anumeric
representing the arc sine of this object.psyAtan()
Returns anumeric
representing the arc tangent of this object.psyCbrt()
Returns anumeric
representing the cubic root of this object.Returns acomplex
representing the complex conjugate of this object.psyCos()
Returns anumeric
representing the cosine of this object.psyCosh()
Returns anumeric
representing the hyperbolic cosine of this object.psyDiv
(PsyNumeric oNumeric) Returns a result of arithmetic division of this object by given object.psyExp()
Returns anumeric
representing the 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 anumeric
representing the natural logarithm of this object.psyMul
(PsyNumeric oNumeric) Returns a result of arithmetic multiplication of given object by this object.psyNeg()
Returns anadditive
representing the result of arithmetic negation of this object.psyPow
(PsyNumeric oNumeric) Returns areal
real part of this object.Returns the signum of this object.psySin()
Returns anumeric
representing the sine of this object.psySinh()
Returns anumeric
representing the hyperbolic sine of this object.psySqrt()
Returns anumeric
representing the square root of this object.psySub
(PsyNumeric oNumeric) Returns anadditive
representing the result of arithmetic subtraction of given object from this object.psyTan()
Returns anumeric
representing the tangent of this object.psyTanh()
Returns anumeric
representing the hyperbolic tangent of this object.double
Returns the real part 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
-
MINUS_I
-
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 anumeric
absolute value of this object.- Specified by:
psyAbs
in interfacePsyNumeric
- Returns:
- a
numeric
absolute value.
-
psySignum
Description copied from interface:PsyNumeric
Returns the signum of this object.- Specified by:
psySignum
in interfacePsyNumeric
- Returns:
- the
numeric
signum of this object.
-
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyObject
-
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 anadditive
representing the result of arithmetic negation of this object.- Specified by:
psyNeg
in interfacePsyAdditive<PsyNumeric>
- Returns:
- a negation.
-
psyAdd
Description copied from interface:PsyAdditive
Returns anadditive
representing the result of arithmetic addition of given object to this object.- Specified by:
psyAdd
in interfacePsyAdditive<PsyNumeric>
- Parameters:
oNumeric
- given object.- Returns:
- a sum.
-
psySub
Description copied from interface:PsyAdditive
Returns anadditive
representing the result of arithmetic subtraction of given object from this object.- Specified by:
psySub
in interfacePsyAdditive<PsyNumeric>
- Parameters:
oNumeric
- given 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 anumeric
representing the exponent of this object.- Specified by:
psyExp
in interfacePsyNumeric
- Returns:
- a
numeric
exponent.
-
psyCos
Description copied from interface:PsyNumeric
Returns anumeric
representing the cosine of this object.- Specified by:
psyCos
in interfacePsyNumeric
- Returns:
- a
numeric
cosine.
-
psySin
Description copied from interface:PsyNumeric
Returns anumeric
representing the sine of this object.- Specified by:
psySin
in interfacePsyNumeric
- Returns:
- a
numeric
sine.
-
psyLog
Description copied from interface:PsyNumeric
Returns anumeric
representing the natural logarithm of this object.- Specified by:
psyLog
in interfacePsyNumeric
- Returns:
- a
numeric
logarithm.
-
psyAcos
Description copied from interface:PsyNumeric
Returns anumeric
representing the arc cosine of this object.- Specified by:
psyAcos
in interfacePsyNumeric
- Returns:
- a
numeric
arc cosine.
-
psyAsin
Description copied from interface:PsyNumeric
Returns anumeric
representing the arc sine of this object.- Specified by:
psyAsin
in interfacePsyNumeric
- Returns:
- a
numeric
arc sine.
-
psyAtan
Description copied from interface:PsyNumeric
Returns anumeric
representing the arc tangent of this object.- Specified by:
psyAtan
in interfacePsyNumeric
- Returns:
- a
numeric
arc tangent.
-
psySqrt
Description copied from interface:PsyNumeric
Returns anumeric
representing the square root of this object.- Specified by:
psySqrt
in interfacePsyNumeric
- Returns:
- a
numeric
square root of this number.
-
psyCbrt
Description copied from interface:PsyNumeric
Returns anumeric
representing the cubic root of this object.- Specified by:
psyCbrt
in interfacePsyNumeric
- Returns:
- a
numeric
cubic root of this number.
-
psyCosh
Description copied from interface:PsyNumeric
Returns anumeric
representing the hyperbolic cosine of this object.- Specified by:
psyCosh
in interfacePsyNumeric
- Returns:
- a
numeric
hyperbolic cosine of this number.
-
psyTan
Description copied from interface:PsyNumeric
Returns anumeric
representing the tangent of this object.- Specified by:
psyTan
in interfacePsyNumeric
- Returns:
- a
numeric
tangent.
-
psySinh
Description copied from interface:PsyNumeric
Returns anumeric
representing the hyperbolic sine of this object.- Specified by:
psySinh
in interfacePsyNumeric
- Returns:
- a
numeric
hyperbolic sine of this number.
-
psyTanh
Description copied from interface:PsyNumeric
Returns anumeric
representing the hyperbolic tangent of this object.- Specified by:
psyTanh
in interfacePsyNumeric
- Returns:
- a
numeric
hyperbolic tangent of this number.
-
psyFromPolar
-
psyFromPolar
-