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>
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
FieldsModifier and TypeFieldDescriptionprivate int[]
For each vertex incontractionGraph
contains id of its Voronoi cell, orNO_VORONOI_CELL
if it does not belong to any cell. -
Constructor Summary
ConstructorsConstructorDescriptionVoronoiDiagram
(int[] voronoiCells) Constructs a new instance for the givenvoronoiCells
. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns Voronoi cell id which corresponds tovertex
.
-
Field Details
-
voronoiCells
private int[] voronoiCellsFor each vertex incontractionGraph
contains id of its Voronoi cell, orNO_VORONOI_CELL
if it does not belong to any cell.
-
-
Constructor Details
-
VoronoiDiagram
public VoronoiDiagram(int[] voronoiCells) Constructs a new instance for the givenvoronoiCells
.- Parameters:
voronoiCells
- Voronoi cells ids
-
-
Method Details
-
getVoronoiCellId
Returns Voronoi cell id which corresponds tovertex
.- Parameters:
vertex
- vertex- Returns:
- Voronoi cell id
-