Constructs embeddings from given layout. More...
#include <ogdf/planarity/TopologyModule.h>
Public Types | |
enum class | Options { DegOneCrossings = 0x0001 , GenToAss = 0x0002 , CrossFlip = 0x0004 , FlipUML = 0x0010 , Loop = 0x0008 } |
The (pre/post)processing options. More... | |
Public Member Functions | |
TopologyModule () | |
virtual | ~TopologyModule () |
void | addOption (TopologyModule::Options o) |
double | faceSum (PlanRep &PG, const GraphAttributes &AG, face f) |
face | getExternalFace (PlanRep &PG, const GraphAttributes &AG) |
bool | setEmbeddingFromGraph (PlanRep &PG, GraphAttributes &GA, adjEntry &adjExternal, bool setExternal=true, bool reuseGAEmbedding=false) |
Uses the layout GA to determine an embedding for PG . | |
void | setOptions (int i) |
void | sortEdgesFromLayout (Graph &G, GraphAttributes &GA) |
Sorts the edges around all nodes of GA corresponding to the layout given in GA . | |
Protected Member Functions | |
bool | checkFlipCrossing (PlanRep &PG, node v, bool flip=true) |
void | handleImprecision (PlanRep &PG) |
bool | hasCrossing (topology_module::EdgeLeg *legA, topology_module::EdgeLeg *legB, DPoint &xp) |
void | planarizeFromLayout (PlanRep &PG, GraphAttributes &AG) |
void | postProcess (PlanRep &PG) |
bool | skipable (topology_module::EdgeLeg *legA, topology_module::EdgeLeg *legB) |
Private Member Functions | |
double | angle (DPoint p, DPoint q, DPoint r) |
int | compare_vectors (const double &x1, const double &y1, const double &x2, const double &y2) |
Private Attributes | |
NodeArray< DPoint > | m_crossPosition |
EdgeArray< List< topology_module::EdgeLeg * > > | m_eLegs |
int | m_options |
Friends | |
int | operator| (int, TopologyModule::Options) |
int | operator| (TopologyModule::Options, TopologyModule::Options) |
Constructs embeddings from given layout.
This class comprises functions for constructing the combinatorial embedding of a graph or a planarized representation from a given layout.
The main functions of the class are the following:
Definition at line 101 of file TopologyModule.h.
The (pre/post)processing options.
CrossFlip increases running time by constant * n, Loop increases running time by constant * m
Definition at line 108 of file TopologyModule.h.
|
inline |
Definition at line 128 of file TopologyModule.h.
|
inlinevirtual |
Definition at line 132 of file TopologyModule.h.
|
inline |
Definition at line 136 of file TopologyModule.h.
|
private |
double ogdf::TopologyModule::faceSum | ( | PlanRep & | PG, |
const GraphAttributes & | AG, | ||
face | f | ||
) |
face ogdf::TopologyModule::getExternalFace | ( | PlanRep & | PG, |
const GraphAttributes & | AG | ||
) |
|
protected |
|
protected |
bool ogdf::TopologyModule::setEmbeddingFromGraph | ( | PlanRep & | PG, |
GraphAttributes & | GA, | ||
adjEntry & | adjExternal, | ||
bool | setExternal = true , |
||
bool | reuseGAEmbedding = false |
||
) |
Uses the layout GA
to determine an embedding for PG
.
Non-constness of GA in the following methods is only used when resolving problems, e.g., setting edge types if two generalizations cross in the input layout
PG | is the input graph. |
GA | is the input layout. |
adjExternal | is assigned the external face (if setExternal is true). |
setExternal | if true, we run over faces to compute the external face. |
reuseGAEmbedding | If true, the call only checks for a correct embedding of PG and tries to insert crossings detected in the given layout otherwise. This allows to assign already sorted UMLGraphs. NOTE: if the sorting of the edges does not correspond to the layout given in GA , this cannot work correctly |
Definition at line 134 of file TopologyModule.h.
|
protected |
void ogdf::TopologyModule::sortEdgesFromLayout | ( | Graph & | G, |
GraphAttributes & | GA | ||
) |
Sorts the edges around all nodes of GA
corresponding to the layout given in GA
.
There is no check of the embedding afterwards because this method could be used as a first step of a planarization
G | is the input graph whose adjacency lists get sorted. |
GA | is the input layout. |
|
friend |
Definition at line 207 of file TopologyModule.h.
|
friend |
Definition at line 203 of file TopologyModule.h.
Definition at line 191 of file TopologyModule.h.
|
private |
Definition at line 195 of file TopologyModule.h.
|
private |
Definition at line 198 of file TopologyModule.h.