Interface IDistanceMeasures

All Superinterfaces:
DistanceMeasures<Integer,Integer>

public interface IDistanceMeasures extends DistanceMeasures<Integer,Integer>
A set of graph distance measures for IntGraph.

This interface is a specification of DistanceMeasures for IntGraph. See the generic interface for the full documentation.

Author:
Barak Ugav
  • Method Details

    • 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 use eccentricity(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 interface DistanceMeasures<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 interface DistanceMeasures<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 interface DistanceMeasures<Integer,Integer>
      Returns:
      the set of vertices forming the periphery of the graph