Class Integer¶
Defined in File integer.h
Inheritance Relationships¶
Base Type¶
public SymEngine::Number(Class Number)
Class Documentation¶
-
class
SymEngine::Integer: public SymEngine::Number¶ Integer Class.
Public Functions
-
Integer(const integer_class &_i)¶ Constructor of Integer using
integer_class
-
Integer(integer_class &&_i)¶
-
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+zinto canonical order. This function assumes thatois the same type asthis. Use__cmp__if you want general comparison.
-
signed long int
as_int() const¶ Convert to
int, raise an exception if it does not fit.
-
unsigned long int
as_uint() const¶ Convert to
uint, raise an exception if it does not fit.
-
const integer_class &
as_integer_class() const¶ Convert to
integer_class.
-
bool
is_zero() const¶ - Return
trueif0
-
bool
is_one() const¶ - Return
trueif1
-
bool
is_minus_one() const¶ - Return
trueif-1
-
bool
is_positive() const¶ - Return
trueif positive
-
bool
is_negative() const¶ - Return
trueif negative
-
bool
is_complex() const¶ - Return
false
-