Class CommunityDetectionGridReader
java.lang.Object
es.uam.eps.ir.relison.grid.GridReader
es.uam.eps.ir.relison.grid.community.CommunityDetectionGridReader
public class CommunityDetectionGridReader extends GridReader
Class for reading a community detection algorithm.
For each algorithm, a single set of parameters is read.
File format:
algorithm:
param1: ...
File format:
algorithm:
param1: ...
- See Also:
GridReader
-
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,Grid>
communityDetectionAlgorithms
The set of parameters for the community detection algorithms. -
Constructor Summary
Constructors Constructor Description CommunityDetectionGridReader()
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.Grid
getGrid(java.lang.String algorithm)
Gets the grid of 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.GridReader
readBooleanGrid, readDoubleGrid, readGridGrid, readIntegerGrid, readLongGrid, readOrientationGrid, readParameterGrid, readStringGrid
-
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
-
CommunityDetectionGridReader
public CommunityDetectionGridReader()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.
-
getGrid
Gets the grid of parameters for the given algorithm.- Parameters:
algorithm
- the community detection algorithm to search.- Returns:
- The grid of parameters if it exists, an empty parameter object if not.
-