An interval is a support that is a finite union of intervals.
Public fields
lower
A numeric vector of lower bounds.
upper
A numeric vector of upper bounds.
lower_closed
A logical vector indicating whether the lower bound is
closed.
upper_closed
A logical vector indicating whether the upper bound is
closed.
Methods
Method new()
Initialize an interval.
Usage
interval$new(
lower = -Inf,
upper = Inf,
lower_closed = FALSE,
upper_closed = FALSE
)
Arguments
lower
A numeric vector of lower bounds.
upper
A numeric vector of upper bounds.
lower_closed
A logical vector indicating whether the lower
bound is closed.
upper_closed
A logical vector indicating whether the upper
bound is closed.
Method is_empty()
Determine if the interval is empty
Returns
A logical vector indicating whether the interval is empty.
Determine if a value is contained in the interval.
Arguments
x
A numeric vector of values.
Returns
A logical vector indicating whether each value is contained
Get the infimum of the interval.
Returns
A numeric vector of infimums.
Get the supremum of the interval.
Returns
A numeric vector of supremums.
Get the dimension of the interval.
Returns
The dimension of the interval.
Method clone()
The objects of this class are cloneable with this method.
Usage
interval$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.