Class CommunityDetectionParametersReader
java.lang.Object
es.uam.eps.ir.relison.grid.ParametersReader
es.uam.eps.ir.relison.grid.community.CommunityDetectionParametersReader
public class CommunityDetectionParametersReader extends ParametersReader
Class for reading a community detection algorithm.
For each metric, a single set of parameters is read.
File format:
algorithm:
param1: ...
File format:
algorithm:
param1: ...
- See Also:
ParametersReader
-
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,Parameters>
communityDetectionAlgorithms
The set of parameters for the community detection algorithms. -
Constructor Summary
Constructors Constructor Description CommunityDetectionParametersReader()
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.Parameters
getParameters(java.lang.String algorithm)
Gets the parameters 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.Methods inherited from class es.uam.eps.ir.relison.grid.ParametersReader
readBoolean, readDouble, readInteger, readLong, readOrientation, readParameters, readParameterValues, readString
-
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
-
CommunityDetectionParametersReader
public CommunityDetectionParametersReader()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.
-
getParameters
Gets the parameters for the given algorithm.- Parameters:
algorithm
- the community detection algorithm to search.- Returns:
- The parameters if it exists, an empty parameter object if not.
-