Class CompleteCommunityNoSelfLoopsGraphGenerator<U>
java.lang.Object
es.uam.eps.ir.relison.sna.community.graph.CompleteCommunityNoSelfLoopsGraphGenerator<U>
- Type Parameters:
U
- type of the nodes
- All Implemented Interfaces:
CommunityGraphGenerator<U>
public class CompleteCommunityNoSelfLoopsGraphGenerator<U> extends java.lang.Object implements CommunityGraphGenerator<U>
Generates a multi-graph which contains all communities as nodes and all links between
communities (different or not) as edges. Self-loops in the original network do not generate links
in the community network.
-
Constructor Summary
Constructors Constructor Description CompleteCommunityNoSelfLoopsGraphGenerator()
-
Method Summary
Modifier and Type Method Description MultiGraph<java.lang.Integer>
generate(Graph<U> graph, Communities<U> communities)
Given a graph and its community partition, generates the community graph.
-
Constructor Details
-
CompleteCommunityNoSelfLoopsGraphGenerator
public CompleteCommunityNoSelfLoopsGraphGenerator()
-
-
Method Details
-
generate
Description copied from interface:CommunityGraphGenerator
Given a graph and its community partition, generates the community graph.- Specified by:
generate
in interfaceCommunityGraphGenerator<U>
- Parameters:
graph
- the original network.communities
- the community partition of the network.- Returns:
- the community-based multigraph.
-