bcds.phison.gm
Class BetweennessCentrality<V,E>
java.lang.Object
bcds.phison.ra.RoutingAlgBase<V,E>
bcds.phison.gm.BetweennessCentrality<V,E>
public class BetweennessCentrality<V,E>
- extends RoutingAlgBase<V,E>
WARNING: This class will disappear as such (the Brandes' part will
be folded into BrandesBC, and the rest...probably taken to
the attic.
BetweennessCentrality computes the betweenness centrality (BC)
of nodes and links in a directed graph.
Two implementations are provided here:
The Python's source was adapted for making optional:
- the discovery of "equal cost minimum paths" (enabled by default in
Brandes'). See the
flag
BRANDES_NO_ECMP.
- the inclusion of end points (Brandes' does not include them
by default). See
flag
INCLUDE_END_POINTS.
These two implementations are not equivalent, i.e., they do not
always produce the same values. The first (Juan Segovia's) implementation
is "reasonable" (it is possible to follow it). Debugging messages
can be actividated by setting the environment variable DL_Level:
$ export DL_Level=0
Available options (Flags): The following options/flags are
available. None of them are set (on) by default.
- NORMALIZE: the BC produced is in the range [0..1). The specific
normalization factor employed depends on the version of the
altorighm.
- INCLUDE_END_POINTS:
- BRANDES_NO_ECMP:
- WEIGHTED: Uses either hop count or "cost" to discover shortest paths.
- AS_UNDIRECTED: Not used.
Methods inherited from class bcds.phison.ra.RoutingAlgBase |
buildPathFromParentNodes, commitBackupPath, commitWorkingPath, dumpState, getBackupPath, getCost, getEnviron, getEnvParams, getName, getTED, getWorkingPath, offersProtection, setBackupPath, setRequest, setup, setWorkingPath, topologyHasChanged, uncommitBackupPath, uncommitWorkingPath |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BetweennessCentrality
public BetweennessCentrality(TED<V,E> ted)
addFlag
public void addFlag(BetweennessCentrality.Flags f)
removeFlag
public void removeFlag(BetweennessCentrality.Flags f)
getFlags
public java.util.Set<BetweennessCentrality.Flags> getFlags()
getNodeBC
public java.util.Map<V,java.lang.Double> getNodeBC()
getEdgeBC
public java.util.Map<E,java.lang.Double> getEdgeBC()
setTrafficMatrix
public void setTrafficMatrix(java.util.Map<SimplePair<V,V>,java.lang.Double> trf)
setIngressEgressSet
public void setIngressEgressSet(java.util.Set<V> ingress_set,
java.util.Set<V> egress_set)
nodeBC_slow
public void nodeBC_slow()
- nodeBC_slow() is not really "slow", only slightly slower than
brandesNodeBC().
edgeBC_slow
public void edgeBC_slow()
edgeBC_faster
public void edgeBC_faster()
brandesNodeBC
public void brandesNodeBC()
brandesEdgeBC
public void brandesEdgeBC()