Interface VoronoiAlgo.IResult
-
- All Superinterfaces:
IVertexPartition,VertexPartition<Integer,Integer>,VoronoiAlgo.Result<Integer,Integer>
- Enclosing interface:
- VoronoiAlgo
public static interface VoronoiAlgo.IResult extends IVertexPartition, VoronoiAlgo.Result<Integer,Integer>
A result object ofVoronoiAlgocomputation forIntGraph.See
VoronoiAlgo.Resultfor the result object documentation.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default IntegerblockSite(int block)Deprecated.Please useblockSiteInt(int)instead to avoid un/boxing.intblockSiteInt(int block)Get the site vertex of a block.doubledistance(int vertex)Get the distance of a vertex from its site.default doubledistance(Integer vertex)Deprecated.Please usedistance(int)instead to avoid un/boxing.IPathgetPath(int target)Get the shortest path of a vertex from its site.default IPathgetPath(Integer target)Deprecated.Please usegetPath(int)instead to avoid un/boxing.intvertexSite(int vertex)Get the site vertex of a vertex.default IntegervertexSite(Integer vertex)Deprecated.Please usevertexSite(int)instead to avoid un/boxing.-
Methods inherited from interface com.jgalgo.alg.IVertexPartition
blockEdges, blocksGraph, blocksGraph, blockSubGraph, blockSubGraph, blockVertices, crossEdges, graph, vertexBlock, vertexBlock
-
Methods inherited from interface com.jgalgo.alg.VertexPartition
numberOfBlocks
-
-
-
-
Method Detail
-
distance
double distance(int vertex)
Get the distance of a vertex from its site.Note that the direction of the distances and paths (in case of a directed graph) is from the sites to the vertices.
- Parameters:
vertex- a target vertex- Returns:
- the shortest distance from any site to the target vertex, or
Double.POSITIVE_INFINITYif the target vertex is unreachable from any site
-
distance
@Deprecated default double distance(Integer vertex)
Deprecated.Please usedistance(int)instead to avoid un/boxing.Get the distance of a vertex from its site.Note that the direction of the distances and paths (in case of a directed graph) is from the sites to the vertices.
- Specified by:
distancein interfaceVoronoiAlgo.Result<Integer,Integer>- Parameters:
vertex- a target vertex- Returns:
- the shortest distance from any site to the target vertex, or
Double.POSITIVE_INFINITYif the target vertex is unreachable from any site
-
getPath
IPath getPath(int target)
Get the shortest path of a vertex from its site.Note that the direction of the distances and paths (in case of a directed graph) is from the sites to the vertices.
- Parameters:
target- a target vertex- Returns:
- the shortest path from any site to the target vertex, or
nullif the target vertex is unreachable from any site
-
getPath
@Deprecated default IPath getPath(Integer target)
Deprecated.Please usegetPath(int)instead to avoid un/boxing.Get the shortest path of a vertex from its site.Note that the direction of the distances and paths (in case of a directed graph) is from the sites to the vertices.
- Specified by:
getPathin interfaceVoronoiAlgo.Result<Integer,Integer>- Parameters:
target- a target vertex- Returns:
- the shortest path from any site to the target vertex, or
nullif the target vertex is unreachable from any site
-
blockSiteInt
int blockSiteInt(int block)
Get the site vertex of a block.The Voronoi cells are defined by the sites. Each 'block' contains all the vertices that are closer to the site of the block than to any other site. This method return the site vertex of one of the blocks
[0, numberOfBlocks()).In case some vertices are unreachable from any sites, the partition will contain an addition block with index
siteNumber+1that contains all these vertices. This method will return-1for this block.- Parameters:
block- index of a block- Returns:
- the site vertex of the block, or
-1if the block is the unreachable block
-
blockSite
@Deprecated default Integer blockSite(int block)
Deprecated.Please useblockSiteInt(int)instead to avoid un/boxing.Get the site vertex of a block.The Voronoi cells are defined by the sites. Each 'block' contains all the vertices that are closer to the site of the block than to any other site. This method return the site vertex of one of the blocks
[0, numberOfBlocks()).In case some vertices are unreachable from any sites, the partition will contain an addition block with index
siteNumber+1that contains all these vertices. This method will returnnullfor this block.- Specified by:
blockSitein interfaceVoronoiAlgo.Result<Integer,Integer>- Parameters:
block- index of a block- Returns:
- the site vertex of the block, or
nullif the block is the unreachable block
-
vertexSite
int vertexSite(int vertex)
Get the site vertex of a vertex.The Voronoi cells are defined by the sites. Each 'block' contains all the vertices that are closer to the site of the block than to any other site. This method return the site vertex of the block that contains the vertex, namely the site with the shortest path from any site to the vertex.
- Parameters:
vertex- a vertex- Returns:
- the site vertex with the shortest path from any site to the vertex
-
vertexSite
@Deprecated default Integer vertexSite(Integer vertex)
Deprecated.Please usevertexSite(int)instead to avoid un/boxing.Get the site vertex of a vertex.The Voronoi cells are defined by the sites. Each 'block' contains all the vertices that are closer to the site of the block than to any other site. This method return the site vertex of the block that contains the vertex, namely the site with the shortest path from any site to the vertex.
- Specified by:
vertexSitein interfaceVoronoiAlgo.Result<Integer,Integer>- Parameters:
vertex- a vertex- Returns:
- the site vertex with the shortest path from any site to the vertex, or
nullif the block is the unreachable block
-
-