org.graffiti.plugins.algorithms.HighDimEmbed
Class BFS

java.lang.Object
  extended by org.graffiti.plugin.AbstractParametrizable
      extended by org.graffiti.plugin.algorithm.AbstractAlgorithm
          extended by org.graffiti.plugins.algorithms.HighDimEmbed.BFS
All Implemented Interfaces:
Algorithm, CalculatingAlgorithm, Parametrizable

public class BFS
extends AbstractAlgorithm
implements CalculatingAlgorithm

An implementation of the BFS algorithm for the high-Embedding Algorithm. (it implements CalculatingAlgortihm to implement getResult())

Version:
$Revision: 5766 $

Constructor Summary
BFS()
          DOCUMENT ME!
 
Method Summary
 void execute()
          Executes the whole algorithm.
 Parameter<?>[] getAlgorithmParameters()
           
 String getName()
          Returns the name (id) of this Parametrizable.
 AlgorithmResult getResult()
          Returns the AlgorithmResult that was computed by the Algorithm during the last execution.
 void postCheck(IntegerParameter tDParams, IntegerParameter hEDParams)
          Checks post conditions of bfs
 void reset()
          Resets the internal state of the algorithm.
 Attribute searchForAttribute(Attribute attr, Class<?> attributeType)
          DOCUMENT ME!
 void setAlgorithmParameters(Parameter<?>[] params)
           
 void setLabel(Node n, String val, ColorAttribute col)
          Set the new Labels of nodes according to their bfs-num.
 void setSourceNode(Node n)
          Set the source node for bfs to start with.
 
Methods inherited from class org.graffiti.plugin.algorithm.AbstractAlgorithm
attach, check, getAnimation, supportsAnimation
 
Methods inherited from class org.graffiti.plugin.AbstractParametrizable
copyParameters, getDefaultParameters, getParameters, getUserParameters, saveUserParameters, saveUserParameters, setParameters
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graffiti.plugin.algorithm.Algorithm
attach, check, getAnimation, supportsAnimation
 
Methods inherited from interface org.graffiti.plugin.Parametrizable
getDefaultParameters, getParameters, setParameters
 

Constructor Detail

BFS

public BFS()
DOCUMENT ME!

Method Detail

setLabel

public void setLabel(Node n,
                     String val,
                     ColorAttribute col)
Set the new Labels of nodes according to their bfs-num.

Parameters:
n - Node to be labeled
val - String as new node label
col - DOCUMENT ME!

getName

public String getName()
Description copied from interface: org.graffiti.plugin.Parametrizable
Returns the name (id) of this Parametrizable.

Specified by:
getName in interface Parametrizable
Returns:
DOCUMENT ME!
See Also:
Parametrizable.getName()

setAlgorithmParameters

public void setAlgorithmParameters(Parameter<?>[] params)
Overrides:
setAlgorithmParameters in class AbstractParametrizable
See Also:
AbstractParametrizable.setAlgorithmParameters(Parameter[])

getAlgorithmParameters

public Parameter<?>[] getAlgorithmParameters()
Overrides:
getAlgorithmParameters in class AbstractParametrizable
See Also:
AbstractParametrizable.getAlgorithmParameters()

getResult

public AlgorithmResult getResult()
Description copied from interface: org.graffiti.plugin.algorithm.CalculatingAlgorithm
Returns the AlgorithmResult that was computed by the Algorithm during the last execution. If there was no previous execution it returns null.

Specified by:
getResult in interface CalculatingAlgorithm
Returns:
the AlgorithmResult computed in the previous execution of the Algorithm.
See Also:
CalculatingAlgorithm.getResult()

setSourceNode

public void setSourceNode(Node n)
Set the source node for bfs to start with.

Parameters:
n - Node to be labeled

execute

public void execute()
Description copied from interface: org.graffiti.plugin.algorithm.Algorithm
Executes the whole algorithm.

Specified by:
execute in interface Algorithm
See Also:
The given graph must have at least one node.

postCheck

public void postCheck(IntegerParameter tDParams,
                      IntegerParameter hEDParams)
               throws RuntimeException
Checks post conditions of bfs

Parameters:
tDParams - DOCUMENT ME!
hEDParams - DOCUMENT ME!
Throws:
RuntimeException - DOCUMENT ME!

reset

public void reset()
Description copied from interface: org.graffiti.plugin.algorithm.Algorithm
Resets the internal state of the algorithm.

Specified by:
reset in interface Algorithm
Overrides:
reset in class AbstractAlgorithm
See Also:
Algorithm.reset()

searchForAttribute

public Attribute searchForAttribute(Attribute attr,
                                    Class<?> attributeType)
DOCUMENT ME!

Parameters:
attr - DOCUMENT ME!
attributeType - DOCUMENT ME!
Returns:
DOCUMENT ME!


Generated at 2012-05-30 11:01:25 PM CEST