Debian Codegraph @

man/reduce-methods.Rd

raw
1 \name{reduce}
2
3 \alias{reduce}
4 \alias{reduce,Intervals_virtual-method}
5
6 \title{Compactly re-represent the points in a set of intervals}
7
8 \description{
9 In general, \code{"\linkS4class{Intervals}"} and
10 \code{"\linkS4class{Intervals_full}"} objects may be redundant, the
11 intervals they contain may be in arbitrary order, and they may contain
12 non-informative intervals for which one or both endpoints are
13 \code{NA}. The \code{reduce} function re-represents the underlying
14 subsets of the integers or the real line in the unique, minimal form,
15 removing intervals with \code{NA} endpoints (with warning).
16 }
17
18 \usage{
19 \S4method{reduce}{Intervals_virtual}( x, check_valid = TRUE )
20 }
21
22 \arguments{
23
24 \item{x}{ An \code{"Intervals"} or \code{"Intervals_full"} object.}
25
26 \item{check_valid}{
27 Should \code{\link{validObject}} be called before passing to
28 compiled code? Also see \code{\link{interval_overlap}}.
29 }
30
31 }
32
33 \value{
34 A single object of appropriate class, compactly representing the
35 union of all intervals in \code{x}. All intervals in \code{reduce(x)}
36 have numeric (i.e., not \code{NA}) endpoints.
37 }
38
39 \seealso{
40 See \code{\link{interval_union}}, which is really just concatenates its
41 arguments and then calls \code{reduce}.
42 }