Class AbstractDistribution<U extends java.io.Serializable,I extends java.io.Serializable,F>
java.lang.Object
es.uam.eps.ir.relison.diffusion.metrics.distributions.AbstractDistribution<U,I,F>
- Type Parameters:
U
- Type of the users.I
- Type of the information pieces.F
- Type of the features.
- All Implemented Interfaces:
Distribution<U,I,F>
- Direct Known Subclasses:
InfoPiecesDistribution
,InformationFeatureDistribution
,MixedFeatureDistribution
,UserDistribution
,UserFeatureDistribution
public abstract class AbstractDistribution<U extends java.io.Serializable,I extends java.io.Serializable,F> extends java.lang.Object implements Distribution<U,I,F>
Abstract class for defining a distribution of elements.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractDistribution(java.lang.String name)
Constructor -
Method Summary
Modifier and Type Method Description java.lang.String
getName()
Obtains the name of the distribution.protected abstract void
initialize()
Initializes the necessary variables.void
initialize(Data<U,I,F> data)
Initializes the necessary parameters for the distribution.boolean
isInitialized()
Checks if the distribution has been initialized.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.distributions.Distribution
clear, print, update
-
Field Details
-
data
The complete data. -
initialized
protected boolean initializedIndicates if it has been initialized. -
name
private final java.lang.String nameThe distribution name
-
-
Constructor Details
-
AbstractDistribution
public AbstractDistribution(java.lang.String name)Constructor- Parameters:
name
- the distribution name.
-
-
Method Details
-
initialize
Description copied from interface:Distribution
Initializes the necessary parameters for the distribution.- Specified by:
initialize
in interfaceDistribution<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Parameters:
data
- the data.
-
initialize
protected abstract void initialize()Initializes the necessary variables. -
getName
public java.lang.String getName()Description copied from interface:Distribution
Obtains the name of the distribution.- Specified by:
getName
in interfaceDistribution<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Returns:
- the name.
-
isInitialized
public boolean isInitialized()Description copied from interface:Distribution
Checks if the distribution has been initialized.- Specified by:
isInitialized
in interfaceDistribution<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Returns:
- true if the distribution has been initialized, false if it has not.
-