Interface SelectionMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>

Type Parameters:
U - type of the users.
I - type of the information.
P - type of the parameters
All Known Implementing Classes:
AbstractSelectionMechanism, AllRealPropagatedSelectionMechanism, BatchRecommenderSelectionMechanism, CountRealPropagatedSelectionMechanism, CountSelectionMechanism, CountThresholdSelectionMechanism, IndependentCascadeModelSelectionMechanism, LimitedCountThresholdSelectionMechanism, LimitedProportionThresholdSelectionMechanism, LooseTimestampBasedSelectionMechanism, OnlyOwnInformationSelectionMechanism, ProportionThresholdSelectionMechanism, PullPushSelectionMechanism, PureRecommenderSelectionMechanism, PureTimestampBasedSelectionMechanism, RecommenderSelectionMechanism, TimestampBasedSelectionMechanism, TimestampOrderedSelectionMechanism

public interface SelectionMechanism<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
Interface for selecting, each iteration of a diffusion process, the set of users that might propagate some information and the information pieces each one of them might propagate.
  • Method Summary

    Modifier and Type Method Description
    java.util.stream.Stream<U> getSelectableUsers​(Data<U,​I,​P> data, SimulationState<U,​I,​P> state, int numIter, java.lang.Long timestamp)
    Selects the users which can propagate information during the iteration.
    Selection select​(UserState<U> user, Data<U,​I,​P> data, SimulationState<U,​I,​P> state, int numIter, java.lang.Long timestamp)
    Given a user, selects the information pieces that he/she propagates during this iteration.
  • Method Details

    • select

      Selection select​(UserState<U> user, Data<U,​I,​P> data, SimulationState<U,​I,​P> state, int numIter, java.lang.Long timestamp)
      Given a user, selects the information pieces that he/she propagates during this iteration.
      Parameters:
      user - the user to analyze.
      data - the complete data.
      state - the current state of the simulation.
      numIter - the iteration number.
      timestamp - the current timestamp.
      Returns:
      a selection of information pieces to be propagated.
    • getSelectableUsers

      java.util.stream.Stream<U> getSelectableUsers​(Data<U,​I,​P> data, SimulationState<U,​I,​P> state, int numIter, java.lang.Long timestamp)
      Selects the users which can propagate information during the iteration.
      Parameters:
      data - the complete data.
      state - the current state of the simulation.
      numIter - iteration number.
      timestamp - the current timestamp.
      Returns:
      a stream containing the users who can propagate information.