% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/60-interval_index-print.R
\name{print.interval_index}
\alias{print.interval_index}
\title{Print an Interval Index Summary}
\usage{
\method{print}{interval_index}(x, max_elements = 4L, show_custom_monoids = FALSE, ...)
}
\arguments{
\item{x}{An \code{interval_index}.}

\item{max_elements}{Maximum number of elements shown in the preview.}

\item{show_custom_monoids}{Logical; show attached non-default monoids and
their root cached measures.}

\item{...}{Passed through to per-element \code{print()}.}
}
\value{
Invisibly returns \code{x}.
}
\description{
Prints a compact summary with interval bounds and a head/tail preview of
payload elements.
}
\examples{
ix <- interval_index(
  one = 1, two = 2, three = 3,
  start = c(20, 30, 10), end = c(25, 37, 24)
)
print(ix, max_elements = 4)
width_sum <- measure_monoid(
  `+`, 0, function(entry) as.numeric(entry$end - entry$start)
)
ix3 <- add_monoids(
  interval_index(1, 2, start = c(1, 3), end = c(2, 5)),
  list(width_sum = width_sum)
)
print(ix3, max_elements = 0, show_custom_monoids = TRUE)

ix2 <- interval_index(1, 2, 3, start = c(2, 4, 6), end = c(3, 5, 8), default_query_bounds = "[]")
print(ix2, max_elements = 3)

print(interval_index())
}
