Interface IndividualCommunityMetric<U>
- Type Parameters:
U
- Type of the nodes.
- All Known Implementing Classes:
CommunityDegree
,ComplementaryIndividualCommunityMetric
,Size
,Volume
public interface IndividualCommunityMetric<U>
Computes a metric for each individual community.
-
Method Summary
Modifier and Type Method Description double
averageValue(Graph<U> graph, Communities<U> comm)
Computes the average value of the metric in the graph.java.util.Map<java.lang.Integer,java.lang.Double>
compute(Graph<U> graph, Communities<U> comm)
Computes the value of the metric for all the users in the graph.double
compute(Graph<U> graph, Communities<U> comm, int indiv)
Computes the value of the metric for a single user.
-
Method Details
-
compute
Computes the value of the metric for a single user.- Parameters:
graph
- The graph.comm
- The relation between communities and nodes.indiv
- Individual community- Returns:
- the value of the metric.
-
compute
Computes the value of the metric for all the users in the graph.- Parameters:
graph
- The graph.comm
- The communities of the graph.- Returns:
- A map relating the users with the values of the metric.
-
averageValue
Computes the average value of the metric in the graph.- Parameters:
graph
- The graph.comm
- the communities of the graph.- Returns:
- the average value of the metric.
-