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

java.lang.Object
es.uam.eps.ir.relison.diffusion.propagation.AllRecommendedNeighborsPropagationMechanism<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 AllRecommendedNeighborsPropagationMechanism<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 the neighbors who can be reached through a recommendation as the destination of the piece.
  • 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.