Class PureRecommenderSelectionMechanism<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.PureRecommenderSelectionMechanism<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>
public class PureRecommenderSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P> extends CountSelectionMechanism<U,I,P>
Selects information pieces to propagate depending on the original users and whether they have been propagated through
recommended links. A user can only propagate an information piece owned by another user if it comes from one of such
links.
-
Field Summary
Fields Modifier and Type Field Description private EdgeOrientation
orientation
Neighborhood the information pieces come from. -
Constructor Summary
Constructors Constructor Description PureRecommenderSelectionMechanism(int numOwn, int numPropagate, int numRepr, EdgeOrientation orientation)
Constructor.PureRecommenderSelectionMechanism(int numOwn, int numPropagate, EdgeOrientation orientation)
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
-
Field Details
-
orientation
Neighborhood the information pieces come from. In case of IN, information comes from the followers of the users. In case of OUT (usual) from the followees. Finally, in case of UND, from any of them.
-
-
Constructor Details
-
PureRecommenderSelectionMechanism
public PureRecommenderSelectionMechanism(int numOwn, int numPropagate, EdgeOrientation orientation)Constructor.- Parameters:
numOwn
- number of own information pieces to propagate for each user and iteration.numPropagate
- number of received information to propagate for each user and iteration.orientation
- neighborhood the information pieces come from
-
PureRecommenderSelectionMechanism
public PureRecommenderSelectionMechanism(int numOwn, int numPropagate, int numRepr, EdgeOrientation orientation)Constructor.- Parameters:
numOwn
- number of own information pieces to propagate for each user and iteration.numPropagate
- number of received information to propagate for each user and iteration.numRepr
- number of propagated information pieces to propagate for each user and iteration.orientation
- neighborhood the information pieces come from
-
-
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.
-