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 Summary
Fields Modifier and Type Field Description private EdgeOrientationorientationThe orientation for selecting the neighbors. -
Constructor Summary
Constructors Constructor Description AllRecommendedNeighborsPropagationMechanism(EdgeOrientation orientation)Constructor. -
Method Summary
Modifier and Type Method Description booleandependsOnInformationPiece()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, waitMethods inherited from interface es.uam.eps.ir.relison.diffusion.propagation.PropagationMechanism
resetSelections
-
Field Details
-
orientation
The orientation for selecting the neighbors.
-
-
Constructor Details
-
AllRecommendedNeighborsPropagationMechanism
Constructor.- Parameters:
orientation- the orientation for selecting the neighbors.
-
-
Method Details
-
getUsersToPropagate
public java.util.stream.Stream<U> getUsersToPropagate(PropagatedInformation information, UserState<U> originUser, Data<U,I,P> data)Description copied from interface:PropagationMechanismSelects the users to which propagate a single piece of information.- Specified by:
getUsersToPropagatein interfacePropagationMechanism<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:PropagationMechanismThis indicates whether the selection of the users depends or not on the information piece which we want to propagate.- Specified by:
dependsOnInformationPiecein interfacePropagationMechanism<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.
-