Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
VarEdgeInserterCore.h
Go to the documentation of this file.
1
33#pragma once
34
35#include <ogdf/basic/Array.h>
36#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/Module.h>
38#include <ogdf/basic/SList.h>
40#include <ogdf/basic/basic.h>
42
43#include <cstdint>
44
45namespace ogdf {
46class StaticSPQRTree;
47enum class RemoveReinsertType;
48template<class E>
49class List;
50
52public:
54 const EdgeArray<bool>* pForbiddenOrig, const EdgeArray<uint32_t>* pEdgeSubgraphs)
55 : m_pr(pr), m_pCost(pCostOrig), m_pForbidden(pForbiddenOrig), m_pSubgraph(pEdgeSubgraphs) { }
56
58
60 double percentMostCrossed);
61
63 double percentMostCrossed);
64
65 int runsPostprocessing() const { return m_runsPostprocessing; }
66
67protected:
68 class BiconnectedComponent;
69 class ExpandedGraph;
70
71 void insert(node s, node t, SList<adjEntry>& eip);
72 int costCrossed(edge eOrig) const;
73
74 bool dfsVertex(node v, int parent);
75 node dfsComp(int i, node parent);
76
77 void blockInsert(const BiconnectedComponent& G, node s, node t, List<adjEntry>& L);
78 bool pathSearch(node v, edge parent, List<edge>& path);
79 virtual void buildSubpath(node v, edge eIn, edge eOut, List<adjEntry>& L, ExpandedGraph& Exp,
80 node s, node t);
81
82 virtual void storeTypeOfCurrentEdge(edge eOrig) { }
83
84 virtual BiconnectedComponent* createBlock();
85 virtual ExpandedGraph* createExpandedGraph(const BiconnectedComponent& BC,
86 const StaticSPQRTree& T);
87
88 static const int c_bigM = 10000;
90
94
95 node m_s, m_t;
98
99 // representation of BC tree
104
105 node m_v1, m_v2;
106
108};
109
111public:
113 const EdgeArray<uint32_t>* pEdgeSubgraph)
114 : VarEdgeInserterCore(pr, pCostOrig, nullptr, pEdgeSubgraph) { }
115
116protected:
117 class BiconnectedComponentUML;
118 class ExpandedGraphUML;
119
121
122 BiconnectedComponent* createBlock() override;
123 ExpandedGraph* createExpandedGraph(const BiconnectedComponent& BC,
124 const StaticSPQRTree& T) override;
125 virtual void buildSubpath(node v, edge eIn, edge eOut, List<adjEntry>& L, ExpandedGraph& Exp,
126 node s, node t) override;
127
129};
130
131}
Declaration and implementation of Array class and Array algorithms.
Includes declaration of graph class.
Declares base class for all module types.
Declaration of class PlanRepLight.
Declaration of singly linked lists and iterators.
Declares base class for modules with timeout functionality.
Basic declarations, included by all source files.
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
Class for the representation of edges.
Definition Graph_d.h:364
EdgeType
The type of edges (only used in derived classes).
Definition Graph_d.h:906
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
ReturnType
The return type of a module.
Definition Module.h:52
Class for the representation of nodes.
Definition Graph_d.h:241
Light-weight version of a planarized representation, associated with a PlanRep.
EdgeType typeOrig(edge eOrig) const
Singly linked lists (maintaining the length of the list).
Definition SList.h:845
Linear-time implementation of static SPQR-trees.
class for timeout funtionality.
Definition Timeouter.h:46
Array< SList< node > > m_nodeB
const EdgeArray< bool > * m_pForbidden
bool dfsVertex(node v, int parent)
virtual ExpandedGraph * createExpandedGraph(const BiconnectedComponent &BC, const StaticSPQRTree &T)
const EdgeArray< int > * m_pCost
Array< SList< edge > > m_edgeB
virtual BiconnectedComponent * createBlock()
bool pathSearch(node v, edge parent, List< edge > &path)
void blockInsert(const BiconnectedComponent &G, node s, node t, List< adjEntry > &L)
Module::ReturnType call(const Array< edge > &origEdges, RemoveReinsertType rrPost, double percentMostCrossed)
int costCrossed(edge eOrig) const
NodeArray< SList< int > > m_compV
node dfsComp(int i, node parent)
virtual void storeTypeOfCurrentEdge(edge eOrig)
int m_runsPostprocessing
Runs of remove-reinsert method.
VarEdgeInserterCore(PlanRepLight &pr, const EdgeArray< int > *pCostOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubgraphs)
void insert(node s, node t, SList< adjEntry > &eip)
const EdgeArray< uint32_t > * m_pSubgraph
virtual void buildSubpath(node v, edge eIn, edge eOut, List< adjEntry > &L, ExpandedGraph &Exp, node s, node t)
Module::ReturnType callPostprocessing(const Array< edge > &origEdges, RemoveReinsertType rrPost, double percentMostCrossed)
BiconnectedComponent * createBlock() override
VarEdgeInserterUMLCore(PlanRepLight &pr, const EdgeArray< int > *pCostOrig, const EdgeArray< uint32_t > *pEdgeSubgraph)
ExpandedGraph * createExpandedGraph(const BiconnectedComponent &BC, const StaticSPQRTree &T) override
void storeTypeOfCurrentEdge(edge eOrig) override
virtual void buildSubpath(node v, edge eIn, edge eOut, List< adjEntry > &L, ExpandedGraph &Exp, node s, node t) override
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
RemoveReinsertType
The postprocessing method for edge insertion algorithms.
The namespace for all OGDF objects.