Class DistributionParameterReader

java.lang.Object
es.uam.eps.ir.relison.grid.ParametersReader
es.uam.eps.ir.relison.grid.diffusion.metrics.distributions.DistributionParameterReader

public class DistributionParameterReader
extends ParametersReader
Reads the parameter for a distribution during information diffusion simulations. It reads a single configuration for each distribution. In a file, it should look as: distrib_name:
params:
param1: ...
times:
values: [value1,value2,...,valueN] or value1
range: - start: start_val
end: end_val
step: steps_val
- start: ...
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private static java.lang.String END  
    private java.lang.String name
    Name of the selection mechanism.
    private static java.lang.String PARAMS
    Identifier for the parameters.
    private static java.lang.String RANGE  
    private static java.lang.String START  
    private static java.lang.String STEP  
    private java.util.List<java.lang.Integer> times
    Times in which to store the times
    private static java.lang.String TIMES
    Identifiers for the times.
    private Parameters values
    Parameter values for the distribution.
    private static java.lang.String VALUES
    Identifier for the time values.
  • Constructor Summary

    Constructors 
    Constructor Description
    DistributionParameterReader()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getName()
    Obtains the name of the selection mechanism.
    Parameters getParams()
    Obtains the values of the parameters of the selection mechanism.
    java.util.List<java.lang.Integer> getTimes()
    Obtains the list of iterations when the distribution will be written into a file.
    java.lang.String printDistribution()
    Shows the configuration of a distribution.
    void readDistribution​(java.util.Map.Entry<java.lang.String,​java.lang.Object> node)
    Reads the elements of a distribution
    private void readTimes​(java.util.Map<java.lang.String,​java.lang.Object> map)
    Obtains the list of iterations of the simulation when the distribution shall be stored in a file.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • readDistribution

      public void readDistribution​(java.util.Map.Entry<java.lang.String,​java.lang.Object> node)
      Reads the elements of a distribution
      Parameters:
      node - the node containing the information for that selection mechanism.
    • readTimes

      private void readTimes​(java.util.Map<java.lang.String,​java.lang.Object> map)
      Obtains the list of iterations of the simulation when the distribution shall be stored in a file.
      Parameters:
      map - a map containing the times to use.
    • getName

      public java.lang.String getName()
      Obtains the name of the selection mechanism.
      Returns:
      the name of the selection mechanism.
    • getParams

      public Parameters getParams()
      Obtains the values of the parameters of the selection mechanism.
      Returns:
      the values of the parameters.
    • getTimes

      public java.util.List<java.lang.Integer> getTimes()
      Obtains the list of iterations when the distribution will be written into a file.
      Returns:
      the list of iterations.
    • printDistribution

      public java.lang.String printDistribution()
      Shows the configuration of a distribution.
      Returns:
      a string containing the configuration of the distribution.