Creates variety of possible SimDraw creations. More...
#include <ogdf/simultaneous/SimDrawCreator.h>
Inheritance diagram for ogdf::SimDrawCreator:Public Member Functions | |
| SimDrawCreator (SimDraw &SD) | |
| constructor | |
| void | clearESG () |
| clears edgeSubGraphs value | |
| void | createRandom (int numberOfNodes, int numberOfEdges, int numberOfBasicGraphs) |
| randomly creates a simdraw instance | |
| void | randomESG (int graphNumber) |
| randomly chose edgeSubGraphs value for graphNumber graphs | |
| void | randomESG2 (int doubleESGProbability=50) |
| randomly chose edgeSubGraphs value for two graphs | |
| void | randomESG3 (int doubleESGProbability=50, int tripleESGProbability=25) |
| randomly chose edgeSubGraphs value for three graphs | |
| void | readGraph (const Graph &G) |
| reads a Graph | |
| uint32_t & | SubGraphBits (edge e) |
| returns SubGraphBits from edge e | |
| uint32_t & | SubGraphBits (edge e) const |
| returns SubGraphBits from edge e | |
Public Member Functions inherited from ogdf::SimDrawManipulatorModule | |
| SimDrawManipulatorModule () | |
| default constructor | |
| SimDrawManipulatorModule (SimDraw &SD) | |
| constructor | |
| const SimDraw & | constSimDraw () const |
| returns base instance | |
| void | init (SimDraw &SD) |
| initializing base instance | |
Additional Inherited Members | |
Protected Attributes inherited from ogdf::SimDrawManipulatorModule | |
| Graph * | m_G |
| pointer to current graph | |
| GraphAttributes * | m_GA |
| pointer to current graphattributes | |
| SimDraw * | m_SD |
| pointer to current 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 51 of file SimDrawCreator.h.
|
inlineexplicit |
constructor
Definition at line 54 of file SimDrawCreator.h.
| void ogdf::SimDrawCreator::clearESG | ( | ) |
clears edgeSubGraphs 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 edgeSubGraphs 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 edgeSubGraphs value for graphNumber graphs
Assigns random edgeSubGraphs 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 edgeSubGraphs value for two graphs
Assigns random edgeSubGraphs 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 edgeSubGraphs value for three graphs
Assigns random edgeSubGraphs 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.
|
inline |
reads a Graph
Definition at line 63 of file SimDrawCreator.h.
|
inline |
returns SubGraphBits from edge e
Definition at line 57 of file SimDrawCreator.h.
|
inline |
returns SubGraphBits from edge e
Definition at line 60 of file SimDrawCreator.h.