% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/traversal.R
\name{a5_grid_disk}
\alias{a5_grid_disk}
\title{Cells within k hops of a cell}
\usage{
a5_grid_disk(cell, k, vertex = FALSE)
}
\arguments{
\item{cell}{A single \link{a5_cell} value.}

\item{k}{Integer scalar, number of hops.}

\item{vertex}{Logical scalar. If \code{FALSE} (default), only edge-sharing
neighbours (4-connected) are traversed. If \code{TRUE}, vertex-sharing
neighbours are included (8-connected).}
}
\value{
A compacted \link{a5_cell} vector.
}
\description{
Returns all cells reachable within \code{k} edge hops of a centre cell,
including the centre cell itself.
}
\examples{
cell <- a5_lonlat_to_cell(-3.19, 55.95, resolution = 8)
a5_grid_disk(cell, k = 1)
}
\seealso{
\code{\link[=a5_spherical_cap]{a5_spherical_cap()}} for distance-based selection.
}
