Class CreatorRecall<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.creator.individual.CreatorRecall<U,I,F>
- Type Parameters:
- U- type of the users.
- I- type of the information pieces.
- F- type of the features.
- All Implemented Interfaces:
- IndividualSimulationMetric<U,I,F>,- SimulationMetric<U,I,F>
public class CreatorRecall<U extends java.io.Serializable,I extends java.io.Serializable,F> extends AbstractIndividualSimulationMetric<U,I,F>
For each user in the network, this metric computes the proportion of users in the network who have created
 an information piece that has been received by the user (i.e. supposing that all the received pieces indicated
 the original creator, this metric indicates the fraction of the people in the network that each user has
 discovered).
- 
Field SummaryFields Modifier and Type Field Description private static java.lang.StringRECALLName fixed value.private java.util.Map<U,java.util.Set<U>>retrievedThe different "retrieved" users.Fields inherited from class es.uam.eps.ir.relison.diffusion.metrics.AbstractIndividualSimulationMetricdata, initialized
- 
Constructor SummaryConstructors Constructor Description CreatorRecall()Constructor.
- 
Method SummaryModifier 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.AbstractIndividualSimulationMetriccalculateIndividuals, getName, initialize, isInitializedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.relison.diffusion.metrics.IndividualSimulationMetriccalculate, calculateIndividualsMethods inherited from interface es.uam.eps.ir.relison.diffusion.metrics.SimulationMetriccalculate, initialize
- 
Field Details- 
RECALLprivate static final java.lang.String RECALLName fixed value.- See Also:
- Constant Field Values
 
- 
retrievedprivate final java.util.Map<U extends java.io.Serializable,java.util.Set<U extends java.io.Serializable>> retrievedThe different "retrieved" users.
 
- 
- 
Constructor Details- 
CreatorRecallpublic CreatorRecall()Constructor.
 
- 
- 
Method Details- 
calculateDescription 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.
 
- 
calculatepublic 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
 
- 
updateDescription 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.
 
- 
clearpublic void clear()Description copied from interface:SimulationMetricResets the metric.
- 
initializeprotected void initialize()Description copied from class:AbstractIndividualSimulationMetricInitializes all the variables needed for computing and updating the values of the metric.- Specified by:
- initializein class- AbstractIndividualSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
 
 
-