Class NewestUpdateMechanism
java.lang.Object
es.uam.eps.ir.relison.diffusion.update.NewestUpdateMechanism
- All Implemented Interfaces:
UpdateMechanism
public class NewestUpdateMechanism extends java.lang.Object implements UpdateMechanism
Update mechanism for the information cascade model. As all selections are independent from the set of users,
this just takes the newest information piece.
-
Constructor Summary
Constructors Constructor Description NewestUpdateMechanism() -
Method Summary
Modifier and Type Method Description PropagatedInformationupdateDiscarded(PropagatedInformation oldInfo, PropagatedInformation newInfo)Updates a piece of information which was previously discarded.PropagatedInformationupdateSeen(PropagatedInformation oldInfo, PropagatedInformation newInfo)Updates a piece of information which has been newly seen.
-
Constructor Details
-
NewestUpdateMechanism
public NewestUpdateMechanism()
-
-
Method Details
-
updateSeen
public PropagatedInformation updateSeen(PropagatedInformation oldInfo, PropagatedInformation newInfo)Description copied from interface:UpdateMechanismUpdates a piece of information which has been newly seen.- Specified by:
updateSeenin interfaceUpdateMechanism- Parameters:
oldInfo- piece of information with old info.newInfo- piece of information with new info.- Returns:
- the updated piece of information.
-
updateDiscarded
public PropagatedInformation updateDiscarded(PropagatedInformation oldInfo, PropagatedInformation newInfo)Description copied from interface:UpdateMechanismUpdates a piece of information which was previously discarded.- Specified by:
updateDiscardedin interfaceUpdateMechanism- Parameters:
oldInfo- piece of information with the discarded info.newInfo- piece of information with the new info.- Returns:
- the updated piece of information.
-