Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class TransitNodeRoutingPrecomputation.VoronoiDiagram<V>
- java.lang.Object
-
- org.jgrapht.alg.shortestpath.TransitNodeRoutingPrecomputation.VoronoiDiagram<V>
-
- Type Parameters:
V
- graph vertex type
- Enclosing class:
- TransitNodeRoutingPrecomputation<V,E>
public static class TransitNodeRoutingPrecomputation.VoronoiDiagram<V> extends java.lang.Object
Voronoi diagram for a graph. Formally each cell in the diagram is defined as $Vor(v) = \{u ∈ V : ∀w ∈ T$ \ $ \{v\} : \mu(u, v) ≤ \mu(u, w)\}$, where $V$ is the vertex set, $T$ is a set of vertaccess verticesices representing Voronoi cells centers and $\mu(u,v)$ denotes distance between vertices $u$ and $v$.
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
voronoiCells
For each vertex incontractionGraph
contains id of its Voronoi cell, orNO_VORONOI_CELL
if it does not belong to any cell.
-
Constructor Summary
Constructors Constructor Description VoronoiDiagram(int[] voronoiCells)
Constructs a new instance for the givenvoronoiCells
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getVoronoiCellId(ContractionHierarchyPrecomputation.ContractionVertex<V> vertex)
Returns Voronoi cell id which corresponds tovertex
.
-
-
-
Method Detail
-
getVoronoiCellId
public int getVoronoiCellId(ContractionHierarchyPrecomputation.ContractionVertex<V> vertex)
Returns Voronoi cell id which corresponds tovertex
.- Parameters:
vertex
- vertex- Returns:
- Voronoi cell id
-
-