Interface PropagationMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Type Parameters:
U- type of the users.I- type of the items.P- type of the parameters.
- All Known Implementing Classes:
AllNeighborsPropagationMechanism,AllRecommendedNeighborsPropagationMechanism,PullPushStrategyPropagationMechanism,PullPushStrategyPureRecommenderPropagationMechanism,PullPushStrategyRecommenderPropagationMechanism,PullStrategyPropagationMechanism,PushStrategyPropagationMechanism
public interface PropagationMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
Mechanism for selecting the set of users towards whom each user in the network propagates his/her information
pieces.
-
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.default voidresetSelections(Data<U,I,P> data)It resets the selections that this mechanism did in past iterations.
-
Method Details
-
getUsersToPropagate
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.- 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.
-
resetSelections
It resets the selections that this mechanism did in past iterations.- Parameters:
data- the data.
-
dependsOnInformationPiece
boolean dependsOnInformationPiece()This indicates whether the selection of the users depends or not on the information piece which we want to propagate.- Returns:
- true if it depends on the information piece, false if it does not.
-