Class AbstractGlobalSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
java.lang.Object
es.uam.eps.ir.relison.diffusion.metrics.AbstractGlobalSimulationMetric<U,I,F>
- Type Parameters:
U
- type of the users.I
- type of the information pieces.F
- type of the parameters.
- All Implemented Interfaces:
GlobalSimulationMetric<U,I,F>
,SimulationMetric<U,I,F>
- Direct Known Subclasses:
AbstractFeatureGlobalSimulationMetric
,CreatorGlobalEntropy
,CreatorGlobalGiniComplement
,InformationPieceGiniComplement
,RealPropagatedGlobalRecall
,Speed
public abstract class AbstractGlobalSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F> extends java.lang.Object implements GlobalSimulationMetric<U,I,F>
Abstract class for representing global simulation metrics.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractGlobalSimulationMetric(java.lang.String name)
Constructor. -
Method Summary
Modifier and Type Method Description java.lang.String
getName()
Obtains the name of the metric.protected abstract void
initialize()
Initializes all the variables needed for computing and updating the values of the metric.void
initialize(Data<U,I,F> data)
Initializes the metric.boolean
isInitialized()
Indicates if the metric has been initialized or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.uam.eps.ir.relison.diffusion.metrics.SimulationMetric
calculate, calculate, clear, initialize, update
-
Field Details
-
name
private final java.lang.String nameThe name of the metric. -
initialized
protected boolean initializedIndicates if the metric has been initialized or not. -
data
The data.
-
-
Constructor Details
-
AbstractGlobalSimulationMetric
public AbstractGlobalSimulationMetric(java.lang.String name)Constructor.- Parameters:
name
- the name of the metric.
-
-
Method Details
-
getName
public java.lang.String getName()Description copied from interface:SimulationMetric
Obtains the name of the metric.- Specified by:
getName
in interfaceSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Returns:
- the name of the metric.
-
isInitialized
public boolean isInitialized()Description copied from interface:SimulationMetric
Indicates if the metric has been initialized or not.- Specified by:
isInitialized
in interfaceSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Returns:
- true if it has been initialized, false if it has not.
-
initialize
Description copied from interface:SimulationMetric
Initializes the metric.- Specified by:
initialize
in interfaceSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Parameters:
data
- the data.
-
initialize
protected abstract void initialize()Initializes all the variables needed for computing and updating the values of the metric.
-