nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores
Class OptimizedLinkBetweenessCore

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.PathBaseCore
      extended by nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.OptimizedLinkBetweenessCore

public class OptimizedLinkBetweenessCore
extends PathBaseCore

Provides link betweeness calculations for algorithms that use it continuosly rather than once. Use the full algorithm for edge betweeness if possible since this allows bookeeping of which algorithm for edge betweeness was used.


Field Summary
protected  java.util.HashMap<Link,java.lang.Double> linkMap
           
protected  double maxBetweeness
           
 
Constructor Summary
OptimizedLinkBetweenessCore()
           
 
Method Summary
protected  void doAnalysis(PathNode[] path, PathNode source)
           
protected  void doCleanup(PathNode[] path, Graph g)
          Any additional calculations to be performed before control returns to the scheduler
 java.util.Map<Link,java.lang.Double> getLinkMap()
          Return the mapping between links and their betweeness values.
protected  void setSize(int size)
           
 
Methods inherited from class nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.PathBaseCore
compare, execute, getMode, getRelation, setMode, setRelation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxBetweeness

protected double maxBetweeness

linkMap

protected java.util.HashMap<Link,java.lang.Double> linkMap
Constructor Detail

OptimizedLinkBetweenessCore

public OptimizedLinkBetweenessCore()
Method Detail

doCleanup

protected void doCleanup(PathNode[] path,
                         Graph g)
Description copied from class: PathBaseCore
Any additional calculations to be performed before control returns to the scheduler

Specified by:
doCleanup in class PathBaseCore

doAnalysis

protected void doAnalysis(PathNode[] path,
                          PathNode source)
Specified by:
doAnalysis in class PathBaseCore

setSize

protected void setSize(int size)
Specified by:
setSize in class PathBaseCore

getLinkMap

public java.util.Map<Link,java.lang.Double> getLinkMap()
Return the mapping between links and their betweeness values. Null values indicate 0.0 betweeness. Returns an empty collection if no links exist in this subgraph

Returns:
mapping between links and their betweeness value