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

java.lang.Object
es.uam.eps.ir.relison.diffusion.propagation.AllNeighborsPropagationMechanism<U,​I,​P>
Type Parameters:
U - type of the users.
I - type of the items.
P - type of the parameters.
All Implemented Interfaces:
PropagationMechanism<U,​I,​P>

public class AllNeighborsPropagationMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
extends java.lang.Object
implements PropagationMechanism<U,​I,​P>
Given a single piece of information, a user selects all his/her neighbors as the destination of the piece.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private EdgeOrientation orientation
    The orientation for selecting the neighbors.
  • Constructor Summary

    Constructors 
    Constructor Description
    AllNeighborsPropagationMechanism​(EdgeOrientation orientation)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    boolean dependsOnInformationPiece()
    This indicates whether the selection of the users depends or not on the information piece which we want to propagate.
    java.util.stream.Stream<U> getUsersToPropagate​(PropagatedInformation information, UserState<U> originUser, Data<U,​I,​P> data)
    Selects the users to which propagate a single piece of information.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface es.uam.eps.ir.relison.diffusion.propagation.PropagationMechanism

    resetSelections
  • Field Details

  • Constructor Details

  • Method Details

    • getUsersToPropagate

      public java.util.stream.Stream<U> getUsersToPropagate​(PropagatedInformation information, UserState<U> originUser, Data<U,​I,​P> data)
      Description copied from interface: PropagationMechanism
      Selects the users to which propagate a single piece of information.
      Specified by:
      getUsersToPropagate in interface PropagationMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
      Parameters:
      information - the information piece to propagate.
      originUser - the user who propagates the information piece.
      data - the complete data for the simulation.
      Returns:
      the stream of users to which propagate the single piece of information.
    • dependsOnInformationPiece

      public boolean dependsOnInformationPiece()
      Description copied from interface: PropagationMechanism
      This indicates whether the selection of the users depends or not on the information piece which we want to propagate.
      Specified by:
      dependsOnInformationPiece in interface PropagationMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
      Returns:
      true if it depends on the information piece, false if it does not.