Learn R Programming

set6 (version 0.2.4)

NegRationals: Set of Negative Rational Numbers

Description

The mathematical set of negative rational numbers, defined as the set of numbers that can be written as a fraction of two integers and are non-positive. i.e. $$\\{\frac{p}{q} \ : \ p,q \ \in \ Z, \ p/q \le 0, \ q \ne 0\\}$$ where \(Z\) is the set of integers.

Arguments

Super classes

set6::Set -> set6::Interval -> set6::SpecialSet -> set6::Rationals -> NegRationals

Methods

Public methods

Method new()

Create a new NegRationals object.

Usage

NegRationals$new(zero = FALSE)

Arguments

zero

logical. If TRUE, zero is included in the set.

Returns

A new NegRationals object.

Method clone()

The objects of this class are cloneable with this method.

Usage

NegRationals$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

The $contains method does not work for the set of Rationals as it is notoriously difficult/impossible to find an algorithm for determining if any given number is rational or not. Furthermore, computers must truncate all irrational numbers to rational numbers.

See Also

Other special sets: Complex, ExtendedReals, Integers, Logicals, Naturals, NegIntegers, NegReals, PosIntegers, PosNaturals, PosRationals, PosReals, Rationals, Reals, Universal