public class ClosenessCentrality extends AbstractCentrality
AbstractCentrality.NormalizationMode
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ATTRIBUTE_KEY |
Constructor and Description |
---|
ClosenessCentrality()
Default construtor.
|
ClosenessCentrality(String attribute)
Construtor allowing to configure centrality attribute.
|
ClosenessCentrality(String attribute,
AbstractCentrality.NormalizationMode normalize)
Constructor allowing to configure attribute and normalize flag.
|
ClosenessCentrality(String centralityAttribute,
AbstractCentrality.NormalizationMode normalize,
boolean computeAPSP,
boolean useDangalchevMethod)
Fully configurable construtor.
|
Modifier and Type | Method and Description |
---|---|
void |
init(org.graphstream.graph.Graph graph)
Initialization of the algorithm.
|
compute, copyValuesTo, copyValuesTo, getCentralityAttribute, getNormalizationMode, setCentralityAttribute, setNormalizationMode
public static final String DEFAULT_ATTRIBUTE_KEY
public ClosenessCentrality()
public ClosenessCentrality(String attribute)
attribute
- attribute where centrality will be storedpublic ClosenessCentrality(String attribute, AbstractCentrality.NormalizationMode normalize)
attribute
- attribute where centrality will be storednormalize
- defines the normalization modepublic ClosenessCentrality(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.Copyright © 2015. All rights reserved.