bcds.phison.gm
Class BetweennessCentrality<V,E>

java.lang.Object
  extended by bcds.phison.ra.RoutingAlgBase<V,E>
      extended by 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:

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.


Nested Class Summary
static class BetweennessCentrality.Flags
           
 
Constructor Summary
BetweennessCentrality(TED<V,E> ted)
           
 
Method Summary
 void addFlag(BetweennessCentrality.Flags f)
           
 void brandesEdgeBC()
           
 void brandesNodeBC()
           
 void edgeBC_faster()
           
 void edgeBC_slow()
           
 java.util.Map<E,java.lang.Double> getEdgeBC()
           
 java.util.Set<BetweennessCentrality.Flags> getFlags()
           
 java.util.Map<V,java.lang.Double> getNodeBC()
           
 void nodeBC_slow()
          nodeBC_slow() is not really "slow", only slightly slower than brandesNodeBC().
 void removeFlag(BetweennessCentrality.Flags f)
           
 void setIngressEgressSet(java.util.Set<V> ingress_set, java.util.Set<V> egress_set)
           
 void setTrafficMatrix(java.util.Map<SimplePair<V,V>,java.lang.Double> trf)
           
 
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
 

Constructor Detail

BetweennessCentrality

public BetweennessCentrality(TED<V,E> ted)
Method Detail

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()