Class Volume<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.communities.indiv.Volume<U>
- Type Parameters:
U
- type of the users.
- All Implemented Interfaces:
IndividualCommunityMetric<U>
public class Volume<U> extends java.lang.Object implements IndividualCommunityMetric<U>
Computes the volume of the community: the sum of the degrees
of the nodes in the community.
-
Field Summary
Fields Modifier and Type Field Description private EdgeOrientation
orientation
Indicates if the degree to use is inDegree, outDegree or the full degree of the community graph. -
Constructor Summary
Constructors Constructor Description Volume(EdgeOrientation orientation)
Constructor. -
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.
-
Field Details
-
orientation
Indicates if the degree to use is inDegree, outDegree or the full degree of the community graph.
-
-
Constructor Details
-
Volume
Constructor.- Parameters:
orientation
- indicates if the degree to use is the in-degree, out-degree or full full degree of the nodes in the community graph.
-
-
Method Details
-
compute
Description copied from interface:IndividualCommunityMetric
Computes the value of the metric for a single user.- Specified by:
compute
in interfaceIndividualCommunityMetric<U>
- Parameters:
graph
- The graph.comm
- The relation between communities and nodes.indiv
- Individual community- Returns:
- the value of the metric.
-
compute
public java.util.Map<java.lang.Integer,java.lang.Double> compute(Graph<U> graph, Communities<U> comm)Description copied from interface:IndividualCommunityMetric
Computes the value of the metric for all the users in the graph.- Specified by:
compute
in interfaceIndividualCommunityMetric<U>
- Parameters:
graph
- The graph.comm
- The communities of the graph.- Returns:
- A map relating the users with the values of the metric.
-
averageValue
Description copied from interface:IndividualCommunityMetric
Computes the average value of the metric in the graph.- Specified by:
averageValue
in interfaceIndividualCommunityMetric<U>
- Parameters:
graph
- The graph.comm
- the communities of the graph.- Returns:
- the average value of the metric.
-