Class InformationFeatureDistribution<U extends java.io.Serializable,​I extends java.io.Serializable,​F>

java.lang.Object
es.uam.eps.ir.relison.diffusion.metrics.distributions.AbstractDistribution<U,​I,​F>
es.uam.eps.ir.relison.diffusion.metrics.distributions.InformationFeatureDistribution<U,​I,​F>
Type Parameters:
U - type of the users.
I - type of the information pieces.
F - type of the the user / information pieces features.
All Implemented Interfaces:
Distribution<U,​I,​F>

public class InformationFeatureDistribution<U extends java.io.Serializable,​I extends java.io.Serializable,​F>
extends AbstractDistribution<U,​I,​F>
Distribution for information pieces features. It measures how many times each information pieces with such feature have been received.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private java.util.Map<F,​java.lang.Double> distrib
    The feature distribution.
    private java.lang.String feature
    Name of the feature.
    private static java.lang.String INFOPARAM
    Name of the distribution.

    Fields inherited from class es.uam.eps.ir.relison.diffusion.metrics.distributions.AbstractDistribution

    data, initialized
  • Constructor Summary

    Constructors 
    Constructor Description
    InformationFeatureDistribution​(java.lang.String feature)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void clear()
    Resets the distribution.
    java.lang.String getName()
    Obtains the name of the distribution.
    protected void initialize()
    Initializes the necessary variables.
    void print​(java.lang.String file)
    Prints the distribution into a file.
    void update​(Iteration<U,​I,​F> iteration)
    Updates the different values of the distribution.

    Methods inherited from class es.uam.eps.ir.relison.diffusion.metrics.distributions.AbstractDistribution

    initialize, isInitialized

    Methods inherited from class java.lang.Object

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

    • INFOPARAM

      private static final java.lang.String INFOPARAM
      Name of the distribution.
      See Also:
      Constant Field Values
    • feature

      private final java.lang.String feature
      Name of the feature.
    • distrib

      private final java.util.Map<F,​java.lang.Double> distrib
      The feature distribution.
  • Constructor Details

    • InformationFeatureDistribution

      public InformationFeatureDistribution​(java.lang.String feature)
      Constructor.
      Parameters:
      feature - The name of the information piece feature whose distribution we want to find.
  • Method Details

    • update

      public void update​(Iteration<U,​I,​F> iteration)
      Description copied from interface: Distribution
      Updates the different values of the distribution.
      Parameters:
      iteration - The current iteration.
    • print

      public void print​(java.lang.String file)
      Description copied from interface: Distribution
      Prints the distribution into a file.
      Parameters:
      file - The output file.
    • clear

      public void clear()
      Description copied from interface: Distribution
      Resets the distribution.
    • getName

      public java.lang.String getName()
      Description copied from interface: Distribution
      Obtains the name of the distribution.
      Specified by:
      getName in interface Distribution<U extends java.io.Serializable,​I extends java.io.Serializable,​F>
      Overrides:
      getName in class AbstractDistribution<U extends java.io.Serializable,​I extends java.io.Serializable,​F>
      Returns:
      the name.
    • initialize

      protected void initialize()
      Description copied from class: AbstractDistribution
      Initializes the necessary variables.
      Specified by:
      initialize in class AbstractDistribution<U extends java.io.Serializable,​I extends java.io.Serializable,​F>