Range returns a vector of length two, with the minimum and maximum values of the (support of the) distribution.
The support method gives the smallest and largest values the support
reaches — its two outermost points, taking the atoms and the continuous
regions together. Gaps in between are not represented.
An empty support reaches nothing, and its range is c(Inf, -Inf) — what
R gives for the range of nothing, and reversed on purpose, being the
identity for combining ranges.
Arguments
- distribution
Distribution to compute range from.
- ...
Not used; vestige of the
base::range()S3 generic.- support
A support object.
Details
The range is read from the distribution's support (see support()), which
is where a distribution says what values it reaches. In this it behaves like
vtype(): derived, not declared.
It is still a property, and eval_property() reaches it like any other, so
code walking a list of property names need not know which are stored and
which are worked out. What it cannot be is stated: distribution()
refuses a range entry, since a stated one would be consulted ahead of the
derived value and could disagree with it.
The Null distribution is a different case: it has no support at all, so
neither end is known, and its range is c(NA, NA) — still a vector of
length two, rather than a single NA. An empty support says there is
nothing to reach; the Null distribution says nothing at all.
