sim.field.network.stats.actorcentrality
Class NodeIndex

java.lang.Object
  extended by sim.field.network.stats.actorcentrality.NodeIndex
Direct Known Subclasses:
FreemanNodeIndex, InformationCentrality, PowerPrestige, ProximityPrestige

public abstract class NodeIndex
extends java.lang.Object

Actor Centrality Index

Normally this would be an interface containing double getMeasure(final Network network, Object node). BUT in some metrics (e.g. InformationCentrality and BetweennessCentrality) all getMeasure calls use some common precomputed matrix.

The downside of this is that one cannot have a single static instance of a certain centrality mesure, but as long as one does not have a large number of small Networks processed in a tight loop, the overhead of allocating a new CentralityMeasure object for each graph is small.


Field Summary
 Network network
           
 
Constructor Summary
NodeIndex(Network network)
           
 
Method Summary
abstract  double getMaxValue()
           
 double getStandardizedValue(java.lang.Object node)
          The value of the metric might depend on the size of the graph.
 double getValue(int nodeIndex)
           
abstract  double getValue(java.lang.Object node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

network

public final Network network
Constructor Detail

NodeIndex

public NodeIndex(Network network)
Method Detail

getValue

public abstract double getValue(java.lang.Object node)

getValue

public double getValue(int nodeIndex)

getStandardizedValue

public final double getStandardizedValue(java.lang.Object node)
The value of the metric might depend on the size of the graph. this function divides these values by the max value.
This is final because this is what I do in CentralizationStatistics but without calling getValue(node) again.


getMaxValue

public abstract double getMaxValue()