Class CountRealPropagatedSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
java.lang.Object
es.uam.eps.ir.relison.diffusion.selections.AbstractSelectionMechanism<U,I,P>
es.uam.eps.ir.relison.diffusion.selections.CountSelectionMechanism<U,I,P>
es.uam.eps.ir.relison.diffusion.selections.CountRealPropagatedSelectionMechanism<U,I,P>
- Type Parameters:
U
- type of the users.I
- type of the information.P
- type of the parameters.
- All Implemented Interfaces:
SelectionMechanism<U,I,P>
- Direct Known Subclasses:
AllRealPropagatedSelectionMechanism
public class CountRealPropagatedSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P> extends CountSelectionMechanism<U,I,P>
Selection mechanism that chooses randomly a fixed number of information pieces owned by the propagating user, and,
from the received ones, it randomly chooses a fixed number of pieces which the user did propagate during the actual
diffusion procedure (in a real life scenario).
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CountRealPropagatedSelectionMechanism(int numOwn, int numPropagate)
Constructor.CountRealPropagatedSelectionMechanism(int numOwn, int numPropagate, int numRepropagate)
Constructor. -
Method Summary
Modifier and Type Method Description protected java.util.List<PropagatedInformation>
getReceivedInformation(UserState<U> user, Data<U,I,P> data, SimulationState<U,I,P> state, int numIter, java.lang.Long timestamp)
Obtains the list of received information pieces to repropagate.Methods inherited from class es.uam.eps.ir.relison.diffusion.selections.CountSelectionMechanism
getNumOwn, getNumReceived, getNumRepropagate, getOwnInformation, getPropagatedInformation, getRepropagatedInformation
Methods inherited from class es.uam.eps.ir.relison.diffusion.selections.AbstractSelectionMechanism
getSelectableUsers, select
-
Constructor Details
-
CountRealPropagatedSelectionMechanism
public CountRealPropagatedSelectionMechanism(int numOwn, int numPropagate)Constructor.- Parameters:
numOwn
- the number of own information pieces to propagate for each user and iteration.numPropagate
- the number of received information to propagate for each user and iteration.
-
CountRealPropagatedSelectionMechanism
public CountRealPropagatedSelectionMechanism(int numOwn, int numPropagate, int numRepropagate)Constructor.- Parameters:
numOwn
- the number of own information pieces to propagate for each user and iteration.numPropagate
- the number of received information to propagate for each user and iteration.numRepropagate
- the number of information pieces to repropagate for each user and iteration.
-
-
Method Details
-
getReceivedInformation
protected java.util.List<PropagatedInformation> getReceivedInformation(UserState<U> user, Data<U,I,P> data, SimulationState<U,I,P> state, int numIter, java.lang.Long timestamp)Description copied from class:AbstractSelectionMechanism
Obtains the list of received information pieces to repropagate.- Overrides:
getReceivedInformation
in classCountSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Parameters:
user
- the user to analyze.data
- the full data.state
- the iteration number.numIter
- number of the iteration.timestamp
- the timestamp for the current simulation.- Returns:
- a selection of the received information pieces to be propagated.
-