Class MonteCarloGiniCollection

java.lang.Object
es.uam.eps.ir.relison.utils.indexes.MonteCarloGiniCollection

public class MonteCarloGiniCollection
extends java.lang.Object
Configures a set of MonteCarlo-computed Gini coefficients.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private int maxSizePerIndiv
    Maximum income per individual.
    private java.util.List<MonteCarloGini> mcList
    A list containing the different distributions for the Gini
    private int populationSize
    Size of the population
    private int totalFreq
    Total frequency.
  • Constructor Summary

    Constructors 
    Constructor Description
    MonteCarloGiniCollection​(int populationSize, int numMC)
    Constructor.
    MonteCarloGiniCollection​(int populationSize, int maxSizePerIndiv, int numMC)
    Full constructor.
  • Method Summary

    Modifier and Type Method Description
    double averageValue()
    Computes the average value computed by MonteCarlo.
    double maxValue()
    Returns the maximum value for the Gini coefficient and the current configuration.
    double minValue()
    Returns the minimum value for the Gini coefficient and the current configuration.
    void update​(int newElems)
    Update the MonteCarlo Gini collection with a fixed number of elements.

    Methods inherited from class java.lang.Object

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

    • populationSize

      private final int populationSize
      Size of the population
    • maxSizePerIndiv

      private final int maxSizePerIndiv
      Maximum income per individual.
    • mcList

      private final java.util.List<MonteCarloGini> mcList
      A list containing the different distributions for the Gini
    • totalFreq

      private int totalFreq
      Total frequency.
  • Constructor Details

    • MonteCarloGiniCollection

      public MonteCarloGiniCollection​(int populationSize, int maxSizePerIndiv, int numMC)
      Full constructor.
      Parameters:
      populationSize - the population size.
      maxSizePerIndiv - maximum income per individual in the population (0 if there is no limit).
      numMC - Number of MonteCarlo samples
    • MonteCarloGiniCollection

      public MonteCarloGiniCollection​(int populationSize, int numMC)
      Constructor. Considers no limit to the maximum income per individual in the population.
      Parameters:
      populationSize - the population size.
      numMC - Number of MonteCarlo samples.
  • Method Details

    • maxValue

      public double maxValue()
      Returns the maximum value for the Gini coefficient and the current configuration.
      Returns:
      the maximum value for the Gini coefficient and the current configuration.
    • minValue

      public double minValue()
      Returns the minimum value for the Gini coefficient and the current configuration.
      Returns:
      the minimum value for the Gini coefficient and the current configuration.
    • averageValue

      public double averageValue()
      Computes the average value computed by MonteCarlo.
      Returns:
      the average value.
    • update

      public void update​(int newElems)
      Update the MonteCarlo Gini collection with a fixed number of elements.
      Parameters:
      newElems - the number of new elements.