Metrics¶
Usage
use Metrics;
Compilation of common metrics to be performed on hypergraphs or graphs.
-
iter
getVertexComponents(graph, s = 1)¶ Iterate over all vertices in graph and count the number of s-connected components. A s-connected component is a group of vertices that can be s-walked to. A vertex v can s-walk to a vertex v’ if the intersection of both v and v’ is at least s. :arg graph: Hypergraph or Graph to obtain the vertex components of. :arg s: Minimum s-connectivity.
-
iter
getEdgeComponents(graph, s = 1)¶ Iterate over all edges in graph and count the number of s-connected components. A s-connected component is a group of vertices that can be s-walked to. A edge e can s-walk to a edge e’ if the intersection of both e and e’ is at least s.
Note
This is significantly slower than getEdgeComponentMappings :arg graph: Hypergraph or Graph to obtain the vertex components of. :arg s: Minimum s-connectivity.
-
proc
getVertexComponentMappings(graph, s = 1)¶ Assigns vertices to components and assigns them component ids. Returns an array that is mapped over the same domain as the hypergraph or graph.
Arguments: - graph – Hypergraph or graph.
- s – Minimum s-connectivity.
-
proc
getEdgeComponentMappings(graph, s = 1)¶ Assigns hyperedges to components and assigns them component ids. Returns an array that is mapped over the same domain as the hypergraph or graph. Component ids are
Arguments: - graph – Hypergraph or graph.
- s – Minimum s-connectivity.
-
proc
vertexDegreeDistribution(graph)¶ Obtain the degree distribution of vertices as a histogram.
Arguments: graph – Hypergraph or graph.
-
proc
edgeDegreeDistribution(graph)¶ Obtain the degree distribution of edges as a histogram.
Arguments: graph – Hypergraph or graph.
-
proc
componentSizeDistribution(componentMappings: [?D] int)¶
-
proc
vertexComponentSizeDistribution(graph, s = 1)¶ Obtain the component size distribution of vertices as a histogram.
Arguments: - graph – Hypergraph or graph.
- s – Minimum s-connectivity.
-
proc
edgeComponentSizeDistribution(graph, s = 1)¶ Obtain the component size distribution of edges as a histogram.
Arguments: - graph – Hypergraph or graph.
- s – Minimum s-connectivity.
-
proc
edgeSDistance(graph, source, target, s)¶
-
proc
vertexSDistance(graph, source, target, s)¶