Class SimpleCommunityGraphGenerator<U>
java.lang.Object
es.uam.eps.ir.relison.sna.community.graph.SimpleCommunityGraphGenerator<U>
- Type Parameters:
U
- type of the users.
- All Implemented Interfaces:
GraphGenerator<java.lang.Integer>
public class SimpleCommunityGraphGenerator<U> extends java.lang.Object implements GraphGenerator<java.lang.Integer>
Generates a community graph, which has, at most, a single link between
each pair of communities (including auto-loops). The weight of the corresponding
graph is the sum of the weight of the links between communities.
-
Field Summary
Fields Modifier and Type Field Description private Communities<U>
comm
A community partition.private boolean
configured
true if the generator has been configured, false otherwise.private boolean
directed
true if we have to take into account the real directionality of the graph, false if the graph has to be undirected.private Graph<U>
graph
The graph. -
Constructor Summary
Constructors Constructor Description SimpleCommunityGraphGenerator()
-
Method Summary
-
Field Details
-
graph
The graph. -
comm
A community partition. -
directed
private boolean directedtrue if we have to take into account the real directionality of the graph, false if the graph has to be undirected. -
configured
private boolean configuredtrue if the generator has been configured, false otherwise.
-
-
Constructor Details
-
SimpleCommunityGraphGenerator
public SimpleCommunityGraphGenerator()
-
-
Method Details
-
configure
public void configure(java.lang.Object... configuration)Description copied from interface:GraphGenerator
Configures the generator.- Specified by:
configure
in interfaceGraphGenerator<U>
- Parameters:
configuration
- An array containing the configuration parameters.
-
configure
Configures the generator.- Parameters:
graph
- the graph.comm
- the community partition.directed
- true if we have to take communities into account.
-
generate
public Graph<java.lang.Integer> generate() throws GeneratorNotConfiguredException, GeneratorBadConfiguredExceptionDescription copied from interface:GraphGenerator
Generates a graph.- Specified by:
generate
in interfaceGraphGenerator<U>
- Returns:
- the generated graph.
- Throws:
GeneratorNotConfiguredException
- The generator is not configured.GeneratorBadConfiguredException
- The generator parameters are incorretct.
-