Class IndividualSightMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>

java.lang.Object
es.uam.eps.ir.relison.diffusion.sight.IndividualSightMechanism<U,​I,​P>
Type Parameters:
U - type of the users.
I - type of the information pieces.
P - type of the parameters.
All Implemented Interfaces:
SightMechanism<U,​I,​P>
Direct Known Subclasses:
AllNotDiscardedNorPropagatedSightMechanism, AllNotDiscardedSightMechanism, AllNotPropagatedSightMechanism, AllRecommendedSightMechanism, AllSightMechanism, AllTrainSightMechanism, RecommendedSightMechanism

public abstract class IndividualSightMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
extends java.lang.Object
implements SightMechanism<U,​I,​P>
Abstract implementation of a sight mechanism who values whether an information piece is observed by a user or not independently.
  • Constructor Summary

    Constructors 
    Constructor Description
    IndividualSightMechanism()  
  • Method Summary

    Modifier and Type Method Description
    void resetSelections​(Data<U,​I,​P> data)
    For each user, this method preconfigures the sight mechanism (for example, selecting a fixed set of users whom each user pays attention to).
    protected abstract boolean seesInformation​(UserState<U> user, Data<U,​I,​P> data, PropagatedInformation prop)
    Checks if a user sees or not a piece of information.
    java.util.List<PropagatedInformation> seesInformation​(UserState<U> user, Data<U,​I,​P> data, java.util.List<PropagatedInformation> prop)
    Given a list of propagated information, it identifies which pieces the user has seen.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • resetSelections

      public void resetSelections​(Data<U,​I,​P> data)
      Description copied from interface: SightMechanism
      For each user, this method preconfigures the sight mechanism (for example, selecting a fixed set of users whom each user pays attention to).
      Specified by:
      resetSelections in interface SightMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
      Parameters:
      data - the simulation data.
    • seesInformation

      public java.util.List<PropagatedInformation> seesInformation​(UserState<U> user, Data<U,​I,​P> data, java.util.List<PropagatedInformation> prop)
      Description copied from interface: SightMechanism
      Given a list of propagated information, it identifies which pieces the user has seen.
      Specified by:
      seesInformation in interface SightMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
      Parameters:
      user - the current state of the user.
      data - the simulation data.
      prop - the list of propagated information.
      Returns:
      a list containing all the information that the user pays attention to from the list of received pieces.
    • seesInformation

      protected abstract boolean seesInformation​(UserState<U> user, Data<U,​I,​P> data, PropagatedInformation prop)
      Checks if a user sees or not a piece of information.
      Parameters:
      user - the user.
      data - the full data.
      prop - the information piece received by a user.
      Returns:
      true if the user sees the piece, false if it does not.