Class TimestampBasedSelectionMechanism<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.TimestampBasedSelectionMechanism<U,I,P>
- Type Parameters:
U
- type of the users.I
- type of the information pieces.P
- type of the parameters.
- All Implemented Interfaces:
SelectionMechanism<U,I,P>
- Direct Known Subclasses:
LooseTimestampBasedSelectionMechanism
,PureTimestampBasedSelectionMechanism
public abstract class TimestampBasedSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P> extends AbstractSelectionMechanism<U,I,P>
Selection mechanism that takes the real timestamps of the users into account. Each own piece of information
is released when the timestamp of the piece is equal to the timestamp of the simulation. No information pieces
are repropagated.
-
Constructor Summary
Constructors Constructor Description TimestampBasedSelectionMechanism()
-
Method Summary
Modifier and Type Method Description protected java.util.List<PropagatedInformation>
getOwnInformation(UserState<U> user, Data<U,I,P> data, SimulationState<U,I,P> state, int numIter, java.lang.Long timestamp)
Obtains the list of own information pieces to repropagate.protected java.util.List<PropagatedInformation>
getRepropagatedInformation(UserState<U> user, Data<U,I,P> data, SimulationState<U,I,P> state, int numIter, java.lang.Long timestamp)
Obtains the list of propagated information pieces to repropagate.Methods inherited from class es.uam.eps.ir.relison.diffusion.selections.AbstractSelectionMechanism
getReceivedInformation, getSelectableUsers, select
-
Constructor Details
-
TimestampBasedSelectionMechanism
public TimestampBasedSelectionMechanism()
-
-
Method Details
-
getOwnInformation
protected java.util.List<PropagatedInformation> getOwnInformation(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 own information pieces to repropagate.- Specified by:
getOwnInformation
in classAbstractSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Parameters:
user
- the user to analyze.data
- the full data.state
- current simulation state.numIter
- the iteration number.timestamp
- the timestamp for the current simulation.- Returns:
- a selection of the own information pieces to be propagated.
-
getRepropagatedInformation
protected java.util.List<PropagatedInformation> getRepropagatedInformation(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 propagated information pieces to repropagate.- Specified by:
getRepropagatedInformation
in classAbstractSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Parameters:
user
- the user to analyze.data
- the full data.state
- current simulation state.numIter
- number of the iteration.timestamp
- the timestamp for the current simulation.- Returns:
- a selection of the information pieces to repropagate.
-