Learn R Programming

distr6 (version 1.3.1)

NegRationals: Set of Negative Rationals

Description

The mathematical set of negative rational numbers.

Value

Returns R6 object of class NegRationals.

Constructor

NegRationals$new(dim = 1, zero = FALSE)

Constructor Arguments

Argument Type Details
dim numeric Dimension of the set.
zero = FALSE logical If TRUE, zero is included in the set.

Details

The set of Positive Rationals is defined as the set of numbers that can be written as a fraction of two integers and are non-negative, i.e. $$NegRationals = \{\frac{p}{q} | p,q \ \in \ Z, \ \frac{p}{q} \le 0\}$$ where \(Z\) is the set of integers.

\(0\) may or may not be included (depending on the zero argument).

See Also

listSpecialSets

Examples

Run this code
# NOT RUN {
NegRationals$new()
NegRationals$new(zero = TRUE)
NegRationals$new(dim = 2)

# }

Run the code above in your browser using DataLab