Interface StopCondition<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Type Parameters:
U- type of the users.I- type of the information pieces.F- type of the user and information pieces features.
- All Known Implementing Classes:
MaxTimestampStopCondition,NoMoreNewPropagatedInfoStopCondition,NoMorePropagatedInfoStopCondition,NoMoreTimestampsNorPropInfoStopCondition,NoMoreTimestampsStopCondition,NumIterStopCondition,TotalPropagatedStopCondition
public interface StopCondition<U extends java.io.Serializable,I extends java.io.Serializable,F>
Interface for defining stop conditions for simulations.
-
Method Details
-
stop
boolean stop(int numIter, int numPropagated, int propagatingUsers, long newlyPropagated, long totalPropagated, Data<U,I,F> data, java.lang.Long timestamp)Checks the stop condition.- Parameters:
numIter- the current number of iterations.numPropagated- the number of information pieces which has been propagated during this iteration.propagatingUsers- the number of users who propagate information.newlyPropagated- the number of information pieces which have been seen this iteration.totalPropagated- the total number of information pieces which have been propagated during the simulation.data- the simulation data.timestamp- the timestamp corresponding to the current iteration.- Returns:
- true if the simulator has to stop, false if not.
-