A simple container that contains information about how far to iterate through the object.

early_stop_sort!(early_stopper::ES, predicate::F)::ES where {ES<:EarlyStopper, F<:Function}

Sorts `early_stopper.obj` based on `predicate` and returns an `EarlyStopper` of the same type
that contains updated `stop_at` information. The sorting is unstable.
get_corners(TL, BR)

Returns the corners of the rectangle defined by its top-left (TL) and bottom-right (BR) corners

get_quadrants(TL, BR)

Returns a tuple containing top-left (TL) and bottom-right (BR) corners for each quadrant of input TL-BR

jfa_voronoi!(grid::Matrix{T}, sites::Vector{T}; distance=euclidean) where {T<:SVector{2,Int}}

Construct in-place a Voronoi diagram using the jump flooding algorithm. The algorithm assumes that a blank cell in the grid has value SVector(0, 0) and that sites are inside the grid.

label_voronoi_grid(grid; shuffle_cells=true)

Given a grid of un-plottable things, it assigns each unique value in the grid a number to plot. shuffle_cells determines whether the assigned values are randomly shuffled before assignment. If they're not you might get a pretty gradient or other pattern :)

naive_voronoi!(grid::Matrix{T}, sites::Vector{T}; distance=euclidean) where {T<:SVector{2,Int}}

Construct in-place a Voronoi diagram in the most basic way possible: check every cell and every combination.

redac_voronoi!(grid::Matrix{T}, sites::Vector{T}; distance=euclidean, auxiliary=exact_aux) where {T<:SVector{2,Int}}

Performs a divide-and-conquer method similar to dac_voronoi! but has an additional site-elimination step which aims to reduce the work of subsequent steps.

swap!(v, i::Int, j::Int)

Swap (in-place) the elements of v indexed by i and j. Does nothing if i == j.

voronoi_equality(grid1, grid2; distance=euclidean)

Checks equality of Voronoi diagrams accounting for the fact that there may be multiple correct/equivalent solutions as some sites may be the same distance from some cells.