org.graffiti.plugins.algorithms.generators
Class PlanarMapGenerator

java.lang.Object
  extended by org.graffiti.plugin.AbstractParametrizable
      extended by org.graffiti.plugin.algorithm.AbstractAlgorithm
          extended by org.graffiti.plugins.algorithms.generators.AbstractGenerator
              extended by org.graffiti.plugins.algorithms.generators.PlanarMapGenerator
All Implemented Interfaces:
Algorithm, Parametrizable

public class PlanarMapGenerator
extends AbstractGenerator

This generator creates a planar map or a planar graph. They can be maximal or random. A maximal planar map with n nodes has 3n - 6 edges. Every edge has a reversal edge, that means: If there is an directed edge from node a to node b, there is also an directed edge from b to a. Undirected edges are not allowed. In a planar graph, only one of two reversal edges is kept. Which one this will be, is decided randomly. In a random planar map x edges are randomly deleted. In a random planar graph x edges of the remaining edges are deleted. A map or a graph is planar, if the nodes can be placed graphically on a two-dimensional area with no edge crossing each other.

Version:
$1.0$ $1.9.2005$
Author:
$Marek Piorkowski$

Field Summary
 
Fields inherited from class org.graffiti.plugins.algorithms.generators.AbstractGenerator
DYNAMIC_CIRCLE, RANDOM, STATIC_CIRCLE
 
Constructor Summary
PlanarMapGenerator()
          Creates a new PlanarGraphGenerator object.
 
Method Summary
 void check()
          Checks whether all preconditions of the current graph are satisfied.
 void execute()
          Executes the whole algorithm.
 String getName()
          Returns the name (id) of this Parametrizable.
 void reset()
          Resets the internal state of the algorithm.
 
Methods inherited from class org.graffiti.plugins.algorithms.generators.AbstractGenerator
getAlgorithmParameters
 
Methods inherited from class org.graffiti.plugin.algorithm.AbstractAlgorithm
attach, 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.Parametrizable
getDefaultParameters, getParameters, setParameters
 

Constructor Detail

PlanarMapGenerator

public PlanarMapGenerator()
Creates a new PlanarGraphGenerator object.

Method Detail

getName

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

Returns:
DOCUMENT ME!
See Also:
Parametrizable.getName()

check

public void check()
           throws PreconditionException
Description copied from interface: org.graffiti.plugin.algorithm.Algorithm
Checks whether all preconditions of the current graph are satisfied.

Specified by:
check in interface Algorithm
Overrides:
check in class AbstractAlgorithm
Throws:
PreconditionException - if the preconditions of the current graph are not satisfied.
See Also:
Algorithm.check()

execute

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

See Also:
Algorithm.execute()

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 AbstractGenerator
See Also:
Algorithm.reset()


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