Class InformationPieceGiniComplement<U extends java.io.Serializable,I extends java.io.Serializable,P>
java.lang.Object
es.uam.eps.ir.relison.diffusion.metrics.AbstractGlobalSimulationMetric<U,I,P>
es.uam.eps.ir.relison.diffusion.metrics.informationpieces.global.InformationPieceGiniComplement<U,I,P>
- Type Parameters:
U- type of the user.I- type of the information.P- type of the parameters.
- All Implemented Interfaces:
GlobalSimulationMetric<U,I,P>,SimulationMetric<U,I,P>
public class InformationPieceGiniComplement<U extends java.io.Serializable,I extends java.io.Serializable,P> extends AbstractGlobalSimulationMetric<U,I,P>
It finds the complement of the Gini coefficient of the distribution of the times each information piece is received and seen
during the simulation.
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringINFOPIECEGININame fixed value.private Relation<java.lang.Integer>relationRelation between users and received pieces of information.private doublespeedSpeed value.Fields inherited from class es.uam.eps.ir.relison.diffusion.metrics.AbstractGlobalSimulationMetric
data, initialized -
Constructor Summary
Constructors Constructor Description InformationPieceGiniComplement()Constructor. -
Method Summary
Modifier and Type Method Description doublecalculate()Calculates the metric for the current state of the simulation.voidclear()Resets the metric.protected voidinitialize()Initializes all the variables needed for computing and updating the values of the metric.voidupdate(Iteration<U,I,P> 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.AbstractGlobalSimulationMetric
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.SimulationMetric
calculate, initialize
-
Field Details
-
relation
Relation between users and received pieces of information. -
INFOPIECEGINI
private static final java.lang.String INFOPIECEGININame fixed value.- See Also:
- Constant Field Values
-
speed
private double speedSpeed value.
-
-
Constructor Details
-
InformationPieceGiniComplement
public InformationPieceGiniComplement()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:AbstractGlobalSimulationMetricInitializes all the variables needed for computing and updating the values of the metric.- Specified by:
initializein classAbstractGlobalSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,P>
-