Creates variety of possible SimDraw creations. More...
#include <ogdf/simultaneous/SimDrawCreator.h>
Public Member Functions | |
| SimDrawCreator (SimDraw &SD) | |
| constructor | |
| unsigned int & | SubGraphBits (edge e) |
| returns SubGraphBits from edge e | |
| const unsigned int & | SubGraphBits (edge e) const |
| returns SubGraphBits from edge e | |
| void | readGraph (const Graph &G) |
| reads a Graph | |
| void | randomESG2 (int doubleESGProbability=50) |
| randomly chose edgeSubGraph value for two graphs | |
| void | randomESG3 (int doubleESGProbability=50, int tripleESGProbability=25) |
| randomly chose edgeSubGraph value for three graphs | |
| void | randomESG (int graphNumber) |
| randomly chose edgeSubGraph value for graphNumber graphs | |
| void | clearESG () |
| clears edgeSubGraph value | |
| void | createRandom (int numberOfNodes, int numberOfEdges, int numberOfBasicGraphs) |
| randomly creates a simdraw instance | |
Creates variety of possible SimDraw creations.
This class is used for creating simdraw instances. Possible features include reading a graph, randomly modifying or clearing the edgeSubgraph value and changing the subGraphBits.
Definition at line 56 of file SimDrawCreator.h.
| ogdf::SimDrawCreator::SimDrawCreator | ( | SimDraw & | SD | ) | [inline] |
constructor
Definition at line 61 of file SimDrawCreator.h.
| void ogdf::SimDrawCreator::clearESG | ( | ) |
clears edgeSubGraph value
This method clears all SubGraph values from m_G. After this function all edges belong to no basic graph. CAUTION: All edges need to be reset their edgeSubGraph value for maintaining consistency.
| void ogdf::SimDrawCreator::createRandom | ( | int | numberOfNodes, |
| int | numberOfEdges, | ||
| int | numberOfBasicGraphs | ||
| ) |
randomly creates a simdraw instance
This method creates a random graph with numberOfNodes nodes, numberOfEdges edges. It is transfered into a simdraw instance with numberOfBasicGraphs basic graphs.
randomSimpleGraph from graph_generators.h is used to create a random graph. Furthermore randomESG is used on this graph to generate numberOfBasicGraphs basic graphs.
| void ogdf::SimDrawCreator::randomESG | ( | int | graphNumber | ) |
randomly chose edgeSubGraph value for graphNumber graphs
Assigns random edgeSubGraph values to all edges to create a SimDraw instance consisting of graphNumber basic graphs. Each edge has an equal chance for each SubGraphBit - value.
| void ogdf::SimDrawCreator::randomESG2 | ( | int | doubleESGProbability = 50 | ) |
randomly chose edgeSubGraph value for two graphs
Assigns random edgeSubGraph values to all edges to create a SimDraw instance consisting of two basic graphs. Each edge in m_G has a chance of doubleESGProbability (in Percent) to belong to two SubGraphs. Otherwise it has equal chance to belong to either basic graph.
| void ogdf::SimDrawCreator::randomESG3 | ( | int | doubleESGProbability = 50, |
| int | tripleESGProbability = 25 |
||
| ) |
randomly chose edgeSubGraph value for three graphs
Assigns random edgeSubGraph values to all edges to create a SimDraw instance consisting of three basic graphs. Each edge in m_G has a chance of doubleESGProbabilit (in Percent) to belong to two basic graphs and a chance of tripleESGProbability (in Percent) to belong to three basic graphs.
| void ogdf::SimDrawCreator::readGraph | ( | const Graph & | G | ) | [inline] |
reads a Graph
Definition at line 70 of file SimDrawCreator.h.
| unsigned int& ogdf::SimDrawCreator::SubGraphBits | ( | edge | e | ) | [inline] |
returns SubGraphBits from edge e
Definition at line 64 of file SimDrawCreator.h.
| const unsigned int& ogdf::SimDrawCreator::SubGraphBits | ( | edge | e | ) | const [inline] |
returns SubGraphBits from edge e
Definition at line 67 of file SimDrawCreator.h.