This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Plots | |
""" | |
Lower and upper bounds on the number of `k`-faces for a Voronoi diagram in `d`-dimensional space using `n` points. | |
""" | |
function n_faces_voronoi(k, d, n; return_mean=true) | |
vals = if k == 0 | |
r = div(d + mod(d, 2), 2) | |
if mod(d, 2) == 0 | |
n^r/factorial(r), 2 * n^r/factorial(r) |