`DiscreteVoronoi.EarlyStopper`

— Type`EarlyStopper{T}`

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

`DiscreteVoronoi.dac_voronoi!`

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

Construct in-place a Voronoi diagram using the divide-and-conquer algorithm.

`DiscreteVoronoi.early_stop_sort!`

— Method```
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.
```

`DiscreteVoronoi.find_closest_site`

— Method`find_closest_site(cell, sites; distance=euclidean)`

Returns the closest site to `cell`

in `sites`

determined by `distance`

.

`DiscreteVoronoi.get_corners`

— Method`get_corners(TL, BR)`

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

`DiscreteVoronoi.get_quadrants`

— Method`get_quadrants(TL, BR)`

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

`DiscreteVoronoi.jfa_voronoi!`

— Method`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.

`DiscreteVoronoi.label_voronoi_grid`

— Method`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 :)

`DiscreteVoronoi.naive_voronoi!`

— Method`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.

`DiscreteVoronoi.redac_voronoi!`

— Method`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.

`DiscreteVoronoi.swap!`

— Method`swap!(v, i::Int, j::Int)`

Swap (in-place) the elements of `v`

indexed by `i`

and `j`

. Does nothing if `i == j`

.

`DiscreteVoronoi.voronoi_equality`

— Method`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.