\HeaderA{RleViews-class}{The RleViews class}{RleViews.Rdash.class}
\aliasA{class:RleViews}{RleViews-class}{class:RleViews}
\aliasA{RleViews}{RleViews-class}{RleViews}
\aliasA{show,RleViews-method}{RleViews-class}{show,RleViews.Rdash.method}
\aliasA{Views,Rle-method}{RleViews-class}{Views,Rle.Rdash.method}
\keyword{methods}{RleViews-class}
\keyword{classes}{RleViews-class}
\begin{Description}\relax
The RleViews class is the basic container for storing a set of views
(start/end locations) on the same Rle object.
\end{Description}
\begin{Details}\relax
An RleViews object contains a set of views (start/end locations) on the same
\LinkA{Rle}{Rle} object called "the subject vector" or simply "the subject".
Each view is defined by its start and end locations: both are integers such
that start <= end.
An RleViews object is in fact a particular case of a \LinkA{Views}{Views}
object (the RleViews class contains the \LinkA{Views}{Views} class) so it
can be manipulated in a similar manner: see \code{?\LinkA{Views}{Views}} for
more information.
Note that two views can overlap and that a view can be "out of limits"
i.e. it can start before the first element of the subject or/and end
after its last element.
\end{Details}
\begin{Author}\relax
P. Aboyoun
\end{Author}
\begin{SeeAlso}\relax
\LinkA{Views-class}{Views.Rdash.class},
\LinkA{Rle-class}{Rle.Rdash.class},
\LinkA{Views-utils}{Views.Rdash.utils}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  subject <- Rle(rep(c(3L, 2L, 18L, 0L), c(3,2,1,5)))
  myViews <- Views(subject, 3:0, 5:8)
  myViews
  subject(myViews)
  length(myViews)
  start(myViews)
  end(myViews)
  width(myViews)
  myViews[[2]]

  set.seed(0)
  vec <- Rle(sample(0:2, 20, replace = TRUE))
  vec
  Views(vec, vec > 0)
\end{ExampleCode}
\end{Examples}

