Class MixedFeatureDistribution<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.MixedFeatureDistribution<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 MixedFeatureDistribution<U extends java.io.Serializable,​I extends java.io.Serializable,​F>
extends AbstractDistribution<U,​I,​F>
Distribution combining user and information pieces features. It measures how many times pieces with each information piece, created by a user with a given user feature have been received.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private java.lang.String infoFeature
    Name of the information pieces parameter.
    private static java.lang.String INFOPIECES
    Name of the distribution.
    private java.util.Map<Pair<F>,​java.lang.Double> relation
    Relation between users and tags.
    private java.lang.String userFeature
    Name of the user parameter.

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

    data, initialized
  • Constructor Summary

    Constructors 
    Constructor Description
    MixedFeatureDistribution​(java.lang.String infoFeature, java.lang.String userFeature)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void clear()
    Resets 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

    getName, initialize, isInitialized

    Methods inherited from class java.lang.Object

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

    • INFOPIECES

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

      private final java.lang.String infoFeature
      Name of the information pieces parameter.
    • userFeature

      private final java.lang.String userFeature
      Name of the user parameter.
    • relation

      private final java.util.Map<Pair<F>,​java.lang.Double> relation
      Relation between users and tags.
  • Constructor Details

    • MixedFeatureDistribution

      public MixedFeatureDistribution​(java.lang.String infoFeature, java.lang.String userFeature)
      Constructor.
      Parameters:
      infoFeature - name of the information pieces feature.
      userFeature - name of the user feature.
  • 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.
    • 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>
    • clear

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