Class Complex¶
Defined in File complex.h
Inheritance Relationships¶
Base Type¶
public SymEngine::ComplexBase
(Class ComplexBase)
Class Documentation¶
-
class
SymEngine
::
Complex
: public SymEngine::ComplexBase¶ Complex Class.
Public Functions
-
Complex
(rational_class real, rational_class imaginary)¶ Constructor of Complex class.
-
bool
is_canonical
(const rational_class &real, const rational_class &imaginary) const¶ - Return
true if canonical
-
bool
__eq__
(const Basic &o) const¶ Equality comparator
- Return
whether the 2 objects are equal
- Parameters
o
: - Object to be compared with
-
int
compare
(const Basic &o) const¶ Returns -1, 0, 1 for
this < o, this == o, this > o
. This method is used when you want to sort things likex+y+z
into canonical order. This function assumes thato
is the same type asthis
. Use__cmp__
if you want general comparison.
-
bool
is_positive
() const¶ - Return
false
-
bool
is_negative
() const¶ - Return
false
-
bool
is_complex
() const¶ - Return
true
-
bool
is_zero
() const¶ - Return
false
sinceimaginary_
cannot be zero
-
bool
is_one
() const¶ - Return
false
sinceimaginary_
cannot be zero
-
bool
is_minus_one
() const¶ - Return
false
sinceimaginary_
cannot be zero
-
RCP<const Number>
subcomp
(const Complex &other) const¶ Subtract Complex
- Parameters
other
: of type Complex
-
RCP<const Number>
subcomp
(const Rational &other) const¶ Subtract Complex
- Parameters
other
: of type Rational
-
RCP<const Number>
subcomp
(const Integer &other) const¶ Subtract Complex
- Parameters
other
: of type Integer
-
RCP<const Number>
rsubcomp
(const Complex &other) const¶ Subtract Complex from other
- Parameters
other
: of type Complex
-
RCP<const Number>
rsubcomp
(const Rational &other) const¶ Subtract Complex from other
- Parameters
other
: of type Rational
-
RCP<const Number>
rsubcomp
(const Integer &other) const¶ Subtract Complex from other
- Parameters
other
: of type Integer
-
RCP<const Number>
mulcomp
(const Complex &other) const¶ Multiply Complex
- Parameters
other
: of type Complex
-
RCP<const Number>
mulcomp
(const Rational &other) const¶ Multiply Complex
- Parameters
other
: of type Rational
-
RCP<const Number>
mulcomp
(const Integer &other) const¶ Multiply Complex
- Parameters
other
: of type Integer
-
RCP<const Number>
divcomp
(const Complex &other) const¶ Divide Complex
- Parameters
other
: of type Complex
-
RCP<const Number>
divcomp
(const Rational &other) const¶ Divide Complex
- Parameters
other
: of type Rational
-
RCP<const Number>
divcomp
(const Integer &other) const¶ Divide Complex
- Parameters
other
: of type Integer
-
RCP<const Number>
rdivcomp
(const Integer &other) const¶ Divide other by the Complex
- Parameters
other
: of type Integer
-
RCP<const Number>
add
(const Number &other) const¶ Converts the param
other
appropriately and then callsaddcomp
-
RCP<const Number>
sub
(const Number &other) const¶ Converts the param
other
appropriately and then callssubcomp
-
RCP<const Number>
rsub
(const Number &other) const¶ Converts the param
other
appropriately and then callsrsubcomp
-
RCP<const Number>
mul
(const Number &other) const¶ Converts the param
other
appropriately and then callsmulcomp
-
RCP<const Number>
div
(const Number &other) const¶ Converts the param
other
appropriately and then callsdivcomp
-
RCP<const Number>
rdiv
(const Number &other) const¶ Converts the param
other
appropriately and then callsrdivcomp
Public Members
-
rational_class
real_
¶ real_
: Real part of the complex Numberimaginary_
: Imaginary part of the complex Number
-
rational_class
imaginary_
¶
Public Static Functions
-
RCP<const Number>
from_mpq
(const rational_class re, const rational_class im)¶ Creates an instance of Complex if imaginary part is non-zero
-