Class CommunityDetectionSelector<U extends java.io.Serializable>
java.lang.Object
es.uam.eps.ir.relison.grid.community.CommunityDetectionSelector<U>
- Type Parameters:
U
- type of the users
public class CommunityDetectionSelector<U extends java.io.Serializable>
extends java.lang.Object
Given a parameter configuration, this class obtains the corresponding community detection
algorithms, so they can be applied over networks.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
tempFolder
A temporary directory for storing intermediate files. -
Constructor Summary
Constructors Constructor Description CommunityDetectionSelector(java.lang.String tempFolder)
Constructor. -
Method Summary
Modifier and Type Method Description org.jooq.lambda.tuple.Tuple2<java.lang.String,java.util.function.Supplier<CommunityDetectionAlgorithm<U>>>
getCommunityDetectionAlgorithm(java.lang.String algorithm, Parameters parameters)
Obtains the different community detection algorithms to apply.java.util.Map<java.lang.String,java.util.function.Supplier<CommunityDetectionAlgorithm<U>>>
getCommunityDetectionAlgorithms(java.lang.String algorithm, Configurations configs)
Obtains the different community detection algorithms to apply.java.util.Map<java.lang.String,java.util.function.Supplier<CommunityDetectionAlgorithm<U>>>
getCommunityDetectionAlgorithms(java.lang.String algorithm, Grid grid)
Obtains the different community detection algorithms to apply.CommunityDetectionConfigurator<U>
getConfigurator(java.lang.String algorithm)
Obtains a community configurator.
-
Field Details
-
tempFolder
private final java.lang.String tempFolderA temporary directory for storing intermediate files.
-
-
Constructor Details
-
CommunityDetectionSelector
public CommunityDetectionSelector(java.lang.String tempFolder)Constructor.- Parameters:
tempFolder
- a temporary directory for storing intermediate files.
-
-
Method Details
-
getConfigurator
Obtains a community configurator.- Parameters:
algorithm
- the name of the algorithm.- Returns:
- the community detection algorithm configurator if the algorithm exists, null otherwise
-
getCommunityDetectionAlgorithms
public java.util.Map<java.lang.String,java.util.function.Supplier<CommunityDetectionAlgorithm<U>>> getCommunityDetectionAlgorithms(java.lang.String algorithm, Grid grid)Obtains the different community detection algorithms to apply.- Parameters:
algorithm
- the name of the algorithm.grid
- the parameter grid for the community detection approach.- Returns:
- the suppliers for the community detection algorithms, indexed by name. If the algorithm does not exist, it returns null.
-
getCommunityDetectionAlgorithm
public org.jooq.lambda.tuple.Tuple2<java.lang.String,java.util.function.Supplier<CommunityDetectionAlgorithm<U>>> getCommunityDetectionAlgorithm(java.lang.String algorithm, Parameters parameters)Obtains the different community detection algorithms to apply.- Parameters:
algorithm
- the name of the algorithm.parameters
- the parameter configuration for a single community detection approach- Returns:
- a pair containing the name and the supplier for the file if everything is ok, null otherwise.
-
getCommunityDetectionAlgorithms
public java.util.Map<java.lang.String,java.util.function.Supplier<CommunityDetectionAlgorithm<U>>> getCommunityDetectionAlgorithms(java.lang.String algorithm, Configurations configs)Obtains the different community detection algorithms to apply. If a configuration does not result in an algorithm, it is ignored.- Parameters:
algorithm
- the name of the algorithm.configs
- the different configurations for the algorithm.- Returns:
- the suppliers for the community detection algorithms, indexed by name. If the algorithm does not exist, it returns null.
-