de.cau.cs.kieler.keg.diagram.custom.random
Class RandomGraphGenerator

java.lang.Object
  extended by de.cau.cs.kieler.keg.diagram.custom.random.RandomGraphGenerator
All Implemented Interfaces:
IRandomGraphGenerator

public class RandomGraphGenerator
extends Object
implements IRandomGraphGenerator

The basic KEG random graph generator.

Rating red

Nested Class Summary
static class RandomGraphGenerator.EdgeDetermination
          the possible ways to determine edges.
static class RandomGraphGenerator.GraphType
          the possible graph types.
 
Field Summary
static Property<Boolean> CYCLES
          the option for allowing cycles.
static Property<RandomGraphGenerator.EdgeDetermination> EDGE_DETERMINATION
          the option for specifying how to determine edges.
static Property<Float> EDGE_DIRECTED_CHANCE
          the option for the chance of generating a directed edge.
static Property<RandomGraphGenerator.GraphType> GRAPH_TYPE
          the option for the graph type.
static Property<Float> HIERARCHY_CHANCE
          the option for the chance of creating a compound node.
static Property<Float> HIERARCHY_NODES_FACTOR
          the option for the factor to calculate the number of nodes in a compound node.
static Property<Float> HYPERNODE_CHANCE
          the option for the chance of creating a hypernode.
static Property<Integer> MAX_DEGREE
          the option for the maximum degree ('0' meaning unlimited).
static Property<Integer> MAX_HIERARCHY_LEVEL
          the option for the maximum hierarchy level.
static Property<Integer> MAX_OUTGOING_EDGES
          the option for the maximum number of outgoing edges.
static Property<Integer> MAX_WIDTH
          the option for the maximum tree width ('0' meaning unlimited).
static Property<Integer> MIN_OUTGOING_EDGES
          the option for the minimum number of outgoing edges.
static Property<Boolean> MULTI_EDGES
          the option for allowing multi-edges.
static Property<Integer> NUMBER_OF_EDGES
          the option for the number of edges.
static Property<Integer> NUMBER_OF_NODES
          the option for the number of nodes.
static Property<Boolean> PLANAR
          the option for planarity.
static Property<Boolean> PORTS
          the option for using ports to connect nodes.
static Property<Boolean> SELF_LOOPS
          the option for allowing self-loops.
 
Constructor Summary
RandomGraphGenerator()
           
 
Method Summary
 Node generate(IPropertyHolder options)
          Generates a graph using the specified options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAPH_TYPE

public static final Property<RandomGraphGenerator.GraphType> GRAPH_TYPE
the option for the graph type.


NUMBER_OF_NODES

public static final Property<Integer> NUMBER_OF_NODES
the option for the number of nodes.


HIERARCHY_CHANCE

public static final Property<Float> HIERARCHY_CHANCE
the option for the chance of creating a compound node.


MAX_HIERARCHY_LEVEL

public static final Property<Integer> MAX_HIERARCHY_LEVEL
the option for the maximum hierarchy level.


HIERARCHY_NODES_FACTOR

public static final Property<Float> HIERARCHY_NODES_FACTOR
the option for the factor to calculate the number of nodes in a compound node.


HYPERNODE_CHANCE

public static final Property<Float> HYPERNODE_CHANCE
the option for the chance of creating a hypernode.


EDGE_DIRECTED_CHANCE

public static final Property<Float> EDGE_DIRECTED_CHANCE
the option for the chance of generating a directed edge.


PORTS

public static final Property<Boolean> PORTS
the option for using ports to connect nodes.


EDGE_DETERMINATION

public static final Property<RandomGraphGenerator.EdgeDetermination> EDGE_DETERMINATION
the option for specifying how to determine edges.


MIN_OUTGOING_EDGES

public static final Property<Integer> MIN_OUTGOING_EDGES
the option for the minimum number of outgoing edges.


MAX_OUTGOING_EDGES

public static final Property<Integer> MAX_OUTGOING_EDGES
the option for the maximum number of outgoing edges.


SELF_LOOPS

public static final Property<Boolean> SELF_LOOPS
the option for allowing self-loops.


MULTI_EDGES

public static final Property<Boolean> MULTI_EDGES
the option for allowing multi-edges.


CYCLES

public static final Property<Boolean> CYCLES
the option for allowing cycles.


MAX_WIDTH

public static final Property<Integer> MAX_WIDTH
the option for the maximum tree width ('0' meaning unlimited).


MAX_DEGREE

public static final Property<Integer> MAX_DEGREE
the option for the maximum degree ('0' meaning unlimited).


PLANAR

public static final Property<Boolean> PLANAR
the option for planarity.


NUMBER_OF_EDGES

public static final Property<Integer> NUMBER_OF_EDGES
the option for the number of edges.

Constructor Detail

RandomGraphGenerator

public RandomGraphGenerator()
Method Detail

generate

public Node generate(IPropertyHolder options)
Generates a graph using the specified options.

Specified by:
generate in interface IRandomGraphGenerator
Parameters:
options - the options
Returns:
the graph