Class RealPropagatedRecall<U extends java.io.Serializable,I extends java.io.Serializable,F>
java.lang.Object
es.uam.eps.ir.relison.diffusion.metrics.AbstractIndividualSimulationMetric<U,I,F>
es.uam.eps.ir.relison.diffusion.metrics.informationpieces.individual.RealPropagatedRecall<U,I,F>
- Type Parameters:
U- type of the user.I- type of the information.F- type of the features.
- All Implemented Interfaces:
IndividualSimulationMetric<U,I,F>,SimulationMetric<U,I,F>
public class RealPropagatedRecall<U extends java.io.Serializable,I extends java.io.Serializable,F> extends AbstractIndividualSimulationMetric<U,I,F>
Computes the fraction of pieces which were repropagated in the real setting which have been received by each user.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<U,java.lang.Double>currentSpeed value.private java.util.Map<U,java.lang.Double>maximumNumber of currently propagated.private static java.lang.StringPROPName fixed value.Fields inherited from class es.uam.eps.ir.relison.diffusion.metrics.AbstractIndividualSimulationMetric
data, initialized -
Constructor Summary
Constructors Constructor Description RealPropagatedRecall()Constructor. -
Method Summary
Modifier and Type Method Description doublecalculate()Calculates the metric for the current state of the simulation.doublecalculate(U user)Calculates the metric value for a single user.voidclear()Resets the metric.protected voidinitialize()Initializes all the variables needed for computing and updating the values of the metric.voidupdate(Iteration<U,I,F> iteration)Updates the different values which are necessary for computing a metric, given the information received by users in an iteration of the simulation.Methods inherited from class es.uam.eps.ir.relison.diffusion.metrics.AbstractIndividualSimulationMetric
calculateIndividuals, getName, initialize, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.relison.diffusion.metrics.IndividualSimulationMetric
calculate, calculateIndividualsMethods inherited from interface es.uam.eps.ir.relison.diffusion.metrics.SimulationMetric
calculate, initialize
-
Field Details
-
PROP
private static final java.lang.String PROPName fixed value.- See Also:
- Constant Field Values
-
current
Speed value. -
maximum
Number of currently propagated.
-
-
Constructor Details
-
RealPropagatedRecall
public RealPropagatedRecall()Constructor.
-
-
Method Details
-
clear
public void clear()Description copied from interface:SimulationMetricResets the metric. -
calculate
public double calculate()Description copied from interface:SimulationMetricCalculates the metric for the current state of the simulation.- Returns:
- the value of the metric for the current state of the simulation
-
update
Description copied from interface:SimulationMetricUpdates the different values which are necessary for computing a metric, given the information received by users in an iteration of the simulation.- Parameters:
iteration- the new iteration.
-
initialize
protected void initialize()Description copied from class:AbstractIndividualSimulationMetricInitializes all the variables needed for computing and updating the values of the metric.- Specified by:
initializein classAbstractIndividualSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
-
calculate
Description copied from interface:IndividualSimulationMetricCalculates the metric value for a single user.- Parameters:
user- the single user.- Returns:
- the value of the metric, NaN if something failed.
-