\HeaderA{MIndex-class}{MIndex objects}{MIndex.Rdash.class}
\aliasA{ByPos\_MIndex-class}{MIndex-class}{ByPos.Rul.MIndex.Rdash.class}
\aliasA{class:ByPos\_MIndex}{MIndex-class}{class:ByPos.Rul.MIndex}
\aliasA{class:MIndex}{MIndex-class}{class:MIndex}
\aliasA{coerce,MIndex,CompressedIRangesList-method}{MIndex-class}{coerce,MIndex,CompressedIRangesList.Rdash.method}
\aliasA{countIndex}{MIndex-class}{countIndex}
\aliasA{countIndex,ByPos\_MIndex-method}{MIndex-class}{countIndex,ByPos.Rul.MIndex.Rdash.method}
\aliasA{countIndex,MIndex-method}{MIndex-class}{countIndex,MIndex.Rdash.method}
\aliasA{elementLengths,MIndex-method}{MIndex-class}{elementLengths,MIndex.Rdash.method}
\aliasA{endIndex}{MIndex-class}{endIndex}
\aliasA{endIndex,ByPos\_MIndex-method}{MIndex-class}{endIndex,ByPos.Rul.MIndex.Rdash.method}
\aliasA{length,MIndex-method}{MIndex-class}{length,MIndex.Rdash.method}
\aliasA{MIndex}{MIndex-class}{MIndex}
\aliasA{names,MIndex-method}{MIndex-class}{names,MIndex.Rdash.method}
\aliasA{names<-,MIndex-method}{MIndex-class}{names<.Rdash.,MIndex.Rdash.method}
\aliasA{show,ByPos\_MIndex-method}{MIndex-class}{show,ByPos.Rul.MIndex.Rdash.method}
\aliasA{startIndex}{MIndex-class}{startIndex}
\aliasA{startIndex,ByPos\_MIndex-method}{MIndex-class}{startIndex,ByPos.Rul.MIndex.Rdash.method}
\aliasA{unlist,MIndex-method}{MIndex-class}{unlist,MIndex.Rdash.method}
\aliasA{width0}{MIndex-class}{width0}
\aliasA{width0,MIndex-method}{MIndex-class}{width0,MIndex.Rdash.method}
\aliasA{[[,ByPos\_MIndex-method}{MIndex-class}{[[,ByPos.Rul.MIndex.Rdash.method}
\keyword{methods}{MIndex-class}
\keyword{classes}{MIndex-class}
\begin{Description}\relax
The MIndex class is the basic container for storing the matches of
a set of patterns in a subject sequence.
\end{Description}
\begin{Details}\relax
An MIndex object contains the matches (start/end locations) of
a set of patterns found in an \LinkA{XString}{XString} object
called "the subject string" or "the subject sequence" or
simply "the subject".

\code{\LinkA{matchPDict}{matchPDict}} function returns an MIndex object.
\end{Details}
\begin{Section}{Accessor methods}
In the code snippets below, \code{x} is an MIndex object.

\describe{
\item[] \code{length(x)}:
The number of patterns that matches are stored for.

\item[] \code{names(x)}:
The names of the patterns that matches are stored for.

\item[] \code{startIndex(x)}:
A list containing the starting positions of the matches
for each pattern.

\item[] \code{endIndex(x)}:
A list containing the ending positions of the matches
for each pattern.

\item[] \code{countIndex(x)}:
An integer vector containing the number of matches
for each pattern. Equivalent to \code{elementLengths(x)}.

}
\end{Section}
\begin{Section}{Subsetting methods}
In the code snippets below, \code{x} is an MIndex object.

\describe{
\item[] \code{x[[i]]}:
Extract the matches for the i-th pattern as an
\LinkA{IRanges}{IRanges} object. 

}
\end{Section}
\begin{Section}{Coercion}
In the code snippets below, \code{x} is an MIndex object.

\describe{
\item[] \code{as(x, "CompressedIRangesList")}:
Turns \code{x} into an
\LinkA{CompressedIRangesList}{CompressedIRangesList} object. 
This coercion changes \code{x} from one
\LinkA{RangesList}{RangesList} 
subtype to another with the underlying
\LinkA{Ranges}{Ranges} values remaining unchanged.

}
\end{Section}
\begin{Section}{Other utility methods and functions}
In the code snippets below,
\code{x} and \code{mindex} are MIndex objects
and \code{subject} is the \LinkA{XString}{XString} object
containing the sequence in which the matches were found.

\describe{
\item[] \code{unlist(x, recursive=TRUE, use.names=TRUE)}:
Return all the matches in a single
\LinkA{IRanges}{IRanges} object. 
\code{recursive} and \code{use.names} are ignored.

\item[] \code{extractAllMatches(subject, mindex)}:
Return all the matches in a single \LinkA{XStringViews}{XStringViews} object.

}
\end{Section}
\begin{Author}\relax
H. Pages
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{matchPDict}{matchPDict}},
\LinkA{PDict-class}{PDict.Rdash.class},
\LinkA{IRanges-class}{IRanges.Rdash.class},
\LinkA{XStringViews-class}{XStringViews.Rdash.class}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  ## See ?matchPDict and ?`matchPDict-inexact` for some examples.
\end{ExampleCode}
\end{Examples}

