Interface IDistanceMeasures
-
- All Superinterfaces:
DistanceMeasures<Integer,Integer>
public interface IDistanceMeasures extends DistanceMeasures<Integer,Integer>
A set of graph distance measures forIntGraph
.This interface is a specification of
DistanceMeasures
forIntGraph
. See the generic interface for the full documentation.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description IntSet
center()
Get the center of the graph.double
eccentricity(int v)
Get the eccentricity of a vertex.default double
eccentricity(Integer v)
Deprecated.Please useeccentricity(int)
instead to avoid un/boxing.IntSet
periphery()
Get the periphery of the graph.-
Methods inherited from interface com.jgalgo.alg.distancemeasures.DistanceMeasures
diameter, radius
-
-
-
-
Method Detail
-
eccentricity
double eccentricity(int v)
Get the eccentricity of a vertex.Given a graph \(G=(V,E)\), and an edge weight function \(w:E \rightarrow \mathbb{R}\), the eccentricity of a vertex \(v \in V\) is the maximum distance from \(v\) to any other vertex in the graph. If the graph is directed, the eccentricity of a vertex \(v \in V\) is the maximum directed distance from \(v\) to any other vertex in the graph.
- Parameters:
v
- a vertex- Returns:
- the eccentricity of the vertex
-
eccentricity
@Deprecated default double eccentricity(Integer v)
Deprecated.Please useeccentricity(int)
instead to avoid un/boxing.Get the eccentricity of a vertex.Given a graph \(G=(V,E)\), and an edge weight function \(w:E \rightarrow \mathbb{R}\), the eccentricity of a vertex \(v \in V\) is the maximum distance from \(v\) to any other vertex in the graph. If the graph is directed, the eccentricity of a vertex \(v \in V\) is the maximum directed distance from \(v\) to any other vertex in the graph.
If there is a vertex \(u \in V\) that is not reachable from \(v\), the eccentricity of \(v\) is
Double.POSITIVE_INFINITY
.- Specified by:
eccentricity
in interfaceDistanceMeasures<Integer,Integer>
- Parameters:
v
- a vertex- Returns:
- the eccentricity of the vertex
-
center
IntSet center()
Description copied from interface:DistanceMeasures
Get the center of the graph.Given a graph \(G=(V,E)\), and an edge weight function \(w:E \rightarrow \mathbb{R}\), the eccentricity of a vertex \(v \in V\) is the maximum distance from \(v\) to any other vertex in the graph. The raidus of the graph is the minimum eccentricity of all vertices in the graph. The center of the graph is the set of vertices with eccentricity equal to the radius.
- Specified by:
center
in interfaceDistanceMeasures<Integer,Integer>
- Returns:
- the set of vertices forming the center of the graph
-
periphery
IntSet periphery()
Description copied from interface:DistanceMeasures
Get the periphery of the graph.Given a graph \(G=(V,E)\), and an edge weight function \(w:E \rightarrow \mathbb{R}\), the eccentricity of a vertex \(v \in V\) is the maximum distance from \(v\) to any other vertex in the graph. The diameter of the graph is the maximum eccentricity of all vertices in the graph. The periphery of the graph is the set of vertices with eccentricity equal to the diameter.
If the graph is not (strongly) connected, the periphery is the set of all the vertices as all the vertices eccentricity and the diameter are
Double.POSITIVE_INFINITY
.- Specified by:
periphery
in interfaceDistanceMeasures<Integer,Integer>
- Returns:
- the set of vertices forming the periphery of the graph
-
-