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: ...
See Also:
ParametersReader
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private static java.lang.String ALGORITHMS
    Identifier for the name of the mechanism
    private 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 parameters
    void readAlgorithm​(java.util.Map.Entry<java.lang.String,​java.lang.Object> element)
    Reads the parameters of a community detection algorithm.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • 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

      public Parameters getParameters​(java.lang.String algorithm)
      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.