Class SimulationMetricsParameterReader

java.lang.Object
es.uam.eps.ir.relison.grid.diffusion.SimulationMetricsParameterReader

public class SimulationMetricsParameterReader
extends java.lang.Object
Obtains the configuration of metrics to use in the evaluation of the information diffusion process.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private java.util.Map<java.lang.String,​org.jooq.lambda.tuple.Tuple2<Parameters,​java.util.List<java.lang.Integer>>> distribParams
    Parameters for the different distributions to compute.
    private static java.lang.String DISTRIBUTIONS
    Identifier for the distributions list
    private static java.lang.String FILTER
    Identifier for the filter
    private java.util.List<FilterParameterReader> filterParams
    Parameters for the different filters.
    private static java.lang.String FILTERS
    Identifier for filters
    private java.util.Map<java.lang.String,​Parameters> metricParams
    Parameters for the different metrics to compute.
    private static java.lang.String METRICS
    Identifier for the metrics list.
  • Constructor Summary

    Constructors 
    Constructor Description
    SimulationMetricsParameterReader()
    Constructor
  • Method Summary

    Modifier and Type Method Description
    org.jooq.lambda.tuple.Tuple2<Parameters,​java.util.List<java.lang.Integer>> getDistributionParameters​(java.lang.String distrib)
    Obtains the set of parameters for a single distribution.
    java.util.List<java.lang.String> getDistributions()
    Obtains the list of metrics.
    FilterParameterReader getFilterParameter​(int num)
    Gets the parameters for a single filter.
    java.util.List<FilterParameterReader> getFiltersParameters()
    Gets the filter parameters for a given simulation.
    Parameters getMetricParameters​(java.lang.String metric)
    Obtains the set of parameters for a single metric.
    java.util.List<java.lang.String> getMetrics()
    Obtains the list of metrics.
    void read​(java.util.Map<java.lang.String,​java.lang.Object> map)
    Obtains the metric configuration for the diffusion simulation from a YAML file.
    private void readDistributions​(java.util.Map<java.lang.String,​java.lang.Object> node)
    Reads the configuration parameters for a list of information propagation distributions.
    private void readFilters​(java.util.Map<java.lang.String,​java.lang.Object> filters)
    Reads the configuration parameters for the data filters.
    private void readMetrics​(java.util.Map<java.lang.String,​java.lang.Object> node)
    Reads the configuration parameters for a list of information propagation metrics.

    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)
      Obtains the metric configuration for the diffusion simulation from a YAML file.
      Parameters:
      map - a map representing the contents of the YAML file.
    • readMetrics

      private void readMetrics​(java.util.Map<java.lang.String,​java.lang.Object> node)
      Reads the configuration parameters for a list of information propagation metrics.
      Parameters:
      node - the map specifying the list of metrics.
    • readDistributions

      private void readDistributions​(java.util.Map<java.lang.String,​java.lang.Object> node)
      Reads the configuration parameters for a list of information propagation distributions.
      Parameters:
      node - the node containing the list of distributions.
    • readFilters

      private void readFilters​(java.util.Map<java.lang.String,​java.lang.Object> filters)
      Reads the configuration parameters for the data filters.
      Parameters:
      filters - a map containing the filters to apply.
    • getMetrics

      public java.util.List<java.lang.String> getMetrics()
      Obtains the list of metrics.
      Returns:
      a list containing the names of the metrics.
    • getMetricParameters

      public Parameters getMetricParameters​(java.lang.String metric)
      Obtains the set of parameters for a single metric.
      Parameters:
      metric - the name of the metric.
      Returns:
      the parameters for the given metric if they exist, an empty parameter set otherwise.
    • getDistributions

      public java.util.List<java.lang.String> getDistributions()
      Obtains the list of metrics.
      Returns:
      a list containing the names of the metrics.
    • getDistributionParameters

      public org.jooq.lambda.tuple.Tuple2<Parameters,​java.util.List<java.lang.Integer>> getDistributionParameters​(java.lang.String distrib)
      Obtains the set of parameters for a single distribution.
      Parameters:
      distrib - the name of the distribution.
      Returns:
      the parameters for the given distribution if they exist, an empty parameter set otherwise.
    • getFiltersParameters

      public java.util.List<FilterParameterReader> getFiltersParameters()
      Gets the filter parameters for a given simulation.
      Returns:
      the filter parameters.
    • getFilterParameter

      public FilterParameterReader getFilterParameter​(int num)
      Gets the parameters for a single filter.
      Parameters:
      num - the index of the filter
      Returns:
      the filter parameters, or null if it does not exist.