The Base class for simultaneous graph drawing. More...
#include <ogdf/simultaneous/SimDraw.h>
Public Types | |
enum | CompareBy { CompareBy::index, CompareBy::label } |
Types for node comparison. More... | |
Public Member Functions | |
SimDraw () | |
constructs empty simdraw instance More... | |
void | addAttribute (long attr) |
gives access to new attribute if not already given More... | |
bool | addGraph (const Graph &G) |
adds the graph g to the instance m_G More... | |
bool | addGraphAttributes (const GraphAttributes &GA) |
adds new GraphAttributes to m_G More... | |
void | clear () |
empty graph More... | |
CompareBy & | compareBy () |
returns compare mode More... | |
const CompareBy & | compareBy () const |
returns compare mode More... | |
void | consistencyCheck () const |
Asserts that this SimDraw instance is consistent. More... | |
Graph & | constGraph () |
returns graph More... | |
const Graph & | constGraph () const |
returns graph More... | |
GraphAttributes & | constGraphAttributes () |
returns graphattributes More... | |
const GraphAttributes & | constGraphAttributes () const |
returns graphattributes More... | |
std::unique_ptr< GraphCopy > | getBasicGraph (int i) const |
returns graph consisting of all edges and nodes from SubGraph i More... | |
void | getBasicGraphAttributes (int i, GraphAttributes &GA, Graph &G) |
returns graphattributes associated with basic graph i More... | |
bool & | isDummy (node v) |
returns true if node v is marked as dummy More... | |
const bool & | isDummy (node v) const |
returns true if node v is marked as dummy More... | |
bool | isPhantomDummy (node v) const |
returns true if node v is a cost zero dummy node More... | |
bool | isProperDummy (node v) const |
returns true if node v is a cost greater zero dummy node More... | |
int | maxSubGraph () const |
calculates maximum number of input graphs More... | |
int | numberOfBasicGraphs () const |
returns number of BasicGraphs in m_G More... | |
int | numberOfDummyNodes () const |
returns number of dummy nodes More... | |
int | numberOfNodes () const |
returns number of nodes More... | |
int | numberOfPhantomDummyNodes () const |
returns number of phantom dummy nodes More... | |
int | numberOfProperDummyNodes () const |
returns number of proper dummy nodes More... | |
void | readGML (const char *fileName) |
calls GraphAttributes::readGML More... | |
void | writeGML (const char *fileName) const |
calls GraphAttributes::writeGML More... | |
Private Member Functions | |
bool | compare (const GraphAttributes &vGA, node v, const GraphAttributes &wGA, node w) const |
compares two nodes v and w by compare mode stored in m_compareBy More... | |
bool | compareById (node v, node w) const |
compares two nodes v and w by their ids More... | |
bool | compareByLabel (const GraphAttributes &vGA, node v, const GraphAttributes &wGA, node w) const |
compares two nodes v and w by their labels More... | |
Private Attributes | |
CompareBy | m_compareBy |
compare mode More... | |
Graph | m_G |
the underlying graph More... | |
GraphAttributes | m_GA |
the underlying graphattributes More... | |
NodeArray< bool > | m_isDummy |
dummy nodes may be colored differently More... | |
Friends | |
class | SimDrawCaller |
class | SimDrawColorizer |
class | SimDrawCreator |
class | SimDrawCreatorSimple |
class | SimDrawManipulatorModule |
The Base class for simultaneous graph drawing.
This class provides functions for simultaneous graph drawing, such as adding new subgraphs.
It is possible to store up to 32 basicgraphs in one instance of the class. The basic graph membership for all edges is stored via GraphAttributes::edgeSubgraph. Several functions are outsourced in corresponding manipulator modules.
|
strong |
ogdf::SimDraw::SimDraw | ( | ) |
constructs empty simdraw instance
GraphAttributes::edgeSubGraphs is activated. No other attributes are active.
|
inline |
bool ogdf::SimDraw::addGraph | ( | const Graph & | G | ) |
adds the graph g to the instance m_G
If the number of subgraphs in m_G is less than 32 and m_compareBy is set to index, this function will add graph G
to m_G and return true. Otherwise this function returns false.
bool ogdf::SimDraw::addGraphAttributes | ( | const GraphAttributes & | GA | ) |
adds new GraphAttributes to m_G
If the number of subgraphs in m_G is less than 32, this function will add the new GraphAttributes GA
to m_G and return true. Otherwise this function returns false. The function uses the current compare mode.
|
private |
compares two nodes v
and w
by compare mode stored in m_compareBy
This method checks whether m_compareBy was set to index or label and uses the corresponding compare method.
|
inline |
|
inline |
|
inlineprivate |
void ogdf::SimDraw::consistencyCheck | ( | ) | const |
Asserts that this SimDraw instance is consistent.
|
inline |
|
inline |
|
inline |
std::unique_ptr<GraphCopy> ogdf::SimDraw::getBasicGraph | ( | int | i | ) | const |
returns graph consisting of all edges and nodes from SubGraph i
void ogdf::SimDraw::getBasicGraphAttributes | ( | int | i, |
GraphAttributes & | GA, | ||
Graph & | G | ||
) |
returns graphattributes associated with basic graph i
Supported attributes are: nodeGraphics, edgeGraphics, edgeLabel, nodeLabel, nodeId, edgeIntWeight and edgeColor.
|
inline |
|
inline |
returns true if node v
is marked as dummy
All dummy node features are introduced for usage when running callSubgraphPlanarizer of SimDrawCaller.
|
inline |
bool ogdf::SimDraw::isProperDummy | ( | node | v | ) | const |
returns true if node v
is a cost greater zero dummy node
int ogdf::SimDraw::maxSubGraph | ( | ) | const |
calculates maximum number of input graphs
Subgraphs are numbered from 0 to 31. This method returns the number of the maximal used subgraph. If the graph is empty, the function returns -1.
int ogdf::SimDraw::numberOfBasicGraphs | ( | ) | const |
returns number of BasicGraphs in m_G
This function uses maxSubGraph to return the number of basic graphs contained in m_G. If the graph is empty, the function returns 0.
int ogdf::SimDraw::numberOfDummyNodes | ( | ) | const |
returns number of dummy nodes
|
inline |
int ogdf::SimDraw::numberOfPhantomDummyNodes | ( | ) | const |
returns number of phantom dummy nodes
int ogdf::SimDraw::numberOfProperDummyNodes | ( | ) | const |
returns number of proper dummy nodes
void ogdf::SimDraw::readGML | ( | const char * | fileName | ) |
calls GraphAttributes::readGML
void ogdf::SimDraw::writeGML | ( | const char * | fileName | ) | const |
calls GraphAttributes::writeGML
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
private |