Class CommunityDetectionConfigurationsReader
java.lang.Object
es.uam.eps.ir.relison.grid.ConfigurationsReader
es.uam.eps.ir.relison.grid.community.CommunityDetectionConfigurationsReader
public class CommunityDetectionConfigurationsReader extends ConfigurationsReader
Class for reading a community detection algorithm.
For each algorithm, a list of parameter configurations is read.
File format:
algorithm:
param1: ...
File format:
algorithm:
param1: ...
- See Also:
ConfigurationsReader
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ALGORITHMS
Identifier for the name of the mechanismprivate java.util.Map<java.lang.String,Configurations>
communityDetectionAlgorithms
The set of parameters for the community detection algorithms. -
Constructor Summary
Constructors Constructor Description CommunityDetectionConfigurationsReader()
Constructor. -
Method Summary
Modifier and Type Method Description java.util.Set<java.lang.String>
getAlgorithms()
Gets the set of community detection algorithms previously read from the YAML file.Configurations
getConfigurations(java.lang.String algorithm)
Gets the parameter configurations for the given algorithm.void
read(java.util.Map<java.lang.String,java.lang.Object> map)
Reads a YAML document containing the parametersvoid
readAlgorithm(java.util.Map.Entry<java.lang.String,java.lang.Object> element)
Reads the parameters of a community detection algorithm.
-
Field Details
-
ALGORITHMS
private static final java.lang.String ALGORITHMSIdentifier for the name of the mechanism- See Also:
- Constant Field Values
-
communityDetectionAlgorithms
The set of parameters for the community detection algorithms.
-
-
Constructor Details
-
CommunityDetectionConfigurationsReader
public CommunityDetectionConfigurationsReader()Constructor.
-
-
Method Details
-
read
public void read(java.util.Map<java.lang.String,java.lang.Object> map)Reads a YAML document containing the parameters- Parameters:
map
- a map containing the information about the community detection algorithms in the YAML file.
-
readAlgorithm
public void readAlgorithm(java.util.Map.Entry<java.lang.String,java.lang.Object> element)Reads the parameters of a community detection algorithm.- Parameters:
element
- the YAML element containing the information for that community detection algorithm.
-
getAlgorithms
public java.util.Set<java.lang.String> getAlgorithms()Gets the set of community detection algorithms previously read from the YAML file.- Returns:
- the set of algorithms.
-
getConfigurations
Gets the parameter configurations for the given algorithm.- Parameters:
algorithm
- the community detection algorithm to search.- Returns:
- The parameter configurations if it exists, an empty parameter object if not.
-