VoronoiGraph
Documentation for VoronoiGraph.
VoronoiGraph.adjacencyVoronoiGraph.descentVoronoiGraph.expected_verticesVoronoiGraph.exploreVoronoiGraph.mc_integrateVoronoiGraph.mc_volumeVoronoiGraph.mc_volumesVoronoiGraph.mc_volumesVoronoiGraph.neighborsVoronoiGraph.randrayVoronoiGraph.randray_modifiedVoronoiGraph.raycastVoronoiGraph.raycastVoronoiGraph.raycastVoronoiGraph.raycast_start_heuristicVoronoiGraph.transformationVoronoiGraph.volumesVoronoiGraph.voronoiVoronoiGraph.voronoi_randomVoronoiGraph.walkVoronoiGraph.walkray
VoronoiGraph.adjacency — Methodgiven vertices in generator-coordinates, collect the verts belonging to generator pairs, i.e. boundary vertices
VoronoiGraph.descent — Functionstarting at given points, run the ray shooting descent to find vertices
VoronoiGraph.expected_vertices — Methodvertexheuristic(d, n)
expected number of vertices for n points in d dimensions c.f. [Dwyer, The expected number of k-faces of a Voronoi Diagram (1993)]
VoronoiGraph.explore — MethodBFS of vertices starting from S0
VoronoiGraph.mc_integrate — Functionmc_integrate(f::Function, i::Int, xs::Points, nmc=1000, nmc2=1000, searcher=Raycast(xs))Integrate function f over cell i and its boundary using nmc rays per cell and nmc2 points per ray for the volume integral.
Returns:
Vf::Real: the volume integral offAf::SparseVector: Af[j] is the surface integral offover the intersection between cells i and j.V::Real: the volume of celliA::SparseVector: A[j] is the surface area of the intersection between cells i and j.
VoronoiGraph.mc_volume — Functionmc_volume(i, xs, nmc, searcher)Estimate the area and volume of the i-th Voronoi cell from the Voronoi Diagram generated by xs by a Monte Carlo estimate from random rays
VoronoiGraph.mc_volumes — Functionmc_volumes(xs::Points, nmc=1000)Estimate the areas and volumes of the Voronoi Cells generated by xs using nmc Monte Carlo samples.
Returns
SparseMatrix: the areas of the common boundaries of two cellsVector: the volumes of each cell
VoronoiGraph.mc_volumes — Functionmc_volumes(sig::Vertices, xs::Points, nmc=1000)In the case when the simplicial complex is already known this information can be used to speed up the Monte-Carlo sampling by restricting the search space
VoronoiGraph.neighbors — Methodneighbors(sig::Vertices) --> Dict{Int, Vector{Int}}Compute the neighbors of all generators.
VoronoiGraph.randray — Methodgenerate a random ray orthogonal to the subspace spanned by the given points
VoronoiGraph.randray_modified — Methodgenerate a random ray orthogonal to the subspace spanned by the given points
VoronoiGraph.raycast — Methodshooting a ray in the given direction, find the next connecting point. This variant (by Poliaski, Pokorny) uses a binary search
VoronoiGraph.raycast — MethodShooting a ray in the given direction, find the next connecting point. This variant uses an iterative NN search
VoronoiGraph.raycast — Methodshooting a ray in the given direction, find the next connecting point. This is the bruteforce variant, using a linear search to find the closest point
VoronoiGraph.raycast_start_heuristic — Methodcompute initial candidate assuming the resulting delauney simplex was regular this reduces number of extra searches by about 10%
VoronoiGraph.transformation — Methodaffine transformation rotatinig and translating such that the boundary is aligned with the first dimension. A->B will be mapped to const*[1,0,0,...] and (A+B)/2 to [0,0,...]
VoronoiGraph.volumes — Methodbuild the connectivity matrix for the SQRA from adjacency and boundary information
VoronoiGraph.voronoi — Functionconstruct the voronoi diagram from x through breadth-first search
VoronoiGraph.voronoi_random — Functionconstruct a (partial) voronoi diagram from x through a random walk
VoronoiGraph.walk — Methodstarting at vertices, walk nsteps along the voronoi graph to find new vertices
VoronoiGraph.walkray — Methodfind the vertex connected to v by moving away from its i-th generator