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