% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/immutables-package.R
\docType{package}
\name{Immutables-package}
\alias{Immutables}
\alias{Immutables-package}
\title{Immutables: Fast and Functional Data Structures}
\description{
The \code{Immutables} R package implements several immutable, or persistent, data
structures: operations return modified copies while remaining fast and true
to R's side-effect-free functional nature.
}
\details{
\itemize{
\item \code{flexseq}s provide list-like operations: indexed and named element access;
push/pop/peek from either end for double-ended queue behavior; insertion,
splitting, and concatenation.
\item \code{priority_queue}s associate items with priority values and provide
min and max peek/pop by priority and fast insertion.
\item \code{ordered_sequence}s associate items with key values and keep the elements in
sorted order by key. These may be similarly be inserted/popped/peeked by key
value as well as position. Keys may be duplicated, with first-in-first-out order within key groups.
\item \code{interval_index}es store items associated with interval ranges, supporting
point as well as interval overlaps/contains/within queries. Items are kept
in start-order enabling ordered sequence operations and sweep-line
algorithms.
}

Backed by monoid-annotated 2-3 fingertrees as described by
Hinze and Paterson, most operations are constant time, amortized constant time, or $O(\\log(n))$. Core functions are implemented in C++ (via Rcpp) for speed, with matching pure-R reference implementations using \code{lambda.r} syntax to match the paper.

Finally, the developer API supports the addition of custom structures via combinations of monoids and measures.
\itemize{
\item Hinze, R. and Paterson, R. (2006), \emph{Finger trees: a simple general-purpose data structure}. \doi{10.1017/S0956796805005769}
}
}
\seealso{
Useful links:
\itemize{
  \item \url{https://oneilsh.github.io/immutables/}
  \item \url{https://github.com/oneilsh/immutables}
  \item Report bugs at \url{https://github.com/oneilsh/immutables/issues}
}

}
\author{
\strong{Maintainer}: Shawn T. O'Neil \email{shawn@tislab.org}

}
\keyword{internal}
