Package com.jgalgo.alg.shortestpath
Class VoronoiAlgoAbstract
java.lang.Object
com.jgalgo.alg.shortestpath.VoronoiAlgoAbstract
- All Implemented Interfaces:
VoronoiAlgo
- Direct Known Subclasses:
VoronoiAlgoDijkstra
Abstract class for computing the Voronoi cells in a graph given a set of site vertices.
The class implements the interface by solving the problem on the index graph and then maps the results back to the original graph. The implementation for index graphs is abstract and left to the subclasses.
- Author:
- Barak Ugav
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jgalgo.alg.shortestpath.VoronoiAlgo
VoronoiAlgo.IResult, VoronoiAlgo.Result<V,
E> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<V,
E> VoronoiAlgo.Result <V, E> computeVoronoiCells
(Graph<V, E> g, Collection<V> sites, WeightFunction<E> w) Compute the Voronoi cells of a graph with respect to a set of sites and an edge weight function.
-
Constructor Details
-
VoronoiAlgoAbstract
public VoronoiAlgoAbstract()Default constructor.
-
-
Method Details
-
computeVoronoiCells
public <V,E> VoronoiAlgo.Result<V,E> computeVoronoiCells(Graph<V, E> g, Collection<V> sites, WeightFunction<E> w) Description copied from interface:VoronoiAlgo
Compute the Voronoi cells of a graph with respect to a set of sites and an edge weight function.If
g
is anIntGraph
, aVoronoiAlgo.IResult
object will be returned. In that case, its better to pass aIntCollection
assites
andIWeightFunction
asw
to avoid boxing/unboxing.- Specified by:
computeVoronoiCells
in interfaceVoronoiAlgo
- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a graphsites
- a set of sitesw
- an edge weight function- Returns:
- the Voronoi cells of the sites
-