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

java.lang.Object
  extended by bcds.phison.gm.GraphMetricBase<V,E>
      extended by bcds.phison.gm.BrandesBC<V,E>
          extended by bcds.phison.gm.AverageNodeBC<V,E>
All Implemented Interfaces:
GraphMetric<V,E>, WithEnvParams

public class AverageNodeBC<V,E>
extends BrandesBC<V,E>
implements GraphMetric<V,E>

Computes the average node betweenness centrality of a directed graph.

Note: in order to consider the graph as weighted the environment must contain:

 BrandesBC.weighted=true
 

Author:
mmanzano

Constructor Summary
AverageNodeBC()
          Default constructor.
AverageNodeBC(SimGraph<V,E> g, Environ env)
          Creates a new instance and calls setup to complete the initialization.
 
Method Summary
 java.lang.String getDescription()
          Returns a string describing the metric, for example, article where it has been published, URL where to find reference implementation, etc.
 double getGraphMetric()
          Returns the average node betweenness centrality.
 double getGraphMetricStdev()
          Returns the standard deviation of the average node betweenness centrality.
 java.lang.String getLabel()
          Returns "Average node betweenness centrality".
 boolean isApplicableTo(MetricTarget m)
          Returns true if m is MetricTarget.GRAPH.
 void run()
          Computes the betweenness centrality.
 
Methods inherited from class bcds.phison.gm.BrandesBC
getEdgeMetric, getEnvParams, getNodeMetric, setup
 
Methods inherited from class bcds.phison.gm.GraphMetricBase
dump, getEnviron, getGraph, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bcds.phison.gm.GraphMetric
dump, getEdgeMetric, getNodeMetric, setup
 
Methods inherited from interface bcds.phison.WithEnvParams
getEnviron, getEnvParams, getName
 

Constructor Detail

AverageNodeBC

public AverageNodeBC()
Default constructor.


AverageNodeBC

public AverageNodeBC(SimGraph<V,E> g,
                     Environ env)
Creates a new instance and calls setup to complete the initialization.

Method Detail

isApplicableTo

public boolean isApplicableTo(MetricTarget m)
Returns true if m is MetricTarget.GRAPH.

Specified by:
isApplicableTo in interface GraphMetric<V,E>
Overrides:
isApplicableTo in class BrandesBC<V,E>

run

public void run()
Computes the betweenness centrality.

Specified by:
run in interface GraphMetric<V,E>
Overrides:
run in class BrandesBC<V,E>

getGraphMetric

public double getGraphMetric()
Returns the average node betweenness centrality.

Specified by:
getGraphMetric in interface GraphMetric<V,E>
Overrides:
getGraphMetric in class GraphMetricBase<V,E>

getGraphMetricStdev

public double getGraphMetricStdev()
Returns the standard deviation of the average node betweenness centrality.

Specified by:
getGraphMetricStdev in interface GraphMetric<V,E>
Overrides:
getGraphMetricStdev in class GraphMetricBase<V,E>

getLabel

public java.lang.String getLabel()
Returns "Average node betweenness centrality".

Specified by:
getLabel in interface GraphMetric<V,E>
Overrides:
getLabel in class BrandesBC<V,E>

getDescription

public java.lang.String getDescription()
Description copied from interface: GraphMetric
Returns a string describing the metric, for example, article where it has been published, URL where to find reference implementation, etc.

Specified by:
getDescription in interface GraphMetric<V,E>
Overrides:
getDescription in class BrandesBC<V,E>