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: ...
See Also:
GridReader
  • 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,​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 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.
    • getGrid

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