nz.ac.waikato.mcennis.rat.reusablecores
Class PathBaseCore

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.reusablecores.PathBaseCore
Direct Known Subclasses:
ActorDistanceMatrixCore, OptimizedLinkBetweenessCore

public abstract class PathBaseCore
extends java.lang.Object

Core abstract class for algorithm cores that utilize shortest-path info in their algorithms. It creates shortest-path using Djikstra's algorithm for each source actor, allows performing of caluclations then, and allows algorithms to perform additional calculatio afterwards.


Constructor Summary
PathBaseCore()
           
 
Method Summary
protected  void compare(PathNode current, PathNode next, Link link)
           
protected abstract  void doAnalysis(PathNode[] path, PathNode source)
           
protected abstract  void doCleanup(PathNode[] path, Graph g)
          Any additional calculations to be performed before control returns to the scheduler
 void execute(Graph g)
          Generates a spanning tree for a given actor.
 java.lang.String getMode()
          Return which mode of actors are to be used for shortest path calculations
 Properties getProperties()
           
 java.lang.String getRelation()
          Returns which relation of links to use in path calculations
 void setMode(java.lang.String m)
          Set the mode of actors to use for calculations
 void setProperties(Properties props)
           
 void setRelation(java.lang.String r)
          Set which relation of links to use in path calculations
protected abstract  void setSize(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathBaseCore

public PathBaseCore()
Method Detail

execute

public void execute(Graph g)
Generates a spanning tree for a given actor. Calls the abstract methods:
setSize - gives the derived class the size of the user list.
doAnalysis - gives a set of PathNodes and the root of the tree.
doCleanup - allows any extra calculations to be made before the algorithm returns control to the scheduler.


compare

protected void compare(PathNode current,
                       PathNode next,
                       Link link)

doCleanup

protected abstract void doCleanup(PathNode[] path,
                                  Graph g)
Any additional calculations to be performed before control returns to the scheduler

Parameters:
path -
g -

doAnalysis

protected abstract void doAnalysis(PathNode[] path,
                                   PathNode source)
Parameters:
path -
source -

setSize

protected abstract void setSize(int size)
Parameters:
size -

setRelation

public void setRelation(java.lang.String r)
Set which relation of links to use in path calculations

Parameters:
r - relation of links to utilize

getRelation

public java.lang.String getRelation()
Returns which relation of links to use in path calculations

Returns:
relation of links utilized

setMode

public void setMode(java.lang.String m)
Set the mode of actors to use for calculations

Parameters:
m - mode of actors to utilize

getMode

public java.lang.String getMode()
Return which mode of actors are to be used for shortest path calculations

Returns:
mode of actors to use

getProperties

public Properties getProperties()

setProperties

public void setProperties(Properties props)

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads