public class ClosenessCentrality extends AbstractCentrality
AbstractCentrality.NormalizationMode
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_ATTRIBUTE_KEY |
Constructor and Description |
---|
ClosenessCentrality()
Default construtor.
|
ClosenessCentrality(java.lang.String attribute)
Construtor allowing to configure centrality attribute.
|
ClosenessCentrality(java.lang.String attribute,
AbstractCentrality.NormalizationMode normalize)
Constructor allowing to configure attribute and normalize flag.
|
ClosenessCentrality(java.lang.String centralityAttribute,
AbstractCentrality.NormalizationMode normalize,
boolean computeAPSP,
boolean useDangalchevMethod)
Fully configurable construtor.
|
Modifier and Type | Method and Description |
---|---|
void |
computeAPSP(boolean compute) |
void |
init(org.graphstream.graph.Graph graph)
Initialization of the algorithm.
|
compute, copyValuesTo, copyValuesTo, defaultMessage, getCentralityAttribute, getNormalizationMode, setCentralityAttribute, setNormalizationMode
public static final java.lang.String DEFAULT_ATTRIBUTE_KEY
public ClosenessCentrality()
public ClosenessCentrality(java.lang.String attribute)
attribute
- attribute where centrality will be storedpublic ClosenessCentrality(java.lang.String attribute, AbstractCentrality.NormalizationMode normalize)
attribute
- attribute where centrality will be storednormalize
- defines the normalization modepublic ClosenessCentrality(java.lang.String centralityAttribute, AbstractCentrality.NormalizationMode normalize, boolean computeAPSP, boolean useDangalchevMethod)
centralityAttribute
- attribute where centrality will be storednormalize
- defines the normalization modecomputeAPSP
- if true, apsp will be computed in this algorithmuseDangalchevMethod
- if true, Dangelchev method will be used in this algorithmpublic void init(org.graphstream.graph.Graph graph)
Algorithm
Algorithm.compute()
method to initialize or reset the algorithm according
to the new given graph.init
in interface Algorithm
init
in class AbstractCentrality
graph
- The graph this algorithm is using.public void computeAPSP(boolean compute)