Class Infty

Inheritance Relationships

Base Type

Class Documentation

class SymEngine::Infty : public SymEngine::Number

This class holds “infinity” It includes a direction (like -infinity).

Public Functions

Infty(const RCP<const Number> &direction)

Constructs Infty using the sign of _direction

Infty(const Infty &inf)

Copy Constructor.

bool is_canonical(const RCP<const Number> &num) const

Canonical when the direction is -1, 0 or 1.

Return

true if canonical

hash_t __hash__() const

Return

size of the hash

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 like x+y+z into canonical order. This function assumes that o is the same type as this. Use __cmp__ if you want general comparison.

vec_basic get_args() const

Returns the list of arguments.

bool is_zero() const

Return

true if 0

bool is_one() const

Return

true if 1

bool is_minus_one() const

Return

true if -1

bool is_exact() const

Return

true if this number is an exact number

Evaluate &get_eval() const

Get Evaluate singleton to evaluate numerically.

RCP<const Number> get_direction() const
bool is_unsigned_infinity() const
bool is_positive_infinity() const
bool is_negative_infinity() const
bool is_positive() const

Return

true if positive

bool is_negative() const

Return

true if negative

bool is_complex() const

Return

true if a complex number

RCP<const Basic> conjugate() const

Return

the conjugate if the class is complex

RCP<const Number> add(const Number &other) const

Addition.

RCP<const Number> mul(const Number &other) const

Multiplication.

RCP<const Number> div(const Number &other) const

Division.

RCP<const Number> pow(const Number &other) const

Power.

RCP<const Number> rpow(const Number &other) const

Public Static Functions

RCP<const Infty> from_direction(const RCP<const Number> &direction)
RCP<const Infty> from_int(const int val)

Constructs Infty using sign of val