Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
MixedModelBase.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Array.h>
36#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/List.h>
41
42#include <iosfwd>
43
44namespace ogdf {
45class AugmentationModule;
46class EmbedderModule;
47class GridLayout;
48class ShellingOrderModule;
49
51public:
53 : m_PG(PG), m_gridLayout(gridLayout), m_iops(PG) { }
54
55 virtual ~MixedModelBase() { }
56
59 void computeOrder(AugmentationModule& augmenter, EmbedderModule* pEmbedder,
60 adjEntry adjExternal, ShellingOrderModule& compOrder);
61
64
66 void placeNodes();
67
71
74
77 void setBends();
78
81
84
85
88 void printMMOrder(std::ostream& os);
89 void printInOutPoints(std::ostream& os);
90 void print(std::ostream& os, const InOutPoint& iop);
91 void printNodeCoords(std::ostream& os);
93
95
96private:
98
100
104
109
110 bool exists(adjEntry adj) { return !m_PG.isDummy(adj->theEdge()); }
111
113 bool hasLeft(int k) const;
114
116 bool hasRight(int k) const;
117
120
121 void firstPoint(int& x, int& y, adjEntry adj);
122 bool isRedundant(int x1, int y1, int x2, int y2, int x3, int y3);
123};
124
125}
Declaration and implementation of Array class and Array algorithms.
Declaration and implementation of ArrayBuffer class.
Includes declaration of graph class.
Declaration of classes InOutPoint and IOPoints which implement the management of in-/out-points.
Declaration of doubly linked lists and iterators.
Declaration of shelling order used by the Mixed-Model layout algorithm.
Declaration of a base class for planar representations of graphs and cluster graphs.
Class for adjacency list elements.
Definition Graph_d.h:143
edge theEdge() const
Returns the edge associated with this adjacency entry.
Definition Graph_d.h:161
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition ArrayBuffer.h:64
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
The base class for graph augmentation algorithms.
Base class for embedder algorithms.
bool isDummy(node v) const
Returns true iff v has no corresponding node in the original graph.
Definition GraphCopy.h:172
Representation of a graph's grid layout.
Definition GridLayout.h:47
Representation of in- and outpoint lists.
Definition IOPoints.h:63
void postprocessing2()
Tries to reduce the number of bends by moving degree-2 nodes on bend points.
NodeArray< int > m_dxla
void firstPoint(int &x, int &y, adjEntry adj)
void postprocessing1()
Tries to reduce the number of bends by changing the outpoints of nodes with indeg and outdeg 2.
void setBends()
Assigns polylines to edges of the original graph and computes the x- and y-coordinates of deg-1-nodes...
NodeArray< ListConstIterator< InOutPoint > > m_nextRight
Array< ListConstIterator< InOutPoint > > m_leftOp
void assignIopCoords()
Computes the relative coordinates of the in- and outpoints, incl. height(v), depth(v).
bool isRedundant(int x1, int y1, int x2, int y2, int x3, int y3)
void removeDeg1Nodes()
Removes degree-1 nodes and store informations for restoring them.
void placeNodes()
Implements the placement step. Computes x[v] and y[v].
bool hasRight(int k) const
Determine if the kth set in the ordered partition has a "real" right vertex.
void computeYCoords()
Computes the absolute y-coordinates y[v] of all nodes in the ordering.
MixedModelBase(PlanRep &PG, GridLayout &gridLayout)
void printInOutPoints(std::ostream &os)
bool hasLeft(int k) const
Determine if the kth set in the ordered partition has a "real" left vertex.
ArrayBuffer< PlanRep::Deg1RestoreInfo > m_deg1RestoreStack
void print(std::ostream &os, const InOutPoint &iop)
void computeOrder(AugmentationModule &augmenter, EmbedderModule *pEmbedder, adjEntry adjExternal, ShellingOrderModule &compOrder)
Computes the ordered partition (incl. m_leftOp[k], em_rightOp[k]) and constructs the in- and outpoint...
NodeArray< ListConstIterator< InOutPoint > > m_nextLeft
NodeArray< int > m_dxra
void printMMOrder(std::ostream &os)
Functions for debugging output.
void computeXCoords()
Computes the absolute x-coordinates x[v] of all nodes in the ordering, furthermore dyla[k] and dyra[k...
bool exists(adjEntry adj)
GridLayout & m_gridLayout
MixedModelBase & operator=(const MixedModelBase &)=delete
void printNodeCoords(std::ostream &os)
Array< ListConstIterator< InOutPoint > > m_rightOp
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:68
Base class for modules that compute a shelling order of a graph.
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
The namespace for all OGDF objects.
Representation of an in- or outpoint.
Definition IOPoints.h:47